generated-configure.sh revision 2749:55bf5464b0e6
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_BUNDLE_LIB_PATH
690FREETYPE_LIBS
691FREETYPE_CFLAGS
692CUPS_CFLAGS
693X_EXTRA_LIBS
694X_LIBS
695X_PRE_LIBS
696X_CFLAGS
697XMKMF
698MSVCP_DLL
699MSVCR_DLL
700LIBCXX
701FIXPATH_DETACH_FLAG
702FIXPATH
703BUILD_GTEST
704ENABLE_AOT
705GCOV_ENABLED
706ZIP_EXTERNAL_DEBUG_SYMBOLS
707COPY_DEBUG_SYMBOLS
708COMPILE_WITH_DEBUG_SYMBOLS
709CFLAGS_WARNINGS_ARE_ERRORS
710BUILD_CC_DISABLE_WARNING_PREFIX
711DISABLE_WARNING_PREFIX
712WARNINGS_AS_ERRORS
713COMPILER_SUPPORTS_TARGET_BITS_FLAG
714LDFLAGS_TESTEXE
715LDFLAGS_TESTLIB
716CXXFLAGS_TESTEXE
717CXXFLAGS_TESTLIB
718CFLAGS_TESTEXE
719CFLAGS_TESTLIB
720OPENJDK_BUILD_JVM_LIBS
721OPENJDK_BUILD_JVM_ASFLAGS
722OPENJDK_BUILD_JVM_LDFLAGS
723OPENJDK_BUILD_JVM_CFLAGS
724OPENJDK_BUILD_LDFLAGS_HASH_STYLE
725OPENJDK_BUILD_LDFLAGS_CXX_JDK
726OPENJDK_BUILD_JDKEXE_LIBS
727OPENJDK_BUILD_JDKLIB_LIBS
728OPENJDK_BUILD_LDFLAGS_JDKEXE
729OPENJDK_BUILD_LDFLAGS_JDKLIB
730OPENJDK_BUILD_CXXFLAGS_JDKEXE
731OPENJDK_BUILD_CXXFLAGS_JDKLIB
732OPENJDK_BUILD_CFLAGS_JDKEXE
733OPENJDK_BUILD_CFLAGS_JDKLIB
734OPENJDK_BUILD_CXXSTD_CXXFLAG
735JVM_LIBS
736JVM_ASFLAGS
737JVM_LDFLAGS
738JVM_CFLAGS
739LDFLAGS_HASH_STYLE
740LDFLAGS_CXX_JDK
741JDKEXE_LIBS
742JDKLIB_LIBS
743LDFLAGS_JDKEXE
744LDFLAGS_JDKLIB
745CXXFLAGS_JDKEXE
746CXXFLAGS_JDKLIB
747CFLAGS_JDKEXE
748CFLAGS_JDKLIB
749MACOSX_VERSION_MIN
750CXXSTD_CXXFLAG
751JDK_ARCH_ABI_PROP_NAME
752CXX_O_FLAG_SIZE
753CXX_O_FLAG_NONE
754CXX_O_FLAG_DEBUG
755CXX_O_FLAG_NORM
756CXX_O_FLAG_HI
757CXX_O_FLAG_HIGHEST
758CXX_O_FLAG_HIGHEST_JVM
759C_O_FLAG_SIZE
760C_O_FLAG_NONE
761C_O_FLAG_DEBUG
762C_O_FLAG_NORM
763C_O_FLAG_HI
764C_O_FLAG_HIGHEST
765C_O_FLAG_HIGHEST_JVM
766JVM_CFLAGS_SYMBOLS
767CXXFLAGS_DEBUG_SYMBOLS
768CFLAGS_DEBUG_SYMBOLS
769CXX_FLAG_DEPS
770C_FLAG_DEPS
771SHARED_LIBRARY_FLAGS
772SET_SHARED_LIBRARY_MAPFILE
773SET_SHARED_LIBRARY_NAME
774SET_SHARED_LIBRARY_ORIGIN
775SET_EXECUTABLE_ORIGIN
776CXX_FLAG_REORDER
777C_FLAG_REORDER
778JVM_RCFLAGS
779RC_FLAGS
780AR_OUT_OPTION
781LD_OUT_OPTION
782EXE_OUT_OPTION
783CC_OUT_OPTION
784STRIPFLAGS
785ARFLAGS
786COMPILER_BINDCMD_FILE_FLAG
787COMPILER_COMMAND_FILE_FLAG
788COMPILER_TARGET_BITS_FLAG
789JIB_JAR
790JT_HOME
791JTREGEXE
792HOTSPOT_TOOLCHAIN_TYPE
793USING_BROKEN_SUSE_LD
794PACKAGE_PATH
795BUILD_AS
796BUILD_LDCXX
797BUILD_LD
798BUILD_STRIP
799BUILD_OBJCOPY
800BUILD_AR
801BUILD_NM
802BUILD_CXX
803BUILD_CC
804BUILD_SYSROOT_LDFLAGS
805BUILD_SYSROOT_CFLAGS
806ac_ct_OBJDUMP
807OBJDUMP
808ac_ct_OBJCOPY
809OBJCOPY
810ac_ct_NM
811ac_ct_STRIP
812GNM
813NM
814STRIP
815MSBUILD
816DUMPBIN
817RC
818MT
819LIPO
820ac_ct_AR
821AR
822AS
823LDCXX
824LD
825CXXCPP
826CPP
827CXX_VERSION_NUMBER
828CC_VERSION_NUMBER
829ac_ct_CXX
830CXXFLAGS
831CXX
832TOOLCHAIN_PATH_CXX
833POTENTIAL_CXX
834OBJEXT
835EXEEXT
836ac_ct_CC
837CPPFLAGS
838LDFLAGS
839CFLAGS
840CC
841TOOLCHAIN_PATH_CC
842POTENTIAL_CC
843TOOLCHAIN_VERSION
844VS_LIB
845VS_INCLUDE
846VS_PATH
847CYGWIN_LINK
848SYSROOT_LDFLAGS
849SYSROOT_CFLAGS
850EXTRA_LDFLAGS
851EXTRA_CXXFLAGS
852EXTRA_CFLAGS
853EXE_SUFFIX
854OBJ_SUFFIX
855STATIC_LIBRARY
856SHARED_LIBRARY
857STATIC_LIBRARY_SUFFIX
858SHARED_LIBRARY_SUFFIX
859LIBRARY_PREFIX
860TOOLCHAIN_TYPE
861STATIC_BUILD
862IMPORT_MODULES_MAKE
863IMPORT_MODULES_SRC
864IMPORT_MODULES_MAN
865IMPORT_MODULES_LEGAL
866IMPORT_MODULES_CONF
867IMPORT_MODULES_LIBS
868IMPORT_MODULES_CMDS
869IMPORT_MODULES_CLASSES
870BUILD_OUTPUT
871JDK_TOPDIR
872NASHORN_TOPDIR
873HOTSPOT_TOPDIR
874JAXWS_TOPDIR
875JAXP_TOPDIR
876CORBA_TOPDIR
877LANGTOOLS_TOPDIR
878EXTERNAL_BUILDJDK
879BUILD_JDK
880CREATE_BUILDJDK
881JLINK
882JMOD
883JAVAC_FLAGS
884BOOT_JDK_MODULAR
885BOOT_JDK_SOURCETARGET
886JARSIGNER
887JAR
888JAVAH
889JAVAC
890JAVA
891BOOT_JDK
892JAVA_CHECK
893JAVAC_CHECK
894VERSION_IS_GA
895VERSION_SHORT
896VERSION_STRING
897VERSION_NUMBER_FOUR_POSITIONS
898VERSION_NUMBER
899VERSION_OPT
900VERSION_BUILD
901VERSION_PRE
902VERSION_PATCH
903VERSION_SECURITY
904VERSION_MINOR
905VERSION_MAJOR
906MACOSX_BUNDLE_ID_BASE
907MACOSX_BUNDLE_NAME_BASE
908HOTSPOT_VM_DISTRO
909COMPANY_NAME
910JDK_RC_PLATFORM_NAME
911PRODUCT_SUFFIX
912PRODUCT_NAME
913LAUNCHER_NAME
914JLINK_KEEP_PACKAGED_MODULES
915COPYRIGHT_YEAR
916COMPRESS_JARS
917INCLUDE_SA
918UNLIMITED_CRYPTO
919CACERTS_FILE
920ENABLE_FULL_DOCS
921ENABLE_HEADLESS_ONLY
922DEFAULT_MAKE_TARGET
923OS_VERSION_MICRO
924OS_VERSION_MINOR
925OS_VERSION_MAJOR
926PKG_CONFIG
927BASH_ARGS
928SETFILE
929CODESIGN
930XATTR
931DSYMUTIL
932IS_GNU_TIME
933PATCH
934DTRACE
935FLOCK
936TIME
937STAT
938HG
939DOT
940READELF
941OTOOL
942LDD
943ZIPEXE
944UNZIP
945TAR_SUPPORTS_TRANSFORM
946TAR_INCLUDE_PARAM
947TAR_CREATE_EXTRA_PARAM
948TAR_TYPE
949FIND_DELETE
950OUTPUT_SYNC
951OUTPUT_SYNC_SUPPORTED
952CHECK_TOOLSDIR_MAKE
953CHECK_TOOLSDIR_GMAKE
954CHECK_MAKE
955CHECK_GMAKE
956MAKE
957PKGHANDLER
958CONFIGURESUPPORT_OUTPUTDIR
959OUTPUT_ROOT
960CONF_NAME
961SPEC
962SDKROOT
963XCODEBUILD
964JVM_VARIANT_MAIN
965VALID_JVM_VARIANTS
966JVM_VARIANTS
967DEBUG_LEVEL
968HOTSPOT_DEBUG_LEVEL
969JDK_VARIANT
970USERNAME
971CANONICAL_TOPDIR
972ORIGINAL_TOPDIR
973TOPDIR
974PATH_SEP
975HOTSPOT_BUILD_CPU_DEFINE
976HOTSPOT_BUILD_CPU_ARCH
977HOTSPOT_BUILD_CPU
978HOTSPOT_BUILD_OS_TYPE
979HOTSPOT_BUILD_OS
980OPENJDK_BUILD_BUNDLE_PLATFORM
981OPENJDK_BUILD_OS_EXPORT_DIR
982OPENJDK_BUILD_CPU_OSARCH
983OPENJDK_BUILD_CPU_ISADIR
984OPENJDK_BUILD_CPU_LEGACY_LIB
985OPENJDK_BUILD_CPU_LEGACY
986HOTSPOT_TARGET_CPU_DEFINE
987HOTSPOT_TARGET_CPU_ARCH
988HOTSPOT_TARGET_CPU
989HOTSPOT_TARGET_OS_TYPE
990HOTSPOT_TARGET_OS
991DEFINE_CROSS_COMPILE_ARCH
992OPENJDK_TARGET_BUNDLE_PLATFORM
993OPENJDK_TARGET_OS_EXPORT_DIR
994OPENJDK_TARGET_CPU_OSARCH
995OPENJDK_TARGET_CPU_ISADIR
996OPENJDK_TARGET_CPU_LEGACY_LIB
997OPENJDK_TARGET_CPU_LEGACY
998RELEASE_FILE_OS_ARCH
999RELEASE_FILE_OS_NAME
1000OPENJDK_MODULE_TARGET_PLATFORM
1001COMPILE_TYPE
1002OPENJDK_TARGET_CPU_ENDIAN
1003OPENJDK_TARGET_CPU_BITS
1004OPENJDK_TARGET_CPU_ARCH
1005OPENJDK_TARGET_CPU
1006OPENJDK_TARGET_OS_ENV
1007OPENJDK_TARGET_OS_TYPE
1008OPENJDK_TARGET_OS
1009OPENJDK_BUILD_CPU_ENDIAN
1010OPENJDK_BUILD_CPU_BITS
1011OPENJDK_BUILD_CPU_ARCH
1012OPENJDK_BUILD_CPU
1013OPENJDK_BUILD_OS_ENV
1014OPENJDK_BUILD_OS_TYPE
1015OPENJDK_BUILD_OS
1016OPENJDK_BUILD_AUTOCONF_NAME
1017OPENJDK_TARGET_AUTOCONF_NAME
1018target_os
1019target_vendor
1020target_cpu
1021target
1022host_os
1023host_vendor
1024host_cpu
1025host
1026build_os
1027build_vendor
1028build_cpu
1029build
1030PANDOC
1031NICE
1032CPIO
1033DF
1034READLINK
1035CYGPATH
1036SED
1037FGREP
1038EGREP
1039GREP
1040AWK
1041XARGS
1042WHICH
1043WC
1044UNIQ
1045UNAME
1046TR
1047TOUCH
1048TEE
1049TAR
1050TAIL
1051SORT
1052SH
1053RMDIR
1054RM
1055PRINTF
1056NAWK
1057MV
1058MKTEMP
1059MKDIR
1060LS
1061LN
1062GZIP
1063GUNZIP
1064HEAD
1065FIND
1066FILE
1067EXPR
1068ECHO
1069DIRNAME
1070DIFF
1071DATE
1072CUT
1073CP
1074COMM
1075CMP
1076CHMOD
1077CAT
1078BASH
1079BASENAME
1080DATE_WHEN_CONFIGURED
1081ORIGINAL_PATH
1082CONFIGURE_COMMAND_LINE
1083target_alias
1084host_alias
1085build_alias
1086LIBS
1087ECHO_T
1088ECHO_N
1089ECHO_C
1090DEFS
1091mandir
1092localedir
1093libdir
1094psdir
1095pdfdir
1096dvidir
1097htmldir
1098infodir
1099docdir
1100oldincludedir
1101includedir
1102localstatedir
1103sharedstatedir
1104sysconfdir
1105datadir
1106datarootdir
1107libexecdir
1108sbindir
1109bindir
1110program_transform_name
1111prefix
1112exec_prefix
1113PACKAGE_URL
1114PACKAGE_BUGREPORT
1115PACKAGE_STRING
1116PACKAGE_VERSION
1117PACKAGE_TARNAME
1118PACKAGE_NAME
1119PATH_SEPARATOR
1120SHELL'
1121ac_subst_files=''
1122ac_user_opts='
1123enable_option_checking
1124with_target_bits
1125enable_openjdk_only
1126with_custom_make_dir
1127with_jdk_variant
1128enable_debug
1129with_debug_level
1130with_jvm_variants
1131with_cpu_port
1132with_devkit
1133with_sys_root
1134with_sysroot
1135with_tools_dir
1136with_toolchain_path
1137with_extra_path
1138with_sdk_name
1139with_conf_name
1140with_output_sync
1141with_default_make_target
1142enable_headless_only
1143enable_full_docs
1144with_cacerts_file
1145enable_unlimited_crypto
1146with_copyright_year
1147enable_keep_packaged_modules
1148with_milestone
1149with_update_version
1150with_user_release_suffix
1151with_build_number
1152with_version_string
1153with_version_pre
1154with_version_opt
1155with_version_build
1156with_version_major
1157with_version_minor
1158with_version_security
1159with_version_patch
1160with_boot_jdk
1161with_build_jdk
1162with_add_source_root
1163with_override_source_root
1164with_adds_and_overrides
1165with_override_langtools
1166with_override_corba
1167with_override_jaxp
1168with_override_jaxws
1169with_override_hotspot
1170with_override_nashorn
1171with_override_jdk
1172with_import_hotspot
1173with_import_modules
1174enable_static_build
1175with_toolchain_type
1176with_extra_cflags
1177with_extra_cxxflags
1178with_extra_ldflags
1179with_toolchain_version
1180with_build_devkit
1181with_jtreg
1182with_jib
1183with_abi_profile
1184enable_warnings_as_errors
1185with_native_debug_symbols
1186enable_debug_symbols
1187enable_zip_debug_info
1188enable_native_coverage
1189enable_dtrace
1190enable_aot
1191enable_hotspot_gtest
1192with_stdc__lib
1193with_msvcr_dll
1194with_msvcp_dll
1195with_x
1196with_cups
1197with_cups_include
1198with_freetype
1199with_freetype_include
1200with_freetype_lib
1201with_freetype_src
1202enable_freetype_bundling
1203with_alsa
1204with_alsa_include
1205with_alsa_lib
1206with_libffi
1207with_libffi_include
1208with_libffi_lib
1209enable_libffi_bundling
1210with_libjpeg
1211with_giflib
1212with_libpng
1213with_zlib
1214with_lcms
1215with_dxsdk
1216with_dxsdk_lib
1217with_dxsdk_include
1218with_jvm_features
1219with_jvm_interpreter
1220enable_jtreg_failure_handler
1221enable_generate_classlist
1222with_num_cores
1223with_memory_size
1224with_jobs
1225with_test_jobs
1226with_boot_jdk_jvmargs
1227with_sjavac_server_java
1228enable_sjavac
1229enable_javac_server
1230enable_icecc
1231enable_precompiled_headers
1232enable_ccache
1233with_ccache_dir
1234'
1235      ac_precious_vars='build_alias
1236host_alias
1237target_alias
1238BASENAME
1239BASH
1240CAT
1241CHMOD
1242CMP
1243COMM
1244CP
1245CUT
1246DATE
1247DIFF
1248DIRNAME
1249ECHO
1250EXPR
1251FILE
1252FIND
1253HEAD
1254GUNZIP
1255GZIP
1256LN
1257LS
1258MKDIR
1259MKTEMP
1260MV
1261NAWK
1262PRINTF
1263RM
1264RMDIR
1265SH
1266SORT
1267TAIL
1268TAR
1269TEE
1270TOUCH
1271TR
1272UNAME
1273UNIQ
1274WC
1275WHICH
1276XARGS
1277AWK
1278GREP
1279EGREP
1280FGREP
1281SED
1282CYGPATH
1283READLINK
1284DF
1285CPIO
1286NICE
1287PANDOC
1288MAKE
1289UNZIP
1290ZIPEXE
1291LDD
1292OTOOL
1293READELF
1294DOT
1295HG
1296STAT
1297TIME
1298FLOCK
1299DTRACE
1300PATCH
1301DSYMUTIL
1302XATTR
1303CODESIGN
1304SETFILE
1305PKG_CONFIG
1306JAVA
1307JAVAC
1308JAVAH
1309JAR
1310JARSIGNER
1311CC
1312CFLAGS
1313LDFLAGS
1314LIBS
1315CPPFLAGS
1316CXX
1317CXXFLAGS
1318CCC
1319CPP
1320CXXCPP
1321AS
1322AR
1323LIPO
1324STRIP
1325NM
1326GNM
1327OBJCOPY
1328OBJDUMP
1329BUILD_CC
1330BUILD_CXX
1331BUILD_NM
1332BUILD_AR
1333BUILD_OBJCOPY
1334BUILD_STRIP
1335JTREGEXE
1336XMKMF
1337FREETYPE_CFLAGS
1338FREETYPE_LIBS
1339ALSA_CFLAGS
1340ALSA_LIBS
1341LIBFFI_CFLAGS
1342LIBFFI_LIBS
1343PNG_CFLAGS
1344PNG_LIBS
1345LCMS_CFLAGS
1346LCMS_LIBS
1347ICECC_CMD
1348ICECC_CREATE_ENV
1349ICECC_WRAPPER
1350CCACHE'
1351
1352
1353# Initialize some variables set by options.
1354ac_init_help=
1355ac_init_version=false
1356ac_unrecognized_opts=
1357ac_unrecognized_sep=
1358# The variables have the same names as the options, with
1359# dashes changed to underlines.
1360cache_file=/dev/null
1361exec_prefix=NONE
1362no_create=
1363no_recursion=
1364prefix=NONE
1365program_prefix=NONE
1366program_suffix=NONE
1367program_transform_name=s,x,x,
1368silent=
1369site=
1370srcdir=
1371verbose=
1372x_includes=NONE
1373x_libraries=NONE
1374
1375# Installation directory options.
1376# These are left unexpanded so users can "make install exec_prefix=/foo"
1377# and all the variables that are supposed to be based on exec_prefix
1378# by default will actually change.
1379# Use braces instead of parens because sh, perl, etc. also accept them.
1380# (The list follows the same order as the GNU Coding Standards.)
1381bindir='${exec_prefix}/bin'
1382sbindir='${exec_prefix}/sbin'
1383libexecdir='${exec_prefix}/libexec'
1384datarootdir='${prefix}/share'
1385datadir='${datarootdir}'
1386sysconfdir='${prefix}/etc'
1387sharedstatedir='${prefix}/com'
1388localstatedir='${prefix}/var'
1389includedir='${prefix}/include'
1390oldincludedir='/usr/include'
1391docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1392infodir='${datarootdir}/info'
1393htmldir='${docdir}'
1394dvidir='${docdir}'
1395pdfdir='${docdir}'
1396psdir='${docdir}'
1397libdir='${exec_prefix}/lib'
1398localedir='${datarootdir}/locale'
1399mandir='${datarootdir}/man'
1400
1401ac_prev=
1402ac_dashdash=
1403for ac_option
1404do
1405  # If the previous option needs an argument, assign it.
1406  if test -n "$ac_prev"; then
1407    eval $ac_prev=\$ac_option
1408    ac_prev=
1409    continue
1410  fi
1411
1412  case $ac_option in
1413  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1414  *=)   ac_optarg= ;;
1415  *)    ac_optarg=yes ;;
1416  esac
1417
1418  # Accept the important Cygnus configure options, so we can diagnose typos.
1419
1420  case $ac_dashdash$ac_option in
1421  --)
1422    ac_dashdash=yes ;;
1423
1424  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1425    ac_prev=bindir ;;
1426  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1427    bindir=$ac_optarg ;;
1428
1429  -build | --build | --buil | --bui | --bu)
1430    ac_prev=build_alias ;;
1431  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1432    build_alias=$ac_optarg ;;
1433
1434  -cache-file | --cache-file | --cache-fil | --cache-fi \
1435  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1436    ac_prev=cache_file ;;
1437  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1438  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1439    cache_file=$ac_optarg ;;
1440
1441  --config-cache | -C)
1442    cache_file=config.cache ;;
1443
1444  -datadir | --datadir | --datadi | --datad)
1445    ac_prev=datadir ;;
1446  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1447    datadir=$ac_optarg ;;
1448
1449  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1450  | --dataroo | --dataro | --datar)
1451    ac_prev=datarootdir ;;
1452  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1453  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1454    datarootdir=$ac_optarg ;;
1455
1456  -disable-* | --disable-*)
1457    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1458    # Reject names that are not valid shell variable names.
1459    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1460      as_fn_error $? "invalid feature name: $ac_useropt"
1461    ac_useropt_orig=$ac_useropt
1462    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1463    case $ac_user_opts in
1464      *"
1465"enable_$ac_useropt"
1466"*) ;;
1467      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1468	 ac_unrecognized_sep=', ';;
1469    esac
1470    eval enable_$ac_useropt=no ;;
1471
1472  -docdir | --docdir | --docdi | --doc | --do)
1473    ac_prev=docdir ;;
1474  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1475    docdir=$ac_optarg ;;
1476
1477  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1478    ac_prev=dvidir ;;
1479  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1480    dvidir=$ac_optarg ;;
1481
1482  -enable-* | --enable-*)
1483    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1484    # Reject names that are not valid shell variable names.
1485    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1486      as_fn_error $? "invalid feature name: $ac_useropt"
1487    ac_useropt_orig=$ac_useropt
1488    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1489    case $ac_user_opts in
1490      *"
1491"enable_$ac_useropt"
1492"*) ;;
1493      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1494	 ac_unrecognized_sep=', ';;
1495    esac
1496    eval enable_$ac_useropt=\$ac_optarg ;;
1497
1498  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1499  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1500  | --exec | --exe | --ex)
1501    ac_prev=exec_prefix ;;
1502  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1503  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1504  | --exec=* | --exe=* | --ex=*)
1505    exec_prefix=$ac_optarg ;;
1506
1507  -gas | --gas | --ga | --g)
1508    # Obsolete; use --with-gas.
1509    with_gas=yes ;;
1510
1511  -help | --help | --hel | --he | -h)
1512    ac_init_help=long ;;
1513  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1514    ac_init_help=recursive ;;
1515  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1516    ac_init_help=short ;;
1517
1518  -host | --host | --hos | --ho)
1519    ac_prev=host_alias ;;
1520  -host=* | --host=* | --hos=* | --ho=*)
1521    host_alias=$ac_optarg ;;
1522
1523  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1524    ac_prev=htmldir ;;
1525  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1526  | --ht=*)
1527    htmldir=$ac_optarg ;;
1528
1529  -includedir | --includedir | --includedi | --included | --include \
1530  | --includ | --inclu | --incl | --inc)
1531    ac_prev=includedir ;;
1532  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1533  | --includ=* | --inclu=* | --incl=* | --inc=*)
1534    includedir=$ac_optarg ;;
1535
1536  -infodir | --infodir | --infodi | --infod | --info | --inf)
1537    ac_prev=infodir ;;
1538  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1539    infodir=$ac_optarg ;;
1540
1541  -libdir | --libdir | --libdi | --libd)
1542    ac_prev=libdir ;;
1543  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1544    libdir=$ac_optarg ;;
1545
1546  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1547  | --libexe | --libex | --libe)
1548    ac_prev=libexecdir ;;
1549  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1550  | --libexe=* | --libex=* | --libe=*)
1551    libexecdir=$ac_optarg ;;
1552
1553  -localedir | --localedir | --localedi | --localed | --locale)
1554    ac_prev=localedir ;;
1555  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1556    localedir=$ac_optarg ;;
1557
1558  -localstatedir | --localstatedir | --localstatedi | --localstated \
1559  | --localstate | --localstat | --localsta | --localst | --locals)
1560    ac_prev=localstatedir ;;
1561  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1562  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1563    localstatedir=$ac_optarg ;;
1564
1565  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1566    ac_prev=mandir ;;
1567  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1568    mandir=$ac_optarg ;;
1569
1570  -nfp | --nfp | --nf)
1571    # Obsolete; use --without-fp.
1572    with_fp=no ;;
1573
1574  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1575  | --no-cr | --no-c | -n)
1576    no_create=yes ;;
1577
1578  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1579  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1580    no_recursion=yes ;;
1581
1582  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1583  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1584  | --oldin | --oldi | --old | --ol | --o)
1585    ac_prev=oldincludedir ;;
1586  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1587  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1588  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1589    oldincludedir=$ac_optarg ;;
1590
1591  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1592    ac_prev=prefix ;;
1593  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1594    prefix=$ac_optarg ;;
1595
1596  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1597  | --program-pre | --program-pr | --program-p)
1598    ac_prev=program_prefix ;;
1599  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1600  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1601    program_prefix=$ac_optarg ;;
1602
1603  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1604  | --program-suf | --program-su | --program-s)
1605    ac_prev=program_suffix ;;
1606  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1607  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1608    program_suffix=$ac_optarg ;;
1609
1610  -program-transform-name | --program-transform-name \
1611  | --program-transform-nam | --program-transform-na \
1612  | --program-transform-n | --program-transform- \
1613  | --program-transform | --program-transfor \
1614  | --program-transfo | --program-transf \
1615  | --program-trans | --program-tran \
1616  | --progr-tra | --program-tr | --program-t)
1617    ac_prev=program_transform_name ;;
1618  -program-transform-name=* | --program-transform-name=* \
1619  | --program-transform-nam=* | --program-transform-na=* \
1620  | --program-transform-n=* | --program-transform-=* \
1621  | --program-transform=* | --program-transfor=* \
1622  | --program-transfo=* | --program-transf=* \
1623  | --program-trans=* | --program-tran=* \
1624  | --progr-tra=* | --program-tr=* | --program-t=*)
1625    program_transform_name=$ac_optarg ;;
1626
1627  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1628    ac_prev=pdfdir ;;
1629  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1630    pdfdir=$ac_optarg ;;
1631
1632  -psdir | --psdir | --psdi | --psd | --ps)
1633    ac_prev=psdir ;;
1634  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1635    psdir=$ac_optarg ;;
1636
1637  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1638  | -silent | --silent | --silen | --sile | --sil)
1639    silent=yes ;;
1640
1641  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1642    ac_prev=sbindir ;;
1643  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1644  | --sbi=* | --sb=*)
1645    sbindir=$ac_optarg ;;
1646
1647  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1648  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1649  | --sharedst | --shareds | --shared | --share | --shar \
1650  | --sha | --sh)
1651    ac_prev=sharedstatedir ;;
1652  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1653  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1654  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1655  | --sha=* | --sh=*)
1656    sharedstatedir=$ac_optarg ;;
1657
1658  -site | --site | --sit)
1659    ac_prev=site ;;
1660  -site=* | --site=* | --sit=*)
1661    site=$ac_optarg ;;
1662
1663  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1664    ac_prev=srcdir ;;
1665  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1666    srcdir=$ac_optarg ;;
1667
1668  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1669  | --syscon | --sysco | --sysc | --sys | --sy)
1670    ac_prev=sysconfdir ;;
1671  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1672  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1673    sysconfdir=$ac_optarg ;;
1674
1675  -target | --target | --targe | --targ | --tar | --ta | --t)
1676    ac_prev=target_alias ;;
1677  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1678    target_alias=$ac_optarg ;;
1679
1680  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1681    verbose=yes ;;
1682
1683  -version | --version | --versio | --versi | --vers | -V)
1684    ac_init_version=: ;;
1685
1686  -with-* | --with-*)
1687    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1688    # Reject names that are not valid shell variable names.
1689    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1690      as_fn_error $? "invalid package name: $ac_useropt"
1691    ac_useropt_orig=$ac_useropt
1692    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1693    case $ac_user_opts in
1694      *"
1695"with_$ac_useropt"
1696"*) ;;
1697      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1698	 ac_unrecognized_sep=', ';;
1699    esac
1700    eval with_$ac_useropt=\$ac_optarg ;;
1701
1702  -without-* | --without-*)
1703    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1704    # Reject names that are not valid shell variable names.
1705    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1706      as_fn_error $? "invalid package name: $ac_useropt"
1707    ac_useropt_orig=$ac_useropt
1708    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1709    case $ac_user_opts in
1710      *"
1711"with_$ac_useropt"
1712"*) ;;
1713      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1714	 ac_unrecognized_sep=', ';;
1715    esac
1716    eval with_$ac_useropt=no ;;
1717
1718  --x)
1719    # Obsolete; use --with-x.
1720    with_x=yes ;;
1721
1722  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1723  | --x-incl | --x-inc | --x-in | --x-i)
1724    ac_prev=x_includes ;;
1725  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1726  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1727    x_includes=$ac_optarg ;;
1728
1729  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1730  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1731    ac_prev=x_libraries ;;
1732  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1733  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1734    x_libraries=$ac_optarg ;;
1735
1736  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1737Try \`$0 --help' for more information"
1738    ;;
1739
1740  *=*)
1741    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1742    # Reject names that are not valid shell variable names.
1743    case $ac_envvar in #(
1744      '' | [0-9]* | *[!_$as_cr_alnum]* )
1745      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1746    esac
1747    eval $ac_envvar=\$ac_optarg
1748    export $ac_envvar ;;
1749
1750  *)
1751    # FIXME: should be removed in autoconf 3.0.
1752    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1753    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1754      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1755    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1756    ;;
1757
1758  esac
1759done
1760
1761if test -n "$ac_prev"; then
1762  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1763  as_fn_error $? "missing argument to $ac_option"
1764fi
1765
1766if test -n "$ac_unrecognized_opts"; then
1767  case $enable_option_checking in
1768    no) ;;
1769    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1770    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1771  esac
1772fi
1773
1774# Check all directory arguments for consistency.
1775for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1776		datadir sysconfdir sharedstatedir localstatedir includedir \
1777		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1778		libdir localedir mandir
1779do
1780  eval ac_val=\$$ac_var
1781  # Remove trailing slashes.
1782  case $ac_val in
1783    */ )
1784      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1785      eval $ac_var=\$ac_val;;
1786  esac
1787  # Be sure to have absolute directory names.
1788  case $ac_val in
1789    [\\/$]* | ?:[\\/]* )  continue;;
1790    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1791  esac
1792  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1793done
1794
1795# There might be people who depend on the old broken behavior: `$host'
1796# used to hold the argument of --host etc.
1797# FIXME: To remove some day.
1798build=$build_alias
1799host=$host_alias
1800target=$target_alias
1801
1802# FIXME: To remove some day.
1803if test "x$host_alias" != x; then
1804  if test "x$build_alias" = x; then
1805    cross_compiling=maybe
1806  elif test "x$build_alias" != "x$host_alias"; then
1807    cross_compiling=yes
1808  fi
1809fi
1810
1811ac_tool_prefix=
1812test -n "$host_alias" && ac_tool_prefix=$host_alias-
1813
1814test "$silent" = yes && exec 6>/dev/null
1815
1816
1817ac_pwd=`pwd` && test -n "$ac_pwd" &&
1818ac_ls_di=`ls -di .` &&
1819ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1820  as_fn_error $? "working directory cannot be determined"
1821test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1822  as_fn_error $? "pwd does not report name of working directory"
1823
1824
1825# Find the source files, if location was not specified.
1826if test -z "$srcdir"; then
1827  ac_srcdir_defaulted=yes
1828  # Try the directory containing this script, then the parent directory.
1829  ac_confdir=`$as_dirname -- "$as_myself" ||
1830$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1831	 X"$as_myself" : 'X\(//\)[^/]' \| \
1832	 X"$as_myself" : 'X\(//\)$' \| \
1833	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1834$as_echo X"$as_myself" |
1835    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1836	    s//\1/
1837	    q
1838	  }
1839	  /^X\(\/\/\)[^/].*/{
1840	    s//\1/
1841	    q
1842	  }
1843	  /^X\(\/\/\)$/{
1844	    s//\1/
1845	    q
1846	  }
1847	  /^X\(\/\).*/{
1848	    s//\1/
1849	    q
1850	  }
1851	  s/.*/./; q'`
1852  srcdir=$ac_confdir
1853  if test ! -r "$srcdir/$ac_unique_file"; then
1854    srcdir=..
1855  fi
1856else
1857  ac_srcdir_defaulted=no
1858fi
1859if test ! -r "$srcdir/$ac_unique_file"; then
1860  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1861  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1862fi
1863ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1864ac_abs_confdir=`(
1865	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1866	pwd)`
1867# When building in place, set srcdir=.
1868if test "$ac_abs_confdir" = "$ac_pwd"; then
1869  srcdir=.
1870fi
1871# Remove unnecessary trailing slashes from srcdir.
1872# Double slashes in file names in object file debugging info
1873# mess up M-x gdb in Emacs.
1874case $srcdir in
1875*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1876esac
1877for ac_var in $ac_precious_vars; do
1878  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1879  eval ac_env_${ac_var}_value=\$${ac_var}
1880  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1881  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1882done
1883
1884#
1885# Report the --help message.
1886#
1887if test "$ac_init_help" = "long"; then
1888  # Omit some internal or obsolete options to make the list less imposing.
1889  # This message is too long to be a string in the A/UX 3.1 sh.
1890  cat <<_ACEOF
1891\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1892
1893Usage: $0 [OPTION]... [VAR=VALUE]...
1894
1895To assign environment variables (e.g., CC, CFLAGS...), specify them as
1896VAR=VALUE.  See below for descriptions of some of the useful variables.
1897
1898Defaults for the options are specified in brackets.
1899
1900Configuration:
1901  -h, --help              display this help and exit
1902      --help=short        display options specific to this package
1903      --help=recursive    display the short help of all the included packages
1904  -V, --version           display version information and exit
1905  -q, --quiet, --silent   do not print \`checking ...' messages
1906      --cache-file=FILE   cache test results in FILE [disabled]
1907  -C, --config-cache      alias for \`--cache-file=config.cache'
1908  -n, --no-create         do not create output files
1909      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1910
1911Installation directories:
1912  --prefix=PREFIX         install architecture-independent files in PREFIX
1913                          [$ac_default_prefix]
1914  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1915                          [PREFIX]
1916
1917By default, \`make install' will install all the files in
1918\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1919an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1920for instance \`--prefix=\$HOME'.
1921
1922For better control, use the options below.
1923
1924Fine tuning of the installation directories:
1925  --bindir=DIR            user executables [EPREFIX/bin]
1926  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1927  --libexecdir=DIR        program executables [EPREFIX/libexec]
1928  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1929  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1930  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1931  --libdir=DIR            object code libraries [EPREFIX/lib]
1932  --includedir=DIR        C header files [PREFIX/include]
1933  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1934  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1935  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1936  --infodir=DIR           info documentation [DATAROOTDIR/info]
1937  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1938  --mandir=DIR            man documentation [DATAROOTDIR/man]
1939  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1940  --htmldir=DIR           html documentation [DOCDIR]
1941  --dvidir=DIR            dvi documentation [DOCDIR]
1942  --pdfdir=DIR            pdf documentation [DOCDIR]
1943  --psdir=DIR             ps documentation [DOCDIR]
1944_ACEOF
1945
1946  cat <<\_ACEOF
1947
1948X features:
1949  --x-includes=DIR    X include files are in DIR
1950  --x-libraries=DIR   X library files are in DIR
1951
1952System types:
1953  --build=BUILD     configure for building on BUILD [guessed]
1954  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1955  --target=TARGET   configure for building compilers for TARGET [HOST]
1956_ACEOF
1957fi
1958
1959if test -n "$ac_init_help"; then
1960  case $ac_init_help in
1961     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1962   esac
1963  cat <<\_ACEOF
1964
1965Optional Features:
1966  --disable-option-checking  ignore unrecognized --enable/--with options
1967  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1968  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1969  --enable-openjdk-only   suppress building custom source even if present
1970                          [disabled]
1971  --enable-debug          set the debug level to fastdebug (shorthand for
1972                          --with-debug-level=fastdebug) [disabled]
1973  --enable-headless-only  only build headless (no GUI) support [disabled]
1974  --enable-full-docs      build complete documentation [enabled if all tools
1975                          found]
1976  --disable-unlimited-crypto
1977                          Disable unlimited crypto policy [enabled]
1978  --disable-keep-packaged-modules
1979                          Do not keep packaged modules in jdk image [enable]
1980  --enable-static-build   enable static library build [disabled]
1981  --disable-warnings-as-errors
1982                          do not consider native warnings to be an error
1983                          [enabled]
1984  --enable-debug-symbols  Deprecated. Option is kept for backwards
1985                          compatibility and is ignored
1986  --enable-zip-debug-info Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --enable-native-coverage
1989                          enable native compilation with code coverage
1990                          data[disabled]
1991  --enable-dtrace[=yes/no/auto]
1992                          enable dtrace. Default is auto, where dtrace is
1993                          enabled if all dependencies are present.
1994  --enable-aot[=yes/no/auto]
1995                          enable ahead of time compilation feature. Default is
1996                          auto, where aot is enabled if all dependencies are
1997                          present.
1998  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1999  --disable-freetype-bundling
2000                          disable bundling of the freetype library with the
2001                          build result [enabled on Windows or when using
2002                          --with-freetype, disabled otherwise]
2003  --enable-libffi-bundling
2004                          enable bundling of libffi.so to make the built JDK
2005                          runnable on more systems
2006  --enable-jtreg-failure-handler
2007                          forces build of the jtreg failure handler to be
2008                          enabled, missing dependencies become fatal errors.
2009                          Default is auto, where the failure handler is built
2010                          if all dependencies are present and otherwise just
2011                          disabled.
2012  --disable-generate-classlist
2013                          forces enabling or disabling of the generation of a
2014                          CDS classlist at build time. Default is to generate
2015                          it when either the server or client JVMs are built.
2016  --enable-sjavac         use sjavac to do fast incremental compiles
2017                          [disabled]
2018  --disable-javac-server  disable javac server [enabled]
2019  --enable-icecc          enable distribted compilation of native code using
2020                          icecc/icecream [disabled]
2021  --disable-precompiled-headers
2022                          disable using precompiled headers when compiling C++
2023                          [enabled]
2024  --enable-ccache         enable using ccache to speed up recompilations
2025                          [disabled]
2026
2027Optional Packages:
2028  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2029  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2030  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2031                          support it), e.g. --with-target-bits=32 [guessed]
2032  --with-custom-make-dir  Deprecated. Option is kept for backwards
2033                          compatibility and is ignored
2034  --with-jdk-variant      JDK variant to build (normal) [normal]
2035  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2036                          optimized) [release]
2037  --with-jvm-variants     JVM variants (separated by commas) to build
2038                          (server,client,minimal,core,zero,zeroshark,custom)
2039                          [server]
2040  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2041                          (arm64,aarch64) [aarch64]
2042  --with-devkit           use this devkit for compilers, tools and resources
2043  --with-sys-root         alias for --with-sysroot for backwards compatability
2044  --with-sysroot          use this directory as sysroot
2045  --with-tools-dir        alias for --with-toolchain-path for backwards
2046                          compatibility
2047  --with-toolchain-path   prepend these directories when searching for
2048                          toolchain binaries (compilers etc)
2049  --with-extra-path       prepend these directories to the default path
2050  --with-sdk-name         use the platform SDK of the given name. [macosx]
2051  --with-conf-name        use this as the name of the configuration [generated
2052                          from important configuration options]
2053  --with-output-sync      set make output sync type if supported by make.
2054                          [recurse]
2055  --with-default-make-target
2056                          set the default make target [exploded-image]
2057  --with-cacerts-file     specify alternative cacerts file
2058  --with-copyright-year   Set copyright year value for build [current year]
2059  --with-milestone        Deprecated. Option is kept for backwards
2060                          compatibility and is ignored
2061  --with-update-version   Deprecated. Option is kept for backwards
2062                          compatibility and is ignored
2063  --with-user-release-suffix
2064                          Deprecated. Option is kept for backwards
2065                          compatibility and is ignored
2066  --with-build-number     Deprecated. Option is kept for backwards
2067                          compatibility and is ignored
2068  --with-version-string   Set version string [calculated]
2069  --with-version-pre      Set the base part of the version 'PRE' field
2070                          (pre-release identifier) ['internal']
2071  --with-version-opt      Set version 'OPT' field (build metadata)
2072                          [<timestamp>.<user>.<dirname>]
2073  --with-version-build    Set version 'BUILD' field (build number) [not
2074                          specified]
2075  --with-version-major    Set version 'MAJOR' field (first number) [current
2076                          source value]
2077  --with-version-minor    Set version 'MINOR' field (second number) [current
2078                          source value]
2079  --with-version-security Set version 'SECURITY' field (third number) [current
2080                          source value]
2081  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2082                          specified]
2083  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2084  --with-build-jdk        path to JDK of same version as is being built[the
2085                          newly built JDK]
2086  --with-add-source-root  Deprecated. Option is kept for backwards
2087                          compatibility and is ignored
2088  --with-override-source-root
2089                          Deprecated. Option is kept for backwards
2090                          compatibility and is ignored
2091  --with-adds-and-overrides
2092                          Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-override-langtools
2095                          Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-corba   Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-jaxp    Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-jaxws   Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-hotspot Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-override-nashorn Deprecated. Option is kept for backwards
2106                          compatibility and is ignored
2107  --with-override-jdk     Deprecated. Option is kept for backwards
2108                          compatibility and is ignored
2109  --with-import_hotspot   Deprecated. Option is kept for backwards
2110                          compatibility and is ignored
2111  --with-import-modules   import a set of prebuilt modules either as a zip
2112                          file or an exploded directory
2113  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2114                          to show possible values [platform dependent]
2115  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2116  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2117  --with-extra-ldflags    extra flags to be used when linking jdk
2118  --with-toolchain-version
2119                          the version of the toolchain to look for, use
2120                          '--help' to show possible values [platform
2121                          dependent]
2122  --with-build-devkit     Devkit to use for the build platform toolchain
2123  --with-jtreg            Regression Test Harness [probed]
2124  --with-jib              Jib dependency management tool [not used]
2125  --with-abi-profile      specify ABI profile for ARM builds
2126                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2127                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2128                          [toolchain dependent]
2129  --with-native-debug-symbols
2130                          set the native debug symbol configuration (none,
2131                          internal, external, zipped) [varying]
2132  --with-stdc++lib=<static>,<dynamic>,<default>
2133                          force linking of the C++ runtime on Linux to either
2134                          static or dynamic, default is static with dynamic as
2135                          fallback
2136  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2137                          (Windows only) [probed]
2138  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2139                          (Windows only) [probed]
2140  --with-x                use the X Window System
2141  --with-cups             specify prefix directory for the cups package
2142                          (expecting the headers under PATH/include)
2143  --with-cups-include     specify directory for the cups include files
2144  --with-freetype         specify prefix directory for the freetype package
2145                          (expecting the libraries under PATH/lib and the
2146                          headers under PATH/include)
2147  --with-freetype-include specify directory for the freetype include files
2148  --with-freetype-lib     specify directory for the freetype library
2149  --with-freetype-src     specify directory with freetype sources to
2150                          automatically build the library (experimental,
2151                          Windows-only)
2152  --with-alsa             specify prefix directory for the alsa package
2153                          (expecting the libraries under PATH/lib and the
2154                          headers under PATH/include)
2155  --with-alsa-include     specify directory for the alsa include files
2156  --with-alsa-lib         specify directory for the alsa library
2157  --with-libffi           specify prefix directory for the libffi package
2158                          (expecting the libraries under PATH/lib and the
2159                          headers under PATH/include)
2160  --with-libffi-include   specify directory for the libffi include files
2161  --with-libffi-lib       specify directory for the libffi library
2162  --with-libjpeg          use libjpeg from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-giflib           use giflib from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-libpng           use libpng from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-zlib             use zlib from build system or OpenJDK source
2169                          (system, bundled) [bundled]
2170  --with-lcms             use lcms2 from build system or OpenJDK source
2171                          (system, bundled) [bundled]
2172  --with-dxsdk            Deprecated. Option is kept for backwards
2173                          compatibility and is ignored
2174  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2175                          compatibility and is ignored
2176  --with-dxsdk-include    Deprecated. Option is kept for backwards
2177                          compatibility and is ignored
2178  --with-jvm-features     additional JVM features to enable (separated by
2179                          comma), use '--help' to show possible values [none]
2180  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2181                          compatibility and is ignored
2182  --with-num-cores        number of cores in the build system, e.g.
2183                          --with-num-cores=8 [probed]
2184  --with-memory-size      memory (in MB) available in the build system, e.g.
2185                          --with-memory-size=1024 [probed]
2186  --with-jobs             number of parallel jobs to let make run [calculated
2187                          based on cores and memory]
2188  --with-test-jobs        number of parallel tests jobs to run [based on build
2189                          jobs]
2190  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2191                          invocations of boot JDK, overriding the default
2192                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2193                          -enableassertions"
2194  --with-sjavac-server-java
2195                          use this java binary for running the sjavac
2196                          background server [Boot JDK java]
2197  --with-ccache-dir       where to store ccache files [~/.ccache]
2198
2199Some influential environment variables:
2200  BASENAME    Override default value for BASENAME
2201  BASH        Override default value for BASH
2202  CAT         Override default value for CAT
2203  CHMOD       Override default value for CHMOD
2204  CMP         Override default value for CMP
2205  COMM        Override default value for COMM
2206  CP          Override default value for CP
2207  CUT         Override default value for CUT
2208  DATE        Override default value for DATE
2209  DIFF        Override default value for DIFF
2210  DIRNAME     Override default value for DIRNAME
2211  ECHO        Override default value for ECHO
2212  EXPR        Override default value for EXPR
2213  FILE        Override default value for FILE
2214  FIND        Override default value for FIND
2215  HEAD        Override default value for HEAD
2216  GUNZIP      Override default value for GUNZIP
2217  GZIP        Override default value for GZIP
2218  LN          Override default value for LN
2219  LS          Override default value for LS
2220  MKDIR       Override default value for MKDIR
2221  MKTEMP      Override default value for MKTEMP
2222  MV          Override default value for MV
2223  NAWK        Override default value for NAWK
2224  PRINTF      Override default value for PRINTF
2225  RM          Override default value for RM
2226  RMDIR       Override default value for RMDIR
2227  SH          Override default value for SH
2228  SORT        Override default value for SORT
2229  TAIL        Override default value for TAIL
2230  TAR         Override default value for TAR
2231  TEE         Override default value for TEE
2232  TOUCH       Override default value for TOUCH
2233  TR          Override default value for TR
2234  UNAME       Override default value for UNAME
2235  UNIQ        Override default value for UNIQ
2236  WC          Override default value for WC
2237  WHICH       Override default value for WHICH
2238  XARGS       Override default value for XARGS
2239  AWK         Override default value for AWK
2240  GREP        Override default value for GREP
2241  EGREP       Override default value for EGREP
2242  FGREP       Override default value for FGREP
2243  SED         Override default value for SED
2244  CYGPATH     Override default value for CYGPATH
2245  READLINK    Override default value for READLINK
2246  DF          Override default value for DF
2247  CPIO        Override default value for CPIO
2248  NICE        Override default value for NICE
2249  PANDOC      Override default value for PANDOC
2250  MAKE        Override default value for MAKE
2251  UNZIP       Override default value for UNZIP
2252  ZIPEXE      Override default value for ZIPEXE
2253  LDD         Override default value for LDD
2254  OTOOL       Override default value for OTOOL
2255  READELF     Override default value for READELF
2256  DOT         Override default value for DOT
2257  HG          Override default value for HG
2258  STAT        Override default value for STAT
2259  TIME        Override default value for TIME
2260  FLOCK       Override default value for FLOCK
2261  DTRACE      Override default value for DTRACE
2262  PATCH       Override default value for PATCH
2263  DSYMUTIL    Override default value for DSYMUTIL
2264  XATTR       Override default value for XATTR
2265  CODESIGN    Override default value for CODESIGN
2266  SETFILE     Override default value for SETFILE
2267  PKG_CONFIG  path to pkg-config utility
2268  JAVA        Override default value for JAVA
2269  JAVAC       Override default value for JAVAC
2270  JAVAH       Override default value for JAVAH
2271  JAR         Override default value for JAR
2272  JARSIGNER   Override default value for JARSIGNER
2273  CC          C compiler command
2274  CFLAGS      C compiler flags
2275  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2276              nonstandard directory <lib dir>
2277  LIBS        libraries to pass to the linker, e.g. -l<library>
2278  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2279              you have headers in a nonstandard directory <include dir>
2280  CXX         C++ compiler command
2281  CXXFLAGS    C++ compiler flags
2282  CPP         C preprocessor
2283  CXXCPP      C++ preprocessor
2284  AS          Override default value for AS
2285  AR          Override default value for AR
2286  LIPO        Override default value for LIPO
2287  STRIP       Override default value for STRIP
2288  NM          Override default value for NM
2289  GNM         Override default value for GNM
2290  OBJCOPY     Override default value for OBJCOPY
2291  OBJDUMP     Override default value for OBJDUMP
2292  BUILD_CC    Override default value for BUILD_CC
2293  BUILD_CXX   Override default value for BUILD_CXX
2294  BUILD_NM    Override default value for BUILD_NM
2295  BUILD_AR    Override default value for BUILD_AR
2296  BUILD_OBJCOPY
2297              Override default value for BUILD_OBJCOPY
2298  BUILD_STRIP Override default value for BUILD_STRIP
2299  JTREGEXE    Override default value for JTREGEXE
2300  XMKMF       Path to xmkmf, Makefile generator for X Window System
2301  FREETYPE_CFLAGS
2302              C compiler flags for FREETYPE, overriding pkg-config
2303  FREETYPE_LIBS
2304              linker flags for FREETYPE, overriding pkg-config
2305  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2306  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2307  LIBFFI_CFLAGS
2308              C compiler flags for LIBFFI, overriding pkg-config
2309  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2310  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2311  PNG_LIBS    linker flags for PNG, overriding pkg-config
2312  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2313  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2314  ICECC_CMD   Override default value for ICECC_CMD
2315  ICECC_CREATE_ENV
2316              Override default value for ICECC_CREATE_ENV
2317  ICECC_WRAPPER
2318              Override default value for ICECC_WRAPPER
2319  CCACHE      Override default value for CCACHE
2320
2321Use these variables to override the choices made by `configure' or to help
2322it to find libraries and programs with nonstandard names/locations.
2323
2324Report bugs to <build-dev@openjdk.java.net>.
2325OpenJDK home page: <http://openjdk.java.net>.
2326_ACEOF
2327ac_status=$?
2328fi
2329
2330if test "$ac_init_help" = "recursive"; then
2331  # If there are subdirs, report their specific --help.
2332  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2333    test -d "$ac_dir" ||
2334      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2335      continue
2336    ac_builddir=.
2337
2338case "$ac_dir" in
2339.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2340*)
2341  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2342  # A ".." for each directory in $ac_dir_suffix.
2343  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2344  case $ac_top_builddir_sub in
2345  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2346  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2347  esac ;;
2348esac
2349ac_abs_top_builddir=$ac_pwd
2350ac_abs_builddir=$ac_pwd$ac_dir_suffix
2351# for backward compatibility:
2352ac_top_builddir=$ac_top_build_prefix
2353
2354case $srcdir in
2355  .)  # We are building in place.
2356    ac_srcdir=.
2357    ac_top_srcdir=$ac_top_builddir_sub
2358    ac_abs_top_srcdir=$ac_pwd ;;
2359  [\\/]* | ?:[\\/]* )  # Absolute name.
2360    ac_srcdir=$srcdir$ac_dir_suffix;
2361    ac_top_srcdir=$srcdir
2362    ac_abs_top_srcdir=$srcdir ;;
2363  *) # Relative name.
2364    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2365    ac_top_srcdir=$ac_top_build_prefix$srcdir
2366    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2367esac
2368ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2369
2370    cd "$ac_dir" || { ac_status=$?; continue; }
2371    # Check for guested configure.
2372    if test -f "$ac_srcdir/configure.gnu"; then
2373      echo &&
2374      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2375    elif test -f "$ac_srcdir/configure"; then
2376      echo &&
2377      $SHELL "$ac_srcdir/configure" --help=recursive
2378    else
2379      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2380    fi || ac_status=$?
2381    cd "$ac_pwd" || { ac_status=$?; break; }
2382  done
2383fi
2384
2385test -n "$ac_init_help" && exit $ac_status
2386if $ac_init_version; then
2387  cat <<\_ACEOF
2388OpenJDK configure jdk9
2389generated by GNU Autoconf 2.69
2390
2391Copyright (C) 2012 Free Software Foundation, Inc.
2392This configure script is free software; the Free Software Foundation
2393gives unlimited permission to copy, distribute and modify it.
2394_ACEOF
2395  exit
2396fi
2397
2398## ------------------------ ##
2399## Autoconf initialization. ##
2400## ------------------------ ##
2401
2402# ac_fn_c_try_compile LINENO
2403# --------------------------
2404# Try to compile conftest.$ac_ext, and return whether this succeeded.
2405ac_fn_c_try_compile ()
2406{
2407  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2408  rm -f conftest.$ac_objext
2409  if { { ac_try="$ac_compile"
2410case "(($ac_try" in
2411  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2412  *) ac_try_echo=$ac_try;;
2413esac
2414eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2415$as_echo "$ac_try_echo"; } >&5
2416  (eval "$ac_compile") 2>conftest.err
2417  ac_status=$?
2418  if test -s conftest.err; then
2419    grep -v '^ *+' conftest.err >conftest.er1
2420    cat conftest.er1 >&5
2421    mv -f conftest.er1 conftest.err
2422  fi
2423  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2424  test $ac_status = 0; } && {
2425	 test -z "$ac_c_werror_flag" ||
2426	 test ! -s conftest.err
2427       } && test -s conftest.$ac_objext; then :
2428  ac_retval=0
2429else
2430  $as_echo "$as_me: failed program was:" >&5
2431sed 's/^/| /' conftest.$ac_ext >&5
2432
2433	ac_retval=1
2434fi
2435  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2436  as_fn_set_status $ac_retval
2437
2438} # ac_fn_c_try_compile
2439
2440# ac_fn_cxx_try_compile LINENO
2441# ----------------------------
2442# Try to compile conftest.$ac_ext, and return whether this succeeded.
2443ac_fn_cxx_try_compile ()
2444{
2445  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2446  rm -f conftest.$ac_objext
2447  if { { ac_try="$ac_compile"
2448case "(($ac_try" in
2449  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2450  *) ac_try_echo=$ac_try;;
2451esac
2452eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2453$as_echo "$ac_try_echo"; } >&5
2454  (eval "$ac_compile") 2>conftest.err
2455  ac_status=$?
2456  if test -s conftest.err; then
2457    grep -v '^ *+' conftest.err >conftest.er1
2458    cat conftest.er1 >&5
2459    mv -f conftest.er1 conftest.err
2460  fi
2461  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2462  test $ac_status = 0; } && {
2463	 test -z "$ac_cxx_werror_flag" ||
2464	 test ! -s conftest.err
2465       } && test -s conftest.$ac_objext; then :
2466  ac_retval=0
2467else
2468  $as_echo "$as_me: failed program was:" >&5
2469sed 's/^/| /' conftest.$ac_ext >&5
2470
2471	ac_retval=1
2472fi
2473  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2474  as_fn_set_status $ac_retval
2475
2476} # ac_fn_cxx_try_compile
2477
2478# ac_fn_c_try_cpp LINENO
2479# ----------------------
2480# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2481ac_fn_c_try_cpp ()
2482{
2483  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2484  if { { ac_try="$ac_cpp conftest.$ac_ext"
2485case "(($ac_try" in
2486  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2487  *) ac_try_echo=$ac_try;;
2488esac
2489eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2490$as_echo "$ac_try_echo"; } >&5
2491  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2492  ac_status=$?
2493  if test -s conftest.err; then
2494    grep -v '^ *+' conftest.err >conftest.er1
2495    cat conftest.er1 >&5
2496    mv -f conftest.er1 conftest.err
2497  fi
2498  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2499  test $ac_status = 0; } > conftest.i && {
2500	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2501	 test ! -s conftest.err
2502       }; then :
2503  ac_retval=0
2504else
2505  $as_echo "$as_me: failed program was:" >&5
2506sed 's/^/| /' conftest.$ac_ext >&5
2507
2508    ac_retval=1
2509fi
2510  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2511  as_fn_set_status $ac_retval
2512
2513} # ac_fn_c_try_cpp
2514
2515# ac_fn_cxx_try_cpp LINENO
2516# ------------------------
2517# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2518ac_fn_cxx_try_cpp ()
2519{
2520  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2521  if { { ac_try="$ac_cpp conftest.$ac_ext"
2522case "(($ac_try" in
2523  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2524  *) ac_try_echo=$ac_try;;
2525esac
2526eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2527$as_echo "$ac_try_echo"; } >&5
2528  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2529  ac_status=$?
2530  if test -s conftest.err; then
2531    grep -v '^ *+' conftest.err >conftest.er1
2532    cat conftest.er1 >&5
2533    mv -f conftest.er1 conftest.err
2534  fi
2535  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2536  test $ac_status = 0; } > conftest.i && {
2537	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2538	 test ! -s conftest.err
2539       }; then :
2540  ac_retval=0
2541else
2542  $as_echo "$as_me: failed program was:" >&5
2543sed 's/^/| /' conftest.$ac_ext >&5
2544
2545    ac_retval=1
2546fi
2547  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2548  as_fn_set_status $ac_retval
2549
2550} # ac_fn_cxx_try_cpp
2551
2552# ac_fn_c_try_link LINENO
2553# -----------------------
2554# Try to link conftest.$ac_ext, and return whether this succeeded.
2555ac_fn_c_try_link ()
2556{
2557  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2558  rm -f conftest.$ac_objext conftest$ac_exeext
2559  if { { ac_try="$ac_link"
2560case "(($ac_try" in
2561  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2562  *) ac_try_echo=$ac_try;;
2563esac
2564eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2565$as_echo "$ac_try_echo"; } >&5
2566  (eval "$ac_link") 2>conftest.err
2567  ac_status=$?
2568  if test -s conftest.err; then
2569    grep -v '^ *+' conftest.err >conftest.er1
2570    cat conftest.er1 >&5
2571    mv -f conftest.er1 conftest.err
2572  fi
2573  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2574  test $ac_status = 0; } && {
2575	 test -z "$ac_c_werror_flag" ||
2576	 test ! -s conftest.err
2577       } && test -s conftest$ac_exeext && {
2578	 test "$cross_compiling" = yes ||
2579	 test -x conftest$ac_exeext
2580       }; then :
2581  ac_retval=0
2582else
2583  $as_echo "$as_me: failed program was:" >&5
2584sed 's/^/| /' conftest.$ac_ext >&5
2585
2586	ac_retval=1
2587fi
2588  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2589  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2590  # interfere with the next link command; also delete a directory that is
2591  # left behind by Apple's compiler.  We do this before executing the actions.
2592  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2593  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2594  as_fn_set_status $ac_retval
2595
2596} # ac_fn_c_try_link
2597
2598# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2599# ---------------------------------------------------------
2600# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2601# the include files in INCLUDES and setting the cache variable VAR
2602# accordingly.
2603ac_fn_cxx_check_header_mongrel ()
2604{
2605  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2606  if eval \${$3+:} false; then :
2607  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2608$as_echo_n "checking for $2... " >&6; }
2609if eval \${$3+:} false; then :
2610  $as_echo_n "(cached) " >&6
2611fi
2612eval ac_res=\$$3
2613	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2614$as_echo "$ac_res" >&6; }
2615else
2616  # Is the header compilable?
2617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2618$as_echo_n "checking $2 usability... " >&6; }
2619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2620/* end confdefs.h.  */
2621$4
2622#include <$2>
2623_ACEOF
2624if ac_fn_cxx_try_compile "$LINENO"; then :
2625  ac_header_compiler=yes
2626else
2627  ac_header_compiler=no
2628fi
2629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2631$as_echo "$ac_header_compiler" >&6; }
2632
2633# Is the header present?
2634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2635$as_echo_n "checking $2 presence... " >&6; }
2636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2637/* end confdefs.h.  */
2638#include <$2>
2639_ACEOF
2640if ac_fn_cxx_try_cpp "$LINENO"; then :
2641  ac_header_preproc=yes
2642else
2643  ac_header_preproc=no
2644fi
2645rm -f conftest.err conftest.i conftest.$ac_ext
2646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2647$as_echo "$ac_header_preproc" >&6; }
2648
2649# So?  What about this header?
2650case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2651  yes:no: )
2652    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2653$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2654    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2655$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2656    ;;
2657  no:yes:* )
2658    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2659$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2660    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2661$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2662    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2663$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2664    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2665$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2666    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2667$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2668( $as_echo "## ----------------------------------------- ##
2669## Report this to build-dev@openjdk.java.net ##
2670## ----------------------------------------- ##"
2671     ) | sed "s/^/$as_me: WARNING:     /" >&2
2672    ;;
2673esac
2674  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2675$as_echo_n "checking for $2... " >&6; }
2676if eval \${$3+:} false; then :
2677  $as_echo_n "(cached) " >&6
2678else
2679  eval "$3=\$ac_header_compiler"
2680fi
2681eval ac_res=\$$3
2682	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2683$as_echo "$ac_res" >&6; }
2684fi
2685  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2686
2687} # ac_fn_cxx_check_header_mongrel
2688
2689# ac_fn_cxx_try_run LINENO
2690# ------------------------
2691# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2692# that executables *can* be run.
2693ac_fn_cxx_try_run ()
2694{
2695  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2696  if { { ac_try="$ac_link"
2697case "(($ac_try" in
2698  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2699  *) ac_try_echo=$ac_try;;
2700esac
2701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2702$as_echo "$ac_try_echo"; } >&5
2703  (eval "$ac_link") 2>&5
2704  ac_status=$?
2705  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2706  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2707  { { case "(($ac_try" in
2708  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2709  *) ac_try_echo=$ac_try;;
2710esac
2711eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2712$as_echo "$ac_try_echo"; } >&5
2713  (eval "$ac_try") 2>&5
2714  ac_status=$?
2715  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2716  test $ac_status = 0; }; }; then :
2717  ac_retval=0
2718else
2719  $as_echo "$as_me: program exited with status $ac_status" >&5
2720       $as_echo "$as_me: failed program was:" >&5
2721sed 's/^/| /' conftest.$ac_ext >&5
2722
2723       ac_retval=$ac_status
2724fi
2725  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2726  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2727  as_fn_set_status $ac_retval
2728
2729} # ac_fn_cxx_try_run
2730
2731# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2732# ---------------------------------------------------------
2733# Tests whether HEADER exists and can be compiled using the include files in
2734# INCLUDES, setting the cache variable VAR accordingly.
2735ac_fn_cxx_check_header_compile ()
2736{
2737  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2738  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2739$as_echo_n "checking for $2... " >&6; }
2740if eval \${$3+:} false; then :
2741  $as_echo_n "(cached) " >&6
2742else
2743  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2744/* end confdefs.h.  */
2745$4
2746#include <$2>
2747_ACEOF
2748if ac_fn_cxx_try_compile "$LINENO"; then :
2749  eval "$3=yes"
2750else
2751  eval "$3=no"
2752fi
2753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2754fi
2755eval ac_res=\$$3
2756	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2757$as_echo "$ac_res" >&6; }
2758  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2759
2760} # ac_fn_cxx_check_header_compile
2761
2762# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2763# ----------------------------------------------
2764# Tries to find the compile-time value of EXPR in a program that includes
2765# INCLUDES, setting VAR accordingly. Returns whether the value could be
2766# computed
2767ac_fn_cxx_compute_int ()
2768{
2769  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2770  if test "$cross_compiling" = yes; then
2771    # Depending upon the size, compute the lo and hi bounds.
2772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2773/* end confdefs.h.  */
2774$4
2775int
2776main ()
2777{
2778static int test_array [1 - 2 * !(($2) >= 0)];
2779test_array [0] = 0;
2780return test_array [0];
2781
2782  ;
2783  return 0;
2784}
2785_ACEOF
2786if ac_fn_cxx_try_compile "$LINENO"; then :
2787  ac_lo=0 ac_mid=0
2788  while :; do
2789    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2790/* end confdefs.h.  */
2791$4
2792int
2793main ()
2794{
2795static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2796test_array [0] = 0;
2797return test_array [0];
2798
2799  ;
2800  return 0;
2801}
2802_ACEOF
2803if ac_fn_cxx_try_compile "$LINENO"; then :
2804  ac_hi=$ac_mid; break
2805else
2806  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2807			if test $ac_lo -le $ac_mid; then
2808			  ac_lo= ac_hi=
2809			  break
2810			fi
2811			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2812fi
2813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2814  done
2815else
2816  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2817/* end confdefs.h.  */
2818$4
2819int
2820main ()
2821{
2822static int test_array [1 - 2 * !(($2) < 0)];
2823test_array [0] = 0;
2824return test_array [0];
2825
2826  ;
2827  return 0;
2828}
2829_ACEOF
2830if ac_fn_cxx_try_compile "$LINENO"; then :
2831  ac_hi=-1 ac_mid=-1
2832  while :; do
2833    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2834/* end confdefs.h.  */
2835$4
2836int
2837main ()
2838{
2839static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2840test_array [0] = 0;
2841return test_array [0];
2842
2843  ;
2844  return 0;
2845}
2846_ACEOF
2847if ac_fn_cxx_try_compile "$LINENO"; then :
2848  ac_lo=$ac_mid; break
2849else
2850  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2851			if test $ac_mid -le $ac_hi; then
2852			  ac_lo= ac_hi=
2853			  break
2854			fi
2855			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2856fi
2857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2858  done
2859else
2860  ac_lo= ac_hi=
2861fi
2862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2863fi
2864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2865# Binary search between lo and hi bounds.
2866while test "x$ac_lo" != "x$ac_hi"; do
2867  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2868  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2869/* end confdefs.h.  */
2870$4
2871int
2872main ()
2873{
2874static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2875test_array [0] = 0;
2876return test_array [0];
2877
2878  ;
2879  return 0;
2880}
2881_ACEOF
2882if ac_fn_cxx_try_compile "$LINENO"; then :
2883  ac_hi=$ac_mid
2884else
2885  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2886fi
2887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2888done
2889case $ac_lo in #((
2890?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2891'') ac_retval=1 ;;
2892esac
2893  else
2894    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2895/* end confdefs.h.  */
2896$4
2897static long int longval () { return $2; }
2898static unsigned long int ulongval () { return $2; }
2899#include <stdio.h>
2900#include <stdlib.h>
2901int
2902main ()
2903{
2904
2905  FILE *f = fopen ("conftest.val", "w");
2906  if (! f)
2907    return 1;
2908  if (($2) < 0)
2909    {
2910      long int i = longval ();
2911      if (i != ($2))
2912	return 1;
2913      fprintf (f, "%ld", i);
2914    }
2915  else
2916    {
2917      unsigned long int i = ulongval ();
2918      if (i != ($2))
2919	return 1;
2920      fprintf (f, "%lu", i);
2921    }
2922  /* Do not output a trailing newline, as this causes \r\n confusion
2923     on some platforms.  */
2924  return ferror (f) || fclose (f) != 0;
2925
2926  ;
2927  return 0;
2928}
2929_ACEOF
2930if ac_fn_cxx_try_run "$LINENO"; then :
2931  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2932else
2933  ac_retval=1
2934fi
2935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2936  conftest.$ac_objext conftest.beam conftest.$ac_ext
2937rm -f conftest.val
2938
2939  fi
2940  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2941  as_fn_set_status $ac_retval
2942
2943} # ac_fn_cxx_compute_int
2944
2945# ac_fn_cxx_try_link LINENO
2946# -------------------------
2947# Try to link conftest.$ac_ext, and return whether this succeeded.
2948ac_fn_cxx_try_link ()
2949{
2950  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2951  rm -f conftest.$ac_objext conftest$ac_exeext
2952  if { { ac_try="$ac_link"
2953case "(($ac_try" in
2954  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2955  *) ac_try_echo=$ac_try;;
2956esac
2957eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2958$as_echo "$ac_try_echo"; } >&5
2959  (eval "$ac_link") 2>conftest.err
2960  ac_status=$?
2961  if test -s conftest.err; then
2962    grep -v '^ *+' conftest.err >conftest.er1
2963    cat conftest.er1 >&5
2964    mv -f conftest.er1 conftest.err
2965  fi
2966  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2967  test $ac_status = 0; } && {
2968	 test -z "$ac_cxx_werror_flag" ||
2969	 test ! -s conftest.err
2970       } && test -s conftest$ac_exeext && {
2971	 test "$cross_compiling" = yes ||
2972	 test -x conftest$ac_exeext
2973       }; then :
2974  ac_retval=0
2975else
2976  $as_echo "$as_me: failed program was:" >&5
2977sed 's/^/| /' conftest.$ac_ext >&5
2978
2979	ac_retval=1
2980fi
2981  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2982  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2983  # interfere with the next link command; also delete a directory that is
2984  # left behind by Apple's compiler.  We do this before executing the actions.
2985  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2986  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2987  as_fn_set_status $ac_retval
2988
2989} # ac_fn_cxx_try_link
2990
2991# ac_fn_cxx_check_func LINENO FUNC VAR
2992# ------------------------------------
2993# Tests whether FUNC exists, setting the cache variable VAR accordingly
2994ac_fn_cxx_check_func ()
2995{
2996  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2997  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2998$as_echo_n "checking for $2... " >&6; }
2999if eval \${$3+:} false; then :
3000  $as_echo_n "(cached) " >&6
3001else
3002  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3003/* end confdefs.h.  */
3004/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3005   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3006#define $2 innocuous_$2
3007
3008/* System header to define __stub macros and hopefully few prototypes,
3009    which can conflict with char $2 (); below.
3010    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3011    <limits.h> exists even on freestanding compilers.  */
3012
3013#ifdef __STDC__
3014# include <limits.h>
3015#else
3016# include <assert.h>
3017#endif
3018
3019#undef $2
3020
3021/* Override any GCC internal prototype to avoid an error.
3022   Use char because int might match the return type of a GCC
3023   builtin and then its argument prototype would still apply.  */
3024#ifdef __cplusplus
3025extern "C"
3026#endif
3027char $2 ();
3028/* The GNU C library defines this for functions which it implements
3029    to always fail with ENOSYS.  Some functions are actually named
3030    something starting with __ and the normal name is an alias.  */
3031#if defined __stub_$2 || defined __stub___$2
3032choke me
3033#endif
3034
3035int
3036main ()
3037{
3038return $2 ();
3039  ;
3040  return 0;
3041}
3042_ACEOF
3043if ac_fn_cxx_try_link "$LINENO"; then :
3044  eval "$3=yes"
3045else
3046  eval "$3=no"
3047fi
3048rm -f core conftest.err conftest.$ac_objext \
3049    conftest$ac_exeext conftest.$ac_ext
3050fi
3051eval ac_res=\$$3
3052	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3053$as_echo "$ac_res" >&6; }
3054  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3055
3056} # ac_fn_cxx_check_func
3057
3058# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3059# -------------------------------------------------------
3060# Tests whether HEADER exists and can be compiled using the include files in
3061# INCLUDES, setting the cache variable VAR accordingly.
3062ac_fn_c_check_header_compile ()
3063{
3064  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3066$as_echo_n "checking for $2... " >&6; }
3067if eval \${$3+:} false; then :
3068  $as_echo_n "(cached) " >&6
3069else
3070  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3071/* end confdefs.h.  */
3072$4
3073#include <$2>
3074_ACEOF
3075if ac_fn_c_try_compile "$LINENO"; then :
3076  eval "$3=yes"
3077else
3078  eval "$3=no"
3079fi
3080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3081fi
3082eval ac_res=\$$3
3083	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3084$as_echo "$ac_res" >&6; }
3085  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3086
3087} # ac_fn_c_check_header_compile
3088cat >config.log <<_ACEOF
3089This file contains any messages produced by compilers while
3090running configure, to aid debugging if configure makes a mistake.
3091
3092It was created by OpenJDK $as_me jdk9, which was
3093generated by GNU Autoconf 2.69.  Invocation command line was
3094
3095  $ $0 $@
3096
3097_ACEOF
3098exec 5>>config.log
3099{
3100cat <<_ASUNAME
3101## --------- ##
3102## Platform. ##
3103## --------- ##
3104
3105hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3106uname -m = `(uname -m) 2>/dev/null || echo unknown`
3107uname -r = `(uname -r) 2>/dev/null || echo unknown`
3108uname -s = `(uname -s) 2>/dev/null || echo unknown`
3109uname -v = `(uname -v) 2>/dev/null || echo unknown`
3110
3111/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3112/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3113
3114/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3115/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3116/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3117/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3118/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3119/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3120/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3121
3122_ASUNAME
3123
3124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3125for as_dir in $PATH
3126do
3127  IFS=$as_save_IFS
3128  test -z "$as_dir" && as_dir=.
3129    $as_echo "PATH: $as_dir"
3130  done
3131IFS=$as_save_IFS
3132
3133} >&5
3134
3135cat >&5 <<_ACEOF
3136
3137
3138## ----------- ##
3139## Core tests. ##
3140## ----------- ##
3141
3142_ACEOF
3143
3144
3145# Keep a trace of the command line.
3146# Strip out --no-create and --no-recursion so they do not pile up.
3147# Strip out --silent because we don't want to record it for future runs.
3148# Also quote any args containing shell meta-characters.
3149# Make two passes to allow for proper duplicate-argument suppression.
3150ac_configure_args=
3151ac_configure_args0=
3152ac_configure_args1=
3153ac_must_keep_next=false
3154for ac_pass in 1 2
3155do
3156  for ac_arg
3157  do
3158    case $ac_arg in
3159    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3160    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3161    | -silent | --silent | --silen | --sile | --sil)
3162      continue ;;
3163    *\'*)
3164      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3165    esac
3166    case $ac_pass in
3167    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3168    2)
3169      as_fn_append ac_configure_args1 " '$ac_arg'"
3170      if test $ac_must_keep_next = true; then
3171	ac_must_keep_next=false # Got value, back to normal.
3172      else
3173	case $ac_arg in
3174	  *=* | --config-cache | -C | -disable-* | --disable-* \
3175	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3176	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3177	  | -with-* | --with-* | -without-* | --without-* | --x)
3178	    case "$ac_configure_args0 " in
3179	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3180	    esac
3181	    ;;
3182	  -* ) ac_must_keep_next=true ;;
3183	esac
3184      fi
3185      as_fn_append ac_configure_args " '$ac_arg'"
3186      ;;
3187    esac
3188  done
3189done
3190{ ac_configure_args0=; unset ac_configure_args0;}
3191{ ac_configure_args1=; unset ac_configure_args1;}
3192
3193# When interrupted or exit'd, cleanup temporary files, and complete
3194# config.log.  We remove comments because anyway the quotes in there
3195# would cause problems or look ugly.
3196# WARNING: Use '\'' to represent an apostrophe within the trap.
3197# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3198trap 'exit_status=$?
3199  # Save into config.log some information that might help in debugging.
3200  {
3201    echo
3202
3203    $as_echo "## ---------------- ##
3204## Cache variables. ##
3205## ---------------- ##"
3206    echo
3207    # The following way of writing the cache mishandles newlines in values,
3208(
3209  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3210    eval ac_val=\$$ac_var
3211    case $ac_val in #(
3212    *${as_nl}*)
3213      case $ac_var in #(
3214      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3215$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3216      esac
3217      case $ac_var in #(
3218      _ | IFS | as_nl) ;; #(
3219      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3220      *) { eval $ac_var=; unset $ac_var;} ;;
3221      esac ;;
3222    esac
3223  done
3224  (set) 2>&1 |
3225    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3226    *${as_nl}ac_space=\ *)
3227      sed -n \
3228	"s/'\''/'\''\\\\'\'''\''/g;
3229	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3230      ;; #(
3231    *)
3232      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3233      ;;
3234    esac |
3235    sort
3236)
3237    echo
3238
3239    $as_echo "## ----------------- ##
3240## Output variables. ##
3241## ----------------- ##"
3242    echo
3243    for ac_var in $ac_subst_vars
3244    do
3245      eval ac_val=\$$ac_var
3246      case $ac_val in
3247      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3248      esac
3249      $as_echo "$ac_var='\''$ac_val'\''"
3250    done | sort
3251    echo
3252
3253    if test -n "$ac_subst_files"; then
3254      $as_echo "## ------------------- ##
3255## File substitutions. ##
3256## ------------------- ##"
3257      echo
3258      for ac_var in $ac_subst_files
3259      do
3260	eval ac_val=\$$ac_var
3261	case $ac_val in
3262	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3263	esac
3264	$as_echo "$ac_var='\''$ac_val'\''"
3265      done | sort
3266      echo
3267    fi
3268
3269    if test -s confdefs.h; then
3270      $as_echo "## ----------- ##
3271## confdefs.h. ##
3272## ----------- ##"
3273      echo
3274      cat confdefs.h
3275      echo
3276    fi
3277    test "$ac_signal" != 0 &&
3278      $as_echo "$as_me: caught signal $ac_signal"
3279    $as_echo "$as_me: exit $exit_status"
3280  } >&5
3281  rm -f core *.core core.conftest.* &&
3282    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3283    exit $exit_status
3284' 0
3285for ac_signal in 1 2 13 15; do
3286  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3287done
3288ac_signal=0
3289
3290# confdefs.h avoids OS command line length limits that DEFS can exceed.
3291rm -f -r conftest* confdefs.h
3292
3293$as_echo "/* confdefs.h */" > confdefs.h
3294
3295# Predefined preprocessor variables.
3296
3297cat >>confdefs.h <<_ACEOF
3298#define PACKAGE_NAME "$PACKAGE_NAME"
3299_ACEOF
3300
3301cat >>confdefs.h <<_ACEOF
3302#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3303_ACEOF
3304
3305cat >>confdefs.h <<_ACEOF
3306#define PACKAGE_VERSION "$PACKAGE_VERSION"
3307_ACEOF
3308
3309cat >>confdefs.h <<_ACEOF
3310#define PACKAGE_STRING "$PACKAGE_STRING"
3311_ACEOF
3312
3313cat >>confdefs.h <<_ACEOF
3314#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3315_ACEOF
3316
3317cat >>confdefs.h <<_ACEOF
3318#define PACKAGE_URL "$PACKAGE_URL"
3319_ACEOF
3320
3321
3322# Let the site file select an alternate cache file if it wants to.
3323# Prefer an explicitly selected file to automatically selected ones.
3324ac_site_file1=NONE
3325ac_site_file2=NONE
3326if test -n "$CONFIG_SITE"; then
3327  # We do not want a PATH search for config.site.
3328  case $CONFIG_SITE in #((
3329    -*)  ac_site_file1=./$CONFIG_SITE;;
3330    */*) ac_site_file1=$CONFIG_SITE;;
3331    *)   ac_site_file1=./$CONFIG_SITE;;
3332  esac
3333elif test "x$prefix" != xNONE; then
3334  ac_site_file1=$prefix/share/config.site
3335  ac_site_file2=$prefix/etc/config.site
3336else
3337  ac_site_file1=$ac_default_prefix/share/config.site
3338  ac_site_file2=$ac_default_prefix/etc/config.site
3339fi
3340for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3341do
3342  test "x$ac_site_file" = xNONE && continue
3343  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3344    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3345$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3346    sed 's/^/| /' "$ac_site_file" >&5
3347    . "$ac_site_file" \
3348      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3349$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3350as_fn_error $? "failed to load site script $ac_site_file
3351See \`config.log' for more details" "$LINENO" 5; }
3352  fi
3353done
3354
3355if test -r "$cache_file"; then
3356  # Some versions of bash will fail to source /dev/null (special files
3357  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3358  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3359    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3360$as_echo "$as_me: loading cache $cache_file" >&6;}
3361    case $cache_file in
3362      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3363      *)                      . "./$cache_file";;
3364    esac
3365  fi
3366else
3367  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3368$as_echo "$as_me: creating cache $cache_file" >&6;}
3369  >$cache_file
3370fi
3371
3372# Check that the precious variables saved in the cache have kept the same
3373# value.
3374ac_cache_corrupted=false
3375for ac_var in $ac_precious_vars; do
3376  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3377  eval ac_new_set=\$ac_env_${ac_var}_set
3378  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3379  eval ac_new_val=\$ac_env_${ac_var}_value
3380  case $ac_old_set,$ac_new_set in
3381    set,)
3382      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3383$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3384      ac_cache_corrupted=: ;;
3385    ,set)
3386      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3387$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3388      ac_cache_corrupted=: ;;
3389    ,);;
3390    *)
3391      if test "x$ac_old_val" != "x$ac_new_val"; then
3392	# differences in whitespace do not lead to failure.
3393	ac_old_val_w=`echo x $ac_old_val`
3394	ac_new_val_w=`echo x $ac_new_val`
3395	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3396	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3397$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3398	  ac_cache_corrupted=:
3399	else
3400	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3401$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3402	  eval $ac_var=\$ac_old_val
3403	fi
3404	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3405$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3406	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3407$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3408      fi;;
3409  esac
3410  # Pass precious variables to config.status.
3411  if test "$ac_new_set" = set; then
3412    case $ac_new_val in
3413    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3414    *) ac_arg=$ac_var=$ac_new_val ;;
3415    esac
3416    case " $ac_configure_args " in
3417      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3418      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3419    esac
3420  fi
3421done
3422if $ac_cache_corrupted; then
3423  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3424$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3425  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3426$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3427  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3428fi
3429## -------------------- ##
3430## Main body of script. ##
3431## -------------------- ##
3432
3433ac_ext=c
3434ac_cpp='$CPP $CPPFLAGS'
3435ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3436ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3437ac_compiler_gnu=$ac_cv_c_compiler_gnu
3438
3439
3440
3441ac_aux_dir=
3442for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3443  if test -f "$ac_dir/install-sh"; then
3444    ac_aux_dir=$ac_dir
3445    ac_install_sh="$ac_aux_dir/install-sh -c"
3446    break
3447  elif test -f "$ac_dir/install.sh"; then
3448    ac_aux_dir=$ac_dir
3449    ac_install_sh="$ac_aux_dir/install.sh -c"
3450    break
3451  elif test -f "$ac_dir/shtool"; then
3452    ac_aux_dir=$ac_dir
3453    ac_install_sh="$ac_aux_dir/shtool install -c"
3454    break
3455  fi
3456done
3457if test -z "$ac_aux_dir"; then
3458  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
3459fi
3460
3461# These three variables are undocumented and unsupported,
3462# and are intended to be withdrawn in a future Autoconf release.
3463# They can cause serious problems if a builder's source tree is in a directory
3464# whose full name contains unusual characters.
3465ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3466ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3467ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3468
3469
3470# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3471
3472#
3473# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3474# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3475#
3476# This code is free software; you can redistribute it and/or modify it
3477# under the terms of the GNU General Public License version 2 only, as
3478# published by the Free Software Foundation.  Oracle designates this
3479# particular file as subject to the "Classpath" exception as provided
3480# by Oracle in the LICENSE file that accompanied this code.
3481#
3482# This code is distributed in the hope that it will be useful, but WITHOUT
3483# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3484# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3485# version 2 for more details (a copy is included in the LICENSE file that
3486# accompanied this code).
3487#
3488# You should have received a copy of the GNU General Public License version
3489# 2 along with this work; if not, write to the Free Software Foundation,
3490# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3491#
3492# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3493# or visit www.oracle.com if you need additional information or have any
3494# questions.
3495#
3496
3497#
3498# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3499#
3500# This program is free software; you can redistribute it and/or modify
3501# it under the terms of the GNU General Public License as published by
3502# the Free Software Foundation; either version 2 of the License, or
3503# (at your option) any later version.
3504#
3505# This program is distributed in the hope that it will be useful, but
3506# WITHOUT ANY WARRANTY; without even the implied warranty of
3507# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3508# General Public License for more details.
3509#
3510# You should have received a copy of the GNU General Public License
3511# along with this program; if not, write to the Free Software
3512# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3513#
3514# As a special exception to the GNU General Public License, if you
3515# distribute this file as part of a program that contains a
3516# configuration script generated by Autoconf, you may include it under
3517# the same distribution terms that you use for the rest of that program.
3518
3519# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3520# ----------------------------------
3521# PKG_PROG_PKG_CONFIG
3522
3523# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3524#
3525# Check to see whether a particular set of modules exists.  Similar
3526# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3527#
3528#
3529# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3530# this or PKG_CHECK_MODULES is called, or make sure to call
3531# PKG_CHECK_EXISTS manually
3532# --------------------------------------------------------------
3533
3534
3535
3536# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3537# ---------------------------------------------
3538# _PKG_CONFIG
3539
3540# _PKG_SHORT_ERRORS_SUPPORTED
3541# -----------------------------
3542# _PKG_SHORT_ERRORS_SUPPORTED
3543
3544
3545# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3546# [ACTION-IF-NOT-FOUND])
3547#
3548#
3549# Note that if there is a possibility the first call to
3550# PKG_CHECK_MODULES might not happen, you should be sure to include an
3551# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3552#
3553#
3554# --------------------------------------------------------------
3555# PKG_CHECK_MODULES
3556
3557
3558# Include these first...
3559#
3560# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3561# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3562#
3563# This code is free software; you can redistribute it and/or modify it
3564# under the terms of the GNU General Public License version 2 only, as
3565# published by the Free Software Foundation.  Oracle designates this
3566# particular file as subject to the "Classpath" exception as provided
3567# by Oracle in the LICENSE file that accompanied this code.
3568#
3569# This code is distributed in the hope that it will be useful, but WITHOUT
3570# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3571# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3572# version 2 for more details (a copy is included in the LICENSE file that
3573# accompanied this code).
3574#
3575# You should have received a copy of the GNU General Public License version
3576# 2 along with this work; if not, write to the Free Software Foundation,
3577# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3578#
3579# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3580# or visit www.oracle.com if you need additional information or have any
3581# questions.
3582#
3583
3584# Create a function/macro that takes a series of named arguments. The call is
3585# similar to AC_DEFUN, but the setup of the function looks like this:
3586# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3587# ... do something
3588#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3589# ])
3590# A star (*) in front of a named argument means that it is required and it's
3591# presence will be verified. To pass e.g. the first value as a normal indexed
3592# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3593# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3594# "ARG_FOO".
3595#
3596# The generated function can be called like this:
3597# MYFUNC(FOO: [foo-val],
3598#     BAR: [
3599#         $ECHO hello world
3600#     ])
3601# Note that the argument value must start on the same line as the argument name.
3602#
3603# Argument 1: Name of the function to define
3604# Argument 2: List of legal named arguments, with a * prefix for required arguments
3605# Argument 3: Argument array to treat as named, typically $@
3606# Argument 4: The main function body
3607
3608
3609# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3610# If so, then append $1 to $2 \
3611# Also set JVM_ARG_OK to true/false depending on outcome.
3612
3613
3614# Appends a string to a path variable, only adding the : when needed.
3615
3616
3617# Prepends a string to a path variable, only adding the : when needed.
3618
3619
3620# This will make sure the given variable points to a full and proper
3621# path. This means:
3622# 1) There will be no spaces in the path. On unix platforms,
3623#    spaces in the path will result in an error. On Windows,
3624#    the path will be rewritten using short-style to be space-free.
3625# 2) The path will be absolute, and it will be in unix-style (on
3626#     cygwin).
3627# $1: The name of the variable to fix
3628
3629
3630# This will make sure the given variable points to a executable
3631# with a full and proper path. This means:
3632# 1) There will be no spaces in the path. On unix platforms,
3633#    spaces in the path will result in an error. On Windows,
3634#    the path will be rewritten using short-style to be space-free.
3635# 2) The path will be absolute, and it will be in unix-style (on
3636#     cygwin).
3637# Any arguments given to the executable is preserved.
3638# If the input variable does not have a directory specification, then
3639# it need to be in the PATH.
3640# $1: The name of the variable to fix
3641
3642
3643
3644
3645# Register a --with argument but mark it as deprecated
3646# $1: The name of the with argument to deprecate, not including --with-
3647
3648
3649# Register a --enable argument but mark it as deprecated
3650# $1: The name of the with argument to deprecate, not including --enable-
3651# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3652# $3: Messages to user.
3653
3654
3655
3656
3657# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3658# $1: variable to check
3659
3660
3661# Check that there are no unprocessed overridden variables left.
3662# If so, they are an incorrect argument and we will exit with an error.
3663
3664
3665# Setup a tool for the given variable. If correctly specified by the user,
3666# use that value, otherwise search for the tool using the supplied code snippet.
3667# $1: variable to set
3668# $2: code snippet to call to look for the tool
3669# $3: code snippet to call if variable was used to find tool
3670
3671
3672# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3673# $1: variable to set
3674# $2: executable name (or list of names) to look for
3675# $3: [path]
3676
3677
3678# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3679# $1: variable to set
3680# $2: executable name (or list of names) to look for
3681
3682
3683# Like BASIC_PATH_PROGS but fails if no tool was found.
3684# $1: variable to set
3685# $2: executable name (or list of names) to look for
3686# $3: [path]
3687
3688
3689# Like BASIC_SETUP_TOOL but fails if no tool was found.
3690# $1: variable to set
3691# $2: autoconf macro to call to look for the special tool
3692
3693
3694# Setup the most fundamental tools that relies on not much else to set up,
3695# but is used by much of the early bootstrap code.
3696
3697
3698# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3699
3700
3701# Evaluates platform specific overrides for devkit variables.
3702# $1: Name of variable
3703
3704
3705
3706
3707
3708
3709#%%% Simple tools %%%
3710
3711# Check if we have found a usable version of make
3712# $1: the path to a potential make binary (or empty)
3713# $2: the description on how we found this
3714
3715
3716
3717
3718# Goes looking for a usable version of GNU make.
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729# Check if build directory is on local disk. If not possible to determine,
3730# we prefer to claim it's local.
3731# Argument 1: directory to test
3732# Argument 2: what to do if it is on local disk
3733# Argument 3: what to do otherwise (remote disk or failure)
3734
3735
3736# Check that source files have basic read permissions set. This might
3737# not be the case in cygwin in certain conditions.
3738
3739
3740
3741
3742# Check for support for specific options in bash
3743
3744
3745################################################################################
3746#
3747# Default make target
3748#
3749
3750
3751# Code to run after AC_OUTPUT
3752
3753
3754#
3755# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3756# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3757#
3758# This code is free software; you can redistribute it and/or modify it
3759# under the terms of the GNU General Public License version 2 only, as
3760# published by the Free Software Foundation.  Oracle designates this
3761# particular file as subject to the "Classpath" exception as provided
3762# by Oracle in the LICENSE file that accompanied this code.
3763#
3764# This code is distributed in the hope that it will be useful, but WITHOUT
3765# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3766# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3767# version 2 for more details (a copy is included in the LICENSE file that
3768# accompanied this code).
3769#
3770# You should have received a copy of the GNU General Public License version
3771# 2 along with this work; if not, write to the Free Software Foundation,
3772# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3773#
3774# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3775# or visit www.oracle.com if you need additional information or have any
3776# questions.
3777#
3778
3779
3780
3781
3782
3783# Helper function which possibly converts a path using DOS-style short mode.
3784# If so, the updated path is stored in $new_path.
3785# $1: The path to check
3786
3787
3788# Helper function which possibly converts a path using DOS-style short mode.
3789# If so, the updated path is stored in $new_path.
3790# $1: The path to check
3791
3792
3793# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3794# and could probably be heavily simplified. However, all changes in this
3795# area tend to need lot of testing in different scenarios, and in lack of
3796# proper unit testing, cleaning this up has not been deemed worth the effort
3797# at the moment.
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3808
3809
3810
3811
3812# ... then the rest
3813#
3814# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3815# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3816#
3817# This code is free software; you can redistribute it and/or modify it
3818# under the terms of the GNU General Public License version 2 only, as
3819# published by the Free Software Foundation.  Oracle designates this
3820# particular file as subject to the "Classpath" exception as provided
3821# by Oracle in the LICENSE file that accompanied this code.
3822#
3823# This code is distributed in the hope that it will be useful, but WITHOUT
3824# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3825# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3826# version 2 for more details (a copy is included in the LICENSE file that
3827# accompanied this code).
3828#
3829# You should have received a copy of the GNU General Public License version
3830# 2 along with this work; if not, write to the Free Software Foundation,
3831# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3832#
3833# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3834# or visit www.oracle.com if you need additional information or have any
3835# questions.
3836#
3837
3838########################################################################
3839# This file handles detection of the Boot JDK. The Boot JDK detection
3840# process has been developed as a response to solve a complex real-world
3841# problem. Initially, it was simple, but it has grown as platform after
3842# platform, idiosyncracy after idiosyncracy has been supported.
3843#
3844# The basic idea is this:
3845# 1) You need an acceptable *) JDK to use as a Boot JDK
3846# 2) There are several ways to locate a JDK, that are mostly platform
3847#    dependent **)
3848# 3) You can have multiple JDKs installed
3849# 4) If possible, configure should try to dig out an acceptable JDK
3850#    automatically, without having to resort to command-line options
3851#
3852# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3853#     javac) and not a JRE, etc.
3854#
3855# **) On Windows we typically use a well-known path.
3856#     On MacOSX we typically use the tool java_home.
3857#     On Linux we typically find javac in the $PATH, and then follow a
3858#     chain of symlinks that often ends up in a real JDK.
3859#
3860# This leads to the code where we check in different ways to locate a
3861# JDK, and if one is found, check if it is acceptable. If not, we print
3862# our reasons for rejecting it (useful when debugging non-working
3863# configure situations) and continue checking the next one.
3864########################################################################
3865
3866# Execute the check given as argument, and verify the result
3867# If the Boot JDK was previously found, do nothing
3868# $1 A command line (typically autoconf macro) to execute
3869
3870
3871# Test: Is bootjdk explicitly set by command line arguments?
3872
3873
3874# Test: Is $JAVA_HOME set?
3875
3876
3877# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3878
3879
3880# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3881# $1: Argument to the java_home binary (optional)
3882
3883
3884# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3885
3886
3887# Look for a jdk in the given path. If there are multiple, try to select the newest.
3888# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3889# $1 = Path to directory containing jdk installations.
3890# $2 = String to append to the found JDK directory to get the proper JDK home
3891
3892
3893# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3894# environmental variable as base for where to look.
3895# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3896
3897
3898# Test: Is there a JDK installed in default, well-known locations?
3899
3900
3901# Check that a command-line tool in the Boot JDK is correct
3902# $1 = name of variable to assign
3903# $2 = name of binary
3904
3905
3906###############################################################################
3907#
3908# We need a Boot JDK to bootstrap the build.
3909#
3910
3911
3912
3913
3914
3915# BUILD_JDK: the location of the latest JDK that can run
3916#   on the host system and supports the target class file version
3917#   generated in this JDK build.  This variable should only be
3918#   used after the launchers are built.
3919#
3920
3921# Execute the check given as argument, and verify the result.
3922# If the JDK was previously found, do nothing.
3923# $1 A command line (typically autoconf macro) to execute
3924
3925
3926# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3927# is different than the host system doing the build (e.g. cross-compilation),
3928# a special BUILD_JDK is built as part of the build process.  An external
3929# prebuilt BUILD_JDK can also be supplied.
3930
3931
3932#
3933# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3934# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3935#
3936# This code is free software; you can redistribute it and/or modify it
3937# under the terms of the GNU General Public License version 2 only, as
3938# published by the Free Software Foundation.  Oracle designates this
3939# particular file as subject to the "Classpath" exception as provided
3940# by Oracle in the LICENSE file that accompanied this code.
3941#
3942# This code is distributed in the hope that it will be useful, but WITHOUT
3943# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3944# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3945# version 2 for more details (a copy is included in the LICENSE file that
3946# accompanied this code).
3947#
3948# You should have received a copy of the GNU General Public License version
3949# 2 along with this work; if not, write to the Free Software Foundation,
3950# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3951#
3952# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3953# or visit www.oracle.com if you need additional information or have any
3954# questions.
3955#
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973################################################################################
3974#
3975# Runs icecc-create-env once and prints the error if it fails
3976#
3977# $1: arguments to icecc-create-env
3978# $2: log file
3979#
3980
3981
3982################################################################################
3983#
3984# Optionally enable distributed compilation of native code using icecc/icecream
3985#
3986
3987
3988
3989
3990
3991
3992
3993#
3994# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3995# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3996#
3997# This code is free software; you can redistribute it and/or modify it
3998# under the terms of the GNU General Public License version 2 only, as
3999# published by the Free Software Foundation.  Oracle designates this
4000# particular file as subject to the "Classpath" exception as provided
4001# by Oracle in the LICENSE file that accompanied this code.
4002#
4003# This code is distributed in the hope that it will be useful, but WITHOUT
4004# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4005# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4006# version 2 for more details (a copy is included in the LICENSE file that
4007# accompanied this code).
4008#
4009# You should have received a copy of the GNU General Public License version
4010# 2 along with this work; if not, write to the Free Software Foundation,
4011# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4012#
4013# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4014# or visit www.oracle.com if you need additional information or have any
4015# questions.
4016#
4017
4018################################################################################
4019#
4020# Setup ABI profile (for arm)
4021#
4022
4023
4024# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4025# corresponding configure arguments instead
4026
4027
4028# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4029# that configure can use them while detecting compilers.
4030# TOOLCHAIN_TYPE is available here.
4031# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4032
4033
4034
4035
4036
4037
4038# Documentation on common flags used for solstudio in HIGHEST.
4039#
4040# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4041#          done with care, there are some assumptions below that need to
4042#          be understood about the use of pointers, and IEEE behavior.
4043#
4044# -fns: Use non-standard floating point mode (not IEEE 754)
4045# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4046# -fsingle: Use single precision floating point with 'float'
4047# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4048#   (Source with excessing pointer casting and data access with mixed
4049#    pointer types are not recommended)
4050# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4051#   (If you expect perfect errno behavior, do not use this)
4052# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4053# -xrestrict: Pointer parameters to functions do not overlap
4054#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4055#    If you pass in multiple pointers to the same data, do not use this)
4056# -xlibmil: Inline some library routines
4057#   (If you expect perfect errno behavior, do not use this)
4058# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4059#   (If you expect perfect errno behavior, do not use this)
4060#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4061
4062    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4063    # Bug?
4064    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4065    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4066    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4067    #fi
4068
4069
4070
4071
4072
4073
4074################################################################################
4075# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4076#      conditionals against.
4077# $2 - Optional prefix for each variable defined.
4078
4079
4080# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4081#                                  IF_FALSE: [RUN-IF-FALSE])
4082# ------------------------------------------------------------
4083# Check that the C compiler supports an argument
4084
4085
4086
4087
4088# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4089#                                    IF_FALSE: [RUN-IF-FALSE])
4090# ------------------------------------------------------------
4091# Check that the C++ compiler supports an argument
4092
4093
4094
4095
4096# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4097#                                IF_FALSE: [RUN-IF-FALSE])
4098# ------------------------------------------------------------
4099# Check that the C and C++ compilers support an argument
4100
4101
4102
4103
4104# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4105#                                   IF_FALSE: [RUN-IF-FALSE])
4106# ------------------------------------------------------------
4107# Check that the linker support an argument
4108
4109
4110
4111
4112
4113
4114# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4115# Arguments:
4116# $1 - Optional prefix for each variable defined.
4117
4118
4119#
4120# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4121# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4122#
4123# This code is free software; you can redistribute it and/or modify it
4124# under the terms of the GNU General Public License version 2 only, as
4125# published by the Free Software Foundation.  Oracle designates this
4126# particular file as subject to the "Classpath" exception as provided
4127# by Oracle in the LICENSE file that accompanied this code.
4128#
4129# This code is distributed in the hope that it will be useful, but WITHOUT
4130# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4131# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4132# version 2 for more details (a copy is included in the LICENSE file that
4133# accompanied this code).
4134#
4135# You should have received a copy of the GNU General Public License version
4136# 2 along with this work; if not, write to the Free Software Foundation,
4137# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4138#
4139# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4140# or visit www.oracle.com if you need additional information or have any
4141# questions.
4142#
4143
4144
4145
4146
4147
4148cygwin_help() {
4149  case $1 in
4150    unzip)
4151      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4152      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4153      ;;
4154    zip)
4155      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4156      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4157      ;;
4158    make)
4159      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4160      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4161      ;;
4162    freetype)
4163      HELP_MSG="
4164The freetype library can now be build during the configure process.
4165Download the freetype sources and unpack them into an arbitrary directory:
4166
4167wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4168tar -xzf freetype-2.5.3.tar.gz
4169
4170Then run configure with '--with-freetype-src=<freetype_src>'. This will
4171automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4172builds or into '<freetype_src>/lib32' for 32-bit builds.
4173Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4174and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4175
4176Alternatively you can unpack the sources like this to use the default directory:
4177
4178tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4179      ;;
4180  esac
4181}
4182
4183msys_help() {
4184  PKGHANDLER_COMMAND=""
4185}
4186
4187apt_help() {
4188  case $1 in
4189    reduced)
4190      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4191    devkit)
4192      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4193    openjdk)
4194      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4195    alsa)
4196      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4197    cups)
4198      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4199    freetype)
4200      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4201    ffi)
4202      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4203    x11)
4204      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4205    ccache)
4206      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4207    dtrace)
4208      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4209    elf)
4210      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4211  esac
4212}
4213
4214yum_help() {
4215  case $1 in
4216    devkit)
4217      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4218    openjdk)
4219      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4220    alsa)
4221      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4222    cups)
4223      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4224    freetype)
4225      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4226    x11)
4227      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4228    ccache)
4229      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4230    elf)
4231      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4232  esac
4233}
4234
4235brew_help() {
4236  case $1 in
4237    openjdk)
4238      PKGHANDLER_COMMAND="brew cask install java" ;;
4239    freetype)
4240      PKGHANDLER_COMMAND="brew install freetype" ;;
4241    ccache)
4242      PKGHANDLER_COMMAND="brew install ccache" ;;
4243  esac
4244}
4245
4246port_help() {
4247  PKGHANDLER_COMMAND=""
4248}
4249
4250pkgutil_help() {
4251  PKGHANDLER_COMMAND=""
4252}
4253
4254pkgadd_help() {
4255  PKGHANDLER_COMMAND=""
4256}
4257
4258# This function will check if we're called from the "configure" wrapper while
4259# printing --help. If so, we will print out additional information that can
4260# only be extracted within the autoconf script, and then exit. This must be
4261# called at the very beginning in configure.ac.
4262
4263
4264
4265
4266
4267
4268#
4269# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4270# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4271#
4272# This code is free software; you can redistribute it and/or modify it
4273# under the terms of the GNU General Public License version 2 only, as
4274# published by the Free Software Foundation.  Oracle designates this
4275# particular file as subject to the "Classpath" exception as provided
4276# by Oracle in the LICENSE file that accompanied this code.
4277#
4278# This code is distributed in the hope that it will be useful, but WITHOUT
4279# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4280# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4281# version 2 for more details (a copy is included in the LICENSE file that
4282# accompanied this code).
4283#
4284# You should have received a copy of the GNU General Public License version
4285# 2 along with this work; if not, write to the Free Software Foundation,
4286# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4287#
4288# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4289# or visit www.oracle.com if you need additional information or have any
4290# questions.
4291#
4292
4293# All valid JVM features, regardless of platform
4294VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4295    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4296    static-build link-time-opt aot"
4297
4298# All valid JVM variants
4299VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4300
4301###############################################################################
4302# Check if the specified JVM variant should be built. To be used in shell if
4303# constructs, like this:
4304# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4305#
4306# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4307
4308# Definition kept in one line to allow inlining in if statements.
4309# Additional [] needed to keep m4 from mangling shell constructs.
4310
4311
4312###############################################################################
4313# Check if the specified JVM features are explicitly enabled. To be used in
4314# shell if constructs, like this:
4315# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4316#
4317# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4318
4319# Definition kept in one line to allow inlining in if statements.
4320# Additional [] needed to keep m4 from mangling shell constructs.
4321
4322
4323###############################################################################
4324# Check which variants of the JVM that we want to build. Available variants are:
4325#   server: normal interpreter, and a tiered C1/C2 compiler
4326#   client: normal interpreter, and C1 (no C2 compiler)
4327#   minimal: reduced form of client with optional features stripped out
4328#   core: normal interpreter only, no compiler
4329#   zero: C++ based interpreter only, no compiler
4330#   zeroshark: C++ based interpreter, and a llvm-based compiler
4331#   custom: baseline JVM with no default features
4332#
4333
4334
4335###############################################################################
4336# Check if dtrace should be enabled and has all prerequisites present.
4337#
4338
4339
4340################################################################################
4341# Check if AOT should be enabled
4342#
4343
4344
4345###############################################################################
4346# Set up all JVM features for each JVM variant.
4347#
4348
4349
4350###############################################################################
4351# Validate JVM features once all setup is complete, including custom setup.
4352#
4353
4354
4355################################################################################
4356#
4357# Specify which sources will be used to build the 64-bit ARM port
4358#
4359# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4360# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4361#
4362
4363
4364
4365################################################################################
4366# Check if gtest should be built
4367#
4368
4369
4370#
4371# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4372# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4373#
4374# This code is free software; you can redistribute it and/or modify it
4375# under the terms of the GNU General Public License version 2 only, as
4376# published by the Free Software Foundation.  Oracle designates this
4377# particular file as subject to the "Classpath" exception as provided
4378# by Oracle in the LICENSE file that accompanied this code.
4379#
4380# This code is distributed in the hope that it will be useful, but WITHOUT
4381# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4382# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4383# version 2 for more details (a copy is included in the LICENSE file that
4384# accompanied this code).
4385#
4386# You should have received a copy of the GNU General Public License version
4387# 2 along with this work; if not, write to the Free Software Foundation,
4388# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4389#
4390# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4391# or visit www.oracle.com if you need additional information or have any
4392# questions.
4393#
4394
4395###############################################################################
4396# Check which variant of the JDK that we want to build.
4397# Currently we have:
4398#    normal:   standard edition
4399# but the custom make system may add other variants
4400#
4401# Effectively the JDK variant gives a name to a specific set of
4402# modules to compile into the JDK.
4403
4404
4405###############################################################################
4406# Set the debug level
4407#    release: no debug information, all optimizations, no asserts.
4408#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4409#    fastdebug: debug information (-g), all optimizations, all asserts
4410#    slowdebug: debug information (-g), no optimizations, all asserts
4411
4412
4413###############################################################################
4414#
4415# Should we build only OpenJDK even if closed sources are present?
4416#
4417
4418
4419
4420
4421###############################################################################
4422#
4423# Enable or disable the elliptic curve crypto implementation
4424#
4425
4426
4427
4428
4429################################################################################
4430#
4431# Gcov coverage data for hotspot
4432#
4433
4434
4435################################################################################
4436#
4437# Static build support.  When enabled will generate static
4438# libraries instead of shared libraries for all JDK libs.
4439#
4440
4441
4442################################################################################
4443#
4444# jlink options.
4445# We always keep packaged modules in JDK image.
4446#
4447
4448
4449################################################################################
4450#
4451# Check if building of the jtreg failure handler should be enabled.
4452#
4453
4454
4455################################################################################
4456#
4457# Enable or disable generation of the classlist at build time
4458#
4459
4460
4461#
4462# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4463# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4464#
4465# This code is free software; you can redistribute it and/or modify it
4466# under the terms of the GNU General Public License version 2 only, as
4467# published by the Free Software Foundation.  Oracle designates this
4468# particular file as subject to the "Classpath" exception as provided
4469# by Oracle in the LICENSE file that accompanied this code.
4470#
4471# This code is distributed in the hope that it will be useful, but WITHOUT
4472# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4473# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4474# version 2 for more details (a copy is included in the LICENSE file that
4475# accompanied this code).
4476#
4477# You should have received a copy of the GNU General Public License version
4478# 2 along with this work; if not, write to the Free Software Foundation,
4479# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4480#
4481# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4482# or visit www.oracle.com if you need additional information or have any
4483# questions.
4484#
4485
4486###############################################################################
4487#
4488# Setup version numbers
4489#
4490
4491# Verify that a given string represents a valid version number, and assign it
4492# to a variable.
4493
4494# Argument 1: the variable to assign to
4495# Argument 2: the value given by the user
4496
4497
4498
4499
4500#
4501# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4502# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4503#
4504# This code is free software; you can redistribute it and/or modify it
4505# under the terms of the GNU General Public License version 2 only, as
4506# published by the Free Software Foundation.  Oracle designates this
4507# particular file as subject to the "Classpath" exception as provided
4508# by Oracle in the LICENSE file that accompanied this code.
4509#
4510# This code is distributed in the hope that it will be useful, but WITHOUT
4511# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4512# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4513# version 2 for more details (a copy is included in the LICENSE file that
4514# accompanied this code).
4515#
4516# You should have received a copy of the GNU General Public License version
4517# 2 along with this work; if not, write to the Free Software Foundation,
4518# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4519#
4520# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4521# or visit www.oracle.com if you need additional information or have any
4522# questions.
4523#
4524
4525# Major library component reside in separate files.
4526#
4527# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4528# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4529#
4530# This code is free software; you can redistribute it and/or modify it
4531# under the terms of the GNU General Public License version 2 only, as
4532# published by the Free Software Foundation.  Oracle designates this
4533# particular file as subject to the "Classpath" exception as provided
4534# by Oracle in the LICENSE file that accompanied this code.
4535#
4536# This code is distributed in the hope that it will be useful, but WITHOUT
4537# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4538# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4539# version 2 for more details (a copy is included in the LICENSE file that
4540# accompanied this code).
4541#
4542# You should have received a copy of the GNU General Public License version
4543# 2 along with this work; if not, write to the Free Software Foundation,
4544# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4545#
4546# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4547# or visit www.oracle.com if you need additional information or have any
4548# questions.
4549#
4550
4551################################################################################
4552# Setup alsa (Advanced Linux Sound Architecture)
4553################################################################################
4554
4555
4556#
4557# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4558# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4559#
4560# This code is free software; you can redistribute it and/or modify it
4561# under the terms of the GNU General Public License version 2 only, as
4562# published by the Free Software Foundation.  Oracle designates this
4563# particular file as subject to the "Classpath" exception as provided
4564# by Oracle in the LICENSE file that accompanied this code.
4565#
4566# This code is distributed in the hope that it will be useful, but WITHOUT
4567# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4568# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4569# version 2 for more details (a copy is included in the LICENSE file that
4570# accompanied this code).
4571#
4572# You should have received a copy of the GNU General Public License version
4573# 2 along with this work; if not, write to the Free Software Foundation,
4574# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4575#
4576# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4577# or visit www.oracle.com if you need additional information or have any
4578# questions.
4579#
4580
4581################################################################################
4582# Setup bundled libraries.
4583#
4584# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4585# OpenJDK repository. Default is to use these libraries as bundled, but they
4586# might be replaced by en external version by the user.
4587################################################################################
4588
4589
4590################################################################################
4591# Setup libjpeg
4592################################################################################
4593
4594
4595################################################################################
4596# Setup giflib
4597################################################################################
4598
4599
4600################################################################################
4601# Setup libpng
4602################################################################################
4603
4604
4605################################################################################
4606# Setup zlib
4607################################################################################
4608
4609
4610################################################################################
4611# Setup lcms (Little CMS)
4612################################################################################
4613
4614
4615#
4616# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4617# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4618#
4619# This code is free software; you can redistribute it and/or modify it
4620# under the terms of the GNU General Public License version 2 only, as
4621# published by the Free Software Foundation.  Oracle designates this
4622# particular file as subject to the "Classpath" exception as provided
4623# by Oracle in the LICENSE file that accompanied this code.
4624#
4625# This code is distributed in the hope that it will be useful, but WITHOUT
4626# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4627# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4628# version 2 for more details (a copy is included in the LICENSE file that
4629# accompanied this code).
4630#
4631# You should have received a copy of the GNU General Public License version
4632# 2 along with this work; if not, write to the Free Software Foundation,
4633# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4634#
4635# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4636# or visit www.oracle.com if you need additional information or have any
4637# questions.
4638#
4639
4640################################################################################
4641# Setup cups (Common Unix Printing System)
4642################################################################################
4643
4644
4645#
4646# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4647# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4648#
4649# This code is free software; you can redistribute it and/or modify it
4650# under the terms of the GNU General Public License version 2 only, as
4651# published by the Free Software Foundation.  Oracle designates this
4652# particular file as subject to the "Classpath" exception as provided
4653# by Oracle in the LICENSE file that accompanied this code.
4654#
4655# This code is distributed in the hope that it will be useful, but WITHOUT
4656# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4657# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4658# version 2 for more details (a copy is included in the LICENSE file that
4659# accompanied this code).
4660#
4661# You should have received a copy of the GNU General Public License version
4662# 2 along with this work; if not, write to the Free Software Foundation,
4663# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4664#
4665# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4666# or visit www.oracle.com if you need additional information or have any
4667# questions.
4668#
4669
4670################################################################################
4671# Setup libffi (Foreign Function Interface)
4672################################################################################
4673
4674
4675#
4676# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4677# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4678#
4679# This code is free software; you can redistribute it and/or modify it
4680# under the terms of the GNU General Public License version 2 only, as
4681# published by the Free Software Foundation.  Oracle designates this
4682# particular file as subject to the "Classpath" exception as provided
4683# by Oracle in the LICENSE file that accompanied this code.
4684#
4685# This code is distributed in the hope that it will be useful, but WITHOUT
4686# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4687# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4688# version 2 for more details (a copy is included in the LICENSE file that
4689# accompanied this code).
4690#
4691# You should have received a copy of the GNU General Public License version
4692# 2 along with this work; if not, write to the Free Software Foundation,
4693# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4694#
4695# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4696# or visit www.oracle.com if you need additional information or have any
4697# questions.
4698#
4699
4700################################################################################
4701# Build the freetype lib from source
4702################################################################################
4703
4704
4705################################################################################
4706# Check if a potential freeype library match is correct and usable
4707################################################################################
4708
4709
4710################################################################################
4711# Setup freetype (The FreeType2 font rendering library)
4712################################################################################
4713
4714
4715#
4716# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4717# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4718#
4719# This code is free software; you can redistribute it and/or modify it
4720# under the terms of the GNU General Public License version 2 only, as
4721# published by the Free Software Foundation.  Oracle designates this
4722# particular file as subject to the "Classpath" exception as provided
4723# by Oracle in the LICENSE file that accompanied this code.
4724#
4725# This code is distributed in the hope that it will be useful, but WITHOUT
4726# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4727# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4728# version 2 for more details (a copy is included in the LICENSE file that
4729# accompanied this code).
4730#
4731# You should have received a copy of the GNU General Public License version
4732# 2 along with this work; if not, write to the Free Software Foundation,
4733# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4734#
4735# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4736# or visit www.oracle.com if you need additional information or have any
4737# questions.
4738#
4739
4740################################################################################
4741# Setup the standard C/C++ runtime libraries.
4742#
4743# Most importantly, determine if stdc++ should be linked statically or
4744# dynamically.
4745################################################################################
4746
4747
4748#
4749# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4750# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4751#
4752# This code is free software; you can redistribute it and/or modify it
4753# under the terms of the GNU General Public License version 2 only, as
4754# published by the Free Software Foundation.  Oracle designates this
4755# particular file as subject to the "Classpath" exception as provided
4756# by Oracle in the LICENSE file that accompanied this code.
4757#
4758# This code is distributed in the hope that it will be useful, but WITHOUT
4759# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4760# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4761# version 2 for more details (a copy is included in the LICENSE file that
4762# accompanied this code).
4763#
4764# You should have received a copy of the GNU General Public License version
4765# 2 along with this work; if not, write to the Free Software Foundation,
4766# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4767#
4768# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4769# or visit www.oracle.com if you need additional information or have any
4770# questions.
4771#
4772
4773################################################################################
4774# Setup X11 Windows system
4775################################################################################
4776
4777
4778
4779################################################################################
4780# Determine which libraries are needed for this configuration
4781################################################################################
4782
4783
4784################################################################################
4785# Parse library options, and setup needed libraries
4786################################################################################
4787
4788
4789################################################################################
4790# Setup llvm (Low-Level VM)
4791################################################################################
4792
4793
4794################################################################################
4795# Setup various libraries, typically small system libraries
4796################################################################################
4797
4798
4799################################################################################
4800# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4801# redistribute it in the test image.
4802################################################################################
4803
4804
4805
4806#
4807# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4808# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4809#
4810# This code is free software; you can redistribute it and/or modify it
4811# under the terms of the GNU General Public License version 2 only, as
4812# published by the Free Software Foundation.  Oracle designates this
4813# particular file as subject to the "Classpath" exception as provided
4814# by Oracle in the LICENSE file that accompanied this code.
4815#
4816# This code is distributed in the hope that it will be useful, but WITHOUT
4817# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4818# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4819# version 2 for more details (a copy is included in the LICENSE file that
4820# accompanied this code).
4821#
4822# You should have received a copy of the GNU General Public License version
4823# 2 along with this work; if not, write to the Free Software Foundation,
4824# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4825#
4826# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4827# or visit www.oracle.com if you need additional information or have any
4828# questions.
4829#
4830
4831# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4832# Converts autoconf style CPU name to OpenJDK style, into
4833# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4834
4835
4836# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4837# Converts autoconf style OS name to OpenJDK style, into
4838# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4839
4840
4841# Expects $host_os $host_cpu $build_os and $build_cpu
4842# and $with_target_bits to have been setup!
4843#
4844# Translate the standard triplet(quadruplet) definition
4845# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4846# OPENJDK_BUILD_OS, etc.
4847
4848
4849# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4850# accordingly. Must be done after setting up build and target system, but before
4851# doing anything else with these values.
4852
4853
4854# Setup the legacy variables, for controlling the old makefiles.
4855#
4856
4857
4858# $1 - Either TARGET or BUILD to setup the variables for.
4859
4860
4861
4862
4863
4864
4865#%%% Build and target systems %%%
4866
4867
4868
4869
4870# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4871# Add -mX to various FLAGS variables.
4872
4873
4874
4875
4876
4877
4878#
4879# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4880# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4881#
4882# This code is free software; you can redistribute it and/or modify it
4883# under the terms of the GNU General Public License version 2 only, as
4884# published by the Free Software Foundation.  Oracle designates this
4885# particular file as subject to the "Classpath" exception as provided
4886# by Oracle in the LICENSE file that accompanied this code.
4887#
4888# This code is distributed in the hope that it will be useful, but WITHOUT
4889# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4890# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4891# version 2 for more details (a copy is included in the LICENSE file that
4892# accompanied this code).
4893#
4894# You should have received a copy of the GNU General Public License version
4895# 2 along with this work; if not, write to the Free Software Foundation,
4896# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4897#
4898# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4899# or visit www.oracle.com if you need additional information or have any
4900# questions.
4901#
4902
4903
4904
4905
4906
4907
4908
4909################################################################################
4910# Define a mechanism for importing extra prebuilt modules
4911#
4912
4913
4914
4915#
4916# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4917# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4918#
4919# This code is free software; you can redistribute it and/or modify it
4920# under the terms of the GNU General Public License version 2 only, as
4921# published by the Free Software Foundation.  Oracle designates this
4922# particular file as subject to the "Classpath" exception as provided
4923# by Oracle in the LICENSE file that accompanied this code.
4924#
4925# This code is distributed in the hope that it will be useful, but WITHOUT
4926# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4927# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4928# version 2 for more details (a copy is included in the LICENSE file that
4929# accompanied this code).
4930#
4931# You should have received a copy of the GNU General Public License version
4932# 2 along with this work; if not, write to the Free Software Foundation,
4933# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4934#
4935# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4936# or visit www.oracle.com if you need additional information or have any
4937# questions.
4938#
4939
4940########################################################################
4941# This file is responsible for detecting, verifying and setting up the
4942# toolchain, i.e. the compiler, linker and related utilities. It will setup
4943# proper paths to the binaries, but it will not setup any flags.
4944#
4945# The binaries used is determined by the toolchain type, which is the family of
4946# compilers and related tools that are used.
4947########################################################################
4948
4949
4950# All valid toolchains, regardless of platform (used by help.m4)
4951VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4952
4953# These toolchains are valid on different platforms
4954VALID_TOOLCHAINS_linux="gcc clang"
4955VALID_TOOLCHAINS_solaris="solstudio"
4956VALID_TOOLCHAINS_macosx="gcc clang"
4957VALID_TOOLCHAINS_aix="xlc"
4958VALID_TOOLCHAINS_windows="microsoft"
4959
4960# Toolchain descriptions
4961TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4962TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4963TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4964TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4965TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4966
4967# Minimum supported versions, empty means unspecified
4968TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4969TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4970TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4971TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4972TOOLCHAIN_MINIMUM_VERSION_xlc=""
4973
4974# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4975# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4976# $1 - optional variable prefix for compiler and version variables (BUILD_)
4977# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4978
4979
4980# Check if the configured compiler (C and C++) is of a specific version or
4981# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4982#
4983# Arguments:
4984#   VERSION:   The version string to check against the found version
4985#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4986#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4987#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4988
4989
4990
4991
4992# Setup a number of variables describing how native output files are
4993# named on this platform/toolchain.
4994
4995
4996# Determine which toolchain type to use, and make sure it is valid for this
4997# platform. Setup various information about the selected toolchain.
4998
4999
5000# Before we start detecting the toolchain executables, we might need some
5001# special setup, e.g. additional paths etc.
5002
5003
5004# Restore path, etc
5005
5006
5007# Check if a compiler is of the toolchain type we expect, and save the version
5008# information from it. If the compiler does not match the expected type,
5009# this function will abort using AC_MSG_ERROR. If it matches, the version will
5010# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5011# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5012#
5013# $1 = compiler to test (CC or CXX)
5014# $2 = human readable name of compiler (C or C++)
5015
5016
5017# Try to locate the given C or C++ compiler in the path, or otherwise.
5018#
5019# $1 = compiler to test (CC or CXX)
5020# $2 = human readable name of compiler (C or C++)
5021# $3 = compiler name to search for
5022
5023
5024# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5025# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5026# archiver (AR). Verify that the compilers are correct according to the
5027# toolchain type.
5028
5029
5030# Setup additional tools that is considered a part of the toolchain, but not the
5031# core part. Many of these are highly platform-specific and do not exist,
5032# and/or are not needed on all platforms.
5033
5034
5035# Setup the build tools (i.e, the compiler and linker used to build programs
5036# that should be run on the build platform, not the target platform, as a build
5037# helper). Since the non-cross-compile case uses the normal, target compilers
5038# for this, we can only do this after these have been setup.
5039
5040
5041# Do some additional checks on the detected tools.
5042
5043
5044# Setup the JTReg Regression Test Harness.
5045
5046
5047# Setup the JIB dependency resolver
5048
5049
5050#
5051# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5052# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5053#
5054# This code is free software; you can redistribute it and/or modify it
5055# under the terms of the GNU General Public License version 2 only, as
5056# published by the Free Software Foundation.  Oracle designates this
5057# particular file as subject to the "Classpath" exception as provided
5058# by Oracle in the LICENSE file that accompanied this code.
5059#
5060# This code is distributed in the hope that it will be useful, but WITHOUT
5061# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5062# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5063# version 2 for more details (a copy is included in the LICENSE file that
5064# accompanied this code).
5065#
5066# You should have received a copy of the GNU General Public License version
5067# 2 along with this work; if not, write to the Free Software Foundation,
5068# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5069#
5070# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5071# or visit www.oracle.com if you need additional information or have any
5072# questions.
5073#
5074
5075################################################################################
5076# The order of these defines the priority by which we try to find them.
5077VALID_VS_VERSIONS="2013 2012 2010"
5078
5079VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5080VS_VERSION_INTERNAL_2010=100
5081VS_MSVCR_2010=msvcr100.dll
5082# We don't use msvcp on Visual Studio 2010
5083#VS_MSVCP_2010=msvcp100.dll
5084VS_ENVVAR_2010="VS100COMNTOOLS"
5085VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5086VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5087VS_VS_PLATFORM_NAME_2010="v100"
5088VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5089
5090VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5091VS_VERSION_INTERNAL_2012=110
5092VS_MSVCR_2012=msvcr110.dll
5093VS_MSVCP_2012=msvcp110.dll
5094VS_ENVVAR_2012="VS110COMNTOOLS"
5095VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5096VS_SDK_INSTALLDIR_2012=
5097VS_VS_PLATFORM_NAME_2012="v110"
5098VS_SDK_PLATFORM_NAME_2012=
5099
5100VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5101VS_VERSION_INTERNAL_2013=120
5102VS_MSVCR_2013=msvcr120.dll
5103VS_MSVCP_2013=msvcp120.dll
5104VS_ENVVAR_2013="VS120COMNTOOLS"
5105VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5106VS_SDK_INSTALLDIR_2013=
5107VS_VS_PLATFORM_NAME_2013="v120"
5108VS_SDK_PLATFORM_NAME_2013=
5109
5110################################################################################
5111
5112
5113
5114################################################################################
5115
5116
5117
5118################################################################################
5119# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5120# build environment and assigns it to VS_ENV_CMD
5121
5122
5123################################################################################
5124
5125
5126
5127################################################################################
5128# Check if the VS env variables were setup prior to running configure.
5129# If not, then find vcvarsall.bat and run it automatically, and integrate
5130# the set env variables into the spec file.
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145# This line needs to be here, verbatim, after all includes and the dummy hook
5146# definitions. It is replaced with custom functionality when building
5147# custom sources.
5148#CUSTOM_AUTOCONF_INCLUDE
5149
5150# Do not change or remove the following line, it is needed for consistency checks:
5151DATE_WHEN_GENERATED=1496222235
5152
5153###############################################################################
5154#
5155# Initialization / Boot-strapping
5156#
5157# The bootstrapping process needs to solve the "chicken or the egg" problem,
5158# thus it jumps back and forth, each time gaining something needed later on.
5159#
5160###############################################################################
5161
5162# If we are requested to print additional help, do that and then exit.
5163# This must be the very first call.
5164
5165  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5166
5167    # Print available toolchains
5168    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5169    $PRINTF "Which are valid to use depends on the build platform.\n"
5170    for toolchain in $VALID_TOOLCHAINS_all; do
5171      # Use indirect variable referencing
5172      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5173      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5174      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5175    done
5176    $PRINTF "\n"
5177
5178    # Print available jvm features
5179    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5180    $PRINTF "Which are valid to use depends on the target platform.\n  "
5181    $PRINTF "%s " $VALID_JVM_FEATURES
5182    $PRINTF "\n"
5183
5184    # And now exit directly
5185    exit 0
5186  fi
5187
5188
5189# Basic initialization that must happen first of all in the normal process.
5190
5191  # Save the original command line. This is passed to us by the wrapper configure script.
5192
5193  # Save the path variable before it gets changed
5194  ORIGINAL_PATH="$PATH"
5195
5196  DATE_WHEN_CONFIGURED=`LANG=C date`
5197
5198  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5199$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5200  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5201$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5202
5203
5204  # Start with tools that do not need have cross compilation support
5205  # and can be expected to be found in the default PATH. These tools are
5206  # used by configure.
5207
5208  # First are all the simple required tools.
5209
5210
5211
5212  # Publish this variable in the help.
5213
5214
5215  if [ -z "${BASENAME+x}" ]; then
5216    # The variable is not set by user, try to locate tool using the code snippet
5217    for ac_prog in basename
5218do
5219  # Extract the first word of "$ac_prog", so it can be a program name with args.
5220set dummy $ac_prog; ac_word=$2
5221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5222$as_echo_n "checking for $ac_word... " >&6; }
5223if ${ac_cv_path_BASENAME+:} false; then :
5224  $as_echo_n "(cached) " >&6
5225else
5226  case $BASENAME in
5227  [\\/]* | ?:[\\/]*)
5228  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5229  ;;
5230  *)
5231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5232for as_dir in $PATH
5233do
5234  IFS=$as_save_IFS
5235  test -z "$as_dir" && as_dir=.
5236    for ac_exec_ext in '' $ac_executable_extensions; do
5237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5238    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5240    break 2
5241  fi
5242done
5243  done
5244IFS=$as_save_IFS
5245
5246  ;;
5247esac
5248fi
5249BASENAME=$ac_cv_path_BASENAME
5250if test -n "$BASENAME"; then
5251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5252$as_echo "$BASENAME" >&6; }
5253else
5254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5255$as_echo "no" >&6; }
5256fi
5257
5258
5259  test -n "$BASENAME" && break
5260done
5261
5262  else
5263    # The variable is set, but is it from the command line or the environment?
5264
5265    # Try to remove the string !BASENAME! from our list.
5266    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5267    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5268      # If it failed, the variable was not from the command line. Ignore it,
5269      # but warn the user (except for BASH, which is always set by the calling BASH).
5270      if test "xBASENAME" != xBASH; then
5271        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5272$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5273      fi
5274      # Try to locate tool using the code snippet
5275      for ac_prog in basename
5276do
5277  # Extract the first word of "$ac_prog", so it can be a program name with args.
5278set dummy $ac_prog; ac_word=$2
5279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5280$as_echo_n "checking for $ac_word... " >&6; }
5281if ${ac_cv_path_BASENAME+:} false; then :
5282  $as_echo_n "(cached) " >&6
5283else
5284  case $BASENAME in
5285  [\\/]* | ?:[\\/]*)
5286  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5287  ;;
5288  *)
5289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5290for as_dir in $PATH
5291do
5292  IFS=$as_save_IFS
5293  test -z "$as_dir" && as_dir=.
5294    for ac_exec_ext in '' $ac_executable_extensions; do
5295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5296    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5298    break 2
5299  fi
5300done
5301  done
5302IFS=$as_save_IFS
5303
5304  ;;
5305esac
5306fi
5307BASENAME=$ac_cv_path_BASENAME
5308if test -n "$BASENAME"; then
5309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5310$as_echo "$BASENAME" >&6; }
5311else
5312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5313$as_echo "no" >&6; }
5314fi
5315
5316
5317  test -n "$BASENAME" && break
5318done
5319
5320    else
5321      # If it succeeded, then it was overridden by the user. We will use it
5322      # for the tool.
5323
5324      # First remove it from the list of overridden variables, so we can test
5325      # for unknown variables in the end.
5326      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5327
5328      # Check if we try to supply an empty value
5329      if test "x$BASENAME" = x; then
5330        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5331$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5332        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5333$as_echo_n "checking for BASENAME... " >&6; }
5334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5335$as_echo "disabled" >&6; }
5336      else
5337        # Check if the provided tool contains a complete path.
5338        tool_specified="$BASENAME"
5339        tool_basename="${tool_specified##*/}"
5340        if test "x$tool_basename" = "x$tool_specified"; then
5341          # A command without a complete path is provided, search $PATH.
5342          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5343$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5344          # Extract the first word of "$tool_basename", so it can be a program name with args.
5345set dummy $tool_basename; ac_word=$2
5346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5347$as_echo_n "checking for $ac_word... " >&6; }
5348if ${ac_cv_path_BASENAME+:} false; then :
5349  $as_echo_n "(cached) " >&6
5350else
5351  case $BASENAME in
5352  [\\/]* | ?:[\\/]*)
5353  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5354  ;;
5355  *)
5356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5357for as_dir in $PATH
5358do
5359  IFS=$as_save_IFS
5360  test -z "$as_dir" && as_dir=.
5361    for ac_exec_ext in '' $ac_executable_extensions; do
5362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5363    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5365    break 2
5366  fi
5367done
5368  done
5369IFS=$as_save_IFS
5370
5371  ;;
5372esac
5373fi
5374BASENAME=$ac_cv_path_BASENAME
5375if test -n "$BASENAME"; then
5376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5377$as_echo "$BASENAME" >&6; }
5378else
5379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5380$as_echo "no" >&6; }
5381fi
5382
5383
5384          if test "x$BASENAME" = x; then
5385            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5386          fi
5387        else
5388          # Otherwise we believe it is a complete path. Use it as it is.
5389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5390$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5391          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5392$as_echo_n "checking for BASENAME... " >&6; }
5393          if test ! -x "$tool_specified"; then
5394            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5395$as_echo "not found" >&6; }
5396            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5397          fi
5398          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5399$as_echo "$tool_specified" >&6; }
5400        fi
5401      fi
5402    fi
5403
5404  fi
5405
5406
5407
5408  if test "x$BASENAME" = x; then
5409    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5410  fi
5411
5412
5413
5414
5415
5416  # Publish this variable in the help.
5417
5418
5419  if [ -z "${BASH+x}" ]; then
5420    # The variable is not set by user, try to locate tool using the code snippet
5421    for ac_prog in bash
5422do
5423  # Extract the first word of "$ac_prog", so it can be a program name with args.
5424set dummy $ac_prog; ac_word=$2
5425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5426$as_echo_n "checking for $ac_word... " >&6; }
5427if ${ac_cv_path_BASH+:} false; then :
5428  $as_echo_n "(cached) " >&6
5429else
5430  case $BASH in
5431  [\\/]* | ?:[\\/]*)
5432  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5433  ;;
5434  *)
5435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5436for as_dir in $PATH
5437do
5438  IFS=$as_save_IFS
5439  test -z "$as_dir" && as_dir=.
5440    for ac_exec_ext in '' $ac_executable_extensions; do
5441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5442    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5444    break 2
5445  fi
5446done
5447  done
5448IFS=$as_save_IFS
5449
5450  ;;
5451esac
5452fi
5453BASH=$ac_cv_path_BASH
5454if test -n "$BASH"; then
5455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5456$as_echo "$BASH" >&6; }
5457else
5458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5459$as_echo "no" >&6; }
5460fi
5461
5462
5463  test -n "$BASH" && break
5464done
5465
5466  else
5467    # The variable is set, but is it from the command line or the environment?
5468
5469    # Try to remove the string !BASH! from our list.
5470    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5471    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5472      # If it failed, the variable was not from the command line. Ignore it,
5473      # but warn the user (except for BASH, which is always set by the calling BASH).
5474      if test "xBASH" != xBASH; then
5475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5476$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5477      fi
5478      # Try to locate tool using the code snippet
5479      for ac_prog in bash
5480do
5481  # Extract the first word of "$ac_prog", so it can be a program name with args.
5482set dummy $ac_prog; ac_word=$2
5483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5484$as_echo_n "checking for $ac_word... " >&6; }
5485if ${ac_cv_path_BASH+:} false; then :
5486  $as_echo_n "(cached) " >&6
5487else
5488  case $BASH in
5489  [\\/]* | ?:[\\/]*)
5490  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5491  ;;
5492  *)
5493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5494for as_dir in $PATH
5495do
5496  IFS=$as_save_IFS
5497  test -z "$as_dir" && as_dir=.
5498    for ac_exec_ext in '' $ac_executable_extensions; do
5499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5500    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5502    break 2
5503  fi
5504done
5505  done
5506IFS=$as_save_IFS
5507
5508  ;;
5509esac
5510fi
5511BASH=$ac_cv_path_BASH
5512if test -n "$BASH"; then
5513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5514$as_echo "$BASH" >&6; }
5515else
5516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5517$as_echo "no" >&6; }
5518fi
5519
5520
5521  test -n "$BASH" && break
5522done
5523
5524    else
5525      # If it succeeded, then it was overridden by the user. We will use it
5526      # for the tool.
5527
5528      # First remove it from the list of overridden variables, so we can test
5529      # for unknown variables in the end.
5530      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5531
5532      # Check if we try to supply an empty value
5533      if test "x$BASH" = x; then
5534        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5535$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5537$as_echo_n "checking for BASH... " >&6; }
5538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5539$as_echo "disabled" >&6; }
5540      else
5541        # Check if the provided tool contains a complete path.
5542        tool_specified="$BASH"
5543        tool_basename="${tool_specified##*/}"
5544        if test "x$tool_basename" = "x$tool_specified"; then
5545          # A command without a complete path is provided, search $PATH.
5546          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5547$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5548          # Extract the first word of "$tool_basename", so it can be a program name with args.
5549set dummy $tool_basename; ac_word=$2
5550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5551$as_echo_n "checking for $ac_word... " >&6; }
5552if ${ac_cv_path_BASH+:} false; then :
5553  $as_echo_n "(cached) " >&6
5554else
5555  case $BASH in
5556  [\\/]* | ?:[\\/]*)
5557  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5558  ;;
5559  *)
5560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5561for as_dir in $PATH
5562do
5563  IFS=$as_save_IFS
5564  test -z "$as_dir" && as_dir=.
5565    for ac_exec_ext in '' $ac_executable_extensions; do
5566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5567    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5569    break 2
5570  fi
5571done
5572  done
5573IFS=$as_save_IFS
5574
5575  ;;
5576esac
5577fi
5578BASH=$ac_cv_path_BASH
5579if test -n "$BASH"; then
5580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5581$as_echo "$BASH" >&6; }
5582else
5583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5584$as_echo "no" >&6; }
5585fi
5586
5587
5588          if test "x$BASH" = x; then
5589            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5590          fi
5591        else
5592          # Otherwise we believe it is a complete path. Use it as it is.
5593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5594$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5595          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5596$as_echo_n "checking for BASH... " >&6; }
5597          if test ! -x "$tool_specified"; then
5598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5599$as_echo "not found" >&6; }
5600            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5601          fi
5602          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5603$as_echo "$tool_specified" >&6; }
5604        fi
5605      fi
5606    fi
5607
5608  fi
5609
5610
5611
5612  if test "x$BASH" = x; then
5613    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5614  fi
5615
5616
5617
5618
5619
5620  # Publish this variable in the help.
5621
5622
5623  if [ -z "${CAT+x}" ]; then
5624    # The variable is not set by user, try to locate tool using the code snippet
5625    for ac_prog in cat
5626do
5627  # Extract the first word of "$ac_prog", so it can be a program name with args.
5628set dummy $ac_prog; ac_word=$2
5629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5630$as_echo_n "checking for $ac_word... " >&6; }
5631if ${ac_cv_path_CAT+:} false; then :
5632  $as_echo_n "(cached) " >&6
5633else
5634  case $CAT in
5635  [\\/]* | ?:[\\/]*)
5636  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5637  ;;
5638  *)
5639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5640for as_dir in $PATH
5641do
5642  IFS=$as_save_IFS
5643  test -z "$as_dir" && as_dir=.
5644    for ac_exec_ext in '' $ac_executable_extensions; do
5645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5646    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5648    break 2
5649  fi
5650done
5651  done
5652IFS=$as_save_IFS
5653
5654  ;;
5655esac
5656fi
5657CAT=$ac_cv_path_CAT
5658if test -n "$CAT"; then
5659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5660$as_echo "$CAT" >&6; }
5661else
5662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5663$as_echo "no" >&6; }
5664fi
5665
5666
5667  test -n "$CAT" && break
5668done
5669
5670  else
5671    # The variable is set, but is it from the command line or the environment?
5672
5673    # Try to remove the string !CAT! from our list.
5674    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5675    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5676      # If it failed, the variable was not from the command line. Ignore it,
5677      # but warn the user (except for BASH, which is always set by the calling BASH).
5678      if test "xCAT" != xBASH; then
5679        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5680$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5681      fi
5682      # Try to locate tool using the code snippet
5683      for ac_prog in cat
5684do
5685  # Extract the first word of "$ac_prog", so it can be a program name with args.
5686set dummy $ac_prog; ac_word=$2
5687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5688$as_echo_n "checking for $ac_word... " >&6; }
5689if ${ac_cv_path_CAT+:} false; then :
5690  $as_echo_n "(cached) " >&6
5691else
5692  case $CAT in
5693  [\\/]* | ?:[\\/]*)
5694  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5695  ;;
5696  *)
5697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5698for as_dir in $PATH
5699do
5700  IFS=$as_save_IFS
5701  test -z "$as_dir" && as_dir=.
5702    for ac_exec_ext in '' $ac_executable_extensions; do
5703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5704    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5706    break 2
5707  fi
5708done
5709  done
5710IFS=$as_save_IFS
5711
5712  ;;
5713esac
5714fi
5715CAT=$ac_cv_path_CAT
5716if test -n "$CAT"; then
5717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5718$as_echo "$CAT" >&6; }
5719else
5720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5721$as_echo "no" >&6; }
5722fi
5723
5724
5725  test -n "$CAT" && break
5726done
5727
5728    else
5729      # If it succeeded, then it was overridden by the user. We will use it
5730      # for the tool.
5731
5732      # First remove it from the list of overridden variables, so we can test
5733      # for unknown variables in the end.
5734      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5735
5736      # Check if we try to supply an empty value
5737      if test "x$CAT" = x; then
5738        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5739$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5740        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5741$as_echo_n "checking for CAT... " >&6; }
5742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5743$as_echo "disabled" >&6; }
5744      else
5745        # Check if the provided tool contains a complete path.
5746        tool_specified="$CAT"
5747        tool_basename="${tool_specified##*/}"
5748        if test "x$tool_basename" = "x$tool_specified"; then
5749          # A command without a complete path is provided, search $PATH.
5750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5751$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5752          # Extract the first word of "$tool_basename", so it can be a program name with args.
5753set dummy $tool_basename; ac_word=$2
5754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5755$as_echo_n "checking for $ac_word... " >&6; }
5756if ${ac_cv_path_CAT+:} false; then :
5757  $as_echo_n "(cached) " >&6
5758else
5759  case $CAT in
5760  [\\/]* | ?:[\\/]*)
5761  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5762  ;;
5763  *)
5764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5765for as_dir in $PATH
5766do
5767  IFS=$as_save_IFS
5768  test -z "$as_dir" && as_dir=.
5769    for ac_exec_ext in '' $ac_executable_extensions; do
5770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5771    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5773    break 2
5774  fi
5775done
5776  done
5777IFS=$as_save_IFS
5778
5779  ;;
5780esac
5781fi
5782CAT=$ac_cv_path_CAT
5783if test -n "$CAT"; then
5784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5785$as_echo "$CAT" >&6; }
5786else
5787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5788$as_echo "no" >&6; }
5789fi
5790
5791
5792          if test "x$CAT" = x; then
5793            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5794          fi
5795        else
5796          # Otherwise we believe it is a complete path. Use it as it is.
5797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5798$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5799          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5800$as_echo_n "checking for CAT... " >&6; }
5801          if test ! -x "$tool_specified"; then
5802            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5803$as_echo "not found" >&6; }
5804            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5805          fi
5806          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5807$as_echo "$tool_specified" >&6; }
5808        fi
5809      fi
5810    fi
5811
5812  fi
5813
5814
5815
5816  if test "x$CAT" = x; then
5817    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5818  fi
5819
5820
5821
5822
5823
5824  # Publish this variable in the help.
5825
5826
5827  if [ -z "${CHMOD+x}" ]; then
5828    # The variable is not set by user, try to locate tool using the code snippet
5829    for ac_prog in chmod
5830do
5831  # Extract the first word of "$ac_prog", so it can be a program name with args.
5832set dummy $ac_prog; ac_word=$2
5833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5834$as_echo_n "checking for $ac_word... " >&6; }
5835if ${ac_cv_path_CHMOD+:} false; then :
5836  $as_echo_n "(cached) " >&6
5837else
5838  case $CHMOD in
5839  [\\/]* | ?:[\\/]*)
5840  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5841  ;;
5842  *)
5843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5844for as_dir in $PATH
5845do
5846  IFS=$as_save_IFS
5847  test -z "$as_dir" && as_dir=.
5848    for ac_exec_ext in '' $ac_executable_extensions; do
5849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5850    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5852    break 2
5853  fi
5854done
5855  done
5856IFS=$as_save_IFS
5857
5858  ;;
5859esac
5860fi
5861CHMOD=$ac_cv_path_CHMOD
5862if test -n "$CHMOD"; then
5863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5864$as_echo "$CHMOD" >&6; }
5865else
5866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5867$as_echo "no" >&6; }
5868fi
5869
5870
5871  test -n "$CHMOD" && break
5872done
5873
5874  else
5875    # The variable is set, but is it from the command line or the environment?
5876
5877    # Try to remove the string !CHMOD! from our list.
5878    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5879    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5880      # If it failed, the variable was not from the command line. Ignore it,
5881      # but warn the user (except for BASH, which is always set by the calling BASH).
5882      if test "xCHMOD" != xBASH; then
5883        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5884$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5885      fi
5886      # Try to locate tool using the code snippet
5887      for ac_prog in chmod
5888do
5889  # Extract the first word of "$ac_prog", so it can be a program name with args.
5890set dummy $ac_prog; ac_word=$2
5891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5892$as_echo_n "checking for $ac_word... " >&6; }
5893if ${ac_cv_path_CHMOD+:} false; then :
5894  $as_echo_n "(cached) " >&6
5895else
5896  case $CHMOD in
5897  [\\/]* | ?:[\\/]*)
5898  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5899  ;;
5900  *)
5901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5902for as_dir in $PATH
5903do
5904  IFS=$as_save_IFS
5905  test -z "$as_dir" && as_dir=.
5906    for ac_exec_ext in '' $ac_executable_extensions; do
5907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5908    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5910    break 2
5911  fi
5912done
5913  done
5914IFS=$as_save_IFS
5915
5916  ;;
5917esac
5918fi
5919CHMOD=$ac_cv_path_CHMOD
5920if test -n "$CHMOD"; then
5921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5922$as_echo "$CHMOD" >&6; }
5923else
5924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5925$as_echo "no" >&6; }
5926fi
5927
5928
5929  test -n "$CHMOD" && break
5930done
5931
5932    else
5933      # If it succeeded, then it was overridden by the user. We will use it
5934      # for the tool.
5935
5936      # First remove it from the list of overridden variables, so we can test
5937      # for unknown variables in the end.
5938      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5939
5940      # Check if we try to supply an empty value
5941      if test "x$CHMOD" = x; then
5942        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5943$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5944        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5945$as_echo_n "checking for CHMOD... " >&6; }
5946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5947$as_echo "disabled" >&6; }
5948      else
5949        # Check if the provided tool contains a complete path.
5950        tool_specified="$CHMOD"
5951        tool_basename="${tool_specified##*/}"
5952        if test "x$tool_basename" = "x$tool_specified"; then
5953          # A command without a complete path is provided, search $PATH.
5954          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5955$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5956          # Extract the first word of "$tool_basename", so it can be a program name with args.
5957set dummy $tool_basename; ac_word=$2
5958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5959$as_echo_n "checking for $ac_word... " >&6; }
5960if ${ac_cv_path_CHMOD+:} false; then :
5961  $as_echo_n "(cached) " >&6
5962else
5963  case $CHMOD in
5964  [\\/]* | ?:[\\/]*)
5965  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5966  ;;
5967  *)
5968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5969for as_dir in $PATH
5970do
5971  IFS=$as_save_IFS
5972  test -z "$as_dir" && as_dir=.
5973    for ac_exec_ext in '' $ac_executable_extensions; do
5974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5975    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5977    break 2
5978  fi
5979done
5980  done
5981IFS=$as_save_IFS
5982
5983  ;;
5984esac
5985fi
5986CHMOD=$ac_cv_path_CHMOD
5987if test -n "$CHMOD"; then
5988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5989$as_echo "$CHMOD" >&6; }
5990else
5991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5992$as_echo "no" >&6; }
5993fi
5994
5995
5996          if test "x$CHMOD" = x; then
5997            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5998          fi
5999        else
6000          # Otherwise we believe it is a complete path. Use it as it is.
6001          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6002$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6003          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6004$as_echo_n "checking for CHMOD... " >&6; }
6005          if test ! -x "$tool_specified"; then
6006            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6007$as_echo "not found" >&6; }
6008            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6009          fi
6010          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6011$as_echo "$tool_specified" >&6; }
6012        fi
6013      fi
6014    fi
6015
6016  fi
6017
6018
6019
6020  if test "x$CHMOD" = x; then
6021    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6022  fi
6023
6024
6025
6026
6027
6028  # Publish this variable in the help.
6029
6030
6031  if [ -z "${CMP+x}" ]; then
6032    # The variable is not set by user, try to locate tool using the code snippet
6033    for ac_prog in cmp
6034do
6035  # Extract the first word of "$ac_prog", so it can be a program name with args.
6036set dummy $ac_prog; ac_word=$2
6037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6038$as_echo_n "checking for $ac_word... " >&6; }
6039if ${ac_cv_path_CMP+:} false; then :
6040  $as_echo_n "(cached) " >&6
6041else
6042  case $CMP in
6043  [\\/]* | ?:[\\/]*)
6044  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6045  ;;
6046  *)
6047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6048for as_dir in $PATH
6049do
6050  IFS=$as_save_IFS
6051  test -z "$as_dir" && as_dir=.
6052    for ac_exec_ext in '' $ac_executable_extensions; do
6053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6054    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6056    break 2
6057  fi
6058done
6059  done
6060IFS=$as_save_IFS
6061
6062  ;;
6063esac
6064fi
6065CMP=$ac_cv_path_CMP
6066if test -n "$CMP"; then
6067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6068$as_echo "$CMP" >&6; }
6069else
6070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6071$as_echo "no" >&6; }
6072fi
6073
6074
6075  test -n "$CMP" && break
6076done
6077
6078  else
6079    # The variable is set, but is it from the command line or the environment?
6080
6081    # Try to remove the string !CMP! from our list.
6082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6084      # If it failed, the variable was not from the command line. Ignore it,
6085      # but warn the user (except for BASH, which is always set by the calling BASH).
6086      if test "xCMP" != xBASH; then
6087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6088$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6089      fi
6090      # Try to locate tool using the code snippet
6091      for ac_prog in cmp
6092do
6093  # Extract the first word of "$ac_prog", so it can be a program name with args.
6094set dummy $ac_prog; ac_word=$2
6095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6096$as_echo_n "checking for $ac_word... " >&6; }
6097if ${ac_cv_path_CMP+:} false; then :
6098  $as_echo_n "(cached) " >&6
6099else
6100  case $CMP in
6101  [\\/]* | ?:[\\/]*)
6102  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6103  ;;
6104  *)
6105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6106for as_dir in $PATH
6107do
6108  IFS=$as_save_IFS
6109  test -z "$as_dir" && as_dir=.
6110    for ac_exec_ext in '' $ac_executable_extensions; do
6111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6112    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6114    break 2
6115  fi
6116done
6117  done
6118IFS=$as_save_IFS
6119
6120  ;;
6121esac
6122fi
6123CMP=$ac_cv_path_CMP
6124if test -n "$CMP"; then
6125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6126$as_echo "$CMP" >&6; }
6127else
6128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6129$as_echo "no" >&6; }
6130fi
6131
6132
6133  test -n "$CMP" && break
6134done
6135
6136    else
6137      # If it succeeded, then it was overridden by the user. We will use it
6138      # for the tool.
6139
6140      # First remove it from the list of overridden variables, so we can test
6141      # for unknown variables in the end.
6142      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6143
6144      # Check if we try to supply an empty value
6145      if test "x$CMP" = x; then
6146        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6147$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6148        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6149$as_echo_n "checking for CMP... " >&6; }
6150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6151$as_echo "disabled" >&6; }
6152      else
6153        # Check if the provided tool contains a complete path.
6154        tool_specified="$CMP"
6155        tool_basename="${tool_specified##*/}"
6156        if test "x$tool_basename" = "x$tool_specified"; then
6157          # A command without a complete path is provided, search $PATH.
6158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6159$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6160          # Extract the first word of "$tool_basename", so it can be a program name with args.
6161set dummy $tool_basename; ac_word=$2
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6163$as_echo_n "checking for $ac_word... " >&6; }
6164if ${ac_cv_path_CMP+:} false; then :
6165  $as_echo_n "(cached) " >&6
6166else
6167  case $CMP in
6168  [\\/]* | ?:[\\/]*)
6169  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6170  ;;
6171  *)
6172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6173for as_dir in $PATH
6174do
6175  IFS=$as_save_IFS
6176  test -z "$as_dir" && as_dir=.
6177    for ac_exec_ext in '' $ac_executable_extensions; do
6178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6179    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6181    break 2
6182  fi
6183done
6184  done
6185IFS=$as_save_IFS
6186
6187  ;;
6188esac
6189fi
6190CMP=$ac_cv_path_CMP
6191if test -n "$CMP"; then
6192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6193$as_echo "$CMP" >&6; }
6194else
6195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6196$as_echo "no" >&6; }
6197fi
6198
6199
6200          if test "x$CMP" = x; then
6201            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6202          fi
6203        else
6204          # Otherwise we believe it is a complete path. Use it as it is.
6205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6206$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6207          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6208$as_echo_n "checking for CMP... " >&6; }
6209          if test ! -x "$tool_specified"; then
6210            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6211$as_echo "not found" >&6; }
6212            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6213          fi
6214          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6215$as_echo "$tool_specified" >&6; }
6216        fi
6217      fi
6218    fi
6219
6220  fi
6221
6222
6223
6224  if test "x$CMP" = x; then
6225    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6226  fi
6227
6228
6229
6230
6231
6232  # Publish this variable in the help.
6233
6234
6235  if [ -z "${COMM+x}" ]; then
6236    # The variable is not set by user, try to locate tool using the code snippet
6237    for ac_prog in comm
6238do
6239  # Extract the first word of "$ac_prog", so it can be a program name with args.
6240set dummy $ac_prog; ac_word=$2
6241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6242$as_echo_n "checking for $ac_word... " >&6; }
6243if ${ac_cv_path_COMM+:} false; then :
6244  $as_echo_n "(cached) " >&6
6245else
6246  case $COMM in
6247  [\\/]* | ?:[\\/]*)
6248  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6249  ;;
6250  *)
6251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6252for as_dir in $PATH
6253do
6254  IFS=$as_save_IFS
6255  test -z "$as_dir" && as_dir=.
6256    for ac_exec_ext in '' $ac_executable_extensions; do
6257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6258    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6260    break 2
6261  fi
6262done
6263  done
6264IFS=$as_save_IFS
6265
6266  ;;
6267esac
6268fi
6269COMM=$ac_cv_path_COMM
6270if test -n "$COMM"; then
6271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6272$as_echo "$COMM" >&6; }
6273else
6274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6275$as_echo "no" >&6; }
6276fi
6277
6278
6279  test -n "$COMM" && break
6280done
6281
6282  else
6283    # The variable is set, but is it from the command line or the environment?
6284
6285    # Try to remove the string !COMM! from our list.
6286    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6287    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6288      # If it failed, the variable was not from the command line. Ignore it,
6289      # but warn the user (except for BASH, which is always set by the calling BASH).
6290      if test "xCOMM" != xBASH; then
6291        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6292$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6293      fi
6294      # Try to locate tool using the code snippet
6295      for ac_prog in comm
6296do
6297  # Extract the first word of "$ac_prog", so it can be a program name with args.
6298set dummy $ac_prog; ac_word=$2
6299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6300$as_echo_n "checking for $ac_word... " >&6; }
6301if ${ac_cv_path_COMM+:} false; then :
6302  $as_echo_n "(cached) " >&6
6303else
6304  case $COMM in
6305  [\\/]* | ?:[\\/]*)
6306  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6307  ;;
6308  *)
6309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6310for as_dir in $PATH
6311do
6312  IFS=$as_save_IFS
6313  test -z "$as_dir" && as_dir=.
6314    for ac_exec_ext in '' $ac_executable_extensions; do
6315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6316    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6318    break 2
6319  fi
6320done
6321  done
6322IFS=$as_save_IFS
6323
6324  ;;
6325esac
6326fi
6327COMM=$ac_cv_path_COMM
6328if test -n "$COMM"; then
6329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6330$as_echo "$COMM" >&6; }
6331else
6332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6333$as_echo "no" >&6; }
6334fi
6335
6336
6337  test -n "$COMM" && break
6338done
6339
6340    else
6341      # If it succeeded, then it was overridden by the user. We will use it
6342      # for the tool.
6343
6344      # First remove it from the list of overridden variables, so we can test
6345      # for unknown variables in the end.
6346      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6347
6348      # Check if we try to supply an empty value
6349      if test "x$COMM" = x; then
6350        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6351$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6353$as_echo_n "checking for COMM... " >&6; }
6354        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6355$as_echo "disabled" >&6; }
6356      else
6357        # Check if the provided tool contains a complete path.
6358        tool_specified="$COMM"
6359        tool_basename="${tool_specified##*/}"
6360        if test "x$tool_basename" = "x$tool_specified"; then
6361          # A command without a complete path is provided, search $PATH.
6362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6363$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6364          # Extract the first word of "$tool_basename", so it can be a program name with args.
6365set dummy $tool_basename; ac_word=$2
6366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6367$as_echo_n "checking for $ac_word... " >&6; }
6368if ${ac_cv_path_COMM+:} false; then :
6369  $as_echo_n "(cached) " >&6
6370else
6371  case $COMM in
6372  [\\/]* | ?:[\\/]*)
6373  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6374  ;;
6375  *)
6376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6377for as_dir in $PATH
6378do
6379  IFS=$as_save_IFS
6380  test -z "$as_dir" && as_dir=.
6381    for ac_exec_ext in '' $ac_executable_extensions; do
6382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6383    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6385    break 2
6386  fi
6387done
6388  done
6389IFS=$as_save_IFS
6390
6391  ;;
6392esac
6393fi
6394COMM=$ac_cv_path_COMM
6395if test -n "$COMM"; then
6396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6397$as_echo "$COMM" >&6; }
6398else
6399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6400$as_echo "no" >&6; }
6401fi
6402
6403
6404          if test "x$COMM" = x; then
6405            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6406          fi
6407        else
6408          # Otherwise we believe it is a complete path. Use it as it is.
6409          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6410$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6411          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6412$as_echo_n "checking for COMM... " >&6; }
6413          if test ! -x "$tool_specified"; then
6414            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6415$as_echo "not found" >&6; }
6416            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6417          fi
6418          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6419$as_echo "$tool_specified" >&6; }
6420        fi
6421      fi
6422    fi
6423
6424  fi
6425
6426
6427
6428  if test "x$COMM" = x; then
6429    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6430  fi
6431
6432
6433
6434
6435
6436  # Publish this variable in the help.
6437
6438
6439  if [ -z "${CP+x}" ]; then
6440    # The variable is not set by user, try to locate tool using the code snippet
6441    for ac_prog in cp
6442do
6443  # Extract the first word of "$ac_prog", so it can be a program name with args.
6444set dummy $ac_prog; ac_word=$2
6445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6446$as_echo_n "checking for $ac_word... " >&6; }
6447if ${ac_cv_path_CP+:} false; then :
6448  $as_echo_n "(cached) " >&6
6449else
6450  case $CP in
6451  [\\/]* | ?:[\\/]*)
6452  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6453  ;;
6454  *)
6455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6456for as_dir in $PATH
6457do
6458  IFS=$as_save_IFS
6459  test -z "$as_dir" && as_dir=.
6460    for ac_exec_ext in '' $ac_executable_extensions; do
6461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6462    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6464    break 2
6465  fi
6466done
6467  done
6468IFS=$as_save_IFS
6469
6470  ;;
6471esac
6472fi
6473CP=$ac_cv_path_CP
6474if test -n "$CP"; then
6475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6476$as_echo "$CP" >&6; }
6477else
6478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6479$as_echo "no" >&6; }
6480fi
6481
6482
6483  test -n "$CP" && break
6484done
6485
6486  else
6487    # The variable is set, but is it from the command line or the environment?
6488
6489    # Try to remove the string !CP! from our list.
6490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6492      # If it failed, the variable was not from the command line. Ignore it,
6493      # but warn the user (except for BASH, which is always set by the calling BASH).
6494      if test "xCP" != xBASH; then
6495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6496$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6497      fi
6498      # Try to locate tool using the code snippet
6499      for ac_prog in cp
6500do
6501  # Extract the first word of "$ac_prog", so it can be a program name with args.
6502set dummy $ac_prog; ac_word=$2
6503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6504$as_echo_n "checking for $ac_word... " >&6; }
6505if ${ac_cv_path_CP+:} false; then :
6506  $as_echo_n "(cached) " >&6
6507else
6508  case $CP in
6509  [\\/]* | ?:[\\/]*)
6510  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6511  ;;
6512  *)
6513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6514for as_dir in $PATH
6515do
6516  IFS=$as_save_IFS
6517  test -z "$as_dir" && as_dir=.
6518    for ac_exec_ext in '' $ac_executable_extensions; do
6519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6520    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6522    break 2
6523  fi
6524done
6525  done
6526IFS=$as_save_IFS
6527
6528  ;;
6529esac
6530fi
6531CP=$ac_cv_path_CP
6532if test -n "$CP"; then
6533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6534$as_echo "$CP" >&6; }
6535else
6536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6537$as_echo "no" >&6; }
6538fi
6539
6540
6541  test -n "$CP" && break
6542done
6543
6544    else
6545      # If it succeeded, then it was overridden by the user. We will use it
6546      # for the tool.
6547
6548      # First remove it from the list of overridden variables, so we can test
6549      # for unknown variables in the end.
6550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6551
6552      # Check if we try to supply an empty value
6553      if test "x$CP" = x; then
6554        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6555$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6557$as_echo_n "checking for CP... " >&6; }
6558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6559$as_echo "disabled" >&6; }
6560      else
6561        # Check if the provided tool contains a complete path.
6562        tool_specified="$CP"
6563        tool_basename="${tool_specified##*/}"
6564        if test "x$tool_basename" = "x$tool_specified"; then
6565          # A command without a complete path is provided, search $PATH.
6566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6567$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6568          # Extract the first word of "$tool_basename", so it can be a program name with args.
6569set dummy $tool_basename; ac_word=$2
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6571$as_echo_n "checking for $ac_word... " >&6; }
6572if ${ac_cv_path_CP+:} false; then :
6573  $as_echo_n "(cached) " >&6
6574else
6575  case $CP in
6576  [\\/]* | ?:[\\/]*)
6577  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6578  ;;
6579  *)
6580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6581for as_dir in $PATH
6582do
6583  IFS=$as_save_IFS
6584  test -z "$as_dir" && as_dir=.
6585    for ac_exec_ext in '' $ac_executable_extensions; do
6586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6587    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6589    break 2
6590  fi
6591done
6592  done
6593IFS=$as_save_IFS
6594
6595  ;;
6596esac
6597fi
6598CP=$ac_cv_path_CP
6599if test -n "$CP"; then
6600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6601$as_echo "$CP" >&6; }
6602else
6603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604$as_echo "no" >&6; }
6605fi
6606
6607
6608          if test "x$CP" = x; then
6609            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6610          fi
6611        else
6612          # Otherwise we believe it is a complete path. Use it as it is.
6613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6614$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6615          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6616$as_echo_n "checking for CP... " >&6; }
6617          if test ! -x "$tool_specified"; then
6618            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6619$as_echo "not found" >&6; }
6620            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6621          fi
6622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6623$as_echo "$tool_specified" >&6; }
6624        fi
6625      fi
6626    fi
6627
6628  fi
6629
6630
6631
6632  if test "x$CP" = x; then
6633    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6634  fi
6635
6636
6637
6638
6639
6640  # Publish this variable in the help.
6641
6642
6643  if [ -z "${CUT+x}" ]; then
6644    # The variable is not set by user, try to locate tool using the code snippet
6645    for ac_prog in cut
6646do
6647  # Extract the first word of "$ac_prog", so it can be a program name with args.
6648set dummy $ac_prog; ac_word=$2
6649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6650$as_echo_n "checking for $ac_word... " >&6; }
6651if ${ac_cv_path_CUT+:} false; then :
6652  $as_echo_n "(cached) " >&6
6653else
6654  case $CUT in
6655  [\\/]* | ?:[\\/]*)
6656  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6657  ;;
6658  *)
6659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6660for as_dir in $PATH
6661do
6662  IFS=$as_save_IFS
6663  test -z "$as_dir" && as_dir=.
6664    for ac_exec_ext in '' $ac_executable_extensions; do
6665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6666    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6668    break 2
6669  fi
6670done
6671  done
6672IFS=$as_save_IFS
6673
6674  ;;
6675esac
6676fi
6677CUT=$ac_cv_path_CUT
6678if test -n "$CUT"; then
6679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6680$as_echo "$CUT" >&6; }
6681else
6682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6683$as_echo "no" >&6; }
6684fi
6685
6686
6687  test -n "$CUT" && break
6688done
6689
6690  else
6691    # The variable is set, but is it from the command line or the environment?
6692
6693    # Try to remove the string !CUT! from our list.
6694    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6695    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6696      # If it failed, the variable was not from the command line. Ignore it,
6697      # but warn the user (except for BASH, which is always set by the calling BASH).
6698      if test "xCUT" != xBASH; then
6699        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6700$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6701      fi
6702      # Try to locate tool using the code snippet
6703      for ac_prog in cut
6704do
6705  # Extract the first word of "$ac_prog", so it can be a program name with args.
6706set dummy $ac_prog; ac_word=$2
6707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6708$as_echo_n "checking for $ac_word... " >&6; }
6709if ${ac_cv_path_CUT+:} false; then :
6710  $as_echo_n "(cached) " >&6
6711else
6712  case $CUT in
6713  [\\/]* | ?:[\\/]*)
6714  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6715  ;;
6716  *)
6717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6718for as_dir in $PATH
6719do
6720  IFS=$as_save_IFS
6721  test -z "$as_dir" && as_dir=.
6722    for ac_exec_ext in '' $ac_executable_extensions; do
6723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6724    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6726    break 2
6727  fi
6728done
6729  done
6730IFS=$as_save_IFS
6731
6732  ;;
6733esac
6734fi
6735CUT=$ac_cv_path_CUT
6736if test -n "$CUT"; then
6737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6738$as_echo "$CUT" >&6; }
6739else
6740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6741$as_echo "no" >&6; }
6742fi
6743
6744
6745  test -n "$CUT" && break
6746done
6747
6748    else
6749      # If it succeeded, then it was overridden by the user. We will use it
6750      # for the tool.
6751
6752      # First remove it from the list of overridden variables, so we can test
6753      # for unknown variables in the end.
6754      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6755
6756      # Check if we try to supply an empty value
6757      if test "x$CUT" = x; then
6758        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6759$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6760        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6761$as_echo_n "checking for CUT... " >&6; }
6762        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6763$as_echo "disabled" >&6; }
6764      else
6765        # Check if the provided tool contains a complete path.
6766        tool_specified="$CUT"
6767        tool_basename="${tool_specified##*/}"
6768        if test "x$tool_basename" = "x$tool_specified"; then
6769          # A command without a complete path is provided, search $PATH.
6770          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6771$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6772          # Extract the first word of "$tool_basename", so it can be a program name with args.
6773set dummy $tool_basename; ac_word=$2
6774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6775$as_echo_n "checking for $ac_word... " >&6; }
6776if ${ac_cv_path_CUT+:} false; then :
6777  $as_echo_n "(cached) " >&6
6778else
6779  case $CUT in
6780  [\\/]* | ?:[\\/]*)
6781  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6782  ;;
6783  *)
6784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6785for as_dir in $PATH
6786do
6787  IFS=$as_save_IFS
6788  test -z "$as_dir" && as_dir=.
6789    for ac_exec_ext in '' $ac_executable_extensions; do
6790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6791    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6793    break 2
6794  fi
6795done
6796  done
6797IFS=$as_save_IFS
6798
6799  ;;
6800esac
6801fi
6802CUT=$ac_cv_path_CUT
6803if test -n "$CUT"; then
6804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6805$as_echo "$CUT" >&6; }
6806else
6807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6808$as_echo "no" >&6; }
6809fi
6810
6811
6812          if test "x$CUT" = x; then
6813            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6814          fi
6815        else
6816          # Otherwise we believe it is a complete path. Use it as it is.
6817          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6818$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6819          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6820$as_echo_n "checking for CUT... " >&6; }
6821          if test ! -x "$tool_specified"; then
6822            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6823$as_echo "not found" >&6; }
6824            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6825          fi
6826          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6827$as_echo "$tool_specified" >&6; }
6828        fi
6829      fi
6830    fi
6831
6832  fi
6833
6834
6835
6836  if test "x$CUT" = x; then
6837    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6838  fi
6839
6840
6841
6842
6843
6844  # Publish this variable in the help.
6845
6846
6847  if [ -z "${DATE+x}" ]; then
6848    # The variable is not set by user, try to locate tool using the code snippet
6849    for ac_prog in date
6850do
6851  # Extract the first word of "$ac_prog", so it can be a program name with args.
6852set dummy $ac_prog; ac_word=$2
6853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6854$as_echo_n "checking for $ac_word... " >&6; }
6855if ${ac_cv_path_DATE+:} false; then :
6856  $as_echo_n "(cached) " >&6
6857else
6858  case $DATE in
6859  [\\/]* | ?:[\\/]*)
6860  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6861  ;;
6862  *)
6863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6864for as_dir in $PATH
6865do
6866  IFS=$as_save_IFS
6867  test -z "$as_dir" && as_dir=.
6868    for ac_exec_ext in '' $ac_executable_extensions; do
6869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6870    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6872    break 2
6873  fi
6874done
6875  done
6876IFS=$as_save_IFS
6877
6878  ;;
6879esac
6880fi
6881DATE=$ac_cv_path_DATE
6882if test -n "$DATE"; then
6883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6884$as_echo "$DATE" >&6; }
6885else
6886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6887$as_echo "no" >&6; }
6888fi
6889
6890
6891  test -n "$DATE" && break
6892done
6893
6894  else
6895    # The variable is set, but is it from the command line or the environment?
6896
6897    # Try to remove the string !DATE! from our list.
6898    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6899    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6900      # If it failed, the variable was not from the command line. Ignore it,
6901      # but warn the user (except for BASH, which is always set by the calling BASH).
6902      if test "xDATE" != xBASH; then
6903        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6904$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6905      fi
6906      # Try to locate tool using the code snippet
6907      for ac_prog in date
6908do
6909  # Extract the first word of "$ac_prog", so it can be a program name with args.
6910set dummy $ac_prog; ac_word=$2
6911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6912$as_echo_n "checking for $ac_word... " >&6; }
6913if ${ac_cv_path_DATE+:} false; then :
6914  $as_echo_n "(cached) " >&6
6915else
6916  case $DATE in
6917  [\\/]* | ?:[\\/]*)
6918  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6919  ;;
6920  *)
6921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6922for as_dir in $PATH
6923do
6924  IFS=$as_save_IFS
6925  test -z "$as_dir" && as_dir=.
6926    for ac_exec_ext in '' $ac_executable_extensions; do
6927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6928    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6930    break 2
6931  fi
6932done
6933  done
6934IFS=$as_save_IFS
6935
6936  ;;
6937esac
6938fi
6939DATE=$ac_cv_path_DATE
6940if test -n "$DATE"; then
6941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6942$as_echo "$DATE" >&6; }
6943else
6944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6945$as_echo "no" >&6; }
6946fi
6947
6948
6949  test -n "$DATE" && break
6950done
6951
6952    else
6953      # If it succeeded, then it was overridden by the user. We will use it
6954      # for the tool.
6955
6956      # First remove it from the list of overridden variables, so we can test
6957      # for unknown variables in the end.
6958      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6959
6960      # Check if we try to supply an empty value
6961      if test "x$DATE" = x; then
6962        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6963$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6964        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6965$as_echo_n "checking for DATE... " >&6; }
6966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6967$as_echo "disabled" >&6; }
6968      else
6969        # Check if the provided tool contains a complete path.
6970        tool_specified="$DATE"
6971        tool_basename="${tool_specified##*/}"
6972        if test "x$tool_basename" = "x$tool_specified"; then
6973          # A command without a complete path is provided, search $PATH.
6974          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6975$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6976          # Extract the first word of "$tool_basename", so it can be a program name with args.
6977set dummy $tool_basename; ac_word=$2
6978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6979$as_echo_n "checking for $ac_word... " >&6; }
6980if ${ac_cv_path_DATE+:} false; then :
6981  $as_echo_n "(cached) " >&6
6982else
6983  case $DATE in
6984  [\\/]* | ?:[\\/]*)
6985  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6986  ;;
6987  *)
6988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6989for as_dir in $PATH
6990do
6991  IFS=$as_save_IFS
6992  test -z "$as_dir" && as_dir=.
6993    for ac_exec_ext in '' $ac_executable_extensions; do
6994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6995    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6997    break 2
6998  fi
6999done
7000  done
7001IFS=$as_save_IFS
7002
7003  ;;
7004esac
7005fi
7006DATE=$ac_cv_path_DATE
7007if test -n "$DATE"; then
7008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7009$as_echo "$DATE" >&6; }
7010else
7011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7012$as_echo "no" >&6; }
7013fi
7014
7015
7016          if test "x$DATE" = x; then
7017            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7018          fi
7019        else
7020          # Otherwise we believe it is a complete path. Use it as it is.
7021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7022$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7023          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7024$as_echo_n "checking for DATE... " >&6; }
7025          if test ! -x "$tool_specified"; then
7026            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7027$as_echo "not found" >&6; }
7028            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7029          fi
7030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7031$as_echo "$tool_specified" >&6; }
7032        fi
7033      fi
7034    fi
7035
7036  fi
7037
7038
7039
7040  if test "x$DATE" = x; then
7041    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7042  fi
7043
7044
7045
7046
7047
7048  # Publish this variable in the help.
7049
7050
7051  if [ -z "${DIFF+x}" ]; then
7052    # The variable is not set by user, try to locate tool using the code snippet
7053    for ac_prog in gdiff diff
7054do
7055  # Extract the first word of "$ac_prog", so it can be a program name with args.
7056set dummy $ac_prog; ac_word=$2
7057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7058$as_echo_n "checking for $ac_word... " >&6; }
7059if ${ac_cv_path_DIFF+:} false; then :
7060  $as_echo_n "(cached) " >&6
7061else
7062  case $DIFF in
7063  [\\/]* | ?:[\\/]*)
7064  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7065  ;;
7066  *)
7067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7068for as_dir in $PATH
7069do
7070  IFS=$as_save_IFS
7071  test -z "$as_dir" && as_dir=.
7072    for ac_exec_ext in '' $ac_executable_extensions; do
7073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7074    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7076    break 2
7077  fi
7078done
7079  done
7080IFS=$as_save_IFS
7081
7082  ;;
7083esac
7084fi
7085DIFF=$ac_cv_path_DIFF
7086if test -n "$DIFF"; then
7087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7088$as_echo "$DIFF" >&6; }
7089else
7090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7091$as_echo "no" >&6; }
7092fi
7093
7094
7095  test -n "$DIFF" && break
7096done
7097
7098  else
7099    # The variable is set, but is it from the command line or the environment?
7100
7101    # Try to remove the string !DIFF! from our list.
7102    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7103    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7104      # If it failed, the variable was not from the command line. Ignore it,
7105      # but warn the user (except for BASH, which is always set by the calling BASH).
7106      if test "xDIFF" != xBASH; then
7107        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7108$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7109      fi
7110      # Try to locate tool using the code snippet
7111      for ac_prog in gdiff diff
7112do
7113  # Extract the first word of "$ac_prog", so it can be a program name with args.
7114set dummy $ac_prog; ac_word=$2
7115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7116$as_echo_n "checking for $ac_word... " >&6; }
7117if ${ac_cv_path_DIFF+:} false; then :
7118  $as_echo_n "(cached) " >&6
7119else
7120  case $DIFF in
7121  [\\/]* | ?:[\\/]*)
7122  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7123  ;;
7124  *)
7125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7126for as_dir in $PATH
7127do
7128  IFS=$as_save_IFS
7129  test -z "$as_dir" && as_dir=.
7130    for ac_exec_ext in '' $ac_executable_extensions; do
7131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7132    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7134    break 2
7135  fi
7136done
7137  done
7138IFS=$as_save_IFS
7139
7140  ;;
7141esac
7142fi
7143DIFF=$ac_cv_path_DIFF
7144if test -n "$DIFF"; then
7145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7146$as_echo "$DIFF" >&6; }
7147else
7148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7149$as_echo "no" >&6; }
7150fi
7151
7152
7153  test -n "$DIFF" && break
7154done
7155
7156    else
7157      # If it succeeded, then it was overridden by the user. We will use it
7158      # for the tool.
7159
7160      # First remove it from the list of overridden variables, so we can test
7161      # for unknown variables in the end.
7162      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7163
7164      # Check if we try to supply an empty value
7165      if test "x$DIFF" = x; then
7166        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7167$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7168        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7169$as_echo_n "checking for DIFF... " >&6; }
7170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7171$as_echo "disabled" >&6; }
7172      else
7173        # Check if the provided tool contains a complete path.
7174        tool_specified="$DIFF"
7175        tool_basename="${tool_specified##*/}"
7176        if test "x$tool_basename" = "x$tool_specified"; then
7177          # A command without a complete path is provided, search $PATH.
7178          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7179$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7180          # Extract the first word of "$tool_basename", so it can be a program name with args.
7181set dummy $tool_basename; ac_word=$2
7182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7183$as_echo_n "checking for $ac_word... " >&6; }
7184if ${ac_cv_path_DIFF+:} false; then :
7185  $as_echo_n "(cached) " >&6
7186else
7187  case $DIFF in
7188  [\\/]* | ?:[\\/]*)
7189  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7190  ;;
7191  *)
7192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7193for as_dir in $PATH
7194do
7195  IFS=$as_save_IFS
7196  test -z "$as_dir" && as_dir=.
7197    for ac_exec_ext in '' $ac_executable_extensions; do
7198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7199    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7201    break 2
7202  fi
7203done
7204  done
7205IFS=$as_save_IFS
7206
7207  ;;
7208esac
7209fi
7210DIFF=$ac_cv_path_DIFF
7211if test -n "$DIFF"; then
7212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7213$as_echo "$DIFF" >&6; }
7214else
7215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7216$as_echo "no" >&6; }
7217fi
7218
7219
7220          if test "x$DIFF" = x; then
7221            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7222          fi
7223        else
7224          # Otherwise we believe it is a complete path. Use it as it is.
7225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7226$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7227          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7228$as_echo_n "checking for DIFF... " >&6; }
7229          if test ! -x "$tool_specified"; then
7230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7231$as_echo "not found" >&6; }
7232            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7233          fi
7234          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7235$as_echo "$tool_specified" >&6; }
7236        fi
7237      fi
7238    fi
7239
7240  fi
7241
7242
7243
7244  if test "x$DIFF" = x; then
7245    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7246  fi
7247
7248
7249
7250
7251
7252  # Publish this variable in the help.
7253
7254
7255  if [ -z "${DIRNAME+x}" ]; then
7256    # The variable is not set by user, try to locate tool using the code snippet
7257    for ac_prog in dirname
7258do
7259  # Extract the first word of "$ac_prog", so it can be a program name with args.
7260set dummy $ac_prog; ac_word=$2
7261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7262$as_echo_n "checking for $ac_word... " >&6; }
7263if ${ac_cv_path_DIRNAME+:} false; then :
7264  $as_echo_n "(cached) " >&6
7265else
7266  case $DIRNAME in
7267  [\\/]* | ?:[\\/]*)
7268  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7269  ;;
7270  *)
7271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7272for as_dir in $PATH
7273do
7274  IFS=$as_save_IFS
7275  test -z "$as_dir" && as_dir=.
7276    for ac_exec_ext in '' $ac_executable_extensions; do
7277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7278    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7280    break 2
7281  fi
7282done
7283  done
7284IFS=$as_save_IFS
7285
7286  ;;
7287esac
7288fi
7289DIRNAME=$ac_cv_path_DIRNAME
7290if test -n "$DIRNAME"; then
7291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7292$as_echo "$DIRNAME" >&6; }
7293else
7294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7295$as_echo "no" >&6; }
7296fi
7297
7298
7299  test -n "$DIRNAME" && break
7300done
7301
7302  else
7303    # The variable is set, but is it from the command line or the environment?
7304
7305    # Try to remove the string !DIRNAME! from our list.
7306    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7307    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7308      # If it failed, the variable was not from the command line. Ignore it,
7309      # but warn the user (except for BASH, which is always set by the calling BASH).
7310      if test "xDIRNAME" != xBASH; then
7311        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7312$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7313      fi
7314      # Try to locate tool using the code snippet
7315      for ac_prog in dirname
7316do
7317  # Extract the first word of "$ac_prog", so it can be a program name with args.
7318set dummy $ac_prog; ac_word=$2
7319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7320$as_echo_n "checking for $ac_word... " >&6; }
7321if ${ac_cv_path_DIRNAME+:} false; then :
7322  $as_echo_n "(cached) " >&6
7323else
7324  case $DIRNAME in
7325  [\\/]* | ?:[\\/]*)
7326  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7327  ;;
7328  *)
7329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7330for as_dir in $PATH
7331do
7332  IFS=$as_save_IFS
7333  test -z "$as_dir" && as_dir=.
7334    for ac_exec_ext in '' $ac_executable_extensions; do
7335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7336    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7338    break 2
7339  fi
7340done
7341  done
7342IFS=$as_save_IFS
7343
7344  ;;
7345esac
7346fi
7347DIRNAME=$ac_cv_path_DIRNAME
7348if test -n "$DIRNAME"; then
7349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7350$as_echo "$DIRNAME" >&6; }
7351else
7352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7353$as_echo "no" >&6; }
7354fi
7355
7356
7357  test -n "$DIRNAME" && break
7358done
7359
7360    else
7361      # If it succeeded, then it was overridden by the user. We will use it
7362      # for the tool.
7363
7364      # First remove it from the list of overridden variables, so we can test
7365      # for unknown variables in the end.
7366      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7367
7368      # Check if we try to supply an empty value
7369      if test "x$DIRNAME" = x; then
7370        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7371$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7372        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7373$as_echo_n "checking for DIRNAME... " >&6; }
7374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7375$as_echo "disabled" >&6; }
7376      else
7377        # Check if the provided tool contains a complete path.
7378        tool_specified="$DIRNAME"
7379        tool_basename="${tool_specified##*/}"
7380        if test "x$tool_basename" = "x$tool_specified"; then
7381          # A command without a complete path is provided, search $PATH.
7382          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7383$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7384          # Extract the first word of "$tool_basename", so it can be a program name with args.
7385set dummy $tool_basename; ac_word=$2
7386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7387$as_echo_n "checking for $ac_word... " >&6; }
7388if ${ac_cv_path_DIRNAME+:} false; then :
7389  $as_echo_n "(cached) " >&6
7390else
7391  case $DIRNAME in
7392  [\\/]* | ?:[\\/]*)
7393  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7394  ;;
7395  *)
7396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7397for as_dir in $PATH
7398do
7399  IFS=$as_save_IFS
7400  test -z "$as_dir" && as_dir=.
7401    for ac_exec_ext in '' $ac_executable_extensions; do
7402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7403    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7405    break 2
7406  fi
7407done
7408  done
7409IFS=$as_save_IFS
7410
7411  ;;
7412esac
7413fi
7414DIRNAME=$ac_cv_path_DIRNAME
7415if test -n "$DIRNAME"; then
7416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7417$as_echo "$DIRNAME" >&6; }
7418else
7419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7420$as_echo "no" >&6; }
7421fi
7422
7423
7424          if test "x$DIRNAME" = x; then
7425            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7426          fi
7427        else
7428          # Otherwise we believe it is a complete path. Use it as it is.
7429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7430$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7431          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7432$as_echo_n "checking for DIRNAME... " >&6; }
7433          if test ! -x "$tool_specified"; then
7434            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7435$as_echo "not found" >&6; }
7436            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7437          fi
7438          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7439$as_echo "$tool_specified" >&6; }
7440        fi
7441      fi
7442    fi
7443
7444  fi
7445
7446
7447
7448  if test "x$DIRNAME" = x; then
7449    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7450  fi
7451
7452
7453
7454
7455
7456  # Publish this variable in the help.
7457
7458
7459  if [ -z "${ECHO+x}" ]; then
7460    # The variable is not set by user, try to locate tool using the code snippet
7461    for ac_prog in echo
7462do
7463  # Extract the first word of "$ac_prog", so it can be a program name with args.
7464set dummy $ac_prog; ac_word=$2
7465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7466$as_echo_n "checking for $ac_word... " >&6; }
7467if ${ac_cv_path_ECHO+:} false; then :
7468  $as_echo_n "(cached) " >&6
7469else
7470  case $ECHO in
7471  [\\/]* | ?:[\\/]*)
7472  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7473  ;;
7474  *)
7475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7476for as_dir in $PATH
7477do
7478  IFS=$as_save_IFS
7479  test -z "$as_dir" && as_dir=.
7480    for ac_exec_ext in '' $ac_executable_extensions; do
7481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7482    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7484    break 2
7485  fi
7486done
7487  done
7488IFS=$as_save_IFS
7489
7490  ;;
7491esac
7492fi
7493ECHO=$ac_cv_path_ECHO
7494if test -n "$ECHO"; then
7495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7496$as_echo "$ECHO" >&6; }
7497else
7498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7499$as_echo "no" >&6; }
7500fi
7501
7502
7503  test -n "$ECHO" && break
7504done
7505
7506  else
7507    # The variable is set, but is it from the command line or the environment?
7508
7509    # Try to remove the string !ECHO! from our list.
7510    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7511    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7512      # If it failed, the variable was not from the command line. Ignore it,
7513      # but warn the user (except for BASH, which is always set by the calling BASH).
7514      if test "xECHO" != xBASH; then
7515        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7516$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7517      fi
7518      # Try to locate tool using the code snippet
7519      for ac_prog in echo
7520do
7521  # Extract the first word of "$ac_prog", so it can be a program name with args.
7522set dummy $ac_prog; ac_word=$2
7523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7524$as_echo_n "checking for $ac_word... " >&6; }
7525if ${ac_cv_path_ECHO+:} false; then :
7526  $as_echo_n "(cached) " >&6
7527else
7528  case $ECHO in
7529  [\\/]* | ?:[\\/]*)
7530  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7531  ;;
7532  *)
7533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7534for as_dir in $PATH
7535do
7536  IFS=$as_save_IFS
7537  test -z "$as_dir" && as_dir=.
7538    for ac_exec_ext in '' $ac_executable_extensions; do
7539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7540    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7542    break 2
7543  fi
7544done
7545  done
7546IFS=$as_save_IFS
7547
7548  ;;
7549esac
7550fi
7551ECHO=$ac_cv_path_ECHO
7552if test -n "$ECHO"; then
7553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7554$as_echo "$ECHO" >&6; }
7555else
7556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7557$as_echo "no" >&6; }
7558fi
7559
7560
7561  test -n "$ECHO" && break
7562done
7563
7564    else
7565      # If it succeeded, then it was overridden by the user. We will use it
7566      # for the tool.
7567
7568      # First remove it from the list of overridden variables, so we can test
7569      # for unknown variables in the end.
7570      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7571
7572      # Check if we try to supply an empty value
7573      if test "x$ECHO" = x; then
7574        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7575$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7576        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7577$as_echo_n "checking for ECHO... " >&6; }
7578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7579$as_echo "disabled" >&6; }
7580      else
7581        # Check if the provided tool contains a complete path.
7582        tool_specified="$ECHO"
7583        tool_basename="${tool_specified##*/}"
7584        if test "x$tool_basename" = "x$tool_specified"; then
7585          # A command without a complete path is provided, search $PATH.
7586          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7587$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7588          # Extract the first word of "$tool_basename", so it can be a program name with args.
7589set dummy $tool_basename; ac_word=$2
7590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7591$as_echo_n "checking for $ac_word... " >&6; }
7592if ${ac_cv_path_ECHO+:} false; then :
7593  $as_echo_n "(cached) " >&6
7594else
7595  case $ECHO in
7596  [\\/]* | ?:[\\/]*)
7597  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7598  ;;
7599  *)
7600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7601for as_dir in $PATH
7602do
7603  IFS=$as_save_IFS
7604  test -z "$as_dir" && as_dir=.
7605    for ac_exec_ext in '' $ac_executable_extensions; do
7606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7607    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7609    break 2
7610  fi
7611done
7612  done
7613IFS=$as_save_IFS
7614
7615  ;;
7616esac
7617fi
7618ECHO=$ac_cv_path_ECHO
7619if test -n "$ECHO"; then
7620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7621$as_echo "$ECHO" >&6; }
7622else
7623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7624$as_echo "no" >&6; }
7625fi
7626
7627
7628          if test "x$ECHO" = x; then
7629            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7630          fi
7631        else
7632          # Otherwise we believe it is a complete path. Use it as it is.
7633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7634$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7635          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7636$as_echo_n "checking for ECHO... " >&6; }
7637          if test ! -x "$tool_specified"; then
7638            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7639$as_echo "not found" >&6; }
7640            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7641          fi
7642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7643$as_echo "$tool_specified" >&6; }
7644        fi
7645      fi
7646    fi
7647
7648  fi
7649
7650
7651
7652  if test "x$ECHO" = x; then
7653    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7654  fi
7655
7656
7657
7658
7659
7660  # Publish this variable in the help.
7661
7662
7663  if [ -z "${EXPR+x}" ]; then
7664    # The variable is not set by user, try to locate tool using the code snippet
7665    for ac_prog in expr
7666do
7667  # Extract the first word of "$ac_prog", so it can be a program name with args.
7668set dummy $ac_prog; ac_word=$2
7669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7670$as_echo_n "checking for $ac_word... " >&6; }
7671if ${ac_cv_path_EXPR+:} false; then :
7672  $as_echo_n "(cached) " >&6
7673else
7674  case $EXPR in
7675  [\\/]* | ?:[\\/]*)
7676  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7677  ;;
7678  *)
7679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7680for as_dir in $PATH
7681do
7682  IFS=$as_save_IFS
7683  test -z "$as_dir" && as_dir=.
7684    for ac_exec_ext in '' $ac_executable_extensions; do
7685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7686    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7688    break 2
7689  fi
7690done
7691  done
7692IFS=$as_save_IFS
7693
7694  ;;
7695esac
7696fi
7697EXPR=$ac_cv_path_EXPR
7698if test -n "$EXPR"; then
7699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7700$as_echo "$EXPR" >&6; }
7701else
7702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7703$as_echo "no" >&6; }
7704fi
7705
7706
7707  test -n "$EXPR" && break
7708done
7709
7710  else
7711    # The variable is set, but is it from the command line or the environment?
7712
7713    # Try to remove the string !EXPR! from our list.
7714    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7715    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7716      # If it failed, the variable was not from the command line. Ignore it,
7717      # but warn the user (except for BASH, which is always set by the calling BASH).
7718      if test "xEXPR" != xBASH; then
7719        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7720$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7721      fi
7722      # Try to locate tool using the code snippet
7723      for ac_prog in expr
7724do
7725  # Extract the first word of "$ac_prog", so it can be a program name with args.
7726set dummy $ac_prog; ac_word=$2
7727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7728$as_echo_n "checking for $ac_word... " >&6; }
7729if ${ac_cv_path_EXPR+:} false; then :
7730  $as_echo_n "(cached) " >&6
7731else
7732  case $EXPR in
7733  [\\/]* | ?:[\\/]*)
7734  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7735  ;;
7736  *)
7737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7738for as_dir in $PATH
7739do
7740  IFS=$as_save_IFS
7741  test -z "$as_dir" && as_dir=.
7742    for ac_exec_ext in '' $ac_executable_extensions; do
7743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7744    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7746    break 2
7747  fi
7748done
7749  done
7750IFS=$as_save_IFS
7751
7752  ;;
7753esac
7754fi
7755EXPR=$ac_cv_path_EXPR
7756if test -n "$EXPR"; then
7757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7758$as_echo "$EXPR" >&6; }
7759else
7760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7761$as_echo "no" >&6; }
7762fi
7763
7764
7765  test -n "$EXPR" && break
7766done
7767
7768    else
7769      # If it succeeded, then it was overridden by the user. We will use it
7770      # for the tool.
7771
7772      # First remove it from the list of overridden variables, so we can test
7773      # for unknown variables in the end.
7774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7775
7776      # Check if we try to supply an empty value
7777      if test "x$EXPR" = x; then
7778        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7779$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7780        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7781$as_echo_n "checking for EXPR... " >&6; }
7782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7783$as_echo "disabled" >&6; }
7784      else
7785        # Check if the provided tool contains a complete path.
7786        tool_specified="$EXPR"
7787        tool_basename="${tool_specified##*/}"
7788        if test "x$tool_basename" = "x$tool_specified"; then
7789          # A command without a complete path is provided, search $PATH.
7790          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7791$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7792          # Extract the first word of "$tool_basename", so it can be a program name with args.
7793set dummy $tool_basename; ac_word=$2
7794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7795$as_echo_n "checking for $ac_word... " >&6; }
7796if ${ac_cv_path_EXPR+:} false; then :
7797  $as_echo_n "(cached) " >&6
7798else
7799  case $EXPR in
7800  [\\/]* | ?:[\\/]*)
7801  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7802  ;;
7803  *)
7804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7805for as_dir in $PATH
7806do
7807  IFS=$as_save_IFS
7808  test -z "$as_dir" && as_dir=.
7809    for ac_exec_ext in '' $ac_executable_extensions; do
7810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7811    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7813    break 2
7814  fi
7815done
7816  done
7817IFS=$as_save_IFS
7818
7819  ;;
7820esac
7821fi
7822EXPR=$ac_cv_path_EXPR
7823if test -n "$EXPR"; then
7824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7825$as_echo "$EXPR" >&6; }
7826else
7827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7828$as_echo "no" >&6; }
7829fi
7830
7831
7832          if test "x$EXPR" = x; then
7833            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7834          fi
7835        else
7836          # Otherwise we believe it is a complete path. Use it as it is.
7837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7838$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7839          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7840$as_echo_n "checking for EXPR... " >&6; }
7841          if test ! -x "$tool_specified"; then
7842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7843$as_echo "not found" >&6; }
7844            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7845          fi
7846          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7847$as_echo "$tool_specified" >&6; }
7848        fi
7849      fi
7850    fi
7851
7852  fi
7853
7854
7855
7856  if test "x$EXPR" = x; then
7857    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7858  fi
7859
7860
7861
7862
7863
7864  # Publish this variable in the help.
7865
7866
7867  if [ -z "${FILE+x}" ]; then
7868    # The variable is not set by user, try to locate tool using the code snippet
7869    for ac_prog in file
7870do
7871  # Extract the first word of "$ac_prog", so it can be a program name with args.
7872set dummy $ac_prog; ac_word=$2
7873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7874$as_echo_n "checking for $ac_word... " >&6; }
7875if ${ac_cv_path_FILE+:} false; then :
7876  $as_echo_n "(cached) " >&6
7877else
7878  case $FILE in
7879  [\\/]* | ?:[\\/]*)
7880  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7881  ;;
7882  *)
7883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7884for as_dir in $PATH
7885do
7886  IFS=$as_save_IFS
7887  test -z "$as_dir" && as_dir=.
7888    for ac_exec_ext in '' $ac_executable_extensions; do
7889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7890    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7892    break 2
7893  fi
7894done
7895  done
7896IFS=$as_save_IFS
7897
7898  ;;
7899esac
7900fi
7901FILE=$ac_cv_path_FILE
7902if test -n "$FILE"; then
7903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7904$as_echo "$FILE" >&6; }
7905else
7906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7907$as_echo "no" >&6; }
7908fi
7909
7910
7911  test -n "$FILE" && break
7912done
7913
7914  else
7915    # The variable is set, but is it from the command line or the environment?
7916
7917    # Try to remove the string !FILE! from our list.
7918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7920      # If it failed, the variable was not from the command line. Ignore it,
7921      # but warn the user (except for BASH, which is always set by the calling BASH).
7922      if test "xFILE" != xBASH; then
7923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7924$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7925      fi
7926      # Try to locate tool using the code snippet
7927      for ac_prog in file
7928do
7929  # Extract the first word of "$ac_prog", so it can be a program name with args.
7930set dummy $ac_prog; ac_word=$2
7931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7932$as_echo_n "checking for $ac_word... " >&6; }
7933if ${ac_cv_path_FILE+:} false; then :
7934  $as_echo_n "(cached) " >&6
7935else
7936  case $FILE in
7937  [\\/]* | ?:[\\/]*)
7938  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7939  ;;
7940  *)
7941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7942for as_dir in $PATH
7943do
7944  IFS=$as_save_IFS
7945  test -z "$as_dir" && as_dir=.
7946    for ac_exec_ext in '' $ac_executable_extensions; do
7947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7948    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7950    break 2
7951  fi
7952done
7953  done
7954IFS=$as_save_IFS
7955
7956  ;;
7957esac
7958fi
7959FILE=$ac_cv_path_FILE
7960if test -n "$FILE"; then
7961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7962$as_echo "$FILE" >&6; }
7963else
7964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7965$as_echo "no" >&6; }
7966fi
7967
7968
7969  test -n "$FILE" && break
7970done
7971
7972    else
7973      # If it succeeded, then it was overridden by the user. We will use it
7974      # for the tool.
7975
7976      # First remove it from the list of overridden variables, so we can test
7977      # for unknown variables in the end.
7978      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7979
7980      # Check if we try to supply an empty value
7981      if test "x$FILE" = x; then
7982        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7983$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7984        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7985$as_echo_n "checking for FILE... " >&6; }
7986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7987$as_echo "disabled" >&6; }
7988      else
7989        # Check if the provided tool contains a complete path.
7990        tool_specified="$FILE"
7991        tool_basename="${tool_specified##*/}"
7992        if test "x$tool_basename" = "x$tool_specified"; then
7993          # A command without a complete path is provided, search $PATH.
7994          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7995$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7996          # Extract the first word of "$tool_basename", so it can be a program name with args.
7997set dummy $tool_basename; ac_word=$2
7998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7999$as_echo_n "checking for $ac_word... " >&6; }
8000if ${ac_cv_path_FILE+:} false; then :
8001  $as_echo_n "(cached) " >&6
8002else
8003  case $FILE in
8004  [\\/]* | ?:[\\/]*)
8005  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8006  ;;
8007  *)
8008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8009for as_dir in $PATH
8010do
8011  IFS=$as_save_IFS
8012  test -z "$as_dir" && as_dir=.
8013    for ac_exec_ext in '' $ac_executable_extensions; do
8014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8015    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8017    break 2
8018  fi
8019done
8020  done
8021IFS=$as_save_IFS
8022
8023  ;;
8024esac
8025fi
8026FILE=$ac_cv_path_FILE
8027if test -n "$FILE"; then
8028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8029$as_echo "$FILE" >&6; }
8030else
8031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8032$as_echo "no" >&6; }
8033fi
8034
8035
8036          if test "x$FILE" = x; then
8037            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8038          fi
8039        else
8040          # Otherwise we believe it is a complete path. Use it as it is.
8041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8042$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8043          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8044$as_echo_n "checking for FILE... " >&6; }
8045          if test ! -x "$tool_specified"; then
8046            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8047$as_echo "not found" >&6; }
8048            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8049          fi
8050          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8051$as_echo "$tool_specified" >&6; }
8052        fi
8053      fi
8054    fi
8055
8056  fi
8057
8058
8059
8060  if test "x$FILE" = x; then
8061    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8062  fi
8063
8064
8065
8066
8067
8068  # Publish this variable in the help.
8069
8070
8071  if [ -z "${FIND+x}" ]; then
8072    # The variable is not set by user, try to locate tool using the code snippet
8073    for ac_prog in find
8074do
8075  # Extract the first word of "$ac_prog", so it can be a program name with args.
8076set dummy $ac_prog; ac_word=$2
8077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8078$as_echo_n "checking for $ac_word... " >&6; }
8079if ${ac_cv_path_FIND+:} false; then :
8080  $as_echo_n "(cached) " >&6
8081else
8082  case $FIND in
8083  [\\/]* | ?:[\\/]*)
8084  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8085  ;;
8086  *)
8087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8088for as_dir in $PATH
8089do
8090  IFS=$as_save_IFS
8091  test -z "$as_dir" && as_dir=.
8092    for ac_exec_ext in '' $ac_executable_extensions; do
8093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8094    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8096    break 2
8097  fi
8098done
8099  done
8100IFS=$as_save_IFS
8101
8102  ;;
8103esac
8104fi
8105FIND=$ac_cv_path_FIND
8106if test -n "$FIND"; then
8107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8108$as_echo "$FIND" >&6; }
8109else
8110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8111$as_echo "no" >&6; }
8112fi
8113
8114
8115  test -n "$FIND" && break
8116done
8117
8118  else
8119    # The variable is set, but is it from the command line or the environment?
8120
8121    # Try to remove the string !FIND! from our list.
8122    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8123    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8124      # If it failed, the variable was not from the command line. Ignore it,
8125      # but warn the user (except for BASH, which is always set by the calling BASH).
8126      if test "xFIND" != xBASH; then
8127        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8128$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8129      fi
8130      # Try to locate tool using the code snippet
8131      for ac_prog in find
8132do
8133  # Extract the first word of "$ac_prog", so it can be a program name with args.
8134set dummy $ac_prog; ac_word=$2
8135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8136$as_echo_n "checking for $ac_word... " >&6; }
8137if ${ac_cv_path_FIND+:} false; then :
8138  $as_echo_n "(cached) " >&6
8139else
8140  case $FIND in
8141  [\\/]* | ?:[\\/]*)
8142  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8143  ;;
8144  *)
8145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8146for as_dir in $PATH
8147do
8148  IFS=$as_save_IFS
8149  test -z "$as_dir" && as_dir=.
8150    for ac_exec_ext in '' $ac_executable_extensions; do
8151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8152    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8154    break 2
8155  fi
8156done
8157  done
8158IFS=$as_save_IFS
8159
8160  ;;
8161esac
8162fi
8163FIND=$ac_cv_path_FIND
8164if test -n "$FIND"; then
8165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8166$as_echo "$FIND" >&6; }
8167else
8168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8169$as_echo "no" >&6; }
8170fi
8171
8172
8173  test -n "$FIND" && break
8174done
8175
8176    else
8177      # If it succeeded, then it was overridden by the user. We will use it
8178      # for the tool.
8179
8180      # First remove it from the list of overridden variables, so we can test
8181      # for unknown variables in the end.
8182      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8183
8184      # Check if we try to supply an empty value
8185      if test "x$FIND" = x; then
8186        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8187$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8188        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8189$as_echo_n "checking for FIND... " >&6; }
8190        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8191$as_echo "disabled" >&6; }
8192      else
8193        # Check if the provided tool contains a complete path.
8194        tool_specified="$FIND"
8195        tool_basename="${tool_specified##*/}"
8196        if test "x$tool_basename" = "x$tool_specified"; then
8197          # A command without a complete path is provided, search $PATH.
8198          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8199$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8200          # Extract the first word of "$tool_basename", so it can be a program name with args.
8201set dummy $tool_basename; ac_word=$2
8202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8203$as_echo_n "checking for $ac_word... " >&6; }
8204if ${ac_cv_path_FIND+:} false; then :
8205  $as_echo_n "(cached) " >&6
8206else
8207  case $FIND in
8208  [\\/]* | ?:[\\/]*)
8209  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8210  ;;
8211  *)
8212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8213for as_dir in $PATH
8214do
8215  IFS=$as_save_IFS
8216  test -z "$as_dir" && as_dir=.
8217    for ac_exec_ext in '' $ac_executable_extensions; do
8218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8219    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8221    break 2
8222  fi
8223done
8224  done
8225IFS=$as_save_IFS
8226
8227  ;;
8228esac
8229fi
8230FIND=$ac_cv_path_FIND
8231if test -n "$FIND"; then
8232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8233$as_echo "$FIND" >&6; }
8234else
8235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8236$as_echo "no" >&6; }
8237fi
8238
8239
8240          if test "x$FIND" = x; then
8241            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8242          fi
8243        else
8244          # Otherwise we believe it is a complete path. Use it as it is.
8245          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8246$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8247          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8248$as_echo_n "checking for FIND... " >&6; }
8249          if test ! -x "$tool_specified"; then
8250            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8251$as_echo "not found" >&6; }
8252            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8253          fi
8254          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8255$as_echo "$tool_specified" >&6; }
8256        fi
8257      fi
8258    fi
8259
8260  fi
8261
8262
8263
8264  if test "x$FIND" = x; then
8265    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8266  fi
8267
8268
8269
8270
8271
8272  # Publish this variable in the help.
8273
8274
8275  if [ -z "${HEAD+x}" ]; then
8276    # The variable is not set by user, try to locate tool using the code snippet
8277    for ac_prog in head
8278do
8279  # Extract the first word of "$ac_prog", so it can be a program name with args.
8280set dummy $ac_prog; ac_word=$2
8281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8282$as_echo_n "checking for $ac_word... " >&6; }
8283if ${ac_cv_path_HEAD+:} false; then :
8284  $as_echo_n "(cached) " >&6
8285else
8286  case $HEAD in
8287  [\\/]* | ?:[\\/]*)
8288  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8289  ;;
8290  *)
8291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8292for as_dir in $PATH
8293do
8294  IFS=$as_save_IFS
8295  test -z "$as_dir" && as_dir=.
8296    for ac_exec_ext in '' $ac_executable_extensions; do
8297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8298    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8300    break 2
8301  fi
8302done
8303  done
8304IFS=$as_save_IFS
8305
8306  ;;
8307esac
8308fi
8309HEAD=$ac_cv_path_HEAD
8310if test -n "$HEAD"; then
8311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8312$as_echo "$HEAD" >&6; }
8313else
8314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8315$as_echo "no" >&6; }
8316fi
8317
8318
8319  test -n "$HEAD" && break
8320done
8321
8322  else
8323    # The variable is set, but is it from the command line or the environment?
8324
8325    # Try to remove the string !HEAD! from our list.
8326    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8327    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8328      # If it failed, the variable was not from the command line. Ignore it,
8329      # but warn the user (except for BASH, which is always set by the calling BASH).
8330      if test "xHEAD" != xBASH; then
8331        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8332$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8333      fi
8334      # Try to locate tool using the code snippet
8335      for ac_prog in head
8336do
8337  # Extract the first word of "$ac_prog", so it can be a program name with args.
8338set dummy $ac_prog; ac_word=$2
8339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8340$as_echo_n "checking for $ac_word... " >&6; }
8341if ${ac_cv_path_HEAD+:} false; then :
8342  $as_echo_n "(cached) " >&6
8343else
8344  case $HEAD in
8345  [\\/]* | ?:[\\/]*)
8346  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8347  ;;
8348  *)
8349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8350for as_dir in $PATH
8351do
8352  IFS=$as_save_IFS
8353  test -z "$as_dir" && as_dir=.
8354    for ac_exec_ext in '' $ac_executable_extensions; do
8355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8356    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8358    break 2
8359  fi
8360done
8361  done
8362IFS=$as_save_IFS
8363
8364  ;;
8365esac
8366fi
8367HEAD=$ac_cv_path_HEAD
8368if test -n "$HEAD"; then
8369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8370$as_echo "$HEAD" >&6; }
8371else
8372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8373$as_echo "no" >&6; }
8374fi
8375
8376
8377  test -n "$HEAD" && break
8378done
8379
8380    else
8381      # If it succeeded, then it was overridden by the user. We will use it
8382      # for the tool.
8383
8384      # First remove it from the list of overridden variables, so we can test
8385      # for unknown variables in the end.
8386      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8387
8388      # Check if we try to supply an empty value
8389      if test "x$HEAD" = x; then
8390        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8391$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8392        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8393$as_echo_n "checking for HEAD... " >&6; }
8394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8395$as_echo "disabled" >&6; }
8396      else
8397        # Check if the provided tool contains a complete path.
8398        tool_specified="$HEAD"
8399        tool_basename="${tool_specified##*/}"
8400        if test "x$tool_basename" = "x$tool_specified"; then
8401          # A command without a complete path is provided, search $PATH.
8402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8403$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8404          # Extract the first word of "$tool_basename", so it can be a program name with args.
8405set dummy $tool_basename; ac_word=$2
8406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8407$as_echo_n "checking for $ac_word... " >&6; }
8408if ${ac_cv_path_HEAD+:} false; then :
8409  $as_echo_n "(cached) " >&6
8410else
8411  case $HEAD in
8412  [\\/]* | ?:[\\/]*)
8413  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8414  ;;
8415  *)
8416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8417for as_dir in $PATH
8418do
8419  IFS=$as_save_IFS
8420  test -z "$as_dir" && as_dir=.
8421    for ac_exec_ext in '' $ac_executable_extensions; do
8422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8423    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8425    break 2
8426  fi
8427done
8428  done
8429IFS=$as_save_IFS
8430
8431  ;;
8432esac
8433fi
8434HEAD=$ac_cv_path_HEAD
8435if test -n "$HEAD"; then
8436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8437$as_echo "$HEAD" >&6; }
8438else
8439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8440$as_echo "no" >&6; }
8441fi
8442
8443
8444          if test "x$HEAD" = x; then
8445            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8446          fi
8447        else
8448          # Otherwise we believe it is a complete path. Use it as it is.
8449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8450$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8451          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8452$as_echo_n "checking for HEAD... " >&6; }
8453          if test ! -x "$tool_specified"; then
8454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8455$as_echo "not found" >&6; }
8456            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8457          fi
8458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8459$as_echo "$tool_specified" >&6; }
8460        fi
8461      fi
8462    fi
8463
8464  fi
8465
8466
8467
8468  if test "x$HEAD" = x; then
8469    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8470  fi
8471
8472
8473
8474
8475
8476  # Publish this variable in the help.
8477
8478
8479  if [ -z "${GUNZIP+x}" ]; then
8480    # The variable is not set by user, try to locate tool using the code snippet
8481    for ac_prog in gunzip
8482do
8483  # Extract the first word of "$ac_prog", so it can be a program name with args.
8484set dummy $ac_prog; ac_word=$2
8485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8486$as_echo_n "checking for $ac_word... " >&6; }
8487if ${ac_cv_path_GUNZIP+:} false; then :
8488  $as_echo_n "(cached) " >&6
8489else
8490  case $GUNZIP in
8491  [\\/]* | ?:[\\/]*)
8492  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8493  ;;
8494  *)
8495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8496for as_dir in $PATH
8497do
8498  IFS=$as_save_IFS
8499  test -z "$as_dir" && as_dir=.
8500    for ac_exec_ext in '' $ac_executable_extensions; do
8501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8502    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8504    break 2
8505  fi
8506done
8507  done
8508IFS=$as_save_IFS
8509
8510  ;;
8511esac
8512fi
8513GUNZIP=$ac_cv_path_GUNZIP
8514if test -n "$GUNZIP"; then
8515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8516$as_echo "$GUNZIP" >&6; }
8517else
8518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8519$as_echo "no" >&6; }
8520fi
8521
8522
8523  test -n "$GUNZIP" && break
8524done
8525
8526  else
8527    # The variable is set, but is it from the command line or the environment?
8528
8529    # Try to remove the string !GUNZIP! from our list.
8530    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8531    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8532      # If it failed, the variable was not from the command line. Ignore it,
8533      # but warn the user (except for BASH, which is always set by the calling BASH).
8534      if test "xGUNZIP" != xBASH; then
8535        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8536$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8537      fi
8538      # Try to locate tool using the code snippet
8539      for ac_prog in gunzip
8540do
8541  # Extract the first word of "$ac_prog", so it can be a program name with args.
8542set dummy $ac_prog; ac_word=$2
8543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8544$as_echo_n "checking for $ac_word... " >&6; }
8545if ${ac_cv_path_GUNZIP+:} false; then :
8546  $as_echo_n "(cached) " >&6
8547else
8548  case $GUNZIP in
8549  [\\/]* | ?:[\\/]*)
8550  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8551  ;;
8552  *)
8553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8554for as_dir in $PATH
8555do
8556  IFS=$as_save_IFS
8557  test -z "$as_dir" && as_dir=.
8558    for ac_exec_ext in '' $ac_executable_extensions; do
8559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8560    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8562    break 2
8563  fi
8564done
8565  done
8566IFS=$as_save_IFS
8567
8568  ;;
8569esac
8570fi
8571GUNZIP=$ac_cv_path_GUNZIP
8572if test -n "$GUNZIP"; then
8573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8574$as_echo "$GUNZIP" >&6; }
8575else
8576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8577$as_echo "no" >&6; }
8578fi
8579
8580
8581  test -n "$GUNZIP" && break
8582done
8583
8584    else
8585      # If it succeeded, then it was overridden by the user. We will use it
8586      # for the tool.
8587
8588      # First remove it from the list of overridden variables, so we can test
8589      # for unknown variables in the end.
8590      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8591
8592      # Check if we try to supply an empty value
8593      if test "x$GUNZIP" = x; then
8594        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8595$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8596        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8597$as_echo_n "checking for GUNZIP... " >&6; }
8598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8599$as_echo "disabled" >&6; }
8600      else
8601        # Check if the provided tool contains a complete path.
8602        tool_specified="$GUNZIP"
8603        tool_basename="${tool_specified##*/}"
8604        if test "x$tool_basename" = "x$tool_specified"; then
8605          # A command without a complete path is provided, search $PATH.
8606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8607$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8608          # Extract the first word of "$tool_basename", so it can be a program name with args.
8609set dummy $tool_basename; ac_word=$2
8610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8611$as_echo_n "checking for $ac_word... " >&6; }
8612if ${ac_cv_path_GUNZIP+:} false; then :
8613  $as_echo_n "(cached) " >&6
8614else
8615  case $GUNZIP in
8616  [\\/]* | ?:[\\/]*)
8617  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8618  ;;
8619  *)
8620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8621for as_dir in $PATH
8622do
8623  IFS=$as_save_IFS
8624  test -z "$as_dir" && as_dir=.
8625    for ac_exec_ext in '' $ac_executable_extensions; do
8626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8627    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8629    break 2
8630  fi
8631done
8632  done
8633IFS=$as_save_IFS
8634
8635  ;;
8636esac
8637fi
8638GUNZIP=$ac_cv_path_GUNZIP
8639if test -n "$GUNZIP"; then
8640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8641$as_echo "$GUNZIP" >&6; }
8642else
8643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8644$as_echo "no" >&6; }
8645fi
8646
8647
8648          if test "x$GUNZIP" = x; then
8649            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8650          fi
8651        else
8652          # Otherwise we believe it is a complete path. Use it as it is.
8653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8654$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8655          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8656$as_echo_n "checking for GUNZIP... " >&6; }
8657          if test ! -x "$tool_specified"; then
8658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8659$as_echo "not found" >&6; }
8660            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8661          fi
8662          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8663$as_echo "$tool_specified" >&6; }
8664        fi
8665      fi
8666    fi
8667
8668  fi
8669
8670
8671
8672  if test "x$GUNZIP" = x; then
8673    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8674  fi
8675
8676
8677
8678
8679
8680  # Publish this variable in the help.
8681
8682
8683  if [ -z "${GZIP+x}" ]; then
8684    # The variable is not set by user, try to locate tool using the code snippet
8685    for ac_prog in pigz gzip
8686do
8687  # Extract the first word of "$ac_prog", so it can be a program name with args.
8688set dummy $ac_prog; ac_word=$2
8689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8690$as_echo_n "checking for $ac_word... " >&6; }
8691if ${ac_cv_path_GZIP+:} false; then :
8692  $as_echo_n "(cached) " >&6
8693else
8694  case $GZIP in
8695  [\\/]* | ?:[\\/]*)
8696  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8697  ;;
8698  *)
8699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8700for as_dir in $PATH
8701do
8702  IFS=$as_save_IFS
8703  test -z "$as_dir" && as_dir=.
8704    for ac_exec_ext in '' $ac_executable_extensions; do
8705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8706    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8708    break 2
8709  fi
8710done
8711  done
8712IFS=$as_save_IFS
8713
8714  ;;
8715esac
8716fi
8717GZIP=$ac_cv_path_GZIP
8718if test -n "$GZIP"; then
8719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8720$as_echo "$GZIP" >&6; }
8721else
8722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8723$as_echo "no" >&6; }
8724fi
8725
8726
8727  test -n "$GZIP" && break
8728done
8729
8730  else
8731    # The variable is set, but is it from the command line or the environment?
8732
8733    # Try to remove the string !GZIP! from our list.
8734    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8735    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8736      # If it failed, the variable was not from the command line. Ignore it,
8737      # but warn the user (except for BASH, which is always set by the calling BASH).
8738      if test "xGZIP" != xBASH; then
8739        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8740$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8741      fi
8742      # Try to locate tool using the code snippet
8743      for ac_prog in pigz gzip
8744do
8745  # Extract the first word of "$ac_prog", so it can be a program name with args.
8746set dummy $ac_prog; ac_word=$2
8747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8748$as_echo_n "checking for $ac_word... " >&6; }
8749if ${ac_cv_path_GZIP+:} false; then :
8750  $as_echo_n "(cached) " >&6
8751else
8752  case $GZIP in
8753  [\\/]* | ?:[\\/]*)
8754  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8755  ;;
8756  *)
8757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8758for as_dir in $PATH
8759do
8760  IFS=$as_save_IFS
8761  test -z "$as_dir" && as_dir=.
8762    for ac_exec_ext in '' $ac_executable_extensions; do
8763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8764    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8766    break 2
8767  fi
8768done
8769  done
8770IFS=$as_save_IFS
8771
8772  ;;
8773esac
8774fi
8775GZIP=$ac_cv_path_GZIP
8776if test -n "$GZIP"; then
8777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8778$as_echo "$GZIP" >&6; }
8779else
8780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8781$as_echo "no" >&6; }
8782fi
8783
8784
8785  test -n "$GZIP" && break
8786done
8787
8788    else
8789      # If it succeeded, then it was overridden by the user. We will use it
8790      # for the tool.
8791
8792      # First remove it from the list of overridden variables, so we can test
8793      # for unknown variables in the end.
8794      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8795
8796      # Check if we try to supply an empty value
8797      if test "x$GZIP" = x; then
8798        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8799$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8800        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8801$as_echo_n "checking for GZIP... " >&6; }
8802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8803$as_echo "disabled" >&6; }
8804      else
8805        # Check if the provided tool contains a complete path.
8806        tool_specified="$GZIP"
8807        tool_basename="${tool_specified##*/}"
8808        if test "x$tool_basename" = "x$tool_specified"; then
8809          # A command without a complete path is provided, search $PATH.
8810          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8811$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8812          # Extract the first word of "$tool_basename", so it can be a program name with args.
8813set dummy $tool_basename; ac_word=$2
8814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8815$as_echo_n "checking for $ac_word... " >&6; }
8816if ${ac_cv_path_GZIP+:} false; then :
8817  $as_echo_n "(cached) " >&6
8818else
8819  case $GZIP in
8820  [\\/]* | ?:[\\/]*)
8821  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8822  ;;
8823  *)
8824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8825for as_dir in $PATH
8826do
8827  IFS=$as_save_IFS
8828  test -z "$as_dir" && as_dir=.
8829    for ac_exec_ext in '' $ac_executable_extensions; do
8830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8831    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8833    break 2
8834  fi
8835done
8836  done
8837IFS=$as_save_IFS
8838
8839  ;;
8840esac
8841fi
8842GZIP=$ac_cv_path_GZIP
8843if test -n "$GZIP"; then
8844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8845$as_echo "$GZIP" >&6; }
8846else
8847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8848$as_echo "no" >&6; }
8849fi
8850
8851
8852          if test "x$GZIP" = x; then
8853            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8854          fi
8855        else
8856          # Otherwise we believe it is a complete path. Use it as it is.
8857          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8858$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8859          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8860$as_echo_n "checking for GZIP... " >&6; }
8861          if test ! -x "$tool_specified"; then
8862            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8863$as_echo "not found" >&6; }
8864            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8865          fi
8866          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8867$as_echo "$tool_specified" >&6; }
8868        fi
8869      fi
8870    fi
8871
8872  fi
8873
8874
8875
8876  if test "x$GZIP" = x; then
8877    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8878  fi
8879
8880
8881
8882
8883
8884  # Publish this variable in the help.
8885
8886
8887  if [ -z "${LN+x}" ]; then
8888    # The variable is not set by user, try to locate tool using the code snippet
8889    for ac_prog in ln
8890do
8891  # Extract the first word of "$ac_prog", so it can be a program name with args.
8892set dummy $ac_prog; ac_word=$2
8893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8894$as_echo_n "checking for $ac_word... " >&6; }
8895if ${ac_cv_path_LN+:} false; then :
8896  $as_echo_n "(cached) " >&6
8897else
8898  case $LN in
8899  [\\/]* | ?:[\\/]*)
8900  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8901  ;;
8902  *)
8903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8904for as_dir in $PATH
8905do
8906  IFS=$as_save_IFS
8907  test -z "$as_dir" && as_dir=.
8908    for ac_exec_ext in '' $ac_executable_extensions; do
8909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8910    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8912    break 2
8913  fi
8914done
8915  done
8916IFS=$as_save_IFS
8917
8918  ;;
8919esac
8920fi
8921LN=$ac_cv_path_LN
8922if test -n "$LN"; then
8923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8924$as_echo "$LN" >&6; }
8925else
8926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8927$as_echo "no" >&6; }
8928fi
8929
8930
8931  test -n "$LN" && break
8932done
8933
8934  else
8935    # The variable is set, but is it from the command line or the environment?
8936
8937    # Try to remove the string !LN! from our list.
8938    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8939    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8940      # If it failed, the variable was not from the command line. Ignore it,
8941      # but warn the user (except for BASH, which is always set by the calling BASH).
8942      if test "xLN" != xBASH; then
8943        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8944$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8945      fi
8946      # Try to locate tool using the code snippet
8947      for ac_prog in ln
8948do
8949  # Extract the first word of "$ac_prog", so it can be a program name with args.
8950set dummy $ac_prog; ac_word=$2
8951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8952$as_echo_n "checking for $ac_word... " >&6; }
8953if ${ac_cv_path_LN+:} false; then :
8954  $as_echo_n "(cached) " >&6
8955else
8956  case $LN in
8957  [\\/]* | ?:[\\/]*)
8958  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8959  ;;
8960  *)
8961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8962for as_dir in $PATH
8963do
8964  IFS=$as_save_IFS
8965  test -z "$as_dir" && as_dir=.
8966    for ac_exec_ext in '' $ac_executable_extensions; do
8967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8968    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8970    break 2
8971  fi
8972done
8973  done
8974IFS=$as_save_IFS
8975
8976  ;;
8977esac
8978fi
8979LN=$ac_cv_path_LN
8980if test -n "$LN"; then
8981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8982$as_echo "$LN" >&6; }
8983else
8984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8985$as_echo "no" >&6; }
8986fi
8987
8988
8989  test -n "$LN" && break
8990done
8991
8992    else
8993      # If it succeeded, then it was overridden by the user. We will use it
8994      # for the tool.
8995
8996      # First remove it from the list of overridden variables, so we can test
8997      # for unknown variables in the end.
8998      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8999
9000      # Check if we try to supply an empty value
9001      if test "x$LN" = x; then
9002        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9003$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9004        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9005$as_echo_n "checking for LN... " >&6; }
9006        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9007$as_echo "disabled" >&6; }
9008      else
9009        # Check if the provided tool contains a complete path.
9010        tool_specified="$LN"
9011        tool_basename="${tool_specified##*/}"
9012        if test "x$tool_basename" = "x$tool_specified"; then
9013          # A command without a complete path is provided, search $PATH.
9014          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9015$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9016          # Extract the first word of "$tool_basename", so it can be a program name with args.
9017set dummy $tool_basename; ac_word=$2
9018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9019$as_echo_n "checking for $ac_word... " >&6; }
9020if ${ac_cv_path_LN+:} false; then :
9021  $as_echo_n "(cached) " >&6
9022else
9023  case $LN in
9024  [\\/]* | ?:[\\/]*)
9025  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9026  ;;
9027  *)
9028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9029for as_dir in $PATH
9030do
9031  IFS=$as_save_IFS
9032  test -z "$as_dir" && as_dir=.
9033    for ac_exec_ext in '' $ac_executable_extensions; do
9034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9035    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9037    break 2
9038  fi
9039done
9040  done
9041IFS=$as_save_IFS
9042
9043  ;;
9044esac
9045fi
9046LN=$ac_cv_path_LN
9047if test -n "$LN"; then
9048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9049$as_echo "$LN" >&6; }
9050else
9051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9052$as_echo "no" >&6; }
9053fi
9054
9055
9056          if test "x$LN" = x; then
9057            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9058          fi
9059        else
9060          # Otherwise we believe it is a complete path. Use it as it is.
9061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9062$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9063          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9064$as_echo_n "checking for LN... " >&6; }
9065          if test ! -x "$tool_specified"; then
9066            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9067$as_echo "not found" >&6; }
9068            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9069          fi
9070          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9071$as_echo "$tool_specified" >&6; }
9072        fi
9073      fi
9074    fi
9075
9076  fi
9077
9078
9079
9080  if test "x$LN" = x; then
9081    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9082  fi
9083
9084
9085
9086
9087
9088  # Publish this variable in the help.
9089
9090
9091  if [ -z "${LS+x}" ]; then
9092    # The variable is not set by user, try to locate tool using the code snippet
9093    for ac_prog in ls
9094do
9095  # Extract the first word of "$ac_prog", so it can be a program name with args.
9096set dummy $ac_prog; ac_word=$2
9097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9098$as_echo_n "checking for $ac_word... " >&6; }
9099if ${ac_cv_path_LS+:} false; then :
9100  $as_echo_n "(cached) " >&6
9101else
9102  case $LS in
9103  [\\/]* | ?:[\\/]*)
9104  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9105  ;;
9106  *)
9107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9108for as_dir in $PATH
9109do
9110  IFS=$as_save_IFS
9111  test -z "$as_dir" && as_dir=.
9112    for ac_exec_ext in '' $ac_executable_extensions; do
9113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9114    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9116    break 2
9117  fi
9118done
9119  done
9120IFS=$as_save_IFS
9121
9122  ;;
9123esac
9124fi
9125LS=$ac_cv_path_LS
9126if test -n "$LS"; then
9127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9128$as_echo "$LS" >&6; }
9129else
9130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9131$as_echo "no" >&6; }
9132fi
9133
9134
9135  test -n "$LS" && break
9136done
9137
9138  else
9139    # The variable is set, but is it from the command line or the environment?
9140
9141    # Try to remove the string !LS! from our list.
9142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9144      # If it failed, the variable was not from the command line. Ignore it,
9145      # but warn the user (except for BASH, which is always set by the calling BASH).
9146      if test "xLS" != xBASH; then
9147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9148$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9149      fi
9150      # Try to locate tool using the code snippet
9151      for ac_prog in ls
9152do
9153  # Extract the first word of "$ac_prog", so it can be a program name with args.
9154set dummy $ac_prog; ac_word=$2
9155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9156$as_echo_n "checking for $ac_word... " >&6; }
9157if ${ac_cv_path_LS+:} false; then :
9158  $as_echo_n "(cached) " >&6
9159else
9160  case $LS in
9161  [\\/]* | ?:[\\/]*)
9162  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9163  ;;
9164  *)
9165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9166for as_dir in $PATH
9167do
9168  IFS=$as_save_IFS
9169  test -z "$as_dir" && as_dir=.
9170    for ac_exec_ext in '' $ac_executable_extensions; do
9171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9172    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9174    break 2
9175  fi
9176done
9177  done
9178IFS=$as_save_IFS
9179
9180  ;;
9181esac
9182fi
9183LS=$ac_cv_path_LS
9184if test -n "$LS"; then
9185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9186$as_echo "$LS" >&6; }
9187else
9188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9189$as_echo "no" >&6; }
9190fi
9191
9192
9193  test -n "$LS" && break
9194done
9195
9196    else
9197      # If it succeeded, then it was overridden by the user. We will use it
9198      # for the tool.
9199
9200      # First remove it from the list of overridden variables, so we can test
9201      # for unknown variables in the end.
9202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9203
9204      # Check if we try to supply an empty value
9205      if test "x$LS" = x; then
9206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9207$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9209$as_echo_n "checking for LS... " >&6; }
9210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9211$as_echo "disabled" >&6; }
9212      else
9213        # Check if the provided tool contains a complete path.
9214        tool_specified="$LS"
9215        tool_basename="${tool_specified##*/}"
9216        if test "x$tool_basename" = "x$tool_specified"; then
9217          # A command without a complete path is provided, search $PATH.
9218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9219$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9220          # Extract the first word of "$tool_basename", so it can be a program name with args.
9221set dummy $tool_basename; ac_word=$2
9222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9223$as_echo_n "checking for $ac_word... " >&6; }
9224if ${ac_cv_path_LS+:} false; then :
9225  $as_echo_n "(cached) " >&6
9226else
9227  case $LS in
9228  [\\/]* | ?:[\\/]*)
9229  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9230  ;;
9231  *)
9232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9233for as_dir in $PATH
9234do
9235  IFS=$as_save_IFS
9236  test -z "$as_dir" && as_dir=.
9237    for ac_exec_ext in '' $ac_executable_extensions; do
9238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9239    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9241    break 2
9242  fi
9243done
9244  done
9245IFS=$as_save_IFS
9246
9247  ;;
9248esac
9249fi
9250LS=$ac_cv_path_LS
9251if test -n "$LS"; then
9252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9253$as_echo "$LS" >&6; }
9254else
9255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9256$as_echo "no" >&6; }
9257fi
9258
9259
9260          if test "x$LS" = x; then
9261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9262          fi
9263        else
9264          # Otherwise we believe it is a complete path. Use it as it is.
9265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9266$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9268$as_echo_n "checking for LS... " >&6; }
9269          if test ! -x "$tool_specified"; then
9270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9271$as_echo "not found" >&6; }
9272            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9273          fi
9274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9275$as_echo "$tool_specified" >&6; }
9276        fi
9277      fi
9278    fi
9279
9280  fi
9281
9282
9283
9284  if test "x$LS" = x; then
9285    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9286  fi
9287
9288
9289
9290
9291
9292  # Publish this variable in the help.
9293
9294
9295  if [ -z "${MKDIR+x}" ]; then
9296    # The variable is not set by user, try to locate tool using the code snippet
9297    for ac_prog in mkdir
9298do
9299  # Extract the first word of "$ac_prog", so it can be a program name with args.
9300set dummy $ac_prog; ac_word=$2
9301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9302$as_echo_n "checking for $ac_word... " >&6; }
9303if ${ac_cv_path_MKDIR+:} false; then :
9304  $as_echo_n "(cached) " >&6
9305else
9306  case $MKDIR in
9307  [\\/]* | ?:[\\/]*)
9308  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9309  ;;
9310  *)
9311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9312for as_dir in $PATH
9313do
9314  IFS=$as_save_IFS
9315  test -z "$as_dir" && as_dir=.
9316    for ac_exec_ext in '' $ac_executable_extensions; do
9317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9318    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9320    break 2
9321  fi
9322done
9323  done
9324IFS=$as_save_IFS
9325
9326  ;;
9327esac
9328fi
9329MKDIR=$ac_cv_path_MKDIR
9330if test -n "$MKDIR"; then
9331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9332$as_echo "$MKDIR" >&6; }
9333else
9334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9335$as_echo "no" >&6; }
9336fi
9337
9338
9339  test -n "$MKDIR" && break
9340done
9341
9342  else
9343    # The variable is set, but is it from the command line or the environment?
9344
9345    # Try to remove the string !MKDIR! from our list.
9346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9348      # If it failed, the variable was not from the command line. Ignore it,
9349      # but warn the user (except for BASH, which is always set by the calling BASH).
9350      if test "xMKDIR" != xBASH; then
9351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9352$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9353      fi
9354      # Try to locate tool using the code snippet
9355      for ac_prog in mkdir
9356do
9357  # Extract the first word of "$ac_prog", so it can be a program name with args.
9358set dummy $ac_prog; ac_word=$2
9359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9360$as_echo_n "checking for $ac_word... " >&6; }
9361if ${ac_cv_path_MKDIR+:} false; then :
9362  $as_echo_n "(cached) " >&6
9363else
9364  case $MKDIR in
9365  [\\/]* | ?:[\\/]*)
9366  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9367  ;;
9368  *)
9369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9370for as_dir in $PATH
9371do
9372  IFS=$as_save_IFS
9373  test -z "$as_dir" && as_dir=.
9374    for ac_exec_ext in '' $ac_executable_extensions; do
9375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9376    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9378    break 2
9379  fi
9380done
9381  done
9382IFS=$as_save_IFS
9383
9384  ;;
9385esac
9386fi
9387MKDIR=$ac_cv_path_MKDIR
9388if test -n "$MKDIR"; then
9389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9390$as_echo "$MKDIR" >&6; }
9391else
9392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9393$as_echo "no" >&6; }
9394fi
9395
9396
9397  test -n "$MKDIR" && break
9398done
9399
9400    else
9401      # If it succeeded, then it was overridden by the user. We will use it
9402      # for the tool.
9403
9404      # First remove it from the list of overridden variables, so we can test
9405      # for unknown variables in the end.
9406      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9407
9408      # Check if we try to supply an empty value
9409      if test "x$MKDIR" = x; then
9410        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9411$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9412        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9413$as_echo_n "checking for MKDIR... " >&6; }
9414        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9415$as_echo "disabled" >&6; }
9416      else
9417        # Check if the provided tool contains a complete path.
9418        tool_specified="$MKDIR"
9419        tool_basename="${tool_specified##*/}"
9420        if test "x$tool_basename" = "x$tool_specified"; then
9421          # A command without a complete path is provided, search $PATH.
9422          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9423$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9424          # Extract the first word of "$tool_basename", so it can be a program name with args.
9425set dummy $tool_basename; ac_word=$2
9426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9427$as_echo_n "checking for $ac_word... " >&6; }
9428if ${ac_cv_path_MKDIR+:} false; then :
9429  $as_echo_n "(cached) " >&6
9430else
9431  case $MKDIR in
9432  [\\/]* | ?:[\\/]*)
9433  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9434  ;;
9435  *)
9436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9437for as_dir in $PATH
9438do
9439  IFS=$as_save_IFS
9440  test -z "$as_dir" && as_dir=.
9441    for ac_exec_ext in '' $ac_executable_extensions; do
9442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9443    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9445    break 2
9446  fi
9447done
9448  done
9449IFS=$as_save_IFS
9450
9451  ;;
9452esac
9453fi
9454MKDIR=$ac_cv_path_MKDIR
9455if test -n "$MKDIR"; then
9456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9457$as_echo "$MKDIR" >&6; }
9458else
9459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9460$as_echo "no" >&6; }
9461fi
9462
9463
9464          if test "x$MKDIR" = x; then
9465            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9466          fi
9467        else
9468          # Otherwise we believe it is a complete path. Use it as it is.
9469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9470$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9471          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9472$as_echo_n "checking for MKDIR... " >&6; }
9473          if test ! -x "$tool_specified"; then
9474            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9475$as_echo "not found" >&6; }
9476            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9477          fi
9478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9479$as_echo "$tool_specified" >&6; }
9480        fi
9481      fi
9482    fi
9483
9484  fi
9485
9486
9487
9488  if test "x$MKDIR" = x; then
9489    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9490  fi
9491
9492
9493
9494
9495
9496  # Publish this variable in the help.
9497
9498
9499  if [ -z "${MKTEMP+x}" ]; then
9500    # The variable is not set by user, try to locate tool using the code snippet
9501    for ac_prog in mktemp
9502do
9503  # Extract the first word of "$ac_prog", so it can be a program name with args.
9504set dummy $ac_prog; ac_word=$2
9505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9506$as_echo_n "checking for $ac_word... " >&6; }
9507if ${ac_cv_path_MKTEMP+:} false; then :
9508  $as_echo_n "(cached) " >&6
9509else
9510  case $MKTEMP in
9511  [\\/]* | ?:[\\/]*)
9512  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9513  ;;
9514  *)
9515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9516for as_dir in $PATH
9517do
9518  IFS=$as_save_IFS
9519  test -z "$as_dir" && as_dir=.
9520    for ac_exec_ext in '' $ac_executable_extensions; do
9521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9522    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9524    break 2
9525  fi
9526done
9527  done
9528IFS=$as_save_IFS
9529
9530  ;;
9531esac
9532fi
9533MKTEMP=$ac_cv_path_MKTEMP
9534if test -n "$MKTEMP"; then
9535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9536$as_echo "$MKTEMP" >&6; }
9537else
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9539$as_echo "no" >&6; }
9540fi
9541
9542
9543  test -n "$MKTEMP" && break
9544done
9545
9546  else
9547    # The variable is set, but is it from the command line or the environment?
9548
9549    # Try to remove the string !MKTEMP! from our list.
9550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9552      # If it failed, the variable was not from the command line. Ignore it,
9553      # but warn the user (except for BASH, which is always set by the calling BASH).
9554      if test "xMKTEMP" != xBASH; then
9555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9556$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9557      fi
9558      # Try to locate tool using the code snippet
9559      for ac_prog in mktemp
9560do
9561  # Extract the first word of "$ac_prog", so it can be a program name with args.
9562set dummy $ac_prog; ac_word=$2
9563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9564$as_echo_n "checking for $ac_word... " >&6; }
9565if ${ac_cv_path_MKTEMP+:} false; then :
9566  $as_echo_n "(cached) " >&6
9567else
9568  case $MKTEMP in
9569  [\\/]* | ?:[\\/]*)
9570  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9571  ;;
9572  *)
9573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9574for as_dir in $PATH
9575do
9576  IFS=$as_save_IFS
9577  test -z "$as_dir" && as_dir=.
9578    for ac_exec_ext in '' $ac_executable_extensions; do
9579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9580    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9582    break 2
9583  fi
9584done
9585  done
9586IFS=$as_save_IFS
9587
9588  ;;
9589esac
9590fi
9591MKTEMP=$ac_cv_path_MKTEMP
9592if test -n "$MKTEMP"; then
9593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9594$as_echo "$MKTEMP" >&6; }
9595else
9596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9597$as_echo "no" >&6; }
9598fi
9599
9600
9601  test -n "$MKTEMP" && break
9602done
9603
9604    else
9605      # If it succeeded, then it was overridden by the user. We will use it
9606      # for the tool.
9607
9608      # First remove it from the list of overridden variables, so we can test
9609      # for unknown variables in the end.
9610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9611
9612      # Check if we try to supply an empty value
9613      if test "x$MKTEMP" = x; then
9614        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9615$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9616        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9617$as_echo_n "checking for MKTEMP... " >&6; }
9618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9619$as_echo "disabled" >&6; }
9620      else
9621        # Check if the provided tool contains a complete path.
9622        tool_specified="$MKTEMP"
9623        tool_basename="${tool_specified##*/}"
9624        if test "x$tool_basename" = "x$tool_specified"; then
9625          # A command without a complete path is provided, search $PATH.
9626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9627$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9628          # Extract the first word of "$tool_basename", so it can be a program name with args.
9629set dummy $tool_basename; ac_word=$2
9630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9631$as_echo_n "checking for $ac_word... " >&6; }
9632if ${ac_cv_path_MKTEMP+:} false; then :
9633  $as_echo_n "(cached) " >&6
9634else
9635  case $MKTEMP in
9636  [\\/]* | ?:[\\/]*)
9637  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9638  ;;
9639  *)
9640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9641for as_dir in $PATH
9642do
9643  IFS=$as_save_IFS
9644  test -z "$as_dir" && as_dir=.
9645    for ac_exec_ext in '' $ac_executable_extensions; do
9646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9647    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9649    break 2
9650  fi
9651done
9652  done
9653IFS=$as_save_IFS
9654
9655  ;;
9656esac
9657fi
9658MKTEMP=$ac_cv_path_MKTEMP
9659if test -n "$MKTEMP"; then
9660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9661$as_echo "$MKTEMP" >&6; }
9662else
9663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9664$as_echo "no" >&6; }
9665fi
9666
9667
9668          if test "x$MKTEMP" = x; then
9669            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9670          fi
9671        else
9672          # Otherwise we believe it is a complete path. Use it as it is.
9673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9674$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9675          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9676$as_echo_n "checking for MKTEMP... " >&6; }
9677          if test ! -x "$tool_specified"; then
9678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9679$as_echo "not found" >&6; }
9680            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9681          fi
9682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9683$as_echo "$tool_specified" >&6; }
9684        fi
9685      fi
9686    fi
9687
9688  fi
9689
9690
9691
9692  if test "x$MKTEMP" = x; then
9693    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9694  fi
9695
9696
9697
9698
9699
9700  # Publish this variable in the help.
9701
9702
9703  if [ -z "${MV+x}" ]; then
9704    # The variable is not set by user, try to locate tool using the code snippet
9705    for ac_prog in mv
9706do
9707  # Extract the first word of "$ac_prog", so it can be a program name with args.
9708set dummy $ac_prog; ac_word=$2
9709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9710$as_echo_n "checking for $ac_word... " >&6; }
9711if ${ac_cv_path_MV+:} false; then :
9712  $as_echo_n "(cached) " >&6
9713else
9714  case $MV in
9715  [\\/]* | ?:[\\/]*)
9716  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9717  ;;
9718  *)
9719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9720for as_dir in $PATH
9721do
9722  IFS=$as_save_IFS
9723  test -z "$as_dir" && as_dir=.
9724    for ac_exec_ext in '' $ac_executable_extensions; do
9725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9726    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9728    break 2
9729  fi
9730done
9731  done
9732IFS=$as_save_IFS
9733
9734  ;;
9735esac
9736fi
9737MV=$ac_cv_path_MV
9738if test -n "$MV"; then
9739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9740$as_echo "$MV" >&6; }
9741else
9742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9743$as_echo "no" >&6; }
9744fi
9745
9746
9747  test -n "$MV" && break
9748done
9749
9750  else
9751    # The variable is set, but is it from the command line or the environment?
9752
9753    # Try to remove the string !MV! from our list.
9754    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9755    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9756      # If it failed, the variable was not from the command line. Ignore it,
9757      # but warn the user (except for BASH, which is always set by the calling BASH).
9758      if test "xMV" != xBASH; then
9759        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9760$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9761      fi
9762      # Try to locate tool using the code snippet
9763      for ac_prog in mv
9764do
9765  # Extract the first word of "$ac_prog", so it can be a program name with args.
9766set dummy $ac_prog; ac_word=$2
9767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9768$as_echo_n "checking for $ac_word... " >&6; }
9769if ${ac_cv_path_MV+:} false; then :
9770  $as_echo_n "(cached) " >&6
9771else
9772  case $MV in
9773  [\\/]* | ?:[\\/]*)
9774  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9775  ;;
9776  *)
9777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9778for as_dir in $PATH
9779do
9780  IFS=$as_save_IFS
9781  test -z "$as_dir" && as_dir=.
9782    for ac_exec_ext in '' $ac_executable_extensions; do
9783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9784    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9786    break 2
9787  fi
9788done
9789  done
9790IFS=$as_save_IFS
9791
9792  ;;
9793esac
9794fi
9795MV=$ac_cv_path_MV
9796if test -n "$MV"; then
9797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9798$as_echo "$MV" >&6; }
9799else
9800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9801$as_echo "no" >&6; }
9802fi
9803
9804
9805  test -n "$MV" && break
9806done
9807
9808    else
9809      # If it succeeded, then it was overridden by the user. We will use it
9810      # for the tool.
9811
9812      # First remove it from the list of overridden variables, so we can test
9813      # for unknown variables in the end.
9814      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9815
9816      # Check if we try to supply an empty value
9817      if test "x$MV" = x; then
9818        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9819$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9820        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9821$as_echo_n "checking for MV... " >&6; }
9822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9823$as_echo "disabled" >&6; }
9824      else
9825        # Check if the provided tool contains a complete path.
9826        tool_specified="$MV"
9827        tool_basename="${tool_specified##*/}"
9828        if test "x$tool_basename" = "x$tool_specified"; then
9829          # A command without a complete path is provided, search $PATH.
9830          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9831$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9832          # Extract the first word of "$tool_basename", so it can be a program name with args.
9833set dummy $tool_basename; ac_word=$2
9834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9835$as_echo_n "checking for $ac_word... " >&6; }
9836if ${ac_cv_path_MV+:} false; then :
9837  $as_echo_n "(cached) " >&6
9838else
9839  case $MV in
9840  [\\/]* | ?:[\\/]*)
9841  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9842  ;;
9843  *)
9844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9845for as_dir in $PATH
9846do
9847  IFS=$as_save_IFS
9848  test -z "$as_dir" && as_dir=.
9849    for ac_exec_ext in '' $ac_executable_extensions; do
9850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9851    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9853    break 2
9854  fi
9855done
9856  done
9857IFS=$as_save_IFS
9858
9859  ;;
9860esac
9861fi
9862MV=$ac_cv_path_MV
9863if test -n "$MV"; then
9864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9865$as_echo "$MV" >&6; }
9866else
9867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9868$as_echo "no" >&6; }
9869fi
9870
9871
9872          if test "x$MV" = x; then
9873            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9874          fi
9875        else
9876          # Otherwise we believe it is a complete path. Use it as it is.
9877          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9878$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9879          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9880$as_echo_n "checking for MV... " >&6; }
9881          if test ! -x "$tool_specified"; then
9882            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9883$as_echo "not found" >&6; }
9884            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9885          fi
9886          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9887$as_echo "$tool_specified" >&6; }
9888        fi
9889      fi
9890    fi
9891
9892  fi
9893
9894
9895
9896  if test "x$MV" = x; then
9897    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9898  fi
9899
9900
9901
9902
9903
9904  # Publish this variable in the help.
9905
9906
9907  if [ -z "${NAWK+x}" ]; then
9908    # The variable is not set by user, try to locate tool using the code snippet
9909    for ac_prog in nawk gawk awk
9910do
9911  # Extract the first word of "$ac_prog", so it can be a program name with args.
9912set dummy $ac_prog; ac_word=$2
9913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9914$as_echo_n "checking for $ac_word... " >&6; }
9915if ${ac_cv_path_NAWK+:} false; then :
9916  $as_echo_n "(cached) " >&6
9917else
9918  case $NAWK in
9919  [\\/]* | ?:[\\/]*)
9920  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9921  ;;
9922  *)
9923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9924for as_dir in $PATH
9925do
9926  IFS=$as_save_IFS
9927  test -z "$as_dir" && as_dir=.
9928    for ac_exec_ext in '' $ac_executable_extensions; do
9929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9930    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9932    break 2
9933  fi
9934done
9935  done
9936IFS=$as_save_IFS
9937
9938  ;;
9939esac
9940fi
9941NAWK=$ac_cv_path_NAWK
9942if test -n "$NAWK"; then
9943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9944$as_echo "$NAWK" >&6; }
9945else
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9947$as_echo "no" >&6; }
9948fi
9949
9950
9951  test -n "$NAWK" && break
9952done
9953
9954  else
9955    # The variable is set, but is it from the command line or the environment?
9956
9957    # Try to remove the string !NAWK! from our list.
9958    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9959    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9960      # If it failed, the variable was not from the command line. Ignore it,
9961      # but warn the user (except for BASH, which is always set by the calling BASH).
9962      if test "xNAWK" != xBASH; then
9963        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9964$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9965      fi
9966      # Try to locate tool using the code snippet
9967      for ac_prog in nawk gawk awk
9968do
9969  # Extract the first word of "$ac_prog", so it can be a program name with args.
9970set dummy $ac_prog; ac_word=$2
9971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9972$as_echo_n "checking for $ac_word... " >&6; }
9973if ${ac_cv_path_NAWK+:} false; then :
9974  $as_echo_n "(cached) " >&6
9975else
9976  case $NAWK in
9977  [\\/]* | ?:[\\/]*)
9978  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9979  ;;
9980  *)
9981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9982for as_dir in $PATH
9983do
9984  IFS=$as_save_IFS
9985  test -z "$as_dir" && as_dir=.
9986    for ac_exec_ext in '' $ac_executable_extensions; do
9987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9988    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9990    break 2
9991  fi
9992done
9993  done
9994IFS=$as_save_IFS
9995
9996  ;;
9997esac
9998fi
9999NAWK=$ac_cv_path_NAWK
10000if test -n "$NAWK"; then
10001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10002$as_echo "$NAWK" >&6; }
10003else
10004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10005$as_echo "no" >&6; }
10006fi
10007
10008
10009  test -n "$NAWK" && break
10010done
10011
10012    else
10013      # If it succeeded, then it was overridden by the user. We will use it
10014      # for the tool.
10015
10016      # First remove it from the list of overridden variables, so we can test
10017      # for unknown variables in the end.
10018      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10019
10020      # Check if we try to supply an empty value
10021      if test "x$NAWK" = x; then
10022        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10023$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10024        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10025$as_echo_n "checking for NAWK... " >&6; }
10026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10027$as_echo "disabled" >&6; }
10028      else
10029        # Check if the provided tool contains a complete path.
10030        tool_specified="$NAWK"
10031        tool_basename="${tool_specified##*/}"
10032        if test "x$tool_basename" = "x$tool_specified"; then
10033          # A command without a complete path is provided, search $PATH.
10034          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10035$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10036          # Extract the first word of "$tool_basename", so it can be a program name with args.
10037set dummy $tool_basename; ac_word=$2
10038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10039$as_echo_n "checking for $ac_word... " >&6; }
10040if ${ac_cv_path_NAWK+:} false; then :
10041  $as_echo_n "(cached) " >&6
10042else
10043  case $NAWK in
10044  [\\/]* | ?:[\\/]*)
10045  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10046  ;;
10047  *)
10048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10049for as_dir in $PATH
10050do
10051  IFS=$as_save_IFS
10052  test -z "$as_dir" && as_dir=.
10053    for ac_exec_ext in '' $ac_executable_extensions; do
10054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10055    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10057    break 2
10058  fi
10059done
10060  done
10061IFS=$as_save_IFS
10062
10063  ;;
10064esac
10065fi
10066NAWK=$ac_cv_path_NAWK
10067if test -n "$NAWK"; then
10068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10069$as_echo "$NAWK" >&6; }
10070else
10071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10072$as_echo "no" >&6; }
10073fi
10074
10075
10076          if test "x$NAWK" = x; then
10077            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10078          fi
10079        else
10080          # Otherwise we believe it is a complete path. Use it as it is.
10081          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10082$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10083          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10084$as_echo_n "checking for NAWK... " >&6; }
10085          if test ! -x "$tool_specified"; then
10086            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10087$as_echo "not found" >&6; }
10088            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10089          fi
10090          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10091$as_echo "$tool_specified" >&6; }
10092        fi
10093      fi
10094    fi
10095
10096  fi
10097
10098
10099
10100  if test "x$NAWK" = x; then
10101    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10102  fi
10103
10104
10105
10106
10107
10108  # Publish this variable in the help.
10109
10110
10111  if [ -z "${PRINTF+x}" ]; then
10112    # The variable is not set by user, try to locate tool using the code snippet
10113    for ac_prog in printf
10114do
10115  # Extract the first word of "$ac_prog", so it can be a program name with args.
10116set dummy $ac_prog; ac_word=$2
10117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10118$as_echo_n "checking for $ac_word... " >&6; }
10119if ${ac_cv_path_PRINTF+:} false; then :
10120  $as_echo_n "(cached) " >&6
10121else
10122  case $PRINTF in
10123  [\\/]* | ?:[\\/]*)
10124  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10125  ;;
10126  *)
10127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10128for as_dir in $PATH
10129do
10130  IFS=$as_save_IFS
10131  test -z "$as_dir" && as_dir=.
10132    for ac_exec_ext in '' $ac_executable_extensions; do
10133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10134    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10136    break 2
10137  fi
10138done
10139  done
10140IFS=$as_save_IFS
10141
10142  ;;
10143esac
10144fi
10145PRINTF=$ac_cv_path_PRINTF
10146if test -n "$PRINTF"; then
10147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10148$as_echo "$PRINTF" >&6; }
10149else
10150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10151$as_echo "no" >&6; }
10152fi
10153
10154
10155  test -n "$PRINTF" && break
10156done
10157
10158  else
10159    # The variable is set, but is it from the command line or the environment?
10160
10161    # Try to remove the string !PRINTF! from our list.
10162    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10163    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10164      # If it failed, the variable was not from the command line. Ignore it,
10165      # but warn the user (except for BASH, which is always set by the calling BASH).
10166      if test "xPRINTF" != xBASH; then
10167        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10168$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10169      fi
10170      # Try to locate tool using the code snippet
10171      for ac_prog in printf
10172do
10173  # Extract the first word of "$ac_prog", so it can be a program name with args.
10174set dummy $ac_prog; ac_word=$2
10175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10176$as_echo_n "checking for $ac_word... " >&6; }
10177if ${ac_cv_path_PRINTF+:} false; then :
10178  $as_echo_n "(cached) " >&6
10179else
10180  case $PRINTF in
10181  [\\/]* | ?:[\\/]*)
10182  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10183  ;;
10184  *)
10185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10186for as_dir in $PATH
10187do
10188  IFS=$as_save_IFS
10189  test -z "$as_dir" && as_dir=.
10190    for ac_exec_ext in '' $ac_executable_extensions; do
10191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10192    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10194    break 2
10195  fi
10196done
10197  done
10198IFS=$as_save_IFS
10199
10200  ;;
10201esac
10202fi
10203PRINTF=$ac_cv_path_PRINTF
10204if test -n "$PRINTF"; then
10205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10206$as_echo "$PRINTF" >&6; }
10207else
10208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10209$as_echo "no" >&6; }
10210fi
10211
10212
10213  test -n "$PRINTF" && break
10214done
10215
10216    else
10217      # If it succeeded, then it was overridden by the user. We will use it
10218      # for the tool.
10219
10220      # First remove it from the list of overridden variables, so we can test
10221      # for unknown variables in the end.
10222      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10223
10224      # Check if we try to supply an empty value
10225      if test "x$PRINTF" = x; then
10226        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10227$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10229$as_echo_n "checking for PRINTF... " >&6; }
10230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10231$as_echo "disabled" >&6; }
10232      else
10233        # Check if the provided tool contains a complete path.
10234        tool_specified="$PRINTF"
10235        tool_basename="${tool_specified##*/}"
10236        if test "x$tool_basename" = "x$tool_specified"; then
10237          # A command without a complete path is provided, search $PATH.
10238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10239$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10240          # Extract the first word of "$tool_basename", so it can be a program name with args.
10241set dummy $tool_basename; ac_word=$2
10242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10243$as_echo_n "checking for $ac_word... " >&6; }
10244if ${ac_cv_path_PRINTF+:} false; then :
10245  $as_echo_n "(cached) " >&6
10246else
10247  case $PRINTF in
10248  [\\/]* | ?:[\\/]*)
10249  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10250  ;;
10251  *)
10252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10253for as_dir in $PATH
10254do
10255  IFS=$as_save_IFS
10256  test -z "$as_dir" && as_dir=.
10257    for ac_exec_ext in '' $ac_executable_extensions; do
10258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10259    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10261    break 2
10262  fi
10263done
10264  done
10265IFS=$as_save_IFS
10266
10267  ;;
10268esac
10269fi
10270PRINTF=$ac_cv_path_PRINTF
10271if test -n "$PRINTF"; then
10272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10273$as_echo "$PRINTF" >&6; }
10274else
10275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10276$as_echo "no" >&6; }
10277fi
10278
10279
10280          if test "x$PRINTF" = x; then
10281            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10282          fi
10283        else
10284          # Otherwise we believe it is a complete path. Use it as it is.
10285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10286$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10287          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10288$as_echo_n "checking for PRINTF... " >&6; }
10289          if test ! -x "$tool_specified"; then
10290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10291$as_echo "not found" >&6; }
10292            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10293          fi
10294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10295$as_echo "$tool_specified" >&6; }
10296        fi
10297      fi
10298    fi
10299
10300  fi
10301
10302
10303
10304  if test "x$PRINTF" = x; then
10305    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10306  fi
10307
10308
10309
10310
10311
10312  # Publish this variable in the help.
10313
10314
10315  if [ -z "${RM+x}" ]; then
10316    # The variable is not set by user, try to locate tool using the code snippet
10317    for ac_prog in rm
10318do
10319  # Extract the first word of "$ac_prog", so it can be a program name with args.
10320set dummy $ac_prog; ac_word=$2
10321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10322$as_echo_n "checking for $ac_word... " >&6; }
10323if ${ac_cv_path_RM+:} false; then :
10324  $as_echo_n "(cached) " >&6
10325else
10326  case $RM in
10327  [\\/]* | ?:[\\/]*)
10328  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10329  ;;
10330  *)
10331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10332for as_dir in $PATH
10333do
10334  IFS=$as_save_IFS
10335  test -z "$as_dir" && as_dir=.
10336    for ac_exec_ext in '' $ac_executable_extensions; do
10337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10338    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10340    break 2
10341  fi
10342done
10343  done
10344IFS=$as_save_IFS
10345
10346  ;;
10347esac
10348fi
10349RM=$ac_cv_path_RM
10350if test -n "$RM"; then
10351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10352$as_echo "$RM" >&6; }
10353else
10354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10355$as_echo "no" >&6; }
10356fi
10357
10358
10359  test -n "$RM" && break
10360done
10361
10362  else
10363    # The variable is set, but is it from the command line or the environment?
10364
10365    # Try to remove the string !RM! from our list.
10366    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10367    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10368      # If it failed, the variable was not from the command line. Ignore it,
10369      # but warn the user (except for BASH, which is always set by the calling BASH).
10370      if test "xRM" != xBASH; then
10371        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10372$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10373      fi
10374      # Try to locate tool using the code snippet
10375      for ac_prog in rm
10376do
10377  # Extract the first word of "$ac_prog", so it can be a program name with args.
10378set dummy $ac_prog; ac_word=$2
10379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10380$as_echo_n "checking for $ac_word... " >&6; }
10381if ${ac_cv_path_RM+:} false; then :
10382  $as_echo_n "(cached) " >&6
10383else
10384  case $RM in
10385  [\\/]* | ?:[\\/]*)
10386  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10387  ;;
10388  *)
10389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10390for as_dir in $PATH
10391do
10392  IFS=$as_save_IFS
10393  test -z "$as_dir" && as_dir=.
10394    for ac_exec_ext in '' $ac_executable_extensions; do
10395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10396    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10398    break 2
10399  fi
10400done
10401  done
10402IFS=$as_save_IFS
10403
10404  ;;
10405esac
10406fi
10407RM=$ac_cv_path_RM
10408if test -n "$RM"; then
10409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10410$as_echo "$RM" >&6; }
10411else
10412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10413$as_echo "no" >&6; }
10414fi
10415
10416
10417  test -n "$RM" && break
10418done
10419
10420    else
10421      # If it succeeded, then it was overridden by the user. We will use it
10422      # for the tool.
10423
10424      # First remove it from the list of overridden variables, so we can test
10425      # for unknown variables in the end.
10426      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10427
10428      # Check if we try to supply an empty value
10429      if test "x$RM" = x; then
10430        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10431$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10432        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10433$as_echo_n "checking for RM... " >&6; }
10434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10435$as_echo "disabled" >&6; }
10436      else
10437        # Check if the provided tool contains a complete path.
10438        tool_specified="$RM"
10439        tool_basename="${tool_specified##*/}"
10440        if test "x$tool_basename" = "x$tool_specified"; then
10441          # A command without a complete path is provided, search $PATH.
10442          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10443$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10444          # Extract the first word of "$tool_basename", so it can be a program name with args.
10445set dummy $tool_basename; ac_word=$2
10446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10447$as_echo_n "checking for $ac_word... " >&6; }
10448if ${ac_cv_path_RM+:} false; then :
10449  $as_echo_n "(cached) " >&6
10450else
10451  case $RM in
10452  [\\/]* | ?:[\\/]*)
10453  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10454  ;;
10455  *)
10456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10457for as_dir in $PATH
10458do
10459  IFS=$as_save_IFS
10460  test -z "$as_dir" && as_dir=.
10461    for ac_exec_ext in '' $ac_executable_extensions; do
10462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10463    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10465    break 2
10466  fi
10467done
10468  done
10469IFS=$as_save_IFS
10470
10471  ;;
10472esac
10473fi
10474RM=$ac_cv_path_RM
10475if test -n "$RM"; then
10476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10477$as_echo "$RM" >&6; }
10478else
10479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10480$as_echo "no" >&6; }
10481fi
10482
10483
10484          if test "x$RM" = x; then
10485            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10486          fi
10487        else
10488          # Otherwise we believe it is a complete path. Use it as it is.
10489          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10490$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10491          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10492$as_echo_n "checking for RM... " >&6; }
10493          if test ! -x "$tool_specified"; then
10494            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10495$as_echo "not found" >&6; }
10496            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10497          fi
10498          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10499$as_echo "$tool_specified" >&6; }
10500        fi
10501      fi
10502    fi
10503
10504  fi
10505
10506
10507
10508  if test "x$RM" = x; then
10509    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10510  fi
10511
10512
10513
10514
10515
10516  # Publish this variable in the help.
10517
10518
10519  if [ -z "${RMDIR+x}" ]; then
10520    # The variable is not set by user, try to locate tool using the code snippet
10521    for ac_prog in rmdir
10522do
10523  # Extract the first word of "$ac_prog", so it can be a program name with args.
10524set dummy $ac_prog; ac_word=$2
10525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10526$as_echo_n "checking for $ac_word... " >&6; }
10527if ${ac_cv_path_RMDIR+:} false; then :
10528  $as_echo_n "(cached) " >&6
10529else
10530  case $RMDIR in
10531  [\\/]* | ?:[\\/]*)
10532  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10533  ;;
10534  *)
10535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10536for as_dir in $PATH
10537do
10538  IFS=$as_save_IFS
10539  test -z "$as_dir" && as_dir=.
10540    for ac_exec_ext in '' $ac_executable_extensions; do
10541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10542    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10544    break 2
10545  fi
10546done
10547  done
10548IFS=$as_save_IFS
10549
10550  ;;
10551esac
10552fi
10553RMDIR=$ac_cv_path_RMDIR
10554if test -n "$RMDIR"; then
10555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10556$as_echo "$RMDIR" >&6; }
10557else
10558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10559$as_echo "no" >&6; }
10560fi
10561
10562
10563  test -n "$RMDIR" && break
10564done
10565
10566  else
10567    # The variable is set, but is it from the command line or the environment?
10568
10569    # Try to remove the string !RMDIR! from our list.
10570    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10571    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10572      # If it failed, the variable was not from the command line. Ignore it,
10573      # but warn the user (except for BASH, which is always set by the calling BASH).
10574      if test "xRMDIR" != xBASH; then
10575        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10576$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10577      fi
10578      # Try to locate tool using the code snippet
10579      for ac_prog in rmdir
10580do
10581  # Extract the first word of "$ac_prog", so it can be a program name with args.
10582set dummy $ac_prog; ac_word=$2
10583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10584$as_echo_n "checking for $ac_word... " >&6; }
10585if ${ac_cv_path_RMDIR+:} false; then :
10586  $as_echo_n "(cached) " >&6
10587else
10588  case $RMDIR in
10589  [\\/]* | ?:[\\/]*)
10590  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10591  ;;
10592  *)
10593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10594for as_dir in $PATH
10595do
10596  IFS=$as_save_IFS
10597  test -z "$as_dir" && as_dir=.
10598    for ac_exec_ext in '' $ac_executable_extensions; do
10599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10600    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10602    break 2
10603  fi
10604done
10605  done
10606IFS=$as_save_IFS
10607
10608  ;;
10609esac
10610fi
10611RMDIR=$ac_cv_path_RMDIR
10612if test -n "$RMDIR"; then
10613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10614$as_echo "$RMDIR" >&6; }
10615else
10616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10617$as_echo "no" >&6; }
10618fi
10619
10620
10621  test -n "$RMDIR" && break
10622done
10623
10624    else
10625      # If it succeeded, then it was overridden by the user. We will use it
10626      # for the tool.
10627
10628      # First remove it from the list of overridden variables, so we can test
10629      # for unknown variables in the end.
10630      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10631
10632      # Check if we try to supply an empty value
10633      if test "x$RMDIR" = x; then
10634        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10635$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10636        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10637$as_echo_n "checking for RMDIR... " >&6; }
10638        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10639$as_echo "disabled" >&6; }
10640      else
10641        # Check if the provided tool contains a complete path.
10642        tool_specified="$RMDIR"
10643        tool_basename="${tool_specified##*/}"
10644        if test "x$tool_basename" = "x$tool_specified"; then
10645          # A command without a complete path is provided, search $PATH.
10646          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10647$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10648          # Extract the first word of "$tool_basename", so it can be a program name with args.
10649set dummy $tool_basename; ac_word=$2
10650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10651$as_echo_n "checking for $ac_word... " >&6; }
10652if ${ac_cv_path_RMDIR+:} false; then :
10653  $as_echo_n "(cached) " >&6
10654else
10655  case $RMDIR in
10656  [\\/]* | ?:[\\/]*)
10657  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10658  ;;
10659  *)
10660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10661for as_dir in $PATH
10662do
10663  IFS=$as_save_IFS
10664  test -z "$as_dir" && as_dir=.
10665    for ac_exec_ext in '' $ac_executable_extensions; do
10666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10667    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10669    break 2
10670  fi
10671done
10672  done
10673IFS=$as_save_IFS
10674
10675  ;;
10676esac
10677fi
10678RMDIR=$ac_cv_path_RMDIR
10679if test -n "$RMDIR"; then
10680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10681$as_echo "$RMDIR" >&6; }
10682else
10683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10684$as_echo "no" >&6; }
10685fi
10686
10687
10688          if test "x$RMDIR" = x; then
10689            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10690          fi
10691        else
10692          # Otherwise we believe it is a complete path. Use it as it is.
10693          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10694$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10695          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10696$as_echo_n "checking for RMDIR... " >&6; }
10697          if test ! -x "$tool_specified"; then
10698            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10699$as_echo "not found" >&6; }
10700            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10701          fi
10702          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10703$as_echo "$tool_specified" >&6; }
10704        fi
10705      fi
10706    fi
10707
10708  fi
10709
10710
10711
10712  if test "x$RMDIR" = x; then
10713    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10714  fi
10715
10716
10717
10718
10719
10720  # Publish this variable in the help.
10721
10722
10723  if [ -z "${SH+x}" ]; then
10724    # The variable is not set by user, try to locate tool using the code snippet
10725    for ac_prog in sh
10726do
10727  # Extract the first word of "$ac_prog", so it can be a program name with args.
10728set dummy $ac_prog; ac_word=$2
10729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10730$as_echo_n "checking for $ac_word... " >&6; }
10731if ${ac_cv_path_SH+:} false; then :
10732  $as_echo_n "(cached) " >&6
10733else
10734  case $SH in
10735  [\\/]* | ?:[\\/]*)
10736  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10737  ;;
10738  *)
10739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10740for as_dir in $PATH
10741do
10742  IFS=$as_save_IFS
10743  test -z "$as_dir" && as_dir=.
10744    for ac_exec_ext in '' $ac_executable_extensions; do
10745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10746    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10748    break 2
10749  fi
10750done
10751  done
10752IFS=$as_save_IFS
10753
10754  ;;
10755esac
10756fi
10757SH=$ac_cv_path_SH
10758if test -n "$SH"; then
10759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10760$as_echo "$SH" >&6; }
10761else
10762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10763$as_echo "no" >&6; }
10764fi
10765
10766
10767  test -n "$SH" && break
10768done
10769
10770  else
10771    # The variable is set, but is it from the command line or the environment?
10772
10773    # Try to remove the string !SH! from our list.
10774    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10775    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10776      # If it failed, the variable was not from the command line. Ignore it,
10777      # but warn the user (except for BASH, which is always set by the calling BASH).
10778      if test "xSH" != xBASH; then
10779        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10780$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10781      fi
10782      # Try to locate tool using the code snippet
10783      for ac_prog in sh
10784do
10785  # Extract the first word of "$ac_prog", so it can be a program name with args.
10786set dummy $ac_prog; ac_word=$2
10787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10788$as_echo_n "checking for $ac_word... " >&6; }
10789if ${ac_cv_path_SH+:} false; then :
10790  $as_echo_n "(cached) " >&6
10791else
10792  case $SH in
10793  [\\/]* | ?:[\\/]*)
10794  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10795  ;;
10796  *)
10797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10798for as_dir in $PATH
10799do
10800  IFS=$as_save_IFS
10801  test -z "$as_dir" && as_dir=.
10802    for ac_exec_ext in '' $ac_executable_extensions; do
10803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10804    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10806    break 2
10807  fi
10808done
10809  done
10810IFS=$as_save_IFS
10811
10812  ;;
10813esac
10814fi
10815SH=$ac_cv_path_SH
10816if test -n "$SH"; then
10817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10818$as_echo "$SH" >&6; }
10819else
10820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10821$as_echo "no" >&6; }
10822fi
10823
10824
10825  test -n "$SH" && break
10826done
10827
10828    else
10829      # If it succeeded, then it was overridden by the user. We will use it
10830      # for the tool.
10831
10832      # First remove it from the list of overridden variables, so we can test
10833      # for unknown variables in the end.
10834      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10835
10836      # Check if we try to supply an empty value
10837      if test "x$SH" = x; then
10838        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10839$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10840        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10841$as_echo_n "checking for SH... " >&6; }
10842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10843$as_echo "disabled" >&6; }
10844      else
10845        # Check if the provided tool contains a complete path.
10846        tool_specified="$SH"
10847        tool_basename="${tool_specified##*/}"
10848        if test "x$tool_basename" = "x$tool_specified"; then
10849          # A command without a complete path is provided, search $PATH.
10850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10851$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10852          # Extract the first word of "$tool_basename", so it can be a program name with args.
10853set dummy $tool_basename; ac_word=$2
10854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10855$as_echo_n "checking for $ac_word... " >&6; }
10856if ${ac_cv_path_SH+:} false; then :
10857  $as_echo_n "(cached) " >&6
10858else
10859  case $SH in
10860  [\\/]* | ?:[\\/]*)
10861  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10862  ;;
10863  *)
10864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10865for as_dir in $PATH
10866do
10867  IFS=$as_save_IFS
10868  test -z "$as_dir" && as_dir=.
10869    for ac_exec_ext in '' $ac_executable_extensions; do
10870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10871    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10873    break 2
10874  fi
10875done
10876  done
10877IFS=$as_save_IFS
10878
10879  ;;
10880esac
10881fi
10882SH=$ac_cv_path_SH
10883if test -n "$SH"; then
10884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10885$as_echo "$SH" >&6; }
10886else
10887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10888$as_echo "no" >&6; }
10889fi
10890
10891
10892          if test "x$SH" = x; then
10893            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10894          fi
10895        else
10896          # Otherwise we believe it is a complete path. Use it as it is.
10897          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10898$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10899          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10900$as_echo_n "checking for SH... " >&6; }
10901          if test ! -x "$tool_specified"; then
10902            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10903$as_echo "not found" >&6; }
10904            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10905          fi
10906          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10907$as_echo "$tool_specified" >&6; }
10908        fi
10909      fi
10910    fi
10911
10912  fi
10913
10914
10915
10916  if test "x$SH" = x; then
10917    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10918  fi
10919
10920
10921
10922
10923
10924  # Publish this variable in the help.
10925
10926
10927  if [ -z "${SORT+x}" ]; then
10928    # The variable is not set by user, try to locate tool using the code snippet
10929    for ac_prog in sort
10930do
10931  # Extract the first word of "$ac_prog", so it can be a program name with args.
10932set dummy $ac_prog; ac_word=$2
10933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10934$as_echo_n "checking for $ac_word... " >&6; }
10935if ${ac_cv_path_SORT+:} false; then :
10936  $as_echo_n "(cached) " >&6
10937else
10938  case $SORT in
10939  [\\/]* | ?:[\\/]*)
10940  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10941  ;;
10942  *)
10943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10944for as_dir in $PATH
10945do
10946  IFS=$as_save_IFS
10947  test -z "$as_dir" && as_dir=.
10948    for ac_exec_ext in '' $ac_executable_extensions; do
10949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10950    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10952    break 2
10953  fi
10954done
10955  done
10956IFS=$as_save_IFS
10957
10958  ;;
10959esac
10960fi
10961SORT=$ac_cv_path_SORT
10962if test -n "$SORT"; then
10963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10964$as_echo "$SORT" >&6; }
10965else
10966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10967$as_echo "no" >&6; }
10968fi
10969
10970
10971  test -n "$SORT" && break
10972done
10973
10974  else
10975    # The variable is set, but is it from the command line or the environment?
10976
10977    # Try to remove the string !SORT! from our list.
10978    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10979    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10980      # If it failed, the variable was not from the command line. Ignore it,
10981      # but warn the user (except for BASH, which is always set by the calling BASH).
10982      if test "xSORT" != xBASH; then
10983        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10984$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10985      fi
10986      # Try to locate tool using the code snippet
10987      for ac_prog in sort
10988do
10989  # Extract the first word of "$ac_prog", so it can be a program name with args.
10990set dummy $ac_prog; ac_word=$2
10991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10992$as_echo_n "checking for $ac_word... " >&6; }
10993if ${ac_cv_path_SORT+:} false; then :
10994  $as_echo_n "(cached) " >&6
10995else
10996  case $SORT in
10997  [\\/]* | ?:[\\/]*)
10998  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10999  ;;
11000  *)
11001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11002for as_dir in $PATH
11003do
11004  IFS=$as_save_IFS
11005  test -z "$as_dir" && as_dir=.
11006    for ac_exec_ext in '' $ac_executable_extensions; do
11007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11008    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11010    break 2
11011  fi
11012done
11013  done
11014IFS=$as_save_IFS
11015
11016  ;;
11017esac
11018fi
11019SORT=$ac_cv_path_SORT
11020if test -n "$SORT"; then
11021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11022$as_echo "$SORT" >&6; }
11023else
11024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11025$as_echo "no" >&6; }
11026fi
11027
11028
11029  test -n "$SORT" && break
11030done
11031
11032    else
11033      # If it succeeded, then it was overridden by the user. We will use it
11034      # for the tool.
11035
11036      # First remove it from the list of overridden variables, so we can test
11037      # for unknown variables in the end.
11038      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11039
11040      # Check if we try to supply an empty value
11041      if test "x$SORT" = x; then
11042        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11043$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11045$as_echo_n "checking for SORT... " >&6; }
11046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11047$as_echo "disabled" >&6; }
11048      else
11049        # Check if the provided tool contains a complete path.
11050        tool_specified="$SORT"
11051        tool_basename="${tool_specified##*/}"
11052        if test "x$tool_basename" = "x$tool_specified"; then
11053          # A command without a complete path is provided, search $PATH.
11054          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11055$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11056          # Extract the first word of "$tool_basename", so it can be a program name with args.
11057set dummy $tool_basename; ac_word=$2
11058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11059$as_echo_n "checking for $ac_word... " >&6; }
11060if ${ac_cv_path_SORT+:} false; then :
11061  $as_echo_n "(cached) " >&6
11062else
11063  case $SORT in
11064  [\\/]* | ?:[\\/]*)
11065  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11066  ;;
11067  *)
11068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11069for as_dir in $PATH
11070do
11071  IFS=$as_save_IFS
11072  test -z "$as_dir" && as_dir=.
11073    for ac_exec_ext in '' $ac_executable_extensions; do
11074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11075    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11077    break 2
11078  fi
11079done
11080  done
11081IFS=$as_save_IFS
11082
11083  ;;
11084esac
11085fi
11086SORT=$ac_cv_path_SORT
11087if test -n "$SORT"; then
11088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11089$as_echo "$SORT" >&6; }
11090else
11091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11092$as_echo "no" >&6; }
11093fi
11094
11095
11096          if test "x$SORT" = x; then
11097            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11098          fi
11099        else
11100          # Otherwise we believe it is a complete path. Use it as it is.
11101          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11102$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11103          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11104$as_echo_n "checking for SORT... " >&6; }
11105          if test ! -x "$tool_specified"; then
11106            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11107$as_echo "not found" >&6; }
11108            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11109          fi
11110          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11111$as_echo "$tool_specified" >&6; }
11112        fi
11113      fi
11114    fi
11115
11116  fi
11117
11118
11119
11120  if test "x$SORT" = x; then
11121    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11122  fi
11123
11124
11125
11126
11127
11128  # Publish this variable in the help.
11129
11130
11131  if [ -z "${TAIL+x}" ]; then
11132    # The variable is not set by user, try to locate tool using the code snippet
11133    for ac_prog in tail
11134do
11135  # Extract the first word of "$ac_prog", so it can be a program name with args.
11136set dummy $ac_prog; ac_word=$2
11137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11138$as_echo_n "checking for $ac_word... " >&6; }
11139if ${ac_cv_path_TAIL+:} false; then :
11140  $as_echo_n "(cached) " >&6
11141else
11142  case $TAIL in
11143  [\\/]* | ?:[\\/]*)
11144  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11145  ;;
11146  *)
11147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11148for as_dir in $PATH
11149do
11150  IFS=$as_save_IFS
11151  test -z "$as_dir" && as_dir=.
11152    for ac_exec_ext in '' $ac_executable_extensions; do
11153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11154    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11156    break 2
11157  fi
11158done
11159  done
11160IFS=$as_save_IFS
11161
11162  ;;
11163esac
11164fi
11165TAIL=$ac_cv_path_TAIL
11166if test -n "$TAIL"; then
11167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11168$as_echo "$TAIL" >&6; }
11169else
11170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11171$as_echo "no" >&6; }
11172fi
11173
11174
11175  test -n "$TAIL" && break
11176done
11177
11178  else
11179    # The variable is set, but is it from the command line or the environment?
11180
11181    # Try to remove the string !TAIL! from our list.
11182    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11183    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11184      # If it failed, the variable was not from the command line. Ignore it,
11185      # but warn the user (except for BASH, which is always set by the calling BASH).
11186      if test "xTAIL" != xBASH; then
11187        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11188$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11189      fi
11190      # Try to locate tool using the code snippet
11191      for ac_prog in tail
11192do
11193  # Extract the first word of "$ac_prog", so it can be a program name with args.
11194set dummy $ac_prog; ac_word=$2
11195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11196$as_echo_n "checking for $ac_word... " >&6; }
11197if ${ac_cv_path_TAIL+:} false; then :
11198  $as_echo_n "(cached) " >&6
11199else
11200  case $TAIL in
11201  [\\/]* | ?:[\\/]*)
11202  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11203  ;;
11204  *)
11205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11206for as_dir in $PATH
11207do
11208  IFS=$as_save_IFS
11209  test -z "$as_dir" && as_dir=.
11210    for ac_exec_ext in '' $ac_executable_extensions; do
11211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11212    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11214    break 2
11215  fi
11216done
11217  done
11218IFS=$as_save_IFS
11219
11220  ;;
11221esac
11222fi
11223TAIL=$ac_cv_path_TAIL
11224if test -n "$TAIL"; then
11225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11226$as_echo "$TAIL" >&6; }
11227else
11228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11229$as_echo "no" >&6; }
11230fi
11231
11232
11233  test -n "$TAIL" && break
11234done
11235
11236    else
11237      # If it succeeded, then it was overridden by the user. We will use it
11238      # for the tool.
11239
11240      # First remove it from the list of overridden variables, so we can test
11241      # for unknown variables in the end.
11242      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11243
11244      # Check if we try to supply an empty value
11245      if test "x$TAIL" = x; then
11246        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11247$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11248        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11249$as_echo_n "checking for TAIL... " >&6; }
11250        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11251$as_echo "disabled" >&6; }
11252      else
11253        # Check if the provided tool contains a complete path.
11254        tool_specified="$TAIL"
11255        tool_basename="${tool_specified##*/}"
11256        if test "x$tool_basename" = "x$tool_specified"; then
11257          # A command without a complete path is provided, search $PATH.
11258          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11259$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11260          # Extract the first word of "$tool_basename", so it can be a program name with args.
11261set dummy $tool_basename; ac_word=$2
11262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11263$as_echo_n "checking for $ac_word... " >&6; }
11264if ${ac_cv_path_TAIL+:} false; then :
11265  $as_echo_n "(cached) " >&6
11266else
11267  case $TAIL in
11268  [\\/]* | ?:[\\/]*)
11269  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11270  ;;
11271  *)
11272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11273for as_dir in $PATH
11274do
11275  IFS=$as_save_IFS
11276  test -z "$as_dir" && as_dir=.
11277    for ac_exec_ext in '' $ac_executable_extensions; do
11278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11279    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11281    break 2
11282  fi
11283done
11284  done
11285IFS=$as_save_IFS
11286
11287  ;;
11288esac
11289fi
11290TAIL=$ac_cv_path_TAIL
11291if test -n "$TAIL"; then
11292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11293$as_echo "$TAIL" >&6; }
11294else
11295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11296$as_echo "no" >&6; }
11297fi
11298
11299
11300          if test "x$TAIL" = x; then
11301            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11302          fi
11303        else
11304          # Otherwise we believe it is a complete path. Use it as it is.
11305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11306$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11307          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11308$as_echo_n "checking for TAIL... " >&6; }
11309          if test ! -x "$tool_specified"; then
11310            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11311$as_echo "not found" >&6; }
11312            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11313          fi
11314          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11315$as_echo "$tool_specified" >&6; }
11316        fi
11317      fi
11318    fi
11319
11320  fi
11321
11322
11323
11324  if test "x$TAIL" = x; then
11325    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11326  fi
11327
11328
11329
11330
11331
11332  # Publish this variable in the help.
11333
11334
11335  if [ -z "${TAR+x}" ]; then
11336    # The variable is not set by user, try to locate tool using the code snippet
11337    for ac_prog in gtar tar
11338do
11339  # Extract the first word of "$ac_prog", so it can be a program name with args.
11340set dummy $ac_prog; ac_word=$2
11341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11342$as_echo_n "checking for $ac_word... " >&6; }
11343if ${ac_cv_path_TAR+:} false; then :
11344  $as_echo_n "(cached) " >&6
11345else
11346  case $TAR in
11347  [\\/]* | ?:[\\/]*)
11348  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11349  ;;
11350  *)
11351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11352for as_dir in $PATH
11353do
11354  IFS=$as_save_IFS
11355  test -z "$as_dir" && as_dir=.
11356    for ac_exec_ext in '' $ac_executable_extensions; do
11357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11358    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11360    break 2
11361  fi
11362done
11363  done
11364IFS=$as_save_IFS
11365
11366  ;;
11367esac
11368fi
11369TAR=$ac_cv_path_TAR
11370if test -n "$TAR"; then
11371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11372$as_echo "$TAR" >&6; }
11373else
11374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11375$as_echo "no" >&6; }
11376fi
11377
11378
11379  test -n "$TAR" && break
11380done
11381
11382  else
11383    # The variable is set, but is it from the command line or the environment?
11384
11385    # Try to remove the string !TAR! from our list.
11386    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11387    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11388      # If it failed, the variable was not from the command line. Ignore it,
11389      # but warn the user (except for BASH, which is always set by the calling BASH).
11390      if test "xTAR" != xBASH; then
11391        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11392$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11393      fi
11394      # Try to locate tool using the code snippet
11395      for ac_prog in gtar tar
11396do
11397  # Extract the first word of "$ac_prog", so it can be a program name with args.
11398set dummy $ac_prog; ac_word=$2
11399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11400$as_echo_n "checking for $ac_word... " >&6; }
11401if ${ac_cv_path_TAR+:} false; then :
11402  $as_echo_n "(cached) " >&6
11403else
11404  case $TAR in
11405  [\\/]* | ?:[\\/]*)
11406  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11407  ;;
11408  *)
11409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11410for as_dir in $PATH
11411do
11412  IFS=$as_save_IFS
11413  test -z "$as_dir" && as_dir=.
11414    for ac_exec_ext in '' $ac_executable_extensions; do
11415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11416    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11418    break 2
11419  fi
11420done
11421  done
11422IFS=$as_save_IFS
11423
11424  ;;
11425esac
11426fi
11427TAR=$ac_cv_path_TAR
11428if test -n "$TAR"; then
11429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11430$as_echo "$TAR" >&6; }
11431else
11432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11433$as_echo "no" >&6; }
11434fi
11435
11436
11437  test -n "$TAR" && break
11438done
11439
11440    else
11441      # If it succeeded, then it was overridden by the user. We will use it
11442      # for the tool.
11443
11444      # First remove it from the list of overridden variables, so we can test
11445      # for unknown variables in the end.
11446      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11447
11448      # Check if we try to supply an empty value
11449      if test "x$TAR" = x; then
11450        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11451$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11452        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11453$as_echo_n "checking for TAR... " >&6; }
11454        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11455$as_echo "disabled" >&6; }
11456      else
11457        # Check if the provided tool contains a complete path.
11458        tool_specified="$TAR"
11459        tool_basename="${tool_specified##*/}"
11460        if test "x$tool_basename" = "x$tool_specified"; then
11461          # A command without a complete path is provided, search $PATH.
11462          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11463$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11464          # Extract the first word of "$tool_basename", so it can be a program name with args.
11465set dummy $tool_basename; ac_word=$2
11466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11467$as_echo_n "checking for $ac_word... " >&6; }
11468if ${ac_cv_path_TAR+:} false; then :
11469  $as_echo_n "(cached) " >&6
11470else
11471  case $TAR in
11472  [\\/]* | ?:[\\/]*)
11473  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11474  ;;
11475  *)
11476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11477for as_dir in $PATH
11478do
11479  IFS=$as_save_IFS
11480  test -z "$as_dir" && as_dir=.
11481    for ac_exec_ext in '' $ac_executable_extensions; do
11482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11483    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11485    break 2
11486  fi
11487done
11488  done
11489IFS=$as_save_IFS
11490
11491  ;;
11492esac
11493fi
11494TAR=$ac_cv_path_TAR
11495if test -n "$TAR"; then
11496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11497$as_echo "$TAR" >&6; }
11498else
11499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11500$as_echo "no" >&6; }
11501fi
11502
11503
11504          if test "x$TAR" = x; then
11505            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11506          fi
11507        else
11508          # Otherwise we believe it is a complete path. Use it as it is.
11509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11510$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11511          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11512$as_echo_n "checking for TAR... " >&6; }
11513          if test ! -x "$tool_specified"; then
11514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11515$as_echo "not found" >&6; }
11516            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11517          fi
11518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11519$as_echo "$tool_specified" >&6; }
11520        fi
11521      fi
11522    fi
11523
11524  fi
11525
11526
11527
11528  if test "x$TAR" = x; then
11529    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11530  fi
11531
11532
11533
11534
11535
11536  # Publish this variable in the help.
11537
11538
11539  if [ -z "${TEE+x}" ]; then
11540    # The variable is not set by user, try to locate tool using the code snippet
11541    for ac_prog in tee
11542do
11543  # Extract the first word of "$ac_prog", so it can be a program name with args.
11544set dummy $ac_prog; ac_word=$2
11545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11546$as_echo_n "checking for $ac_word... " >&6; }
11547if ${ac_cv_path_TEE+:} false; then :
11548  $as_echo_n "(cached) " >&6
11549else
11550  case $TEE in
11551  [\\/]* | ?:[\\/]*)
11552  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11553  ;;
11554  *)
11555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11556for as_dir in $PATH
11557do
11558  IFS=$as_save_IFS
11559  test -z "$as_dir" && as_dir=.
11560    for ac_exec_ext in '' $ac_executable_extensions; do
11561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11562    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11564    break 2
11565  fi
11566done
11567  done
11568IFS=$as_save_IFS
11569
11570  ;;
11571esac
11572fi
11573TEE=$ac_cv_path_TEE
11574if test -n "$TEE"; then
11575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11576$as_echo "$TEE" >&6; }
11577else
11578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11579$as_echo "no" >&6; }
11580fi
11581
11582
11583  test -n "$TEE" && break
11584done
11585
11586  else
11587    # The variable is set, but is it from the command line or the environment?
11588
11589    # Try to remove the string !TEE! from our list.
11590    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11591    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11592      # If it failed, the variable was not from the command line. Ignore it,
11593      # but warn the user (except for BASH, which is always set by the calling BASH).
11594      if test "xTEE" != xBASH; then
11595        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11596$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11597      fi
11598      # Try to locate tool using the code snippet
11599      for ac_prog in tee
11600do
11601  # Extract the first word of "$ac_prog", so it can be a program name with args.
11602set dummy $ac_prog; ac_word=$2
11603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11604$as_echo_n "checking for $ac_word... " >&6; }
11605if ${ac_cv_path_TEE+:} false; then :
11606  $as_echo_n "(cached) " >&6
11607else
11608  case $TEE in
11609  [\\/]* | ?:[\\/]*)
11610  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11611  ;;
11612  *)
11613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11614for as_dir in $PATH
11615do
11616  IFS=$as_save_IFS
11617  test -z "$as_dir" && as_dir=.
11618    for ac_exec_ext in '' $ac_executable_extensions; do
11619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11620    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11622    break 2
11623  fi
11624done
11625  done
11626IFS=$as_save_IFS
11627
11628  ;;
11629esac
11630fi
11631TEE=$ac_cv_path_TEE
11632if test -n "$TEE"; then
11633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11634$as_echo "$TEE" >&6; }
11635else
11636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11637$as_echo "no" >&6; }
11638fi
11639
11640
11641  test -n "$TEE" && break
11642done
11643
11644    else
11645      # If it succeeded, then it was overridden by the user. We will use it
11646      # for the tool.
11647
11648      # First remove it from the list of overridden variables, so we can test
11649      # for unknown variables in the end.
11650      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11651
11652      # Check if we try to supply an empty value
11653      if test "x$TEE" = x; then
11654        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11655$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11656        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11657$as_echo_n "checking for TEE... " >&6; }
11658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11659$as_echo "disabled" >&6; }
11660      else
11661        # Check if the provided tool contains a complete path.
11662        tool_specified="$TEE"
11663        tool_basename="${tool_specified##*/}"
11664        if test "x$tool_basename" = "x$tool_specified"; then
11665          # A command without a complete path is provided, search $PATH.
11666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11667$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11668          # Extract the first word of "$tool_basename", so it can be a program name with args.
11669set dummy $tool_basename; ac_word=$2
11670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11671$as_echo_n "checking for $ac_word... " >&6; }
11672if ${ac_cv_path_TEE+:} false; then :
11673  $as_echo_n "(cached) " >&6
11674else
11675  case $TEE in
11676  [\\/]* | ?:[\\/]*)
11677  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11678  ;;
11679  *)
11680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11681for as_dir in $PATH
11682do
11683  IFS=$as_save_IFS
11684  test -z "$as_dir" && as_dir=.
11685    for ac_exec_ext in '' $ac_executable_extensions; do
11686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11687    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11689    break 2
11690  fi
11691done
11692  done
11693IFS=$as_save_IFS
11694
11695  ;;
11696esac
11697fi
11698TEE=$ac_cv_path_TEE
11699if test -n "$TEE"; then
11700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11701$as_echo "$TEE" >&6; }
11702else
11703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11704$as_echo "no" >&6; }
11705fi
11706
11707
11708          if test "x$TEE" = x; then
11709            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11710          fi
11711        else
11712          # Otherwise we believe it is a complete path. Use it as it is.
11713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11714$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11715          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11716$as_echo_n "checking for TEE... " >&6; }
11717          if test ! -x "$tool_specified"; then
11718            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11719$as_echo "not found" >&6; }
11720            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11721          fi
11722          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11723$as_echo "$tool_specified" >&6; }
11724        fi
11725      fi
11726    fi
11727
11728  fi
11729
11730
11731
11732  if test "x$TEE" = x; then
11733    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11734  fi
11735
11736
11737
11738
11739
11740  # Publish this variable in the help.
11741
11742
11743  if [ -z "${TOUCH+x}" ]; then
11744    # The variable is not set by user, try to locate tool using the code snippet
11745    for ac_prog in touch
11746do
11747  # Extract the first word of "$ac_prog", so it can be a program name with args.
11748set dummy $ac_prog; ac_word=$2
11749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11750$as_echo_n "checking for $ac_word... " >&6; }
11751if ${ac_cv_path_TOUCH+:} false; then :
11752  $as_echo_n "(cached) " >&6
11753else
11754  case $TOUCH in
11755  [\\/]* | ?:[\\/]*)
11756  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11757  ;;
11758  *)
11759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11760for as_dir in $PATH
11761do
11762  IFS=$as_save_IFS
11763  test -z "$as_dir" && as_dir=.
11764    for ac_exec_ext in '' $ac_executable_extensions; do
11765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11766    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11768    break 2
11769  fi
11770done
11771  done
11772IFS=$as_save_IFS
11773
11774  ;;
11775esac
11776fi
11777TOUCH=$ac_cv_path_TOUCH
11778if test -n "$TOUCH"; then
11779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11780$as_echo "$TOUCH" >&6; }
11781else
11782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11783$as_echo "no" >&6; }
11784fi
11785
11786
11787  test -n "$TOUCH" && break
11788done
11789
11790  else
11791    # The variable is set, but is it from the command line or the environment?
11792
11793    # Try to remove the string !TOUCH! from our list.
11794    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11795    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11796      # If it failed, the variable was not from the command line. Ignore it,
11797      # but warn the user (except for BASH, which is always set by the calling BASH).
11798      if test "xTOUCH" != xBASH; then
11799        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11800$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11801      fi
11802      # Try to locate tool using the code snippet
11803      for ac_prog in touch
11804do
11805  # Extract the first word of "$ac_prog", so it can be a program name with args.
11806set dummy $ac_prog; ac_word=$2
11807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11808$as_echo_n "checking for $ac_word... " >&6; }
11809if ${ac_cv_path_TOUCH+:} false; then :
11810  $as_echo_n "(cached) " >&6
11811else
11812  case $TOUCH in
11813  [\\/]* | ?:[\\/]*)
11814  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11815  ;;
11816  *)
11817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11818for as_dir in $PATH
11819do
11820  IFS=$as_save_IFS
11821  test -z "$as_dir" && as_dir=.
11822    for ac_exec_ext in '' $ac_executable_extensions; do
11823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11824    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11826    break 2
11827  fi
11828done
11829  done
11830IFS=$as_save_IFS
11831
11832  ;;
11833esac
11834fi
11835TOUCH=$ac_cv_path_TOUCH
11836if test -n "$TOUCH"; then
11837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11838$as_echo "$TOUCH" >&6; }
11839else
11840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11841$as_echo "no" >&6; }
11842fi
11843
11844
11845  test -n "$TOUCH" && break
11846done
11847
11848    else
11849      # If it succeeded, then it was overridden by the user. We will use it
11850      # for the tool.
11851
11852      # First remove it from the list of overridden variables, so we can test
11853      # for unknown variables in the end.
11854      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11855
11856      # Check if we try to supply an empty value
11857      if test "x$TOUCH" = x; then
11858        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11859$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11860        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11861$as_echo_n "checking for TOUCH... " >&6; }
11862        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11863$as_echo "disabled" >&6; }
11864      else
11865        # Check if the provided tool contains a complete path.
11866        tool_specified="$TOUCH"
11867        tool_basename="${tool_specified##*/}"
11868        if test "x$tool_basename" = "x$tool_specified"; then
11869          # A command without a complete path is provided, search $PATH.
11870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11871$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11872          # Extract the first word of "$tool_basename", so it can be a program name with args.
11873set dummy $tool_basename; ac_word=$2
11874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11875$as_echo_n "checking for $ac_word... " >&6; }
11876if ${ac_cv_path_TOUCH+:} false; then :
11877  $as_echo_n "(cached) " >&6
11878else
11879  case $TOUCH in
11880  [\\/]* | ?:[\\/]*)
11881  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11882  ;;
11883  *)
11884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11885for as_dir in $PATH
11886do
11887  IFS=$as_save_IFS
11888  test -z "$as_dir" && as_dir=.
11889    for ac_exec_ext in '' $ac_executable_extensions; do
11890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11891    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11893    break 2
11894  fi
11895done
11896  done
11897IFS=$as_save_IFS
11898
11899  ;;
11900esac
11901fi
11902TOUCH=$ac_cv_path_TOUCH
11903if test -n "$TOUCH"; then
11904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11905$as_echo "$TOUCH" >&6; }
11906else
11907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11908$as_echo "no" >&6; }
11909fi
11910
11911
11912          if test "x$TOUCH" = x; then
11913            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11914          fi
11915        else
11916          # Otherwise we believe it is a complete path. Use it as it is.
11917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11918$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11919          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11920$as_echo_n "checking for TOUCH... " >&6; }
11921          if test ! -x "$tool_specified"; then
11922            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11923$as_echo "not found" >&6; }
11924            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11925          fi
11926          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11927$as_echo "$tool_specified" >&6; }
11928        fi
11929      fi
11930    fi
11931
11932  fi
11933
11934
11935
11936  if test "x$TOUCH" = x; then
11937    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11938  fi
11939
11940
11941
11942
11943
11944  # Publish this variable in the help.
11945
11946
11947  if [ -z "${TR+x}" ]; then
11948    # The variable is not set by user, try to locate tool using the code snippet
11949    for ac_prog in tr
11950do
11951  # Extract the first word of "$ac_prog", so it can be a program name with args.
11952set dummy $ac_prog; ac_word=$2
11953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11954$as_echo_n "checking for $ac_word... " >&6; }
11955if ${ac_cv_path_TR+:} false; then :
11956  $as_echo_n "(cached) " >&6
11957else
11958  case $TR in
11959  [\\/]* | ?:[\\/]*)
11960  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11961  ;;
11962  *)
11963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11964for as_dir in $PATH
11965do
11966  IFS=$as_save_IFS
11967  test -z "$as_dir" && as_dir=.
11968    for ac_exec_ext in '' $ac_executable_extensions; do
11969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11970    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11972    break 2
11973  fi
11974done
11975  done
11976IFS=$as_save_IFS
11977
11978  ;;
11979esac
11980fi
11981TR=$ac_cv_path_TR
11982if test -n "$TR"; then
11983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11984$as_echo "$TR" >&6; }
11985else
11986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11987$as_echo "no" >&6; }
11988fi
11989
11990
11991  test -n "$TR" && break
11992done
11993
11994  else
11995    # The variable is set, but is it from the command line or the environment?
11996
11997    # Try to remove the string !TR! from our list.
11998    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11999    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12000      # If it failed, the variable was not from the command line. Ignore it,
12001      # but warn the user (except for BASH, which is always set by the calling BASH).
12002      if test "xTR" != xBASH; then
12003        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12004$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12005      fi
12006      # Try to locate tool using the code snippet
12007      for ac_prog in tr
12008do
12009  # Extract the first word of "$ac_prog", so it can be a program name with args.
12010set dummy $ac_prog; ac_word=$2
12011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12012$as_echo_n "checking for $ac_word... " >&6; }
12013if ${ac_cv_path_TR+:} false; then :
12014  $as_echo_n "(cached) " >&6
12015else
12016  case $TR in
12017  [\\/]* | ?:[\\/]*)
12018  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12019  ;;
12020  *)
12021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12022for as_dir in $PATH
12023do
12024  IFS=$as_save_IFS
12025  test -z "$as_dir" && as_dir=.
12026    for ac_exec_ext in '' $ac_executable_extensions; do
12027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12028    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12030    break 2
12031  fi
12032done
12033  done
12034IFS=$as_save_IFS
12035
12036  ;;
12037esac
12038fi
12039TR=$ac_cv_path_TR
12040if test -n "$TR"; then
12041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12042$as_echo "$TR" >&6; }
12043else
12044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12045$as_echo "no" >&6; }
12046fi
12047
12048
12049  test -n "$TR" && break
12050done
12051
12052    else
12053      # If it succeeded, then it was overridden by the user. We will use it
12054      # for the tool.
12055
12056      # First remove it from the list of overridden variables, so we can test
12057      # for unknown variables in the end.
12058      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12059
12060      # Check if we try to supply an empty value
12061      if test "x$TR" = x; then
12062        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12063$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12064        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12065$as_echo_n "checking for TR... " >&6; }
12066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12067$as_echo "disabled" >&6; }
12068      else
12069        # Check if the provided tool contains a complete path.
12070        tool_specified="$TR"
12071        tool_basename="${tool_specified##*/}"
12072        if test "x$tool_basename" = "x$tool_specified"; then
12073          # A command without a complete path is provided, search $PATH.
12074          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12075$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12076          # Extract the first word of "$tool_basename", so it can be a program name with args.
12077set dummy $tool_basename; ac_word=$2
12078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12079$as_echo_n "checking for $ac_word... " >&6; }
12080if ${ac_cv_path_TR+:} false; then :
12081  $as_echo_n "(cached) " >&6
12082else
12083  case $TR in
12084  [\\/]* | ?:[\\/]*)
12085  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12086  ;;
12087  *)
12088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12089for as_dir in $PATH
12090do
12091  IFS=$as_save_IFS
12092  test -z "$as_dir" && as_dir=.
12093    for ac_exec_ext in '' $ac_executable_extensions; do
12094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12095    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12097    break 2
12098  fi
12099done
12100  done
12101IFS=$as_save_IFS
12102
12103  ;;
12104esac
12105fi
12106TR=$ac_cv_path_TR
12107if test -n "$TR"; then
12108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12109$as_echo "$TR" >&6; }
12110else
12111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12112$as_echo "no" >&6; }
12113fi
12114
12115
12116          if test "x$TR" = x; then
12117            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12118          fi
12119        else
12120          # Otherwise we believe it is a complete path. Use it as it is.
12121          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12122$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12123          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12124$as_echo_n "checking for TR... " >&6; }
12125          if test ! -x "$tool_specified"; then
12126            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12127$as_echo "not found" >&6; }
12128            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12129          fi
12130          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12131$as_echo "$tool_specified" >&6; }
12132        fi
12133      fi
12134    fi
12135
12136  fi
12137
12138
12139
12140  if test "x$TR" = x; then
12141    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12142  fi
12143
12144
12145
12146
12147
12148  # Publish this variable in the help.
12149
12150
12151  if [ -z "${UNAME+x}" ]; then
12152    # The variable is not set by user, try to locate tool using the code snippet
12153    for ac_prog in uname
12154do
12155  # Extract the first word of "$ac_prog", so it can be a program name with args.
12156set dummy $ac_prog; ac_word=$2
12157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12158$as_echo_n "checking for $ac_word... " >&6; }
12159if ${ac_cv_path_UNAME+:} false; then :
12160  $as_echo_n "(cached) " >&6
12161else
12162  case $UNAME in
12163  [\\/]* | ?:[\\/]*)
12164  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12165  ;;
12166  *)
12167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12168for as_dir in $PATH
12169do
12170  IFS=$as_save_IFS
12171  test -z "$as_dir" && as_dir=.
12172    for ac_exec_ext in '' $ac_executable_extensions; do
12173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12174    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12176    break 2
12177  fi
12178done
12179  done
12180IFS=$as_save_IFS
12181
12182  ;;
12183esac
12184fi
12185UNAME=$ac_cv_path_UNAME
12186if test -n "$UNAME"; then
12187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12188$as_echo "$UNAME" >&6; }
12189else
12190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12191$as_echo "no" >&6; }
12192fi
12193
12194
12195  test -n "$UNAME" && break
12196done
12197
12198  else
12199    # The variable is set, but is it from the command line or the environment?
12200
12201    # Try to remove the string !UNAME! from our list.
12202    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12203    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12204      # If it failed, the variable was not from the command line. Ignore it,
12205      # but warn the user (except for BASH, which is always set by the calling BASH).
12206      if test "xUNAME" != xBASH; then
12207        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12208$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12209      fi
12210      # Try to locate tool using the code snippet
12211      for ac_prog in uname
12212do
12213  # Extract the first word of "$ac_prog", so it can be a program name with args.
12214set dummy $ac_prog; ac_word=$2
12215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12216$as_echo_n "checking for $ac_word... " >&6; }
12217if ${ac_cv_path_UNAME+:} false; then :
12218  $as_echo_n "(cached) " >&6
12219else
12220  case $UNAME in
12221  [\\/]* | ?:[\\/]*)
12222  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12223  ;;
12224  *)
12225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12226for as_dir in $PATH
12227do
12228  IFS=$as_save_IFS
12229  test -z "$as_dir" && as_dir=.
12230    for ac_exec_ext in '' $ac_executable_extensions; do
12231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12232    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12234    break 2
12235  fi
12236done
12237  done
12238IFS=$as_save_IFS
12239
12240  ;;
12241esac
12242fi
12243UNAME=$ac_cv_path_UNAME
12244if test -n "$UNAME"; then
12245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12246$as_echo "$UNAME" >&6; }
12247else
12248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12249$as_echo "no" >&6; }
12250fi
12251
12252
12253  test -n "$UNAME" && break
12254done
12255
12256    else
12257      # If it succeeded, then it was overridden by the user. We will use it
12258      # for the tool.
12259
12260      # First remove it from the list of overridden variables, so we can test
12261      # for unknown variables in the end.
12262      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12263
12264      # Check if we try to supply an empty value
12265      if test "x$UNAME" = x; then
12266        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12267$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12268        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12269$as_echo_n "checking for UNAME... " >&6; }
12270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12271$as_echo "disabled" >&6; }
12272      else
12273        # Check if the provided tool contains a complete path.
12274        tool_specified="$UNAME"
12275        tool_basename="${tool_specified##*/}"
12276        if test "x$tool_basename" = "x$tool_specified"; then
12277          # A command without a complete path is provided, search $PATH.
12278          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12279$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12280          # Extract the first word of "$tool_basename", so it can be a program name with args.
12281set dummy $tool_basename; ac_word=$2
12282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12283$as_echo_n "checking for $ac_word... " >&6; }
12284if ${ac_cv_path_UNAME+:} false; then :
12285  $as_echo_n "(cached) " >&6
12286else
12287  case $UNAME in
12288  [\\/]* | ?:[\\/]*)
12289  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12290  ;;
12291  *)
12292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12293for as_dir in $PATH
12294do
12295  IFS=$as_save_IFS
12296  test -z "$as_dir" && as_dir=.
12297    for ac_exec_ext in '' $ac_executable_extensions; do
12298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12299    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12301    break 2
12302  fi
12303done
12304  done
12305IFS=$as_save_IFS
12306
12307  ;;
12308esac
12309fi
12310UNAME=$ac_cv_path_UNAME
12311if test -n "$UNAME"; then
12312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12313$as_echo "$UNAME" >&6; }
12314else
12315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12316$as_echo "no" >&6; }
12317fi
12318
12319
12320          if test "x$UNAME" = x; then
12321            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12322          fi
12323        else
12324          # Otherwise we believe it is a complete path. Use it as it is.
12325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12326$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12327          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12328$as_echo_n "checking for UNAME... " >&6; }
12329          if test ! -x "$tool_specified"; then
12330            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12331$as_echo "not found" >&6; }
12332            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12333          fi
12334          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12335$as_echo "$tool_specified" >&6; }
12336        fi
12337      fi
12338    fi
12339
12340  fi
12341
12342
12343
12344  if test "x$UNAME" = x; then
12345    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12346  fi
12347
12348
12349
12350
12351
12352  # Publish this variable in the help.
12353
12354
12355  if [ -z "${UNIQ+x}" ]; then
12356    # The variable is not set by user, try to locate tool using the code snippet
12357    for ac_prog in uniq
12358do
12359  # Extract the first word of "$ac_prog", so it can be a program name with args.
12360set dummy $ac_prog; ac_word=$2
12361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12362$as_echo_n "checking for $ac_word... " >&6; }
12363if ${ac_cv_path_UNIQ+:} false; then :
12364  $as_echo_n "(cached) " >&6
12365else
12366  case $UNIQ in
12367  [\\/]* | ?:[\\/]*)
12368  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12369  ;;
12370  *)
12371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12372for as_dir in $PATH
12373do
12374  IFS=$as_save_IFS
12375  test -z "$as_dir" && as_dir=.
12376    for ac_exec_ext in '' $ac_executable_extensions; do
12377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12378    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12380    break 2
12381  fi
12382done
12383  done
12384IFS=$as_save_IFS
12385
12386  ;;
12387esac
12388fi
12389UNIQ=$ac_cv_path_UNIQ
12390if test -n "$UNIQ"; then
12391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12392$as_echo "$UNIQ" >&6; }
12393else
12394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12395$as_echo "no" >&6; }
12396fi
12397
12398
12399  test -n "$UNIQ" && break
12400done
12401
12402  else
12403    # The variable is set, but is it from the command line or the environment?
12404
12405    # Try to remove the string !UNIQ! from our list.
12406    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12407    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12408      # If it failed, the variable was not from the command line. Ignore it,
12409      # but warn the user (except for BASH, which is always set by the calling BASH).
12410      if test "xUNIQ" != xBASH; then
12411        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12412$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12413      fi
12414      # Try to locate tool using the code snippet
12415      for ac_prog in uniq
12416do
12417  # Extract the first word of "$ac_prog", so it can be a program name with args.
12418set dummy $ac_prog; ac_word=$2
12419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12420$as_echo_n "checking for $ac_word... " >&6; }
12421if ${ac_cv_path_UNIQ+:} false; then :
12422  $as_echo_n "(cached) " >&6
12423else
12424  case $UNIQ in
12425  [\\/]* | ?:[\\/]*)
12426  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12427  ;;
12428  *)
12429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12430for as_dir in $PATH
12431do
12432  IFS=$as_save_IFS
12433  test -z "$as_dir" && as_dir=.
12434    for ac_exec_ext in '' $ac_executable_extensions; do
12435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12436    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12438    break 2
12439  fi
12440done
12441  done
12442IFS=$as_save_IFS
12443
12444  ;;
12445esac
12446fi
12447UNIQ=$ac_cv_path_UNIQ
12448if test -n "$UNIQ"; then
12449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12450$as_echo "$UNIQ" >&6; }
12451else
12452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12453$as_echo "no" >&6; }
12454fi
12455
12456
12457  test -n "$UNIQ" && break
12458done
12459
12460    else
12461      # If it succeeded, then it was overridden by the user. We will use it
12462      # for the tool.
12463
12464      # First remove it from the list of overridden variables, so we can test
12465      # for unknown variables in the end.
12466      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12467
12468      # Check if we try to supply an empty value
12469      if test "x$UNIQ" = x; then
12470        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12471$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12473$as_echo_n "checking for UNIQ... " >&6; }
12474        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12475$as_echo "disabled" >&6; }
12476      else
12477        # Check if the provided tool contains a complete path.
12478        tool_specified="$UNIQ"
12479        tool_basename="${tool_specified##*/}"
12480        if test "x$tool_basename" = "x$tool_specified"; then
12481          # A command without a complete path is provided, search $PATH.
12482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12483$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12484          # Extract the first word of "$tool_basename", so it can be a program name with args.
12485set dummy $tool_basename; ac_word=$2
12486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12487$as_echo_n "checking for $ac_word... " >&6; }
12488if ${ac_cv_path_UNIQ+:} false; then :
12489  $as_echo_n "(cached) " >&6
12490else
12491  case $UNIQ in
12492  [\\/]* | ?:[\\/]*)
12493  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12494  ;;
12495  *)
12496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12497for as_dir in $PATH
12498do
12499  IFS=$as_save_IFS
12500  test -z "$as_dir" && as_dir=.
12501    for ac_exec_ext in '' $ac_executable_extensions; do
12502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12503    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12505    break 2
12506  fi
12507done
12508  done
12509IFS=$as_save_IFS
12510
12511  ;;
12512esac
12513fi
12514UNIQ=$ac_cv_path_UNIQ
12515if test -n "$UNIQ"; then
12516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12517$as_echo "$UNIQ" >&6; }
12518else
12519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12520$as_echo "no" >&6; }
12521fi
12522
12523
12524          if test "x$UNIQ" = x; then
12525            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12526          fi
12527        else
12528          # Otherwise we believe it is a complete path. Use it as it is.
12529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12530$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12531          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12532$as_echo_n "checking for UNIQ... " >&6; }
12533          if test ! -x "$tool_specified"; then
12534            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12535$as_echo "not found" >&6; }
12536            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12537          fi
12538          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12539$as_echo "$tool_specified" >&6; }
12540        fi
12541      fi
12542    fi
12543
12544  fi
12545
12546
12547
12548  if test "x$UNIQ" = x; then
12549    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12550  fi
12551
12552
12553
12554
12555
12556  # Publish this variable in the help.
12557
12558
12559  if [ -z "${WC+x}" ]; then
12560    # The variable is not set by user, try to locate tool using the code snippet
12561    for ac_prog in wc
12562do
12563  # Extract the first word of "$ac_prog", so it can be a program name with args.
12564set dummy $ac_prog; ac_word=$2
12565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12566$as_echo_n "checking for $ac_word... " >&6; }
12567if ${ac_cv_path_WC+:} false; then :
12568  $as_echo_n "(cached) " >&6
12569else
12570  case $WC in
12571  [\\/]* | ?:[\\/]*)
12572  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12573  ;;
12574  *)
12575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12576for as_dir in $PATH
12577do
12578  IFS=$as_save_IFS
12579  test -z "$as_dir" && as_dir=.
12580    for ac_exec_ext in '' $ac_executable_extensions; do
12581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12582    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12584    break 2
12585  fi
12586done
12587  done
12588IFS=$as_save_IFS
12589
12590  ;;
12591esac
12592fi
12593WC=$ac_cv_path_WC
12594if test -n "$WC"; then
12595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12596$as_echo "$WC" >&6; }
12597else
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12599$as_echo "no" >&6; }
12600fi
12601
12602
12603  test -n "$WC" && break
12604done
12605
12606  else
12607    # The variable is set, but is it from the command line or the environment?
12608
12609    # Try to remove the string !WC! from our list.
12610    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12611    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12612      # If it failed, the variable was not from the command line. Ignore it,
12613      # but warn the user (except for BASH, which is always set by the calling BASH).
12614      if test "xWC" != xBASH; then
12615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12616$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12617      fi
12618      # Try to locate tool using the code snippet
12619      for ac_prog in wc
12620do
12621  # Extract the first word of "$ac_prog", so it can be a program name with args.
12622set dummy $ac_prog; ac_word=$2
12623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12624$as_echo_n "checking for $ac_word... " >&6; }
12625if ${ac_cv_path_WC+:} false; then :
12626  $as_echo_n "(cached) " >&6
12627else
12628  case $WC in
12629  [\\/]* | ?:[\\/]*)
12630  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12631  ;;
12632  *)
12633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12634for as_dir in $PATH
12635do
12636  IFS=$as_save_IFS
12637  test -z "$as_dir" && as_dir=.
12638    for ac_exec_ext in '' $ac_executable_extensions; do
12639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12640    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12642    break 2
12643  fi
12644done
12645  done
12646IFS=$as_save_IFS
12647
12648  ;;
12649esac
12650fi
12651WC=$ac_cv_path_WC
12652if test -n "$WC"; then
12653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12654$as_echo "$WC" >&6; }
12655else
12656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12657$as_echo "no" >&6; }
12658fi
12659
12660
12661  test -n "$WC" && break
12662done
12663
12664    else
12665      # If it succeeded, then it was overridden by the user. We will use it
12666      # for the tool.
12667
12668      # First remove it from the list of overridden variables, so we can test
12669      # for unknown variables in the end.
12670      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12671
12672      # Check if we try to supply an empty value
12673      if test "x$WC" = x; then
12674        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12675$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12676        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12677$as_echo_n "checking for WC... " >&6; }
12678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12679$as_echo "disabled" >&6; }
12680      else
12681        # Check if the provided tool contains a complete path.
12682        tool_specified="$WC"
12683        tool_basename="${tool_specified##*/}"
12684        if test "x$tool_basename" = "x$tool_specified"; then
12685          # A command without a complete path is provided, search $PATH.
12686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12687$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12688          # Extract the first word of "$tool_basename", so it can be a program name with args.
12689set dummy $tool_basename; ac_word=$2
12690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12691$as_echo_n "checking for $ac_word... " >&6; }
12692if ${ac_cv_path_WC+:} false; then :
12693  $as_echo_n "(cached) " >&6
12694else
12695  case $WC in
12696  [\\/]* | ?:[\\/]*)
12697  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12698  ;;
12699  *)
12700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12701for as_dir in $PATH
12702do
12703  IFS=$as_save_IFS
12704  test -z "$as_dir" && as_dir=.
12705    for ac_exec_ext in '' $ac_executable_extensions; do
12706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12707    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12709    break 2
12710  fi
12711done
12712  done
12713IFS=$as_save_IFS
12714
12715  ;;
12716esac
12717fi
12718WC=$ac_cv_path_WC
12719if test -n "$WC"; then
12720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12721$as_echo "$WC" >&6; }
12722else
12723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12724$as_echo "no" >&6; }
12725fi
12726
12727
12728          if test "x$WC" = x; then
12729            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12730          fi
12731        else
12732          # Otherwise we believe it is a complete path. Use it as it is.
12733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12734$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12735          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12736$as_echo_n "checking for WC... " >&6; }
12737          if test ! -x "$tool_specified"; then
12738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12739$as_echo "not found" >&6; }
12740            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12741          fi
12742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12743$as_echo "$tool_specified" >&6; }
12744        fi
12745      fi
12746    fi
12747
12748  fi
12749
12750
12751
12752  if test "x$WC" = x; then
12753    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12754  fi
12755
12756
12757
12758
12759
12760  # Publish this variable in the help.
12761
12762
12763  if [ -z "${WHICH+x}" ]; then
12764    # The variable is not set by user, try to locate tool using the code snippet
12765    for ac_prog in which
12766do
12767  # Extract the first word of "$ac_prog", so it can be a program name with args.
12768set dummy $ac_prog; ac_word=$2
12769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12770$as_echo_n "checking for $ac_word... " >&6; }
12771if ${ac_cv_path_WHICH+:} false; then :
12772  $as_echo_n "(cached) " >&6
12773else
12774  case $WHICH in
12775  [\\/]* | ?:[\\/]*)
12776  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12777  ;;
12778  *)
12779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12780for as_dir in $PATH
12781do
12782  IFS=$as_save_IFS
12783  test -z "$as_dir" && as_dir=.
12784    for ac_exec_ext in '' $ac_executable_extensions; do
12785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12786    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12788    break 2
12789  fi
12790done
12791  done
12792IFS=$as_save_IFS
12793
12794  ;;
12795esac
12796fi
12797WHICH=$ac_cv_path_WHICH
12798if test -n "$WHICH"; then
12799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12800$as_echo "$WHICH" >&6; }
12801else
12802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12803$as_echo "no" >&6; }
12804fi
12805
12806
12807  test -n "$WHICH" && break
12808done
12809
12810  else
12811    # The variable is set, but is it from the command line or the environment?
12812
12813    # Try to remove the string !WHICH! from our list.
12814    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12815    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12816      # If it failed, the variable was not from the command line. Ignore it,
12817      # but warn the user (except for BASH, which is always set by the calling BASH).
12818      if test "xWHICH" != xBASH; then
12819        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12820$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12821      fi
12822      # Try to locate tool using the code snippet
12823      for ac_prog in which
12824do
12825  # Extract the first word of "$ac_prog", so it can be a program name with args.
12826set dummy $ac_prog; ac_word=$2
12827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12828$as_echo_n "checking for $ac_word... " >&6; }
12829if ${ac_cv_path_WHICH+:} false; then :
12830  $as_echo_n "(cached) " >&6
12831else
12832  case $WHICH in
12833  [\\/]* | ?:[\\/]*)
12834  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12835  ;;
12836  *)
12837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12838for as_dir in $PATH
12839do
12840  IFS=$as_save_IFS
12841  test -z "$as_dir" && as_dir=.
12842    for ac_exec_ext in '' $ac_executable_extensions; do
12843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12844    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12846    break 2
12847  fi
12848done
12849  done
12850IFS=$as_save_IFS
12851
12852  ;;
12853esac
12854fi
12855WHICH=$ac_cv_path_WHICH
12856if test -n "$WHICH"; then
12857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12858$as_echo "$WHICH" >&6; }
12859else
12860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12861$as_echo "no" >&6; }
12862fi
12863
12864
12865  test -n "$WHICH" && break
12866done
12867
12868    else
12869      # If it succeeded, then it was overridden by the user. We will use it
12870      # for the tool.
12871
12872      # First remove it from the list of overridden variables, so we can test
12873      # for unknown variables in the end.
12874      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12875
12876      # Check if we try to supply an empty value
12877      if test "x$WHICH" = x; then
12878        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12879$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12880        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12881$as_echo_n "checking for WHICH... " >&6; }
12882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12883$as_echo "disabled" >&6; }
12884      else
12885        # Check if the provided tool contains a complete path.
12886        tool_specified="$WHICH"
12887        tool_basename="${tool_specified##*/}"
12888        if test "x$tool_basename" = "x$tool_specified"; then
12889          # A command without a complete path is provided, search $PATH.
12890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12891$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12892          # Extract the first word of "$tool_basename", so it can be a program name with args.
12893set dummy $tool_basename; ac_word=$2
12894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12895$as_echo_n "checking for $ac_word... " >&6; }
12896if ${ac_cv_path_WHICH+:} false; then :
12897  $as_echo_n "(cached) " >&6
12898else
12899  case $WHICH in
12900  [\\/]* | ?:[\\/]*)
12901  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12902  ;;
12903  *)
12904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12905for as_dir in $PATH
12906do
12907  IFS=$as_save_IFS
12908  test -z "$as_dir" && as_dir=.
12909    for ac_exec_ext in '' $ac_executable_extensions; do
12910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12911    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12913    break 2
12914  fi
12915done
12916  done
12917IFS=$as_save_IFS
12918
12919  ;;
12920esac
12921fi
12922WHICH=$ac_cv_path_WHICH
12923if test -n "$WHICH"; then
12924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12925$as_echo "$WHICH" >&6; }
12926else
12927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12928$as_echo "no" >&6; }
12929fi
12930
12931
12932          if test "x$WHICH" = x; then
12933            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12934          fi
12935        else
12936          # Otherwise we believe it is a complete path. Use it as it is.
12937          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12938$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12939          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12940$as_echo_n "checking for WHICH... " >&6; }
12941          if test ! -x "$tool_specified"; then
12942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12943$as_echo "not found" >&6; }
12944            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12945          fi
12946          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12947$as_echo "$tool_specified" >&6; }
12948        fi
12949      fi
12950    fi
12951
12952  fi
12953
12954
12955
12956  if test "x$WHICH" = x; then
12957    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12958  fi
12959
12960
12961
12962
12963
12964  # Publish this variable in the help.
12965
12966
12967  if [ -z "${XARGS+x}" ]; then
12968    # The variable is not set by user, try to locate tool using the code snippet
12969    for ac_prog in xargs
12970do
12971  # Extract the first word of "$ac_prog", so it can be a program name with args.
12972set dummy $ac_prog; ac_word=$2
12973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12974$as_echo_n "checking for $ac_word... " >&6; }
12975if ${ac_cv_path_XARGS+:} false; then :
12976  $as_echo_n "(cached) " >&6
12977else
12978  case $XARGS in
12979  [\\/]* | ?:[\\/]*)
12980  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12981  ;;
12982  *)
12983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12984for as_dir in $PATH
12985do
12986  IFS=$as_save_IFS
12987  test -z "$as_dir" && as_dir=.
12988    for ac_exec_ext in '' $ac_executable_extensions; do
12989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12990    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12992    break 2
12993  fi
12994done
12995  done
12996IFS=$as_save_IFS
12997
12998  ;;
12999esac
13000fi
13001XARGS=$ac_cv_path_XARGS
13002if test -n "$XARGS"; then
13003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13004$as_echo "$XARGS" >&6; }
13005else
13006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13007$as_echo "no" >&6; }
13008fi
13009
13010
13011  test -n "$XARGS" && break
13012done
13013
13014  else
13015    # The variable is set, but is it from the command line or the environment?
13016
13017    # Try to remove the string !XARGS! from our list.
13018    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13019    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13020      # If it failed, the variable was not from the command line. Ignore it,
13021      # but warn the user (except for BASH, which is always set by the calling BASH).
13022      if test "xXARGS" != xBASH; then
13023        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13024$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13025      fi
13026      # Try to locate tool using the code snippet
13027      for ac_prog in xargs
13028do
13029  # Extract the first word of "$ac_prog", so it can be a program name with args.
13030set dummy $ac_prog; ac_word=$2
13031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13032$as_echo_n "checking for $ac_word... " >&6; }
13033if ${ac_cv_path_XARGS+:} false; then :
13034  $as_echo_n "(cached) " >&6
13035else
13036  case $XARGS in
13037  [\\/]* | ?:[\\/]*)
13038  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13039  ;;
13040  *)
13041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13042for as_dir in $PATH
13043do
13044  IFS=$as_save_IFS
13045  test -z "$as_dir" && as_dir=.
13046    for ac_exec_ext in '' $ac_executable_extensions; do
13047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13048    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13050    break 2
13051  fi
13052done
13053  done
13054IFS=$as_save_IFS
13055
13056  ;;
13057esac
13058fi
13059XARGS=$ac_cv_path_XARGS
13060if test -n "$XARGS"; then
13061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13062$as_echo "$XARGS" >&6; }
13063else
13064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13065$as_echo "no" >&6; }
13066fi
13067
13068
13069  test -n "$XARGS" && break
13070done
13071
13072    else
13073      # If it succeeded, then it was overridden by the user. We will use it
13074      # for the tool.
13075
13076      # First remove it from the list of overridden variables, so we can test
13077      # for unknown variables in the end.
13078      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13079
13080      # Check if we try to supply an empty value
13081      if test "x$XARGS" = x; then
13082        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13083$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13084        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13085$as_echo_n "checking for XARGS... " >&6; }
13086        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13087$as_echo "disabled" >&6; }
13088      else
13089        # Check if the provided tool contains a complete path.
13090        tool_specified="$XARGS"
13091        tool_basename="${tool_specified##*/}"
13092        if test "x$tool_basename" = "x$tool_specified"; then
13093          # A command without a complete path is provided, search $PATH.
13094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13095$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13096          # Extract the first word of "$tool_basename", so it can be a program name with args.
13097set dummy $tool_basename; ac_word=$2
13098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13099$as_echo_n "checking for $ac_word... " >&6; }
13100if ${ac_cv_path_XARGS+:} false; then :
13101  $as_echo_n "(cached) " >&6
13102else
13103  case $XARGS in
13104  [\\/]* | ?:[\\/]*)
13105  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13106  ;;
13107  *)
13108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13109for as_dir in $PATH
13110do
13111  IFS=$as_save_IFS
13112  test -z "$as_dir" && as_dir=.
13113    for ac_exec_ext in '' $ac_executable_extensions; do
13114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13115    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13117    break 2
13118  fi
13119done
13120  done
13121IFS=$as_save_IFS
13122
13123  ;;
13124esac
13125fi
13126XARGS=$ac_cv_path_XARGS
13127if test -n "$XARGS"; then
13128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13129$as_echo "$XARGS" >&6; }
13130else
13131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13132$as_echo "no" >&6; }
13133fi
13134
13135
13136          if test "x$XARGS" = x; then
13137            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13138          fi
13139        else
13140          # Otherwise we believe it is a complete path. Use it as it is.
13141          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13142$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13143          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13144$as_echo_n "checking for XARGS... " >&6; }
13145          if test ! -x "$tool_specified"; then
13146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13147$as_echo "not found" >&6; }
13148            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13149          fi
13150          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13151$as_echo "$tool_specified" >&6; }
13152        fi
13153      fi
13154    fi
13155
13156  fi
13157
13158
13159
13160  if test "x$XARGS" = x; then
13161    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13162  fi
13163
13164
13165
13166  # Then required tools that require some special treatment.
13167
13168
13169  # Publish this variable in the help.
13170
13171
13172  if [ -z "${AWK+x}" ]; then
13173    # The variable is not set by user, try to locate tool using the code snippet
13174    for ac_prog in gawk mawk nawk awk
13175do
13176  # Extract the first word of "$ac_prog", so it can be a program name with args.
13177set dummy $ac_prog; ac_word=$2
13178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13179$as_echo_n "checking for $ac_word... " >&6; }
13180if ${ac_cv_prog_AWK+:} false; then :
13181  $as_echo_n "(cached) " >&6
13182else
13183  if test -n "$AWK"; then
13184  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13185else
13186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13187for as_dir in $PATH
13188do
13189  IFS=$as_save_IFS
13190  test -z "$as_dir" && as_dir=.
13191    for ac_exec_ext in '' $ac_executable_extensions; do
13192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13193    ac_cv_prog_AWK="$ac_prog"
13194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13195    break 2
13196  fi
13197done
13198  done
13199IFS=$as_save_IFS
13200
13201fi
13202fi
13203AWK=$ac_cv_prog_AWK
13204if test -n "$AWK"; then
13205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13206$as_echo "$AWK" >&6; }
13207else
13208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13209$as_echo "no" >&6; }
13210fi
13211
13212
13213  test -n "$AWK" && break
13214done
13215
13216  else
13217    # The variable is set, but is it from the command line or the environment?
13218
13219    # Try to remove the string !AWK! from our list.
13220    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13221    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13222      # If it failed, the variable was not from the command line. Ignore it,
13223      # but warn the user (except for BASH, which is always set by the calling BASH).
13224      if test "xAWK" != xBASH; then
13225        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13226$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13227      fi
13228      # Try to locate tool using the code snippet
13229      for ac_prog in gawk mawk nawk awk
13230do
13231  # Extract the first word of "$ac_prog", so it can be a program name with args.
13232set dummy $ac_prog; ac_word=$2
13233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13234$as_echo_n "checking for $ac_word... " >&6; }
13235if ${ac_cv_prog_AWK+:} false; then :
13236  $as_echo_n "(cached) " >&6
13237else
13238  if test -n "$AWK"; then
13239  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13240else
13241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13242for as_dir in $PATH
13243do
13244  IFS=$as_save_IFS
13245  test -z "$as_dir" && as_dir=.
13246    for ac_exec_ext in '' $ac_executable_extensions; do
13247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13248    ac_cv_prog_AWK="$ac_prog"
13249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13250    break 2
13251  fi
13252done
13253  done
13254IFS=$as_save_IFS
13255
13256fi
13257fi
13258AWK=$ac_cv_prog_AWK
13259if test -n "$AWK"; then
13260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13261$as_echo "$AWK" >&6; }
13262else
13263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13264$as_echo "no" >&6; }
13265fi
13266
13267
13268  test -n "$AWK" && break
13269done
13270
13271    else
13272      # If it succeeded, then it was overridden by the user. We will use it
13273      # for the tool.
13274
13275      # First remove it from the list of overridden variables, so we can test
13276      # for unknown variables in the end.
13277      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13278
13279      # Check if we try to supply an empty value
13280      if test "x$AWK" = x; then
13281        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13282$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13283        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13284$as_echo_n "checking for AWK... " >&6; }
13285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13286$as_echo "disabled" >&6; }
13287      else
13288        # Check if the provided tool contains a complete path.
13289        tool_specified="$AWK"
13290        tool_basename="${tool_specified##*/}"
13291        if test "x$tool_basename" = "x$tool_specified"; then
13292          # A command without a complete path is provided, search $PATH.
13293          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13294$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13295          # Extract the first word of "$tool_basename", so it can be a program name with args.
13296set dummy $tool_basename; ac_word=$2
13297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13298$as_echo_n "checking for $ac_word... " >&6; }
13299if ${ac_cv_path_AWK+:} false; then :
13300  $as_echo_n "(cached) " >&6
13301else
13302  case $AWK in
13303  [\\/]* | ?:[\\/]*)
13304  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13305  ;;
13306  *)
13307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13308for as_dir in $PATH
13309do
13310  IFS=$as_save_IFS
13311  test -z "$as_dir" && as_dir=.
13312    for ac_exec_ext in '' $ac_executable_extensions; do
13313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13314    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13316    break 2
13317  fi
13318done
13319  done
13320IFS=$as_save_IFS
13321
13322  ;;
13323esac
13324fi
13325AWK=$ac_cv_path_AWK
13326if test -n "$AWK"; then
13327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13328$as_echo "$AWK" >&6; }
13329else
13330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13331$as_echo "no" >&6; }
13332fi
13333
13334
13335          if test "x$AWK" = x; then
13336            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13337          fi
13338        else
13339          # Otherwise we believe it is a complete path. Use it as it is.
13340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13341$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13342          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13343$as_echo_n "checking for AWK... " >&6; }
13344          if test ! -x "$tool_specified"; then
13345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13346$as_echo "not found" >&6; }
13347            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13348          fi
13349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13350$as_echo "$tool_specified" >&6; }
13351        fi
13352      fi
13353    fi
13354
13355  fi
13356
13357
13358  if test "x$AWK" = x; then
13359    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13360  fi
13361
13362
13363
13364
13365  # Publish this variable in the help.
13366
13367
13368  if [ -z "${GREP+x}" ]; then
13369    # The variable is not set by user, try to locate tool using the code snippet
13370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13371$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13372if ${ac_cv_path_GREP+:} false; then :
13373  $as_echo_n "(cached) " >&6
13374else
13375  if test -z "$GREP"; then
13376  ac_path_GREP_found=false
13377  # Loop through the user's path and test for each of PROGNAME-LIST
13378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13379for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13380do
13381  IFS=$as_save_IFS
13382  test -z "$as_dir" && as_dir=.
13383    for ac_prog in grep ggrep; do
13384    for ac_exec_ext in '' $ac_executable_extensions; do
13385      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13386      as_fn_executable_p "$ac_path_GREP" || continue
13387# Check for GNU ac_path_GREP and select it if it is found.
13388  # Check for GNU $ac_path_GREP
13389case `"$ac_path_GREP" --version 2>&1` in
13390*GNU*)
13391  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13392*)
13393  ac_count=0
13394  $as_echo_n 0123456789 >"conftest.in"
13395  while :
13396  do
13397    cat "conftest.in" "conftest.in" >"conftest.tmp"
13398    mv "conftest.tmp" "conftest.in"
13399    cp "conftest.in" "conftest.nl"
13400    $as_echo 'GREP' >> "conftest.nl"
13401    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13402    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13403    as_fn_arith $ac_count + 1 && ac_count=$as_val
13404    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13405      # Best one so far, save it but keep looking for a better one
13406      ac_cv_path_GREP="$ac_path_GREP"
13407      ac_path_GREP_max=$ac_count
13408    fi
13409    # 10*(2^10) chars as input seems more than enough
13410    test $ac_count -gt 10 && break
13411  done
13412  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13413esac
13414
13415      $ac_path_GREP_found && break 3
13416    done
13417  done
13418  done
13419IFS=$as_save_IFS
13420  if test -z "$ac_cv_path_GREP"; then
13421    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13422  fi
13423else
13424  ac_cv_path_GREP=$GREP
13425fi
13426
13427fi
13428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13429$as_echo "$ac_cv_path_GREP" >&6; }
13430 GREP="$ac_cv_path_GREP"
13431
13432
13433  else
13434    # The variable is set, but is it from the command line or the environment?
13435
13436    # Try to remove the string !GREP! from our list.
13437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13439      # If it failed, the variable was not from the command line. Ignore it,
13440      # but warn the user (except for BASH, which is always set by the calling BASH).
13441      if test "xGREP" != xBASH; then
13442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13443$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13444      fi
13445      # Try to locate tool using the code snippet
13446      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13447$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13448if ${ac_cv_path_GREP+:} false; then :
13449  $as_echo_n "(cached) " >&6
13450else
13451  if test -z "$GREP"; then
13452  ac_path_GREP_found=false
13453  # Loop through the user's path and test for each of PROGNAME-LIST
13454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13455for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13456do
13457  IFS=$as_save_IFS
13458  test -z "$as_dir" && as_dir=.
13459    for ac_prog in grep ggrep; do
13460    for ac_exec_ext in '' $ac_executable_extensions; do
13461      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13462      as_fn_executable_p "$ac_path_GREP" || continue
13463# Check for GNU ac_path_GREP and select it if it is found.
13464  # Check for GNU $ac_path_GREP
13465case `"$ac_path_GREP" --version 2>&1` in
13466*GNU*)
13467  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13468*)
13469  ac_count=0
13470  $as_echo_n 0123456789 >"conftest.in"
13471  while :
13472  do
13473    cat "conftest.in" "conftest.in" >"conftest.tmp"
13474    mv "conftest.tmp" "conftest.in"
13475    cp "conftest.in" "conftest.nl"
13476    $as_echo 'GREP' >> "conftest.nl"
13477    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13478    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13479    as_fn_arith $ac_count + 1 && ac_count=$as_val
13480    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13481      # Best one so far, save it but keep looking for a better one
13482      ac_cv_path_GREP="$ac_path_GREP"
13483      ac_path_GREP_max=$ac_count
13484    fi
13485    # 10*(2^10) chars as input seems more than enough
13486    test $ac_count -gt 10 && break
13487  done
13488  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13489esac
13490
13491      $ac_path_GREP_found && break 3
13492    done
13493  done
13494  done
13495IFS=$as_save_IFS
13496  if test -z "$ac_cv_path_GREP"; then
13497    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13498  fi
13499else
13500  ac_cv_path_GREP=$GREP
13501fi
13502
13503fi
13504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13505$as_echo "$ac_cv_path_GREP" >&6; }
13506 GREP="$ac_cv_path_GREP"
13507
13508
13509    else
13510      # If it succeeded, then it was overridden by the user. We will use it
13511      # for the tool.
13512
13513      # First remove it from the list of overridden variables, so we can test
13514      # for unknown variables in the end.
13515      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13516
13517      # Check if we try to supply an empty value
13518      if test "x$GREP" = x; then
13519        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13520$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13521        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13522$as_echo_n "checking for GREP... " >&6; }
13523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13524$as_echo "disabled" >&6; }
13525      else
13526        # Check if the provided tool contains a complete path.
13527        tool_specified="$GREP"
13528        tool_basename="${tool_specified##*/}"
13529        if test "x$tool_basename" = "x$tool_specified"; then
13530          # A command without a complete path is provided, search $PATH.
13531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13532$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13533          # Extract the first word of "$tool_basename", so it can be a program name with args.
13534set dummy $tool_basename; ac_word=$2
13535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13536$as_echo_n "checking for $ac_word... " >&6; }
13537if ${ac_cv_path_GREP+:} false; then :
13538  $as_echo_n "(cached) " >&6
13539else
13540  case $GREP in
13541  [\\/]* | ?:[\\/]*)
13542  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13543  ;;
13544  *)
13545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13546for as_dir in $PATH
13547do
13548  IFS=$as_save_IFS
13549  test -z "$as_dir" && as_dir=.
13550    for ac_exec_ext in '' $ac_executable_extensions; do
13551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13552    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13554    break 2
13555  fi
13556done
13557  done
13558IFS=$as_save_IFS
13559
13560  ;;
13561esac
13562fi
13563GREP=$ac_cv_path_GREP
13564if test -n "$GREP"; then
13565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13566$as_echo "$GREP" >&6; }
13567else
13568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13569$as_echo "no" >&6; }
13570fi
13571
13572
13573          if test "x$GREP" = x; then
13574            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13575          fi
13576        else
13577          # Otherwise we believe it is a complete path. Use it as it is.
13578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13579$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13580          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13581$as_echo_n "checking for GREP... " >&6; }
13582          if test ! -x "$tool_specified"; then
13583            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13584$as_echo "not found" >&6; }
13585            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13586          fi
13587          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13588$as_echo "$tool_specified" >&6; }
13589        fi
13590      fi
13591    fi
13592
13593  fi
13594
13595
13596  if test "x$GREP" = x; then
13597    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13598  fi
13599
13600
13601
13602
13603  # Publish this variable in the help.
13604
13605
13606  if [ -z "${EGREP+x}" ]; then
13607    # The variable is not set by user, try to locate tool using the code snippet
13608    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13609$as_echo_n "checking for egrep... " >&6; }
13610if ${ac_cv_path_EGREP+:} false; then :
13611  $as_echo_n "(cached) " >&6
13612else
13613  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13614   then ac_cv_path_EGREP="$GREP -E"
13615   else
13616     if test -z "$EGREP"; then
13617  ac_path_EGREP_found=false
13618  # Loop through the user's path and test for each of PROGNAME-LIST
13619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13620for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13621do
13622  IFS=$as_save_IFS
13623  test -z "$as_dir" && as_dir=.
13624    for ac_prog in egrep; do
13625    for ac_exec_ext in '' $ac_executable_extensions; do
13626      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13627      as_fn_executable_p "$ac_path_EGREP" || continue
13628# Check for GNU ac_path_EGREP and select it if it is found.
13629  # Check for GNU $ac_path_EGREP
13630case `"$ac_path_EGREP" --version 2>&1` in
13631*GNU*)
13632  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13633*)
13634  ac_count=0
13635  $as_echo_n 0123456789 >"conftest.in"
13636  while :
13637  do
13638    cat "conftest.in" "conftest.in" >"conftest.tmp"
13639    mv "conftest.tmp" "conftest.in"
13640    cp "conftest.in" "conftest.nl"
13641    $as_echo 'EGREP' >> "conftest.nl"
13642    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13643    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13644    as_fn_arith $ac_count + 1 && ac_count=$as_val
13645    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13646      # Best one so far, save it but keep looking for a better one
13647      ac_cv_path_EGREP="$ac_path_EGREP"
13648      ac_path_EGREP_max=$ac_count
13649    fi
13650    # 10*(2^10) chars as input seems more than enough
13651    test $ac_count -gt 10 && break
13652  done
13653  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13654esac
13655
13656      $ac_path_EGREP_found && break 3
13657    done
13658  done
13659  done
13660IFS=$as_save_IFS
13661  if test -z "$ac_cv_path_EGREP"; then
13662    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13663  fi
13664else
13665  ac_cv_path_EGREP=$EGREP
13666fi
13667
13668   fi
13669fi
13670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13671$as_echo "$ac_cv_path_EGREP" >&6; }
13672 EGREP="$ac_cv_path_EGREP"
13673
13674
13675  else
13676    # The variable is set, but is it from the command line or the environment?
13677
13678    # Try to remove the string !EGREP! from our list.
13679    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13680    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13681      # If it failed, the variable was not from the command line. Ignore it,
13682      # but warn the user (except for BASH, which is always set by the calling BASH).
13683      if test "xEGREP" != xBASH; then
13684        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13685$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13686      fi
13687      # Try to locate tool using the code snippet
13688      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13689$as_echo_n "checking for egrep... " >&6; }
13690if ${ac_cv_path_EGREP+:} false; then :
13691  $as_echo_n "(cached) " >&6
13692else
13693  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13694   then ac_cv_path_EGREP="$GREP -E"
13695   else
13696     if test -z "$EGREP"; then
13697  ac_path_EGREP_found=false
13698  # Loop through the user's path and test for each of PROGNAME-LIST
13699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13700for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13701do
13702  IFS=$as_save_IFS
13703  test -z "$as_dir" && as_dir=.
13704    for ac_prog in egrep; do
13705    for ac_exec_ext in '' $ac_executable_extensions; do
13706      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13707      as_fn_executable_p "$ac_path_EGREP" || continue
13708# Check for GNU ac_path_EGREP and select it if it is found.
13709  # Check for GNU $ac_path_EGREP
13710case `"$ac_path_EGREP" --version 2>&1` in
13711*GNU*)
13712  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13713*)
13714  ac_count=0
13715  $as_echo_n 0123456789 >"conftest.in"
13716  while :
13717  do
13718    cat "conftest.in" "conftest.in" >"conftest.tmp"
13719    mv "conftest.tmp" "conftest.in"
13720    cp "conftest.in" "conftest.nl"
13721    $as_echo 'EGREP' >> "conftest.nl"
13722    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13723    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13724    as_fn_arith $ac_count + 1 && ac_count=$as_val
13725    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13726      # Best one so far, save it but keep looking for a better one
13727      ac_cv_path_EGREP="$ac_path_EGREP"
13728      ac_path_EGREP_max=$ac_count
13729    fi
13730    # 10*(2^10) chars as input seems more than enough
13731    test $ac_count -gt 10 && break
13732  done
13733  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13734esac
13735
13736      $ac_path_EGREP_found && break 3
13737    done
13738  done
13739  done
13740IFS=$as_save_IFS
13741  if test -z "$ac_cv_path_EGREP"; then
13742    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13743  fi
13744else
13745  ac_cv_path_EGREP=$EGREP
13746fi
13747
13748   fi
13749fi
13750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13751$as_echo "$ac_cv_path_EGREP" >&6; }
13752 EGREP="$ac_cv_path_EGREP"
13753
13754
13755    else
13756      # If it succeeded, then it was overridden by the user. We will use it
13757      # for the tool.
13758
13759      # First remove it from the list of overridden variables, so we can test
13760      # for unknown variables in the end.
13761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13762
13763      # Check if we try to supply an empty value
13764      if test "x$EGREP" = x; then
13765        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13766$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13767        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13768$as_echo_n "checking for EGREP... " >&6; }
13769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13770$as_echo "disabled" >&6; }
13771      else
13772        # Check if the provided tool contains a complete path.
13773        tool_specified="$EGREP"
13774        tool_basename="${tool_specified##*/}"
13775        if test "x$tool_basename" = "x$tool_specified"; then
13776          # A command without a complete path is provided, search $PATH.
13777          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13778$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13779          # Extract the first word of "$tool_basename", so it can be a program name with args.
13780set dummy $tool_basename; ac_word=$2
13781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13782$as_echo_n "checking for $ac_word... " >&6; }
13783if ${ac_cv_path_EGREP+:} false; then :
13784  $as_echo_n "(cached) " >&6
13785else
13786  case $EGREP in
13787  [\\/]* | ?:[\\/]*)
13788  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13789  ;;
13790  *)
13791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13792for as_dir in $PATH
13793do
13794  IFS=$as_save_IFS
13795  test -z "$as_dir" && as_dir=.
13796    for ac_exec_ext in '' $ac_executable_extensions; do
13797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13798    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13800    break 2
13801  fi
13802done
13803  done
13804IFS=$as_save_IFS
13805
13806  ;;
13807esac
13808fi
13809EGREP=$ac_cv_path_EGREP
13810if test -n "$EGREP"; then
13811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13812$as_echo "$EGREP" >&6; }
13813else
13814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13815$as_echo "no" >&6; }
13816fi
13817
13818
13819          if test "x$EGREP" = x; then
13820            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13821          fi
13822        else
13823          # Otherwise we believe it is a complete path. Use it as it is.
13824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13825$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13826          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13827$as_echo_n "checking for EGREP... " >&6; }
13828          if test ! -x "$tool_specified"; then
13829            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13830$as_echo "not found" >&6; }
13831            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13832          fi
13833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13834$as_echo "$tool_specified" >&6; }
13835        fi
13836      fi
13837    fi
13838
13839  fi
13840
13841
13842  if test "x$EGREP" = x; then
13843    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13844  fi
13845
13846
13847
13848
13849  # Publish this variable in the help.
13850
13851
13852  if [ -z "${FGREP+x}" ]; then
13853    # The variable is not set by user, try to locate tool using the code snippet
13854    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13855$as_echo_n "checking for fgrep... " >&6; }
13856if ${ac_cv_path_FGREP+:} false; then :
13857  $as_echo_n "(cached) " >&6
13858else
13859  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13860   then ac_cv_path_FGREP="$GREP -F"
13861   else
13862     if test -z "$FGREP"; then
13863  ac_path_FGREP_found=false
13864  # Loop through the user's path and test for each of PROGNAME-LIST
13865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13866for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13867do
13868  IFS=$as_save_IFS
13869  test -z "$as_dir" && as_dir=.
13870    for ac_prog in fgrep; do
13871    for ac_exec_ext in '' $ac_executable_extensions; do
13872      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13873      as_fn_executable_p "$ac_path_FGREP" || continue
13874# Check for GNU ac_path_FGREP and select it if it is found.
13875  # Check for GNU $ac_path_FGREP
13876case `"$ac_path_FGREP" --version 2>&1` in
13877*GNU*)
13878  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13879*)
13880  ac_count=0
13881  $as_echo_n 0123456789 >"conftest.in"
13882  while :
13883  do
13884    cat "conftest.in" "conftest.in" >"conftest.tmp"
13885    mv "conftest.tmp" "conftest.in"
13886    cp "conftest.in" "conftest.nl"
13887    $as_echo 'FGREP' >> "conftest.nl"
13888    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13889    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13890    as_fn_arith $ac_count + 1 && ac_count=$as_val
13891    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13892      # Best one so far, save it but keep looking for a better one
13893      ac_cv_path_FGREP="$ac_path_FGREP"
13894      ac_path_FGREP_max=$ac_count
13895    fi
13896    # 10*(2^10) chars as input seems more than enough
13897    test $ac_count -gt 10 && break
13898  done
13899  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13900esac
13901
13902      $ac_path_FGREP_found && break 3
13903    done
13904  done
13905  done
13906IFS=$as_save_IFS
13907  if test -z "$ac_cv_path_FGREP"; then
13908    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13909  fi
13910else
13911  ac_cv_path_FGREP=$FGREP
13912fi
13913
13914   fi
13915fi
13916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13917$as_echo "$ac_cv_path_FGREP" >&6; }
13918 FGREP="$ac_cv_path_FGREP"
13919
13920
13921  else
13922    # The variable is set, but is it from the command line or the environment?
13923
13924    # Try to remove the string !FGREP! from our list.
13925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13927      # If it failed, the variable was not from the command line. Ignore it,
13928      # but warn the user (except for BASH, which is always set by the calling BASH).
13929      if test "xFGREP" != xBASH; then
13930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13931$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13932      fi
13933      # Try to locate tool using the code snippet
13934      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13935$as_echo_n "checking for fgrep... " >&6; }
13936if ${ac_cv_path_FGREP+:} false; then :
13937  $as_echo_n "(cached) " >&6
13938else
13939  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13940   then ac_cv_path_FGREP="$GREP -F"
13941   else
13942     if test -z "$FGREP"; then
13943  ac_path_FGREP_found=false
13944  # Loop through the user's path and test for each of PROGNAME-LIST
13945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13946for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13947do
13948  IFS=$as_save_IFS
13949  test -z "$as_dir" && as_dir=.
13950    for ac_prog in fgrep; do
13951    for ac_exec_ext in '' $ac_executable_extensions; do
13952      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13953      as_fn_executable_p "$ac_path_FGREP" || continue
13954# Check for GNU ac_path_FGREP and select it if it is found.
13955  # Check for GNU $ac_path_FGREP
13956case `"$ac_path_FGREP" --version 2>&1` in
13957*GNU*)
13958  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13959*)
13960  ac_count=0
13961  $as_echo_n 0123456789 >"conftest.in"
13962  while :
13963  do
13964    cat "conftest.in" "conftest.in" >"conftest.tmp"
13965    mv "conftest.tmp" "conftest.in"
13966    cp "conftest.in" "conftest.nl"
13967    $as_echo 'FGREP' >> "conftest.nl"
13968    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13969    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13970    as_fn_arith $ac_count + 1 && ac_count=$as_val
13971    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13972      # Best one so far, save it but keep looking for a better one
13973      ac_cv_path_FGREP="$ac_path_FGREP"
13974      ac_path_FGREP_max=$ac_count
13975    fi
13976    # 10*(2^10) chars as input seems more than enough
13977    test $ac_count -gt 10 && break
13978  done
13979  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13980esac
13981
13982      $ac_path_FGREP_found && break 3
13983    done
13984  done
13985  done
13986IFS=$as_save_IFS
13987  if test -z "$ac_cv_path_FGREP"; then
13988    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13989  fi
13990else
13991  ac_cv_path_FGREP=$FGREP
13992fi
13993
13994   fi
13995fi
13996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13997$as_echo "$ac_cv_path_FGREP" >&6; }
13998 FGREP="$ac_cv_path_FGREP"
13999
14000
14001    else
14002      # If it succeeded, then it was overridden by the user. We will use it
14003      # for the tool.
14004
14005      # First remove it from the list of overridden variables, so we can test
14006      # for unknown variables in the end.
14007      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14008
14009      # Check if we try to supply an empty value
14010      if test "x$FGREP" = x; then
14011        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14012$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14013        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14014$as_echo_n "checking for FGREP... " >&6; }
14015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14016$as_echo "disabled" >&6; }
14017      else
14018        # Check if the provided tool contains a complete path.
14019        tool_specified="$FGREP"
14020        tool_basename="${tool_specified##*/}"
14021        if test "x$tool_basename" = "x$tool_specified"; then
14022          # A command without a complete path is provided, search $PATH.
14023          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14024$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14025          # Extract the first word of "$tool_basename", so it can be a program name with args.
14026set dummy $tool_basename; ac_word=$2
14027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14028$as_echo_n "checking for $ac_word... " >&6; }
14029if ${ac_cv_path_FGREP+:} false; then :
14030  $as_echo_n "(cached) " >&6
14031else
14032  case $FGREP in
14033  [\\/]* | ?:[\\/]*)
14034  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14035  ;;
14036  *)
14037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14038for as_dir in $PATH
14039do
14040  IFS=$as_save_IFS
14041  test -z "$as_dir" && as_dir=.
14042    for ac_exec_ext in '' $ac_executable_extensions; do
14043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14044    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14046    break 2
14047  fi
14048done
14049  done
14050IFS=$as_save_IFS
14051
14052  ;;
14053esac
14054fi
14055FGREP=$ac_cv_path_FGREP
14056if test -n "$FGREP"; then
14057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14058$as_echo "$FGREP" >&6; }
14059else
14060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14061$as_echo "no" >&6; }
14062fi
14063
14064
14065          if test "x$FGREP" = x; then
14066            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14067          fi
14068        else
14069          # Otherwise we believe it is a complete path. Use it as it is.
14070          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14071$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14072          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14073$as_echo_n "checking for FGREP... " >&6; }
14074          if test ! -x "$tool_specified"; then
14075            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14076$as_echo "not found" >&6; }
14077            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14078          fi
14079          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14080$as_echo "$tool_specified" >&6; }
14081        fi
14082      fi
14083    fi
14084
14085  fi
14086
14087
14088  if test "x$FGREP" = x; then
14089    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14090  fi
14091
14092
14093
14094
14095  # Publish this variable in the help.
14096
14097
14098  if [ -z "${SED+x}" ]; then
14099    # The variable is not set by user, try to locate tool using the code snippet
14100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14101$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14102if ${ac_cv_path_SED+:} false; then :
14103  $as_echo_n "(cached) " >&6
14104else
14105            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14106     for ac_i in 1 2 3 4 5 6 7; do
14107       ac_script="$ac_script$as_nl$ac_script"
14108     done
14109     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14110     { ac_script=; unset ac_script;}
14111     if test -z "$SED"; then
14112  ac_path_SED_found=false
14113  # Loop through the user's path and test for each of PROGNAME-LIST
14114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14115for as_dir in $PATH
14116do
14117  IFS=$as_save_IFS
14118  test -z "$as_dir" && as_dir=.
14119    for ac_prog in sed gsed; do
14120    for ac_exec_ext in '' $ac_executable_extensions; do
14121      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14122      as_fn_executable_p "$ac_path_SED" || continue
14123# Check for GNU ac_path_SED and select it if it is found.
14124  # Check for GNU $ac_path_SED
14125case `"$ac_path_SED" --version 2>&1` in
14126*GNU*)
14127  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14128*)
14129  ac_count=0
14130  $as_echo_n 0123456789 >"conftest.in"
14131  while :
14132  do
14133    cat "conftest.in" "conftest.in" >"conftest.tmp"
14134    mv "conftest.tmp" "conftest.in"
14135    cp "conftest.in" "conftest.nl"
14136    $as_echo '' >> "conftest.nl"
14137    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14138    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14139    as_fn_arith $ac_count + 1 && ac_count=$as_val
14140    if test $ac_count -gt ${ac_path_SED_max-0}; then
14141      # Best one so far, save it but keep looking for a better one
14142      ac_cv_path_SED="$ac_path_SED"
14143      ac_path_SED_max=$ac_count
14144    fi
14145    # 10*(2^10) chars as input seems more than enough
14146    test $ac_count -gt 10 && break
14147  done
14148  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14149esac
14150
14151      $ac_path_SED_found && break 3
14152    done
14153  done
14154  done
14155IFS=$as_save_IFS
14156  if test -z "$ac_cv_path_SED"; then
14157    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14158  fi
14159else
14160  ac_cv_path_SED=$SED
14161fi
14162
14163fi
14164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14165$as_echo "$ac_cv_path_SED" >&6; }
14166 SED="$ac_cv_path_SED"
14167  rm -f conftest.sed
14168
14169  else
14170    # The variable is set, but is it from the command line or the environment?
14171
14172    # Try to remove the string !SED! from our list.
14173    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14174    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14175      # If it failed, the variable was not from the command line. Ignore it,
14176      # but warn the user (except for BASH, which is always set by the calling BASH).
14177      if test "xSED" != xBASH; then
14178        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14179$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14180      fi
14181      # Try to locate tool using the code snippet
14182      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14183$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14184if ${ac_cv_path_SED+:} false; then :
14185  $as_echo_n "(cached) " >&6
14186else
14187            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14188     for ac_i in 1 2 3 4 5 6 7; do
14189       ac_script="$ac_script$as_nl$ac_script"
14190     done
14191     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14192     { ac_script=; unset ac_script;}
14193     if test -z "$SED"; then
14194  ac_path_SED_found=false
14195  # Loop through the user's path and test for each of PROGNAME-LIST
14196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14197for as_dir in $PATH
14198do
14199  IFS=$as_save_IFS
14200  test -z "$as_dir" && as_dir=.
14201    for ac_prog in sed gsed; do
14202    for ac_exec_ext in '' $ac_executable_extensions; do
14203      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14204      as_fn_executable_p "$ac_path_SED" || continue
14205# Check for GNU ac_path_SED and select it if it is found.
14206  # Check for GNU $ac_path_SED
14207case `"$ac_path_SED" --version 2>&1` in
14208*GNU*)
14209  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14210*)
14211  ac_count=0
14212  $as_echo_n 0123456789 >"conftest.in"
14213  while :
14214  do
14215    cat "conftest.in" "conftest.in" >"conftest.tmp"
14216    mv "conftest.tmp" "conftest.in"
14217    cp "conftest.in" "conftest.nl"
14218    $as_echo '' >> "conftest.nl"
14219    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14220    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14221    as_fn_arith $ac_count + 1 && ac_count=$as_val
14222    if test $ac_count -gt ${ac_path_SED_max-0}; then
14223      # Best one so far, save it but keep looking for a better one
14224      ac_cv_path_SED="$ac_path_SED"
14225      ac_path_SED_max=$ac_count
14226    fi
14227    # 10*(2^10) chars as input seems more than enough
14228    test $ac_count -gt 10 && break
14229  done
14230  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14231esac
14232
14233      $ac_path_SED_found && break 3
14234    done
14235  done
14236  done
14237IFS=$as_save_IFS
14238  if test -z "$ac_cv_path_SED"; then
14239    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14240  fi
14241else
14242  ac_cv_path_SED=$SED
14243fi
14244
14245fi
14246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14247$as_echo "$ac_cv_path_SED" >&6; }
14248 SED="$ac_cv_path_SED"
14249  rm -f conftest.sed
14250
14251    else
14252      # If it succeeded, then it was overridden by the user. We will use it
14253      # for the tool.
14254
14255      # First remove it from the list of overridden variables, so we can test
14256      # for unknown variables in the end.
14257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14258
14259      # Check if we try to supply an empty value
14260      if test "x$SED" = x; then
14261        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14262$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14264$as_echo_n "checking for SED... " >&6; }
14265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14266$as_echo "disabled" >&6; }
14267      else
14268        # Check if the provided tool contains a complete path.
14269        tool_specified="$SED"
14270        tool_basename="${tool_specified##*/}"
14271        if test "x$tool_basename" = "x$tool_specified"; then
14272          # A command without a complete path is provided, search $PATH.
14273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14274$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14275          # Extract the first word of "$tool_basename", so it can be a program name with args.
14276set dummy $tool_basename; ac_word=$2
14277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14278$as_echo_n "checking for $ac_word... " >&6; }
14279if ${ac_cv_path_SED+:} false; then :
14280  $as_echo_n "(cached) " >&6
14281else
14282  case $SED in
14283  [\\/]* | ?:[\\/]*)
14284  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14285  ;;
14286  *)
14287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14288for as_dir in $PATH
14289do
14290  IFS=$as_save_IFS
14291  test -z "$as_dir" && as_dir=.
14292    for ac_exec_ext in '' $ac_executable_extensions; do
14293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14294    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14296    break 2
14297  fi
14298done
14299  done
14300IFS=$as_save_IFS
14301
14302  ;;
14303esac
14304fi
14305SED=$ac_cv_path_SED
14306if test -n "$SED"; then
14307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14308$as_echo "$SED" >&6; }
14309else
14310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14311$as_echo "no" >&6; }
14312fi
14313
14314
14315          if test "x$SED" = x; then
14316            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14317          fi
14318        else
14319          # Otherwise we believe it is a complete path. Use it as it is.
14320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14321$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14322          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14323$as_echo_n "checking for SED... " >&6; }
14324          if test ! -x "$tool_specified"; then
14325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14326$as_echo "not found" >&6; }
14327            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14328          fi
14329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14330$as_echo "$tool_specified" >&6; }
14331        fi
14332      fi
14333    fi
14334
14335  fi
14336
14337
14338  if test "x$SED" = x; then
14339    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14340  fi
14341
14342
14343
14344  # Always force rm.
14345  RM="$RM -f"
14346
14347  # pwd behaves differently on various platforms and some don't support the -L flag.
14348  # Always use the bash builtin pwd to get uniform behavior.
14349  THEPWDCMD=pwd
14350
14351  # These are not required on all platforms
14352
14353
14354  # Publish this variable in the help.
14355
14356
14357  if [ -z "${CYGPATH+x}" ]; then
14358    # The variable is not set by user, try to locate tool using the code snippet
14359    for ac_prog in cygpath
14360do
14361  # Extract the first word of "$ac_prog", so it can be a program name with args.
14362set dummy $ac_prog; ac_word=$2
14363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14364$as_echo_n "checking for $ac_word... " >&6; }
14365if ${ac_cv_path_CYGPATH+:} false; then :
14366  $as_echo_n "(cached) " >&6
14367else
14368  case $CYGPATH in
14369  [\\/]* | ?:[\\/]*)
14370  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14371  ;;
14372  *)
14373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14374for as_dir in $PATH
14375do
14376  IFS=$as_save_IFS
14377  test -z "$as_dir" && as_dir=.
14378    for ac_exec_ext in '' $ac_executable_extensions; do
14379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14380    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14382    break 2
14383  fi
14384done
14385  done
14386IFS=$as_save_IFS
14387
14388  ;;
14389esac
14390fi
14391CYGPATH=$ac_cv_path_CYGPATH
14392if test -n "$CYGPATH"; then
14393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14394$as_echo "$CYGPATH" >&6; }
14395else
14396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14397$as_echo "no" >&6; }
14398fi
14399
14400
14401  test -n "$CYGPATH" && break
14402done
14403
14404  else
14405    # The variable is set, but is it from the command line or the environment?
14406
14407    # Try to remove the string !CYGPATH! from our list.
14408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14410      # If it failed, the variable was not from the command line. Ignore it,
14411      # but warn the user (except for BASH, which is always set by the calling BASH).
14412      if test "xCYGPATH" != xBASH; then
14413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14414$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14415      fi
14416      # Try to locate tool using the code snippet
14417      for ac_prog in cygpath
14418do
14419  # Extract the first word of "$ac_prog", so it can be a program name with args.
14420set dummy $ac_prog; ac_word=$2
14421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14422$as_echo_n "checking for $ac_word... " >&6; }
14423if ${ac_cv_path_CYGPATH+:} false; then :
14424  $as_echo_n "(cached) " >&6
14425else
14426  case $CYGPATH in
14427  [\\/]* | ?:[\\/]*)
14428  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14429  ;;
14430  *)
14431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14432for as_dir in $PATH
14433do
14434  IFS=$as_save_IFS
14435  test -z "$as_dir" && as_dir=.
14436    for ac_exec_ext in '' $ac_executable_extensions; do
14437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14438    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14440    break 2
14441  fi
14442done
14443  done
14444IFS=$as_save_IFS
14445
14446  ;;
14447esac
14448fi
14449CYGPATH=$ac_cv_path_CYGPATH
14450if test -n "$CYGPATH"; then
14451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14452$as_echo "$CYGPATH" >&6; }
14453else
14454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14455$as_echo "no" >&6; }
14456fi
14457
14458
14459  test -n "$CYGPATH" && break
14460done
14461
14462    else
14463      # If it succeeded, then it was overridden by the user. We will use it
14464      # for the tool.
14465
14466      # First remove it from the list of overridden variables, so we can test
14467      # for unknown variables in the end.
14468      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14469
14470      # Check if we try to supply an empty value
14471      if test "x$CYGPATH" = x; then
14472        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14473$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14474        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14475$as_echo_n "checking for CYGPATH... " >&6; }
14476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14477$as_echo "disabled" >&6; }
14478      else
14479        # Check if the provided tool contains a complete path.
14480        tool_specified="$CYGPATH"
14481        tool_basename="${tool_specified##*/}"
14482        if test "x$tool_basename" = "x$tool_specified"; then
14483          # A command without a complete path is provided, search $PATH.
14484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14485$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14486          # Extract the first word of "$tool_basename", so it can be a program name with args.
14487set dummy $tool_basename; ac_word=$2
14488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14489$as_echo_n "checking for $ac_word... " >&6; }
14490if ${ac_cv_path_CYGPATH+:} false; then :
14491  $as_echo_n "(cached) " >&6
14492else
14493  case $CYGPATH in
14494  [\\/]* | ?:[\\/]*)
14495  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14496  ;;
14497  *)
14498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14499for as_dir in $PATH
14500do
14501  IFS=$as_save_IFS
14502  test -z "$as_dir" && as_dir=.
14503    for ac_exec_ext in '' $ac_executable_extensions; do
14504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14505    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14507    break 2
14508  fi
14509done
14510  done
14511IFS=$as_save_IFS
14512
14513  ;;
14514esac
14515fi
14516CYGPATH=$ac_cv_path_CYGPATH
14517if test -n "$CYGPATH"; then
14518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14519$as_echo "$CYGPATH" >&6; }
14520else
14521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14522$as_echo "no" >&6; }
14523fi
14524
14525
14526          if test "x$CYGPATH" = x; then
14527            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14528          fi
14529        else
14530          # Otherwise we believe it is a complete path. Use it as it is.
14531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14532$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14533          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14534$as_echo_n "checking for CYGPATH... " >&6; }
14535          if test ! -x "$tool_specified"; then
14536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14537$as_echo "not found" >&6; }
14538            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14539          fi
14540          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14541$as_echo "$tool_specified" >&6; }
14542        fi
14543      fi
14544    fi
14545
14546  fi
14547
14548
14549
14550
14551  # Publish this variable in the help.
14552
14553
14554  if [ -z "${READLINK+x}" ]; then
14555    # The variable is not set by user, try to locate tool using the code snippet
14556    for ac_prog in greadlink readlink
14557do
14558  # Extract the first word of "$ac_prog", so it can be a program name with args.
14559set dummy $ac_prog; ac_word=$2
14560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14561$as_echo_n "checking for $ac_word... " >&6; }
14562if ${ac_cv_path_READLINK+:} false; then :
14563  $as_echo_n "(cached) " >&6
14564else
14565  case $READLINK in
14566  [\\/]* | ?:[\\/]*)
14567  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14568  ;;
14569  *)
14570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14571for as_dir in $PATH
14572do
14573  IFS=$as_save_IFS
14574  test -z "$as_dir" && as_dir=.
14575    for ac_exec_ext in '' $ac_executable_extensions; do
14576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14577    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14579    break 2
14580  fi
14581done
14582  done
14583IFS=$as_save_IFS
14584
14585  ;;
14586esac
14587fi
14588READLINK=$ac_cv_path_READLINK
14589if test -n "$READLINK"; then
14590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14591$as_echo "$READLINK" >&6; }
14592else
14593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14594$as_echo "no" >&6; }
14595fi
14596
14597
14598  test -n "$READLINK" && break
14599done
14600
14601  else
14602    # The variable is set, but is it from the command line or the environment?
14603
14604    # Try to remove the string !READLINK! from our list.
14605    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14606    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14607      # If it failed, the variable was not from the command line. Ignore it,
14608      # but warn the user (except for BASH, which is always set by the calling BASH).
14609      if test "xREADLINK" != xBASH; then
14610        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14611$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14612      fi
14613      # Try to locate tool using the code snippet
14614      for ac_prog in greadlink readlink
14615do
14616  # Extract the first word of "$ac_prog", so it can be a program name with args.
14617set dummy $ac_prog; ac_word=$2
14618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14619$as_echo_n "checking for $ac_word... " >&6; }
14620if ${ac_cv_path_READLINK+:} false; then :
14621  $as_echo_n "(cached) " >&6
14622else
14623  case $READLINK in
14624  [\\/]* | ?:[\\/]*)
14625  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14626  ;;
14627  *)
14628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14629for as_dir in $PATH
14630do
14631  IFS=$as_save_IFS
14632  test -z "$as_dir" && as_dir=.
14633    for ac_exec_ext in '' $ac_executable_extensions; do
14634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14635    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14637    break 2
14638  fi
14639done
14640  done
14641IFS=$as_save_IFS
14642
14643  ;;
14644esac
14645fi
14646READLINK=$ac_cv_path_READLINK
14647if test -n "$READLINK"; then
14648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14649$as_echo "$READLINK" >&6; }
14650else
14651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14652$as_echo "no" >&6; }
14653fi
14654
14655
14656  test -n "$READLINK" && break
14657done
14658
14659    else
14660      # If it succeeded, then it was overridden by the user. We will use it
14661      # for the tool.
14662
14663      # First remove it from the list of overridden variables, so we can test
14664      # for unknown variables in the end.
14665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14666
14667      # Check if we try to supply an empty value
14668      if test "x$READLINK" = x; then
14669        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14670$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14672$as_echo_n "checking for READLINK... " >&6; }
14673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14674$as_echo "disabled" >&6; }
14675      else
14676        # Check if the provided tool contains a complete path.
14677        tool_specified="$READLINK"
14678        tool_basename="${tool_specified##*/}"
14679        if test "x$tool_basename" = "x$tool_specified"; then
14680          # A command without a complete path is provided, search $PATH.
14681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14682$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14683          # Extract the first word of "$tool_basename", so it can be a program name with args.
14684set dummy $tool_basename; ac_word=$2
14685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14686$as_echo_n "checking for $ac_word... " >&6; }
14687if ${ac_cv_path_READLINK+:} false; then :
14688  $as_echo_n "(cached) " >&6
14689else
14690  case $READLINK in
14691  [\\/]* | ?:[\\/]*)
14692  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14693  ;;
14694  *)
14695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14696for as_dir in $PATH
14697do
14698  IFS=$as_save_IFS
14699  test -z "$as_dir" && as_dir=.
14700    for ac_exec_ext in '' $ac_executable_extensions; do
14701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14702    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14704    break 2
14705  fi
14706done
14707  done
14708IFS=$as_save_IFS
14709
14710  ;;
14711esac
14712fi
14713READLINK=$ac_cv_path_READLINK
14714if test -n "$READLINK"; then
14715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14716$as_echo "$READLINK" >&6; }
14717else
14718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14719$as_echo "no" >&6; }
14720fi
14721
14722
14723          if test "x$READLINK" = x; then
14724            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14725          fi
14726        else
14727          # Otherwise we believe it is a complete path. Use it as it is.
14728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14729$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14730          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14731$as_echo_n "checking for READLINK... " >&6; }
14732          if test ! -x "$tool_specified"; then
14733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14734$as_echo "not found" >&6; }
14735            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14736          fi
14737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14738$as_echo "$tool_specified" >&6; }
14739        fi
14740      fi
14741    fi
14742
14743  fi
14744
14745
14746
14747
14748  # Publish this variable in the help.
14749
14750
14751  if [ -z "${DF+x}" ]; then
14752    # The variable is not set by user, try to locate tool using the code snippet
14753    for ac_prog in df
14754do
14755  # Extract the first word of "$ac_prog", so it can be a program name with args.
14756set dummy $ac_prog; ac_word=$2
14757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14758$as_echo_n "checking for $ac_word... " >&6; }
14759if ${ac_cv_path_DF+:} false; then :
14760  $as_echo_n "(cached) " >&6
14761else
14762  case $DF in
14763  [\\/]* | ?:[\\/]*)
14764  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14765  ;;
14766  *)
14767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14768for as_dir in $PATH
14769do
14770  IFS=$as_save_IFS
14771  test -z "$as_dir" && as_dir=.
14772    for ac_exec_ext in '' $ac_executable_extensions; do
14773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14774    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14776    break 2
14777  fi
14778done
14779  done
14780IFS=$as_save_IFS
14781
14782  ;;
14783esac
14784fi
14785DF=$ac_cv_path_DF
14786if test -n "$DF"; then
14787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14788$as_echo "$DF" >&6; }
14789else
14790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14791$as_echo "no" >&6; }
14792fi
14793
14794
14795  test -n "$DF" && break
14796done
14797
14798  else
14799    # The variable is set, but is it from the command line or the environment?
14800
14801    # Try to remove the string !DF! from our list.
14802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14804      # If it failed, the variable was not from the command line. Ignore it,
14805      # but warn the user (except for BASH, which is always set by the calling BASH).
14806      if test "xDF" != xBASH; then
14807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14808$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14809      fi
14810      # Try to locate tool using the code snippet
14811      for ac_prog in df
14812do
14813  # Extract the first word of "$ac_prog", so it can be a program name with args.
14814set dummy $ac_prog; ac_word=$2
14815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14816$as_echo_n "checking for $ac_word... " >&6; }
14817if ${ac_cv_path_DF+:} false; then :
14818  $as_echo_n "(cached) " >&6
14819else
14820  case $DF in
14821  [\\/]* | ?:[\\/]*)
14822  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14823  ;;
14824  *)
14825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14826for as_dir in $PATH
14827do
14828  IFS=$as_save_IFS
14829  test -z "$as_dir" && as_dir=.
14830    for ac_exec_ext in '' $ac_executable_extensions; do
14831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14832    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14834    break 2
14835  fi
14836done
14837  done
14838IFS=$as_save_IFS
14839
14840  ;;
14841esac
14842fi
14843DF=$ac_cv_path_DF
14844if test -n "$DF"; then
14845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14846$as_echo "$DF" >&6; }
14847else
14848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14849$as_echo "no" >&6; }
14850fi
14851
14852
14853  test -n "$DF" && break
14854done
14855
14856    else
14857      # If it succeeded, then it was overridden by the user. We will use it
14858      # for the tool.
14859
14860      # First remove it from the list of overridden variables, so we can test
14861      # for unknown variables in the end.
14862      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14863
14864      # Check if we try to supply an empty value
14865      if test "x$DF" = x; then
14866        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14867$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14868        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14869$as_echo_n "checking for DF... " >&6; }
14870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14871$as_echo "disabled" >&6; }
14872      else
14873        # Check if the provided tool contains a complete path.
14874        tool_specified="$DF"
14875        tool_basename="${tool_specified##*/}"
14876        if test "x$tool_basename" = "x$tool_specified"; then
14877          # A command without a complete path is provided, search $PATH.
14878          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14879$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14880          # Extract the first word of "$tool_basename", so it can be a program name with args.
14881set dummy $tool_basename; ac_word=$2
14882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14883$as_echo_n "checking for $ac_word... " >&6; }
14884if ${ac_cv_path_DF+:} false; then :
14885  $as_echo_n "(cached) " >&6
14886else
14887  case $DF in
14888  [\\/]* | ?:[\\/]*)
14889  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14890  ;;
14891  *)
14892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14893for as_dir in $PATH
14894do
14895  IFS=$as_save_IFS
14896  test -z "$as_dir" && as_dir=.
14897    for ac_exec_ext in '' $ac_executable_extensions; do
14898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14899    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14901    break 2
14902  fi
14903done
14904  done
14905IFS=$as_save_IFS
14906
14907  ;;
14908esac
14909fi
14910DF=$ac_cv_path_DF
14911if test -n "$DF"; then
14912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14913$as_echo "$DF" >&6; }
14914else
14915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14916$as_echo "no" >&6; }
14917fi
14918
14919
14920          if test "x$DF" = x; then
14921            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14922          fi
14923        else
14924          # Otherwise we believe it is a complete path. Use it as it is.
14925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14926$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14927          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14928$as_echo_n "checking for DF... " >&6; }
14929          if test ! -x "$tool_specified"; then
14930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14931$as_echo "not found" >&6; }
14932            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14933          fi
14934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14935$as_echo "$tool_specified" >&6; }
14936        fi
14937      fi
14938    fi
14939
14940  fi
14941
14942
14943
14944
14945  # Publish this variable in the help.
14946
14947
14948  if [ -z "${CPIO+x}" ]; then
14949    # The variable is not set by user, try to locate tool using the code snippet
14950    for ac_prog in cpio bsdcpio
14951do
14952  # Extract the first word of "$ac_prog", so it can be a program name with args.
14953set dummy $ac_prog; ac_word=$2
14954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14955$as_echo_n "checking for $ac_word... " >&6; }
14956if ${ac_cv_path_CPIO+:} false; then :
14957  $as_echo_n "(cached) " >&6
14958else
14959  case $CPIO in
14960  [\\/]* | ?:[\\/]*)
14961  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14962  ;;
14963  *)
14964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14965for as_dir in $PATH
14966do
14967  IFS=$as_save_IFS
14968  test -z "$as_dir" && as_dir=.
14969    for ac_exec_ext in '' $ac_executable_extensions; do
14970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14971    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14973    break 2
14974  fi
14975done
14976  done
14977IFS=$as_save_IFS
14978
14979  ;;
14980esac
14981fi
14982CPIO=$ac_cv_path_CPIO
14983if test -n "$CPIO"; then
14984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14985$as_echo "$CPIO" >&6; }
14986else
14987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14988$as_echo "no" >&6; }
14989fi
14990
14991
14992  test -n "$CPIO" && break
14993done
14994
14995  else
14996    # The variable is set, but is it from the command line or the environment?
14997
14998    # Try to remove the string !CPIO! from our list.
14999    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15000    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15001      # If it failed, the variable was not from the command line. Ignore it,
15002      # but warn the user (except for BASH, which is always set by the calling BASH).
15003      if test "xCPIO" != xBASH; then
15004        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15005$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15006      fi
15007      # Try to locate tool using the code snippet
15008      for ac_prog in cpio bsdcpio
15009do
15010  # Extract the first word of "$ac_prog", so it can be a program name with args.
15011set dummy $ac_prog; ac_word=$2
15012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15013$as_echo_n "checking for $ac_word... " >&6; }
15014if ${ac_cv_path_CPIO+:} false; then :
15015  $as_echo_n "(cached) " >&6
15016else
15017  case $CPIO in
15018  [\\/]* | ?:[\\/]*)
15019  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15020  ;;
15021  *)
15022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15023for as_dir in $PATH
15024do
15025  IFS=$as_save_IFS
15026  test -z "$as_dir" && as_dir=.
15027    for ac_exec_ext in '' $ac_executable_extensions; do
15028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15029    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15031    break 2
15032  fi
15033done
15034  done
15035IFS=$as_save_IFS
15036
15037  ;;
15038esac
15039fi
15040CPIO=$ac_cv_path_CPIO
15041if test -n "$CPIO"; then
15042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15043$as_echo "$CPIO" >&6; }
15044else
15045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15046$as_echo "no" >&6; }
15047fi
15048
15049
15050  test -n "$CPIO" && break
15051done
15052
15053    else
15054      # If it succeeded, then it was overridden by the user. We will use it
15055      # for the tool.
15056
15057      # First remove it from the list of overridden variables, so we can test
15058      # for unknown variables in the end.
15059      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15060
15061      # Check if we try to supply an empty value
15062      if test "x$CPIO" = x; then
15063        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15064$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15065        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15066$as_echo_n "checking for CPIO... " >&6; }
15067        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15068$as_echo "disabled" >&6; }
15069      else
15070        # Check if the provided tool contains a complete path.
15071        tool_specified="$CPIO"
15072        tool_basename="${tool_specified##*/}"
15073        if test "x$tool_basename" = "x$tool_specified"; then
15074          # A command without a complete path is provided, search $PATH.
15075          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15076$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15077          # Extract the first word of "$tool_basename", so it can be a program name with args.
15078set dummy $tool_basename; ac_word=$2
15079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15080$as_echo_n "checking for $ac_word... " >&6; }
15081if ${ac_cv_path_CPIO+:} false; then :
15082  $as_echo_n "(cached) " >&6
15083else
15084  case $CPIO in
15085  [\\/]* | ?:[\\/]*)
15086  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15087  ;;
15088  *)
15089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15090for as_dir in $PATH
15091do
15092  IFS=$as_save_IFS
15093  test -z "$as_dir" && as_dir=.
15094    for ac_exec_ext in '' $ac_executable_extensions; do
15095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15096    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15098    break 2
15099  fi
15100done
15101  done
15102IFS=$as_save_IFS
15103
15104  ;;
15105esac
15106fi
15107CPIO=$ac_cv_path_CPIO
15108if test -n "$CPIO"; then
15109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15110$as_echo "$CPIO" >&6; }
15111else
15112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15113$as_echo "no" >&6; }
15114fi
15115
15116
15117          if test "x$CPIO" = x; then
15118            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15119          fi
15120        else
15121          # Otherwise we believe it is a complete path. Use it as it is.
15122          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15123$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15124          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15125$as_echo_n "checking for CPIO... " >&6; }
15126          if test ! -x "$tool_specified"; then
15127            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15128$as_echo "not found" >&6; }
15129            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15130          fi
15131          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15132$as_echo "$tool_specified" >&6; }
15133        fi
15134      fi
15135    fi
15136
15137  fi
15138
15139
15140
15141
15142  # Publish this variable in the help.
15143
15144
15145  if [ -z "${NICE+x}" ]; then
15146    # The variable is not set by user, try to locate tool using the code snippet
15147    for ac_prog in nice
15148do
15149  # Extract the first word of "$ac_prog", so it can be a program name with args.
15150set dummy $ac_prog; ac_word=$2
15151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15152$as_echo_n "checking for $ac_word... " >&6; }
15153if ${ac_cv_path_NICE+:} false; then :
15154  $as_echo_n "(cached) " >&6
15155else
15156  case $NICE in
15157  [\\/]* | ?:[\\/]*)
15158  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15159  ;;
15160  *)
15161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15162for as_dir in $PATH
15163do
15164  IFS=$as_save_IFS
15165  test -z "$as_dir" && as_dir=.
15166    for ac_exec_ext in '' $ac_executable_extensions; do
15167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15168    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15170    break 2
15171  fi
15172done
15173  done
15174IFS=$as_save_IFS
15175
15176  ;;
15177esac
15178fi
15179NICE=$ac_cv_path_NICE
15180if test -n "$NICE"; then
15181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15182$as_echo "$NICE" >&6; }
15183else
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15185$as_echo "no" >&6; }
15186fi
15187
15188
15189  test -n "$NICE" && break
15190done
15191
15192  else
15193    # The variable is set, but is it from the command line or the environment?
15194
15195    # Try to remove the string !NICE! from our list.
15196    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15197    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15198      # If it failed, the variable was not from the command line. Ignore it,
15199      # but warn the user (except for BASH, which is always set by the calling BASH).
15200      if test "xNICE" != xBASH; then
15201        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15202$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15203      fi
15204      # Try to locate tool using the code snippet
15205      for ac_prog in nice
15206do
15207  # Extract the first word of "$ac_prog", so it can be a program name with args.
15208set dummy $ac_prog; ac_word=$2
15209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15210$as_echo_n "checking for $ac_word... " >&6; }
15211if ${ac_cv_path_NICE+:} false; then :
15212  $as_echo_n "(cached) " >&6
15213else
15214  case $NICE in
15215  [\\/]* | ?:[\\/]*)
15216  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15217  ;;
15218  *)
15219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15220for as_dir in $PATH
15221do
15222  IFS=$as_save_IFS
15223  test -z "$as_dir" && as_dir=.
15224    for ac_exec_ext in '' $ac_executable_extensions; do
15225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15226    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15228    break 2
15229  fi
15230done
15231  done
15232IFS=$as_save_IFS
15233
15234  ;;
15235esac
15236fi
15237NICE=$ac_cv_path_NICE
15238if test -n "$NICE"; then
15239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15240$as_echo "$NICE" >&6; }
15241else
15242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15243$as_echo "no" >&6; }
15244fi
15245
15246
15247  test -n "$NICE" && break
15248done
15249
15250    else
15251      # If it succeeded, then it was overridden by the user. We will use it
15252      # for the tool.
15253
15254      # First remove it from the list of overridden variables, so we can test
15255      # for unknown variables in the end.
15256      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15257
15258      # Check if we try to supply an empty value
15259      if test "x$NICE" = x; then
15260        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15261$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15262        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15263$as_echo_n "checking for NICE... " >&6; }
15264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15265$as_echo "disabled" >&6; }
15266      else
15267        # Check if the provided tool contains a complete path.
15268        tool_specified="$NICE"
15269        tool_basename="${tool_specified##*/}"
15270        if test "x$tool_basename" = "x$tool_specified"; then
15271          # A command without a complete path is provided, search $PATH.
15272          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15273$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15274          # Extract the first word of "$tool_basename", so it can be a program name with args.
15275set dummy $tool_basename; ac_word=$2
15276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15277$as_echo_n "checking for $ac_word... " >&6; }
15278if ${ac_cv_path_NICE+:} false; then :
15279  $as_echo_n "(cached) " >&6
15280else
15281  case $NICE in
15282  [\\/]* | ?:[\\/]*)
15283  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15284  ;;
15285  *)
15286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15287for as_dir in $PATH
15288do
15289  IFS=$as_save_IFS
15290  test -z "$as_dir" && as_dir=.
15291    for ac_exec_ext in '' $ac_executable_extensions; do
15292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15293    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15295    break 2
15296  fi
15297done
15298  done
15299IFS=$as_save_IFS
15300
15301  ;;
15302esac
15303fi
15304NICE=$ac_cv_path_NICE
15305if test -n "$NICE"; then
15306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15307$as_echo "$NICE" >&6; }
15308else
15309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15310$as_echo "no" >&6; }
15311fi
15312
15313
15314          if test "x$NICE" = x; then
15315            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15316          fi
15317        else
15318          # Otherwise we believe it is a complete path. Use it as it is.
15319          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15320$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15321          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15322$as_echo_n "checking for NICE... " >&6; }
15323          if test ! -x "$tool_specified"; then
15324            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15325$as_echo "not found" >&6; }
15326            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15327          fi
15328          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15329$as_echo "$tool_specified" >&6; }
15330        fi
15331      fi
15332    fi
15333
15334  fi
15335
15336
15337
15338
15339  # Publish this variable in the help.
15340
15341
15342  if [ -z "${PANDOC+x}" ]; then
15343    # The variable is not set by user, try to locate tool using the code snippet
15344    for ac_prog in pandoc
15345do
15346  # Extract the first word of "$ac_prog", so it can be a program name with args.
15347set dummy $ac_prog; ac_word=$2
15348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15349$as_echo_n "checking for $ac_word... " >&6; }
15350if ${ac_cv_path_PANDOC+:} false; then :
15351  $as_echo_n "(cached) " >&6
15352else
15353  case $PANDOC in
15354  [\\/]* | ?:[\\/]*)
15355  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15356  ;;
15357  *)
15358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15359for as_dir in $PATH
15360do
15361  IFS=$as_save_IFS
15362  test -z "$as_dir" && as_dir=.
15363    for ac_exec_ext in '' $ac_executable_extensions; do
15364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15365    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15367    break 2
15368  fi
15369done
15370  done
15371IFS=$as_save_IFS
15372
15373  ;;
15374esac
15375fi
15376PANDOC=$ac_cv_path_PANDOC
15377if test -n "$PANDOC"; then
15378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15379$as_echo "$PANDOC" >&6; }
15380else
15381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15382$as_echo "no" >&6; }
15383fi
15384
15385
15386  test -n "$PANDOC" && break
15387done
15388
15389  else
15390    # The variable is set, but is it from the command line or the environment?
15391
15392    # Try to remove the string !PANDOC! from our list.
15393    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15394    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15395      # If it failed, the variable was not from the command line. Ignore it,
15396      # but warn the user (except for BASH, which is always set by the calling BASH).
15397      if test "xPANDOC" != xBASH; then
15398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15399$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15400      fi
15401      # Try to locate tool using the code snippet
15402      for ac_prog in pandoc
15403do
15404  # Extract the first word of "$ac_prog", so it can be a program name with args.
15405set dummy $ac_prog; ac_word=$2
15406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15407$as_echo_n "checking for $ac_word... " >&6; }
15408if ${ac_cv_path_PANDOC+:} false; then :
15409  $as_echo_n "(cached) " >&6
15410else
15411  case $PANDOC in
15412  [\\/]* | ?:[\\/]*)
15413  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15414  ;;
15415  *)
15416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15417for as_dir in $PATH
15418do
15419  IFS=$as_save_IFS
15420  test -z "$as_dir" && as_dir=.
15421    for ac_exec_ext in '' $ac_executable_extensions; do
15422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15423    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15425    break 2
15426  fi
15427done
15428  done
15429IFS=$as_save_IFS
15430
15431  ;;
15432esac
15433fi
15434PANDOC=$ac_cv_path_PANDOC
15435if test -n "$PANDOC"; then
15436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15437$as_echo "$PANDOC" >&6; }
15438else
15439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15440$as_echo "no" >&6; }
15441fi
15442
15443
15444  test -n "$PANDOC" && break
15445done
15446
15447    else
15448      # If it succeeded, then it was overridden by the user. We will use it
15449      # for the tool.
15450
15451      # First remove it from the list of overridden variables, so we can test
15452      # for unknown variables in the end.
15453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15454
15455      # Check if we try to supply an empty value
15456      if test "x$PANDOC" = x; then
15457        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15458$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15460$as_echo_n "checking for PANDOC... " >&6; }
15461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15462$as_echo "disabled" >&6; }
15463      else
15464        # Check if the provided tool contains a complete path.
15465        tool_specified="$PANDOC"
15466        tool_basename="${tool_specified##*/}"
15467        if test "x$tool_basename" = "x$tool_specified"; then
15468          # A command without a complete path is provided, search $PATH.
15469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15470$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15471          # Extract the first word of "$tool_basename", so it can be a program name with args.
15472set dummy $tool_basename; ac_word=$2
15473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15474$as_echo_n "checking for $ac_word... " >&6; }
15475if ${ac_cv_path_PANDOC+:} false; then :
15476  $as_echo_n "(cached) " >&6
15477else
15478  case $PANDOC in
15479  [\\/]* | ?:[\\/]*)
15480  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15481  ;;
15482  *)
15483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15484for as_dir in $PATH
15485do
15486  IFS=$as_save_IFS
15487  test -z "$as_dir" && as_dir=.
15488    for ac_exec_ext in '' $ac_executable_extensions; do
15489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15490    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15492    break 2
15493  fi
15494done
15495  done
15496IFS=$as_save_IFS
15497
15498  ;;
15499esac
15500fi
15501PANDOC=$ac_cv_path_PANDOC
15502if test -n "$PANDOC"; then
15503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15504$as_echo "$PANDOC" >&6; }
15505else
15506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15507$as_echo "no" >&6; }
15508fi
15509
15510
15511          if test "x$PANDOC" = x; then
15512            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15513          fi
15514        else
15515          # Otherwise we believe it is a complete path. Use it as it is.
15516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15517$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15518          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15519$as_echo_n "checking for PANDOC... " >&6; }
15520          if test ! -x "$tool_specified"; then
15521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15522$as_echo "not found" >&6; }
15523            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15524          fi
15525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15526$as_echo "$tool_specified" >&6; }
15527        fi
15528      fi
15529    fi
15530
15531  fi
15532
15533
15534
15535
15536# Now we can determine OpenJDK build and target platforms. This is required to
15537# have early on.
15538# Make sure we can run config.sub.
15539$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15540  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15541
15542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15543$as_echo_n "checking build system type... " >&6; }
15544if ${ac_cv_build+:} false; then :
15545  $as_echo_n "(cached) " >&6
15546else
15547  ac_build_alias=$build_alias
15548test "x$ac_build_alias" = x &&
15549  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15550test "x$ac_build_alias" = x &&
15551  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15552ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15553  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15554
15555fi
15556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15557$as_echo "$ac_cv_build" >&6; }
15558case $ac_cv_build in
15559*-*-*) ;;
15560*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15561esac
15562build=$ac_cv_build
15563ac_save_IFS=$IFS; IFS='-'
15564set x $ac_cv_build
15565shift
15566build_cpu=$1
15567build_vendor=$2
15568shift; shift
15569# Remember, the first character of IFS is used to create $*,
15570# except with old shells:
15571build_os=$*
15572IFS=$ac_save_IFS
15573case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15574
15575
15576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15577$as_echo_n "checking host system type... " >&6; }
15578if ${ac_cv_host+:} false; then :
15579  $as_echo_n "(cached) " >&6
15580else
15581  if test "x$host_alias" = x; then
15582  ac_cv_host=$ac_cv_build
15583else
15584  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15585    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15586fi
15587
15588fi
15589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15590$as_echo "$ac_cv_host" >&6; }
15591case $ac_cv_host in
15592*-*-*) ;;
15593*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15594esac
15595host=$ac_cv_host
15596ac_save_IFS=$IFS; IFS='-'
15597set x $ac_cv_host
15598shift
15599host_cpu=$1
15600host_vendor=$2
15601shift; shift
15602# Remember, the first character of IFS is used to create $*,
15603# except with old shells:
15604host_os=$*
15605IFS=$ac_save_IFS
15606case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15607
15608
15609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15610$as_echo_n "checking target system type... " >&6; }
15611if ${ac_cv_target+:} false; then :
15612  $as_echo_n "(cached) " >&6
15613else
15614  if test "x$target_alias" = x; then
15615  ac_cv_target=$ac_cv_host
15616else
15617  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15618    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15619fi
15620
15621fi
15622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15623$as_echo "$ac_cv_target" >&6; }
15624case $ac_cv_target in
15625*-*-*) ;;
15626*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15627esac
15628target=$ac_cv_target
15629ac_save_IFS=$IFS; IFS='-'
15630set x $ac_cv_target
15631shift
15632target_cpu=$1
15633target_vendor=$2
15634shift; shift
15635# Remember, the first character of IFS is used to create $*,
15636# except with old shells:
15637target_os=$*
15638IFS=$ac_save_IFS
15639case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15640
15641
15642# The aliases save the names the user supplied, while $host etc.
15643# will get canonicalized.
15644test -n "$target_alias" &&
15645  test "$program_prefix$program_suffix$program_transform_name" = \
15646    NONENONEs,x,x, &&
15647  program_prefix=${target_alias}-
15648
15649  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15650  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15651  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15652  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15653  # to use the configure naming style.
15654
15655
15656
15657
15658
15659  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15660  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15661  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15662  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15663  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15664  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15665
15666
15667
15668  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15669
15670  case "$build_os" in
15671    *linux*)
15672      VAR_OS=linux
15673      VAR_OS_TYPE=unix
15674      ;;
15675    *solaris*)
15676      VAR_OS=solaris
15677      VAR_OS_TYPE=unix
15678      ;;
15679    *darwin*)
15680      VAR_OS=macosx
15681      VAR_OS_TYPE=unix
15682      ;;
15683    *bsd*)
15684      VAR_OS=bsd
15685      VAR_OS_TYPE=unix
15686      ;;
15687    *cygwin*)
15688      VAR_OS=windows
15689      VAR_OS_ENV=windows.cygwin
15690      ;;
15691    *mingw*)
15692      VAR_OS=windows
15693      VAR_OS_ENV=windows.msys
15694      ;;
15695    *aix*)
15696      VAR_OS=aix
15697      VAR_OS_TYPE=unix
15698      ;;
15699    *)
15700      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15701      ;;
15702  esac
15703
15704
15705  # First argument is the cpu name from the trip/quad
15706  case "$build_cpu" in
15707    x86_64)
15708      VAR_CPU=x86_64
15709      VAR_CPU_ARCH=x86
15710      VAR_CPU_BITS=64
15711      VAR_CPU_ENDIAN=little
15712      ;;
15713    i?86)
15714      VAR_CPU=x86
15715      VAR_CPU_ARCH=x86
15716      VAR_CPU_BITS=32
15717      VAR_CPU_ENDIAN=little
15718      ;;
15719    arm*)
15720      VAR_CPU=arm
15721      VAR_CPU_ARCH=arm
15722      VAR_CPU_BITS=32
15723      VAR_CPU_ENDIAN=little
15724      ;;
15725    aarch64)
15726      VAR_CPU=aarch64
15727      VAR_CPU_ARCH=aarch64
15728      VAR_CPU_BITS=64
15729      VAR_CPU_ENDIAN=little
15730      ;;
15731    powerpc)
15732      VAR_CPU=ppc
15733      VAR_CPU_ARCH=ppc
15734      VAR_CPU_BITS=32
15735      VAR_CPU_ENDIAN=big
15736      ;;
15737    powerpc64)
15738      VAR_CPU=ppc64
15739      VAR_CPU_ARCH=ppc
15740      VAR_CPU_BITS=64
15741      VAR_CPU_ENDIAN=big
15742      ;;
15743    powerpc64le)
15744      VAR_CPU=ppc64le
15745      VAR_CPU_ARCH=ppc
15746      VAR_CPU_BITS=64
15747      VAR_CPU_ENDIAN=little
15748      ;;
15749    s390)
15750      VAR_CPU=s390
15751      VAR_CPU_ARCH=s390
15752      VAR_CPU_BITS=32
15753      VAR_CPU_ENDIAN=big
15754      ;;
15755    s390x)
15756      VAR_CPU=s390x
15757      VAR_CPU_ARCH=s390
15758      VAR_CPU_BITS=64
15759      VAR_CPU_ENDIAN=big
15760      ;;
15761    sparc)
15762      VAR_CPU=sparc
15763      VAR_CPU_ARCH=sparc
15764      VAR_CPU_BITS=32
15765      VAR_CPU_ENDIAN=big
15766      ;;
15767    sparcv9|sparc64)
15768      VAR_CPU=sparcv9
15769      VAR_CPU_ARCH=sparc
15770      VAR_CPU_BITS=64
15771      VAR_CPU_ENDIAN=big
15772      ;;
15773    *)
15774      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15775      ;;
15776  esac
15777
15778  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15779  OPENJDK_BUILD_OS="$VAR_OS"
15780  if test "x$VAR_OS_TYPE" != x; then
15781    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15782  else
15783    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15784  fi
15785  if test "x$VAR_OS_ENV" != x; then
15786    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15787  else
15788    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15789  fi
15790  OPENJDK_BUILD_CPU="$VAR_CPU"
15791  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15792  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15793  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15794
15795
15796
15797
15798
15799
15800
15801
15802  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15803$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15805$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15806
15807  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15808
15809  case "$host_os" in
15810    *linux*)
15811      VAR_OS=linux
15812      VAR_OS_TYPE=unix
15813      ;;
15814    *solaris*)
15815      VAR_OS=solaris
15816      VAR_OS_TYPE=unix
15817      ;;
15818    *darwin*)
15819      VAR_OS=macosx
15820      VAR_OS_TYPE=unix
15821      ;;
15822    *bsd*)
15823      VAR_OS=bsd
15824      VAR_OS_TYPE=unix
15825      ;;
15826    *cygwin*)
15827      VAR_OS=windows
15828      VAR_OS_ENV=windows.cygwin
15829      ;;
15830    *mingw*)
15831      VAR_OS=windows
15832      VAR_OS_ENV=windows.msys
15833      ;;
15834    *aix*)
15835      VAR_OS=aix
15836      VAR_OS_TYPE=unix
15837      ;;
15838    *)
15839      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15840      ;;
15841  esac
15842
15843
15844  # First argument is the cpu name from the trip/quad
15845  case "$host_cpu" in
15846    x86_64)
15847      VAR_CPU=x86_64
15848      VAR_CPU_ARCH=x86
15849      VAR_CPU_BITS=64
15850      VAR_CPU_ENDIAN=little
15851      ;;
15852    i?86)
15853      VAR_CPU=x86
15854      VAR_CPU_ARCH=x86
15855      VAR_CPU_BITS=32
15856      VAR_CPU_ENDIAN=little
15857      ;;
15858    arm*)
15859      VAR_CPU=arm
15860      VAR_CPU_ARCH=arm
15861      VAR_CPU_BITS=32
15862      VAR_CPU_ENDIAN=little
15863      ;;
15864    aarch64)
15865      VAR_CPU=aarch64
15866      VAR_CPU_ARCH=aarch64
15867      VAR_CPU_BITS=64
15868      VAR_CPU_ENDIAN=little
15869      ;;
15870    powerpc)
15871      VAR_CPU=ppc
15872      VAR_CPU_ARCH=ppc
15873      VAR_CPU_BITS=32
15874      VAR_CPU_ENDIAN=big
15875      ;;
15876    powerpc64)
15877      VAR_CPU=ppc64
15878      VAR_CPU_ARCH=ppc
15879      VAR_CPU_BITS=64
15880      VAR_CPU_ENDIAN=big
15881      ;;
15882    powerpc64le)
15883      VAR_CPU=ppc64le
15884      VAR_CPU_ARCH=ppc
15885      VAR_CPU_BITS=64
15886      VAR_CPU_ENDIAN=little
15887      ;;
15888    s390)
15889      VAR_CPU=s390
15890      VAR_CPU_ARCH=s390
15891      VAR_CPU_BITS=32
15892      VAR_CPU_ENDIAN=big
15893      ;;
15894    s390x)
15895      VAR_CPU=s390x
15896      VAR_CPU_ARCH=s390
15897      VAR_CPU_BITS=64
15898      VAR_CPU_ENDIAN=big
15899      ;;
15900    sparc)
15901      VAR_CPU=sparc
15902      VAR_CPU_ARCH=sparc
15903      VAR_CPU_BITS=32
15904      VAR_CPU_ENDIAN=big
15905      ;;
15906    sparcv9|sparc64)
15907      VAR_CPU=sparcv9
15908      VAR_CPU_ARCH=sparc
15909      VAR_CPU_BITS=64
15910      VAR_CPU_ENDIAN=big
15911      ;;
15912    *)
15913      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15914      ;;
15915  esac
15916
15917  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15918  OPENJDK_TARGET_OS="$VAR_OS"
15919  if test "x$VAR_OS_TYPE" != x; then
15920    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15921  else
15922    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15923  fi
15924  if test "x$VAR_OS_ENV" != x; then
15925    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15926  else
15927    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15928  fi
15929  OPENJDK_TARGET_CPU="$VAR_CPU"
15930  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15931  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15932  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15933
15934
15935
15936
15937
15938
15939
15940
15941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15942$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15944$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15945
15946
15947
15948# Check whether --with-target-bits was given.
15949if test "${with_target_bits+set}" = set; then :
15950  withval=$with_target_bits;
15951fi
15952
15953
15954  # We have three types of compiles:
15955  # native  == normal compilation, target system == build system
15956  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15957  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15958  #
15959  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15960    # We're doing a proper cross-compilation
15961    COMPILE_TYPE="cross"
15962  else
15963    COMPILE_TYPE="native"
15964  fi
15965
15966  if test "x$with_target_bits" != x; then
15967    if test "x$COMPILE_TYPE" = "xcross"; then
15968      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15969    fi
15970
15971    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15972      # A reduced build is requested
15973      COMPILE_TYPE="reduced"
15974      OPENJDK_TARGET_CPU_BITS=32
15975      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15976        OPENJDK_TARGET_CPU=x86
15977      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15978        OPENJDK_TARGET_CPU=sparc
15979      else
15980        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15981      fi
15982    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15983      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
15984    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15985      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15986$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15987    else
15988      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15989    fi
15990  fi
15991
15992
15993  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15994$as_echo_n "checking compilation type... " >&6; }
15995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15996$as_echo "$COMPILE_TYPE" >&6; }
15997
15998
15999  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16000    OPENJDK_MODULE_TARGET_OS_NAME="macos"
16001  else
16002    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16003  fi
16004
16005  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16006    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16007  else
16008    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16009  fi
16010
16011  OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16012
16013
16014
16015  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16016    RELEASE_FILE_OS_NAME=SunOS
16017  fi
16018  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16019    RELEASE_FILE_OS_NAME=Linux
16020  fi
16021  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16022    RELEASE_FILE_OS_NAME=Windows
16023  fi
16024  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16025    RELEASE_FILE_OS_NAME="Darwin"
16026  fi
16027  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16028    RELEASE_FILE_OS_NAME="AIX"
16029  fi
16030  RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16031
16032
16033
16034
16035
16036
16037  # Also store the legacy naming of the cpu.
16038  # Ie i586 and amd64 instead of x86 and x86_64
16039  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16040  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16041    OPENJDK_TARGET_CPU_LEGACY="i586"
16042  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16043    # On all platforms except MacOSX replace x86_64 with amd64.
16044    OPENJDK_TARGET_CPU_LEGACY="amd64"
16045  fi
16046
16047
16048  # And the second legacy naming of the cpu.
16049  # Ie i386 and amd64 instead of x86 and x86_64.
16050  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16051  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16052    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16053  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16054    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16055  fi
16056
16057
16058  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16059  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16060  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16061  OPENJDK_TARGET_CPU_ISADIR=""
16062  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16063    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16064      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16065    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16066      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16067    fi
16068  fi
16069
16070
16071  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16072  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16073  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16074    # On linux only, we replace x86 with i386.
16075    OPENJDK_TARGET_CPU_OSARCH="i386"
16076  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16077    # On all platforms except macosx, we replace x86_64 with amd64.
16078    OPENJDK_TARGET_CPU_OSARCH="amd64"
16079  fi
16080
16081
16082  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16083  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16084    OPENJDK_TARGET_CPU_JLI="i386"
16085  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16086    # On all platforms except macosx, we replace x86_64 with amd64.
16087    OPENJDK_TARGET_CPU_JLI="amd64"
16088  fi
16089
16090  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16091      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16092  else
16093      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16094  fi
16095
16096
16097  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16098  # Macosx is osx and x86_64 is x64
16099  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16100    OPENJDK_TARGET_OS_BUNDLE="osx"
16101  else
16102    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16103  fi
16104  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16105    OPENJDK_TARGET_CPU_BUNDLE="x64"
16106  else
16107    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16108  fi
16109  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16110
16111
16112  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16113    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16114    # unpack200.exe. This variable is used in
16115    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16116    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16117      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16118    fi
16119  fi
16120
16121  if test "x$COMPILE_TYPE" = "xcross"; then
16122    # FIXME: ... or should this include reduced builds..?
16123    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16124  else
16125    DEFINE_CROSS_COMPILE_ARCH=""
16126  fi
16127
16128
16129  # Convert openjdk platform names to hotspot names
16130
16131  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16132  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16133    HOTSPOT_TARGET_OS=bsd
16134  fi
16135
16136
16137  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16138  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16139    HOTSPOT_TARGET_OS_TYPE=posix
16140  fi
16141
16142
16143  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16144  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16145    HOTSPOT_TARGET_CPU=x86_32
16146  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16147    HOTSPOT_TARGET_CPU=sparc
16148  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16149    HOTSPOT_TARGET_CPU=ppc_64
16150  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16151    HOTSPOT_TARGET_CPU=ppc_64
16152  fi
16153
16154
16155  # This is identical with OPENJDK_*, but define anyway for consistency.
16156  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16157
16158
16159  # Setup HOTSPOT_TARGET_CPU_DEFINE
16160  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16161    HOTSPOT_TARGET_CPU_DEFINE=IA32
16162  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16163    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16164  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16165    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16166  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16167    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16168  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16169    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16170  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16171    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16172
16173  # The cpu defines below are for zero, we don't support them directly.
16174  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16175    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16176  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16177    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16178  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16179    HOTSPOT_TARGET_CPU_DEFINE=S390
16180  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16181    HOTSPOT_TARGET_CPU_DEFINE=S390
16182  elif test "x$OPENJDK_TARGET_CPU" != x; then
16183    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16184  fi
16185
16186
16187
16188
16189  # Also store the legacy naming of the cpu.
16190  # Ie i586 and amd64 instead of x86 and x86_64
16191  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16192  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16193    OPENJDK_BUILD_CPU_LEGACY="i586"
16194  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16195    # On all platforms except MacOSX replace x86_64 with amd64.
16196    OPENJDK_BUILD_CPU_LEGACY="amd64"
16197  fi
16198
16199
16200  # And the second legacy naming of the cpu.
16201  # Ie i386 and amd64 instead of x86 and x86_64.
16202  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16203  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16204    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16205  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16206    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16207  fi
16208
16209
16210  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16211  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16212  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16213  OPENJDK_BUILD_CPU_ISADIR=""
16214  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16215    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16216      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16217    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16218      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16219    fi
16220  fi
16221
16222
16223  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16224  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16225  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16226    # On linux only, we replace x86 with i386.
16227    OPENJDK_BUILD_CPU_OSARCH="i386"
16228  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16229    # On all platforms except macosx, we replace x86_64 with amd64.
16230    OPENJDK_BUILD_CPU_OSARCH="amd64"
16231  fi
16232
16233
16234  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16235  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16236    OPENJDK_BUILD_CPU_JLI="i386"
16237  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16238    # On all platforms except macosx, we replace x86_64 with amd64.
16239    OPENJDK_BUILD_CPU_JLI="amd64"
16240  fi
16241
16242  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16243      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16244  else
16245      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16246  fi
16247
16248
16249  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16250  # Macosx is osx and x86_64 is x64
16251  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16252    OPENJDK_BUILD_OS_BUNDLE="osx"
16253  else
16254    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16255  fi
16256  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16257    OPENJDK_BUILD_CPU_BUNDLE="x64"
16258  else
16259    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16260  fi
16261  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16262
16263
16264  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16265    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16266    # unpack200.exe. This variable is used in
16267    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16268    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16269      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16270    fi
16271  fi
16272
16273  if test "x$COMPILE_TYPE" = "xcross"; then
16274    # FIXME: ... or should this include reduced builds..?
16275    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16276  else
16277    DEFINE_CROSS_COMPILE_ARCH=""
16278  fi
16279
16280
16281  # Convert openjdk platform names to hotspot names
16282
16283  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16284  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16285    HOTSPOT_BUILD_OS=bsd
16286  fi
16287
16288
16289  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16290  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16291    HOTSPOT_BUILD_OS_TYPE=posix
16292  fi
16293
16294
16295  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16296  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16297    HOTSPOT_BUILD_CPU=x86_32
16298  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16299    HOTSPOT_BUILD_CPU=sparc
16300  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16301    HOTSPOT_BUILD_CPU=ppc_64
16302  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16303    HOTSPOT_BUILD_CPU=ppc_64
16304  fi
16305
16306
16307  # This is identical with OPENJDK_*, but define anyway for consistency.
16308  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16309
16310
16311  # Setup HOTSPOT_BUILD_CPU_DEFINE
16312  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16313    HOTSPOT_BUILD_CPU_DEFINE=IA32
16314  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16315    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16316  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16317    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16318  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16319    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16320  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16321    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16322  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16323    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16324
16325  # The cpu defines below are for zero, we don't support them directly.
16326  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16327    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16328  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16329    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16330  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16331    HOTSPOT_BUILD_CPU_DEFINE=S390
16332  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16333    HOTSPOT_BUILD_CPU_DEFINE=S390
16334  elif test "x$OPENJDK_BUILD_CPU" != x; then
16335    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16336  fi
16337
16338
16339
16340
16341
16342
16343# Continue setting up basic stuff. Most remaining code require fundamental tools.
16344
16345  # Save the current directory this script was started from
16346  CURDIR="$PWD"
16347
16348  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16349  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16350  # was not available at that time.
16351  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16352  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16353    ORIGINAL_PATH="$REWRITTEN_PATH"
16354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16355$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16356  fi
16357
16358  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16359    PATH_SEP=";"
16360
16361  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16362  if test $SRC_ROOT_LENGTH -gt 100; then
16363    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16364  fi
16365
16366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16367    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16368$as_echo_n "checking cygwin release... " >&6; }
16369    CYGWIN_VERSION=`$UNAME -r`
16370    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16371$as_echo "$CYGWIN_VERSION" >&6; }
16372    WINDOWS_ENV_VENDOR='cygwin'
16373    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16374
16375    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16376    if test "x$CYGWIN_VERSION_OLD" != x; then
16377      { $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
16378$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;}
16379      as_fn_error $? "Cannot continue" "$LINENO" 5
16380    fi
16381    if test "x$CYGPATH" = x; then
16382      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16383    fi
16384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16385$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16386    # The cmd output ends with Windows line endings (CR/LF)
16387    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16388    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16389    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16391$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16392    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16393    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16394    if test "x$test_cygdrive_prefix" = x; then
16395      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16396    fi
16397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16398    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16399$as_echo_n "checking msys release... " >&6; }
16400    MSYS_VERSION=`$UNAME -r`
16401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16402$as_echo "$MSYS_VERSION" >&6; }
16403
16404    WINDOWS_ENV_VENDOR='msys'
16405    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16406
16407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16408$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16409    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16410    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16411
16412  windows_path="$MSYS_ROOT_PATH"
16413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16414    unix_path=`$CYGPATH -u "$windows_path"`
16415    MSYS_ROOT_PATH="$unix_path"
16416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16418    MSYS_ROOT_PATH="$unix_path"
16419  fi
16420
16421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16422$as_echo "$MSYS_ROOT_PATH" >&6; }
16423    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16424  else
16425    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16426  fi
16427
16428  # Test if windows or unix (cygwin/msys) find is first in path.
16429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16430$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16431  FIND_BINARY_OUTPUT=`find --version 2>&1`
16432  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16434$as_echo "unix style" >&6; }
16435  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16437$as_echo "Windows" >&6; }
16438    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16439$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16440    { $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
16441$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16442    as_fn_error $? "Cannot continue" "$LINENO" 5
16443  else
16444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16445$as_echo "unknown" >&6; }
16446    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16447$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16448  fi
16449
16450  else
16451    PATH_SEP=":"
16452  fi
16453
16454
16455  # We get the top-level directory from the supporting wrappers.
16456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16457$as_echo_n "checking for top-level directory... " >&6; }
16458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16459$as_echo "$TOPDIR" >&6; }
16460
16461
16462  # Save the original version of TOPDIR for string comparisons
16463  ORIGINAL_TOPDIR="$TOPDIR"
16464
16465
16466  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16467
16468  # Only process if variable expands to non-empty
16469
16470  if test "x$CURDIR" != x; then
16471    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16472
16473  # Input might be given as Windows format, start by converting to
16474  # unix format.
16475  path="$CURDIR"
16476  new_path=`$CYGPATH -u "$path"`
16477
16478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16481  # "foo.exe" is OK but "foo" is an error.
16482  #
16483  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16484  # It is also a way to make sure we got the proper file name for the real test later on.
16485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16486  if test "x$test_shortpath" = x; then
16487    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16488$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16489    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16490  fi
16491
16492  # Call helper function which possibly converts this using DOS-style short mode.
16493  # If so, the updated path is stored in $new_path.
16494
16495  input_path="$new_path"
16496  # Check if we need to convert this using DOS-style short mode. If the path
16497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16498  # take no chances and rewrite it.
16499  # Note: m4 eats our [], so we need to use [ and ] instead.
16500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16501  if test "x$has_forbidden_chars" != x; then
16502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16503    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16504    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16505    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16506      # Going to short mode and back again did indeed matter. Since short mode is
16507      # case insensitive, let's make it lowercase to improve readability.
16508      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16509      # Now convert it back to Unix-style (cygpath)
16510      input_path=`$CYGPATH -u "$shortmode_path"`
16511      new_path="$input_path"
16512    fi
16513  fi
16514
16515  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16516  if test "x$test_cygdrive_prefix" = x; then
16517    # As a simple fix, exclude /usr/bin since it's not a real path.
16518    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16519      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16520      # a path prefixed by /cygdrive for fixpath to work.
16521      new_path="$CYGWIN_ROOT_PATH$input_path"
16522    fi
16523  fi
16524
16525
16526  if test "x$path" != "x$new_path"; then
16527    CURDIR="$new_path"
16528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16529$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16530  fi
16531
16532    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16533
16534  path="$CURDIR"
16535  has_colon=`$ECHO $path | $GREP ^.:`
16536  new_path="$path"
16537  if test "x$has_colon" = x; then
16538    # Not in mixed or Windows style, start by that.
16539    new_path=`cmd //c echo $path`
16540  fi
16541
16542
16543  input_path="$new_path"
16544  # Check if we need to convert this using DOS-style short mode. If the path
16545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16546  # take no chances and rewrite it.
16547  # Note: m4 eats our [], so we need to use [ and ] instead.
16548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16549  if test "x$has_forbidden_chars" != x; then
16550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16551    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16552  fi
16553
16554
16555  windows_path="$new_path"
16556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16557    unix_path=`$CYGPATH -u "$windows_path"`
16558    new_path="$unix_path"
16559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16561    new_path="$unix_path"
16562  fi
16563
16564  if test "x$path" != "x$new_path"; then
16565    CURDIR="$new_path"
16566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16567$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16568  fi
16569
16570  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16571  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16572
16573    else
16574      # We're on a unix platform. Hooray! :)
16575      path="$CURDIR"
16576      has_space=`$ECHO "$path" | $GREP " "`
16577      if test "x$has_space" != x; then
16578        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16579$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16580        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16581      fi
16582
16583      # Use eval to expand a potential ~
16584      eval path="$path"
16585      if test ! -f "$path" && test ! -d "$path"; then
16586        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16587      fi
16588
16589      if test -d "$path"; then
16590        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16591      else
16592        dir="`$DIRNAME "$path"`"
16593        base="`$BASENAME "$path"`"
16594        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16595      fi
16596    fi
16597  fi
16598
16599
16600  # Only process if variable expands to non-empty
16601
16602  if test "x$TOPDIR" != x; then
16603    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16604
16605  # Input might be given as Windows format, start by converting to
16606  # unix format.
16607  path="$TOPDIR"
16608  new_path=`$CYGPATH -u "$path"`
16609
16610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16613  # "foo.exe" is OK but "foo" is an error.
16614  #
16615  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16616  # It is also a way to make sure we got the proper file name for the real test later on.
16617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16618  if test "x$test_shortpath" = x; then
16619    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16620$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16621    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16622  fi
16623
16624  # Call helper function which possibly converts this using DOS-style short mode.
16625  # If so, the updated path is stored in $new_path.
16626
16627  input_path="$new_path"
16628  # Check if we need to convert this using DOS-style short mode. If the path
16629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16630  # take no chances and rewrite it.
16631  # Note: m4 eats our [], so we need to use [ and ] instead.
16632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16633  if test "x$has_forbidden_chars" != x; then
16634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16638      # Going to short mode and back again did indeed matter. Since short mode is
16639      # case insensitive, let's make it lowercase to improve readability.
16640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16641      # Now convert it back to Unix-style (cygpath)
16642      input_path=`$CYGPATH -u "$shortmode_path"`
16643      new_path="$input_path"
16644    fi
16645  fi
16646
16647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16648  if test "x$test_cygdrive_prefix" = x; then
16649    # As a simple fix, exclude /usr/bin since it's not a real path.
16650    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16652      # a path prefixed by /cygdrive for fixpath to work.
16653      new_path="$CYGWIN_ROOT_PATH$input_path"
16654    fi
16655  fi
16656
16657
16658  if test "x$path" != "x$new_path"; then
16659    TOPDIR="$new_path"
16660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16661$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16662  fi
16663
16664    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16665
16666  path="$TOPDIR"
16667  has_colon=`$ECHO $path | $GREP ^.:`
16668  new_path="$path"
16669  if test "x$has_colon" = x; then
16670    # Not in mixed or Windows style, start by that.
16671    new_path=`cmd //c echo $path`
16672  fi
16673
16674
16675  input_path="$new_path"
16676  # Check if we need to convert this using DOS-style short mode. If the path
16677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16678  # take no chances and rewrite it.
16679  # Note: m4 eats our [], so we need to use [ and ] instead.
16680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16681  if test "x$has_forbidden_chars" != x; then
16682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16684  fi
16685
16686
16687  windows_path="$new_path"
16688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16689    unix_path=`$CYGPATH -u "$windows_path"`
16690    new_path="$unix_path"
16691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16693    new_path="$unix_path"
16694  fi
16695
16696  if test "x$path" != "x$new_path"; then
16697    TOPDIR="$new_path"
16698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16699$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16700  fi
16701
16702  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16703  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16704
16705    else
16706      # We're on a unix platform. Hooray! :)
16707      path="$TOPDIR"
16708      has_space=`$ECHO "$path" | $GREP " "`
16709      if test "x$has_space" != x; then
16710        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16711$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16712        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16713      fi
16714
16715      # Use eval to expand a potential ~
16716      eval path="$path"
16717      if test ! -f "$path" && test ! -d "$path"; then
16718        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16719      fi
16720
16721      if test -d "$path"; then
16722        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16723      else
16724        dir="`$DIRNAME "$path"`"
16725        base="`$BASENAME "$path"`"
16726        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16727      fi
16728    fi
16729  fi
16730
16731  # SRC_ROOT is a traditional alias for TOPDIR.
16732  SRC_ROOT=$TOPDIR
16733
16734  # Calculate a canonical version of TOPDIR for string comparisons
16735  CANONICAL_TOPDIR=$TOPDIR
16736
16737  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16738    # Follow a chain of symbolic links. Use readlink
16739    # where it exists, else fall back to horribly
16740    # complicated shell code.
16741    if test "x$READLINK_TESTED" != yes; then
16742      # On MacOSX there is a readlink tool with a different
16743      # purpose than the GNU readlink tool. Check the found readlink.
16744      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16745      if test "x$ISGNU" = x; then
16746        # A readlink that we do not know how to use.
16747        # Are there other non-GNU readlinks out there?
16748        READLINK_TESTED=yes
16749        READLINK=
16750      fi
16751    fi
16752
16753    if test "x$READLINK" != x; then
16754      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16755    else
16756      # Save the current directory for restoring afterwards
16757      STARTDIR=$PWD
16758      COUNTER=0
16759      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16760      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16761      cd $sym_link_dir
16762      # Use -P flag to resolve symlinks in directories.
16763      cd `$THEPWDCMD -P`
16764      sym_link_dir=`$THEPWDCMD -P`
16765      # Resolve file symlinks
16766      while test $COUNTER -lt 20; do
16767        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16768        if test "x$ISLINK" == x; then
16769          # This is not a symbolic link! We are done!
16770          break
16771        fi
16772        # Again resolve directory symlinks since the target of the just found
16773        # link could be in a different directory
16774        cd `$DIRNAME $ISLINK`
16775        sym_link_dir=`$THEPWDCMD -P`
16776        sym_link_file=`$BASENAME $ISLINK`
16777        let COUNTER=COUNTER+1
16778      done
16779      cd $STARTDIR
16780      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16781    fi
16782  fi
16783
16784
16785
16786  # Locate the directory of this script.
16787  AUTOCONF_DIR=$TOPDIR/common/autoconf
16788
16789  # Setup username (for use in adhoc version strings etc)
16790  # Outer [ ] to quote m4.
16791   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16792
16793
16794
16795# Check if it's a pure open build or if custom sources are to be used.
16796
16797  # Check whether --enable-openjdk-only was given.
16798if test "${enable_openjdk_only+set}" = set; then :
16799  enableval=$enable_openjdk_only;
16800else
16801  enable_openjdk_only="no"
16802fi
16803
16804
16805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16806$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16808$as_echo "$enable_openjdk_only" >&6; }
16809  if test "x$enable_openjdk_only" = "xyes"; then
16810    SUPPRESS_CUSTOM_EXTENSIONS="true"
16811  elif test "x$enable_openjdk_only" = "xno"; then
16812    SUPPRESS_CUSTOM_EXTENSIONS="false"
16813  else
16814    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16815  fi
16816
16817  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16818  # the IncludeCustomExtension macro.
16819
16820
16821# Check whether --with-custom-make-dir was given.
16822if test "${with_custom_make_dir+set}" = set; then :
16823  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
16824$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16825fi
16826
16827
16828
16829
16830# These are needed to be able to create a configuration name (and thus the output directory)
16831
16832  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16833$as_echo_n "checking which variant of the JDK to build... " >&6; }
16834
16835# Check whether --with-jdk-variant was given.
16836if test "${with_jdk_variant+set}" = set; then :
16837  withval=$with_jdk_variant;
16838fi
16839
16840
16841  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16842    JDK_VARIANT="normal"
16843  else
16844    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16845  fi
16846
16847
16848
16849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16850$as_echo "$JDK_VARIANT" >&6; }
16851
16852
16853  DEBUG_LEVEL="release"
16854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16855$as_echo_n "checking which debug level to use... " >&6; }
16856  # Check whether --enable-debug was given.
16857if test "${enable_debug+set}" = set; then :
16858  enableval=$enable_debug;
16859        ENABLE_DEBUG="${enableval}"
16860        DEBUG_LEVEL="fastdebug"
16861
16862else
16863  ENABLE_DEBUG="no"
16864fi
16865
16866
16867
16868# Check whether --with-debug-level was given.
16869if test "${with_debug_level+set}" = set; then :
16870  withval=$with_debug_level;
16871        DEBUG_LEVEL="${withval}"
16872        if test "x$ENABLE_DEBUG" = xyes; then
16873          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16874        fi
16875
16876fi
16877
16878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16879$as_echo "$DEBUG_LEVEL" >&6; }
16880
16881  if test "x$DEBUG_LEVEL" != xrelease && \
16882      test "x$DEBUG_LEVEL" != xoptimized && \
16883      test "x$DEBUG_LEVEL" != xfastdebug && \
16884      test "x$DEBUG_LEVEL" != xslowdebug; then
16885    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16886  fi
16887
16888  # Translate DEBUG_LEVEL to debug level used by Hotspot
16889  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16890  if test "x$DEBUG_LEVEL" = xrelease; then
16891    HOTSPOT_DEBUG_LEVEL="product"
16892  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16893    HOTSPOT_DEBUG_LEVEL="debug"
16894  fi
16895
16896  if test "x$DEBUG_LEVEL" = xoptimized; then
16897    # The debug level 'optimized' is a little special because it is currently only
16898    # applicable to the HotSpot build where it means to build a completely
16899    # optimized version of the VM without any debugging code (like for the
16900    # 'release' debug level which is called 'product' in the HotSpot build) but
16901    # with the exception that it can contain additional code which is otherwise
16902    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16903    # test new and/or experimental features which are not intended for customer
16904    # shipment. Because these new features need to be tested and benchmarked in
16905    # real world scenarios, we want to build the containing JDK at the 'release'
16906    # debug level.
16907    DEBUG_LEVEL="release"
16908  fi
16909
16910
16911
16912
16913
16914
16915# Check whether --with-jvm-variants was given.
16916if test "${with_jvm_variants+set}" = set; then :
16917  withval=$with_jvm_variants;
16918fi
16919
16920
16921
16922
16923# Check whether --with-cpu-port was given.
16924if test "${with_cpu_port+set}" = set; then :
16925  withval=$with_cpu_port;
16926fi
16927
16928
16929  if test "x$with_cpu_port" != x; then
16930    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16931      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16932    fi
16933    if test "x$with_cpu_port" != xarm64 && \
16934        test "x$with_cpu_port" != xaarch64; then
16935      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16936    fi
16937    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16938  fi
16939
16940
16941  if test "x$with_jvm_variants" = x; then
16942    with_jvm_variants="server"
16943  fi
16944  JVM_VARIANTS_OPT="$with_jvm_variants"
16945
16946  # Has the user listed more than one variant?
16947  # Additional [] needed to keep m4 from mangling shell constructs.
16948  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16949    BUILDING_MULTIPLE_JVM_VARIANTS=true
16950  else
16951    BUILDING_MULTIPLE_JVM_VARIANTS=false
16952  fi
16953  # Replace the commas with AND for use in the build directory name.
16954  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16955
16956  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16957$as_echo_n "checking which variants of the JVM to build... " >&6; }
16958  # JVM_VARIANTS is a space-separated list.
16959  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16960  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16962$as_echo "$JVM_VARIANTS" >&6; }
16963
16964  # Check that the selected variants are valid
16965
16966  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16967  # Notice that the original variant failes on SLES 10 and 11
16968  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16969  STACK=${JVM_VARIANTS// /$'\n'}
16970  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16971  if test "x$INVALID_VARIANTS" != x; then
16972    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16973$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16974    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16975  fi
16976
16977  # All "special" variants share the same output directory ("server")
16978  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16979  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16980  STACK=${JVM_VARIANTS// /$'\n'}
16981  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16982  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16983    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16984  fi
16985
16986  # The "main" variant is the one used by other libs to link against during the
16987  # build.
16988  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16989    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16990    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16991      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16992        JVM_VARIANT_MAIN="$variant"
16993        break
16994      fi
16995    done
16996  else
16997    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16998  fi
16999
17000
17001
17002
17003
17004  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17005    # zero behaves as a platform and rewrites these values. This is really weird. :(
17006    # We are guaranteed that we do not build any other variants when building zero.
17007    HOTSPOT_TARGET_CPU=zero
17008    HOTSPOT_TARGET_CPU_ARCH=zero
17009  fi
17010
17011
17012# With basic setup done, call the custom early hook.
17013
17014
17015# Check if we have devkits, extra paths or sysroot set.
17016
17017
17018# Check whether --with-devkit was given.
17019if test "${with_devkit+set}" = set; then :
17020  withval=$with_devkit;
17021
17022  # Only process if variable expands to non-empty
17023
17024  if test "x$with_devkit" != x; then
17025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17026
17027  # Input might be given as Windows format, start by converting to
17028  # unix format.
17029  path="$with_devkit"
17030  new_path=`$CYGPATH -u "$path"`
17031
17032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17035  # "foo.exe" is OK but "foo" is an error.
17036  #
17037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17038  # It is also a way to make sure we got the proper file name for the real test later on.
17039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17040  if test "x$test_shortpath" = x; then
17041    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17042$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17043    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17044  fi
17045
17046  # Call helper function which possibly converts this using DOS-style short mode.
17047  # If so, the updated path is stored in $new_path.
17048
17049  input_path="$new_path"
17050  # Check if we need to convert this using DOS-style short mode. If the path
17051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17052  # take no chances and rewrite it.
17053  # Note: m4 eats our [], so we need to use [ and ] instead.
17054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17055  if test "x$has_forbidden_chars" != x; then
17056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17060      # Going to short mode and back again did indeed matter. Since short mode is
17061      # case insensitive, let's make it lowercase to improve readability.
17062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17063      # Now convert it back to Unix-style (cygpath)
17064      input_path=`$CYGPATH -u "$shortmode_path"`
17065      new_path="$input_path"
17066    fi
17067  fi
17068
17069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17070  if test "x$test_cygdrive_prefix" = x; then
17071    # As a simple fix, exclude /usr/bin since it's not a real path.
17072    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17074      # a path prefixed by /cygdrive for fixpath to work.
17075      new_path="$CYGWIN_ROOT_PATH$input_path"
17076    fi
17077  fi
17078
17079
17080  if test "x$path" != "x$new_path"; then
17081    with_devkit="$new_path"
17082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17083$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17084  fi
17085
17086    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17087
17088  path="$with_devkit"
17089  has_colon=`$ECHO $path | $GREP ^.:`
17090  new_path="$path"
17091  if test "x$has_colon" = x; then
17092    # Not in mixed or Windows style, start by that.
17093    new_path=`cmd //c echo $path`
17094  fi
17095
17096
17097  input_path="$new_path"
17098  # Check if we need to convert this using DOS-style short mode. If the path
17099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17100  # take no chances and rewrite it.
17101  # Note: m4 eats our [], so we need to use [ and ] instead.
17102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17103  if test "x$has_forbidden_chars" != x; then
17104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17106  fi
17107
17108
17109  windows_path="$new_path"
17110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17111    unix_path=`$CYGPATH -u "$windows_path"`
17112    new_path="$unix_path"
17113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17115    new_path="$unix_path"
17116  fi
17117
17118  if test "x$path" != "x$new_path"; then
17119    with_devkit="$new_path"
17120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17121$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17122  fi
17123
17124  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17125  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17126
17127    else
17128      # We're on a unix platform. Hooray! :)
17129      path="$with_devkit"
17130      has_space=`$ECHO "$path" | $GREP " "`
17131      if test "x$has_space" != x; then
17132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17133$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17134        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17135      fi
17136
17137      # Use eval to expand a potential ~
17138      eval path="$path"
17139      if test ! -f "$path" && test ! -d "$path"; then
17140        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17141      fi
17142
17143      if test -d "$path"; then
17144        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17145      else
17146        dir="`$DIRNAME "$path"`"
17147        base="`$BASENAME "$path"`"
17148        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17149      fi
17150    fi
17151  fi
17152
17153        DEVKIT_ROOT="$with_devkit"
17154        # Check for a meta data info file in the root of the devkit
17155        if test -f "$DEVKIT_ROOT/devkit.info"; then
17156          . $DEVKIT_ROOT/devkit.info
17157          # This potentially sets the following:
17158          # A descriptive name of the devkit
17159
17160  if test "x$DEVKIT_NAME" = x; then
17161    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17162  fi
17163
17164          # Corresponds to --with-extra-path
17165
17166  if test "x$DEVKIT_EXTRA_PATH" = x; then
17167    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17168  fi
17169
17170          # Corresponds to --with-toolchain-path
17171
17172  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17173    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17174  fi
17175
17176          # Corresponds to --with-sysroot
17177
17178  if test "x$DEVKIT_SYSROOT" = x; then
17179    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17180  fi
17181
17182
17183          # Identifies the Visual Studio version in the devkit
17184
17185  if test "x$DEVKIT_VS_VERSION" = x; then
17186    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17187  fi
17188
17189          # The Visual Studio include environment variable
17190
17191  if test "x$DEVKIT_VS_INCLUDE" = x; then
17192    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17193  fi
17194
17195          # The Visual Studio lib environment variable
17196
17197  if test "x$DEVKIT_VS_LIB" = x; then
17198    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17199  fi
17200
17201          # Corresponds to --with-msvcr-dll
17202
17203  if test "x$DEVKIT_MSVCR_DLL" = x; then
17204    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17205  fi
17206
17207          # Corresponds to --with-msvcp-dll
17208
17209  if test "x$DEVKIT_MSVCP_DLL" = x; then
17210    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17211  fi
17212
17213        fi
17214
17215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17216$as_echo_n "checking for devkit... " >&6; }
17217        if test "x$DEVKIT_NAME" != x; then
17218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17219$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17220        else
17221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17222$as_echo "$DEVKIT_ROOT" >&6; }
17223        fi
17224
17225
17226  if test "x$DEVKIT_EXTRA_PATH" != x; then
17227    if test "x$EXTRA_PATH" = x; then
17228      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17229    else
17230      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17231    fi
17232  fi
17233
17234
17235        # Fallback default of just /bin if DEVKIT_PATH is not defined
17236        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17237          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17238        fi
17239
17240  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17241    if test "x$TOOLCHAIN_PATH" = x; then
17242      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17243    else
17244      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17245    fi
17246  fi
17247
17248
17249        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17250        # places for backwards compatiblity.
17251        if test "x$DEVKIT_SYSROOT" != x; then
17252          SYSROOT="$DEVKIT_SYSROOT"
17253        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17254          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17255        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17256          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17257        fi
17258
17259
17260fi
17261
17262
17263  # You can force the sysroot if the sysroot encoded into the compiler tools
17264  # is not correct.
17265
17266# Check whether --with-sys-root was given.
17267if test "${with_sys_root+set}" = set; then :
17268  withval=$with_sys_root; SYSROOT=$with_sys_root
17269
17270fi
17271
17272
17273
17274# Check whether --with-sysroot was given.
17275if test "${with_sysroot+set}" = set; then :
17276  withval=$with_sysroot; SYSROOT=$with_sysroot
17277
17278fi
17279
17280
17281
17282# Check whether --with-tools-dir was given.
17283if test "${with_tools_dir+set}" = set; then :
17284  withval=$with_tools_dir;
17285  if test "x$with_tools_dir" != x; then
17286    if test "x$TOOLCHAIN_PATH" = x; then
17287      TOOLCHAIN_PATH="$with_tools_dir"
17288    else
17289      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17290    fi
17291  fi
17292
17293
17294fi
17295
17296
17297
17298# Check whether --with-toolchain-path was given.
17299if test "${with_toolchain_path+set}" = set; then :
17300  withval=$with_toolchain_path;
17301  if test "x$with_toolchain_path" != x; then
17302    if test "x$TOOLCHAIN_PATH" = x; then
17303      TOOLCHAIN_PATH="$with_toolchain_path"
17304    else
17305      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17306    fi
17307  fi
17308
17309
17310fi
17311
17312
17313
17314# Check whether --with-extra-path was given.
17315if test "${with_extra_path+set}" = set; then :
17316  withval=$with_extra_path;
17317  if test "x$with_extra_path" != x; then
17318    if test "x$EXTRA_PATH" = x; then
17319      EXTRA_PATH="$with_extra_path"
17320    else
17321      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17322    fi
17323  fi
17324
17325
17326fi
17327
17328
17329  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17330    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17331    # If not, detect if Xcode is installed by running xcodebuild -version
17332    # if no Xcode installed, xcodebuild exits with 1
17333    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17334    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17335      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17336      # fall back on the stub binary in /usr/bin/xcodebuild
17337      # Extract the first word of "xcodebuild", so it can be a program name with args.
17338set dummy xcodebuild; ac_word=$2
17339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17340$as_echo_n "checking for $ac_word... " >&6; }
17341if ${ac_cv_path_XCODEBUILD+:} false; then :
17342  $as_echo_n "(cached) " >&6
17343else
17344  case $XCODEBUILD in
17345  [\\/]* | ?:[\\/]*)
17346  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17347  ;;
17348  *)
17349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17350for as_dir in $TOOLCHAIN_PATH
17351do
17352  IFS=$as_save_IFS
17353  test -z "$as_dir" && as_dir=.
17354    for ac_exec_ext in '' $ac_executable_extensions; do
17355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17356    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17358    break 2
17359  fi
17360done
17361  done
17362IFS=$as_save_IFS
17363
17364  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17365  ;;
17366esac
17367fi
17368XCODEBUILD=$ac_cv_path_XCODEBUILD
17369if test -n "$XCODEBUILD"; then
17370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17371$as_echo "$XCODEBUILD" >&6; }
17372else
17373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17374$as_echo "no" >&6; }
17375fi
17376
17377
17378    else
17379      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17380      # when only the command line tools are installed there are no SDKs, so headers
17381      # are copied into the system frameworks
17382      XCODEBUILD=
17383
17384    fi
17385
17386    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17387$as_echo_n "checking for sdk name... " >&6; }
17388
17389# Check whether --with-sdk-name was given.
17390if test "${with_sdk_name+set}" = set; then :
17391  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17392
17393fi
17394
17395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17396$as_echo "$SDKNAME" >&6; }
17397
17398    # if toolchain path is specified then don't rely on system headers, they may not compile
17399    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17400    test -z "$TOOLCHAIN_PATH" && \
17401      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17402
17403    if test -z "$SYSROOT"; then
17404      if test -n "$XCODEBUILD"; then
17405        # if we don't have system headers, use default SDK name (last resort)
17406        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17407          SDKNAME=${SDKNAME:-macosx}
17408        fi
17409
17410        if test -n "$SDKNAME"; then
17411          # Call xcodebuild to determine SYSROOT
17412          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17413        fi
17414      else
17415        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17416          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
17417        fi
17418      fi
17419    else
17420      # warn user if --with-sdk-name was also set
17421      if test -n "$with_sdk_name"; then
17422        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17423$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17424      fi
17425    fi
17426
17427    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17428      # If no system framework headers, then SYSROOT must be set, or we won't build
17429      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
17430    fi
17431
17432    # Perform a basic sanity test
17433    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17434      if test -z "$SYSROOT"; then
17435        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
17436      else
17437        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17438      fi
17439    fi
17440
17441    # set SDKROOT too, Xcode tools will pick it up
17442    SDKROOT="$SYSROOT"
17443
17444  fi
17445
17446  # Prepend the extra path to the global path
17447
17448  if test "x$EXTRA_PATH" != x; then
17449    if test "x$PATH" = x; then
17450      PATH="$EXTRA_PATH"
17451    else
17452      PATH="$EXTRA_PATH:$PATH"
17453    fi
17454  fi
17455
17456
17457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17458$as_echo_n "checking for sysroot... " >&6; }
17459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17460$as_echo "$SYSROOT" >&6; }
17461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17462$as_echo_n "checking for toolchain path... " >&6; }
17463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17464$as_echo "$TOOLCHAIN_PATH" >&6; }
17465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17466$as_echo_n "checking for extra path... " >&6; }
17467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17468$as_echo "$EXTRA_PATH" >&6; }
17469
17470
17471# To properly create a configuration name, we need to have the OpenJDK target
17472# and options (variants and debug level) parsed.
17473
17474
17475
17476# Check whether --with-conf-name was given.
17477if test "${with_conf_name+set}" = set; then :
17478  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17479fi
17480
17481
17482  # Test from where we are running configure, in or outside of src root.
17483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17484$as_echo_n "checking where to store configuration... " >&6; }
17485  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17486      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17487      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17488    # We are running configure from the src root.
17489    # Create a default ./build/target-variant-debuglevel output root.
17490    if test "x${CONF_NAME}" = x; then
17491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17492$as_echo "in default location" >&6; }
17493      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17494    else
17495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17496$as_echo "in build directory with custom name" >&6; }
17497    fi
17498    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17499    $MKDIR -p "$OUTPUT_ROOT"
17500    if test ! -d "$OUTPUT_ROOT"; then
17501      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17502    fi
17503  else
17504    # We are running configure from outside of the src dir.
17505    # Then use the current directory as output dir!
17506    # If configuration is situated in normal build directory, just use the build
17507    # directory name as configuration name, otherwise use the complete path.
17508    if test "x${CONF_NAME}" = x; then
17509      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17510    fi
17511    OUTPUT_ROOT="$CURDIR"
17512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17513$as_echo "in current directory" >&6; }
17514
17515    # WARNING: This might be a bad thing to do. You need to be sure you want to
17516    # have a configuration in this directory. Do some sanity checks!
17517
17518    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17519      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17520      # other files
17521      files_present=`$LS $OUTPUT_ROOT`
17522      # Configure has already touched config.log and confdefs.h in the current dir when this check
17523      # is performed.
17524      filtered_files=`$ECHO "$files_present" \
17525          | $SED -e 's/config.log//g' \
17526              -e 's/configure.log//g' \
17527              -e 's/confdefs.h//g' \
17528              -e 's/ //g' \
17529          | $TR -d '\n'`
17530      if test "x$filtered_files" != x; then
17531        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17532$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17533        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17534$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17535        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17536$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17537        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17538$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17539        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17540$as_echo "$as_me: seriously mess up just about everything." >&6;}
17541        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17542$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17543        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17544$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17545        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17546      fi
17547    fi
17548  fi
17549  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17550$as_echo_n "checking what configuration name to use... " >&6; }
17551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17552$as_echo "$CONF_NAME" >&6; }
17553
17554
17555  # Only process if variable expands to non-empty
17556
17557  if test "x$OUTPUT_ROOT" != x; then
17558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17559
17560  # Input might be given as Windows format, start by converting to
17561  # unix format.
17562  path="$OUTPUT_ROOT"
17563  new_path=`$CYGPATH -u "$path"`
17564
17565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17568  # "foo.exe" is OK but "foo" is an error.
17569  #
17570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17571  # It is also a way to make sure we got the proper file name for the real test later on.
17572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17573  if test "x$test_shortpath" = x; then
17574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17575$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17576    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17577  fi
17578
17579  # Call helper function which possibly converts this using DOS-style short mode.
17580  # If so, the updated path is stored in $new_path.
17581
17582  input_path="$new_path"
17583  # Check if we need to convert this using DOS-style short mode. If the path
17584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17585  # take no chances and rewrite it.
17586  # Note: m4 eats our [], so we need to use [ and ] instead.
17587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17588  if test "x$has_forbidden_chars" != x; then
17589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17593      # Going to short mode and back again did indeed matter. Since short mode is
17594      # case insensitive, let's make it lowercase to improve readability.
17595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17596      # Now convert it back to Unix-style (cygpath)
17597      input_path=`$CYGPATH -u "$shortmode_path"`
17598      new_path="$input_path"
17599    fi
17600  fi
17601
17602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17603  if test "x$test_cygdrive_prefix" = x; then
17604    # As a simple fix, exclude /usr/bin since it's not a real path.
17605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17607      # a path prefixed by /cygdrive for fixpath to work.
17608      new_path="$CYGWIN_ROOT_PATH$input_path"
17609    fi
17610  fi
17611
17612
17613  if test "x$path" != "x$new_path"; then
17614    OUTPUT_ROOT="$new_path"
17615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17616$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17617  fi
17618
17619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17620
17621  path="$OUTPUT_ROOT"
17622  has_colon=`$ECHO $path | $GREP ^.:`
17623  new_path="$path"
17624  if test "x$has_colon" = x; then
17625    # Not in mixed or Windows style, start by that.
17626    new_path=`cmd //c echo $path`
17627  fi
17628
17629
17630  input_path="$new_path"
17631  # Check if we need to convert this using DOS-style short mode. If the path
17632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17633  # take no chances and rewrite it.
17634  # Note: m4 eats our [], so we need to use [ and ] instead.
17635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17636  if test "x$has_forbidden_chars" != x; then
17637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17639  fi
17640
17641
17642  windows_path="$new_path"
17643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17644    unix_path=`$CYGPATH -u "$windows_path"`
17645    new_path="$unix_path"
17646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17648    new_path="$unix_path"
17649  fi
17650
17651  if test "x$path" != "x$new_path"; then
17652    OUTPUT_ROOT="$new_path"
17653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17654$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17655  fi
17656
17657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17659
17660    else
17661      # We're on a unix platform. Hooray! :)
17662      path="$OUTPUT_ROOT"
17663      has_space=`$ECHO "$path" | $GREP " "`
17664      if test "x$has_space" != x; then
17665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17666$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17668      fi
17669
17670      # Use eval to expand a potential ~
17671      eval path="$path"
17672      if test ! -f "$path" && test ! -d "$path"; then
17673        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17674      fi
17675
17676      if test -d "$path"; then
17677        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17678      else
17679        dir="`$DIRNAME "$path"`"
17680        base="`$BASENAME "$path"`"
17681        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17682      fi
17683    fi
17684  fi
17685
17686
17687  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17688  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17689
17690  SPEC="$OUTPUT_ROOT/spec.gmk"
17691
17692
17693
17694
17695
17696  # The spec.gmk file contains all variables for the make system.
17697  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17698
17699  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17700  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17701
17702  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17703  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17704
17705  # The compare.sh is used to compare the build output to other builds.
17706  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17707
17708  # The generated Makefile knows where the spec.gmk is and where the source is.
17709  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17710  # which will look for generated configurations
17711  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17712
17713
17714
17715# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17716
17717  for ac_prog in apt-get yum brew port pkgutil pkgadd
17718do
17719  # Extract the first word of "$ac_prog", so it can be a program name with args.
17720set dummy $ac_prog; ac_word=$2
17721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17722$as_echo_n "checking for $ac_word... " >&6; }
17723if ${ac_cv_prog_PKGHANDLER+:} false; then :
17724  $as_echo_n "(cached) " >&6
17725else
17726  if test -n "$PKGHANDLER"; then
17727  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17728else
17729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17730for as_dir in $PATH
17731do
17732  IFS=$as_save_IFS
17733  test -z "$as_dir" && as_dir=.
17734    for ac_exec_ext in '' $ac_executable_extensions; do
17735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17736    ac_cv_prog_PKGHANDLER="$ac_prog"
17737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17738    break 2
17739  fi
17740done
17741  done
17742IFS=$as_save_IFS
17743
17744fi
17745fi
17746PKGHANDLER=$ac_cv_prog_PKGHANDLER
17747if test -n "$PKGHANDLER"; then
17748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17749$as_echo "$PKGHANDLER" >&6; }
17750else
17751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17752$as_echo "no" >&6; }
17753fi
17754
17755
17756  test -n "$PKGHANDLER" && break
17757done
17758
17759
17760
17761# Setup tools that requires more complex handling, or that is not needed by the configure script.
17762
17763
17764
17765  # Publish this variable in the help.
17766
17767
17768  if [ -z "${MAKE+x}" ]; then
17769    # The variable is not set by user, try to locate tool using the code snippet
17770
17771    # Try our hardest to locate a correct version of GNU make
17772    for ac_prog in gmake
17773do
17774  # Extract the first word of "$ac_prog", so it can be a program name with args.
17775set dummy $ac_prog; ac_word=$2
17776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17777$as_echo_n "checking for $ac_word... " >&6; }
17778if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17779  $as_echo_n "(cached) " >&6
17780else
17781  case $CHECK_GMAKE in
17782  [\\/]* | ?:[\\/]*)
17783  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17784  ;;
17785  *)
17786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17787for as_dir in $PATH
17788do
17789  IFS=$as_save_IFS
17790  test -z "$as_dir" && as_dir=.
17791    for ac_exec_ext in '' $ac_executable_extensions; do
17792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17793    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17795    break 2
17796  fi
17797done
17798  done
17799IFS=$as_save_IFS
17800
17801  ;;
17802esac
17803fi
17804CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17805if test -n "$CHECK_GMAKE"; then
17806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17807$as_echo "$CHECK_GMAKE" >&6; }
17808else
17809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17810$as_echo "no" >&6; }
17811fi
17812
17813
17814  test -n "$CHECK_GMAKE" && break
17815done
17816
17817
17818  MAKE_CANDIDATE=""$CHECK_GMAKE""
17819  DESCRIPTION="gmake in PATH"
17820
17821  # On Cygwin, we require a newer version of make than on other platforms
17822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17823    MAKE_VERSION_EXPR="-e 4\."
17824    MAKE_REQUIRED_VERSION="4.0"
17825   else
17826    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17827    MAKE_REQUIRED_VERSION="3.81"
17828  fi
17829
17830  if test "x$MAKE_CANDIDATE" != x; then
17831    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17832$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17833    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17834    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17835    if test "x$IS_GNU_MAKE" = x; then
17836      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17837$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17838    else
17839      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17840      if test "x$IS_MODERN_MAKE" = x; then
17841        { $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
17842$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;}
17843      else
17844        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17845          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17846            MAKE_EXPECTED_ENV='cygwin'
17847          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17848            MAKE_EXPECTED_ENV='msys'
17849          else
17850            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17851          fi
17852          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17853          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17854        else
17855          # Not relevant for non-Windows
17856          IS_MAKE_CORRECT_ENV=true
17857        fi
17858        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17859          { $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
17860$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;}
17861        else
17862          FOUND_MAKE=$MAKE_CANDIDATE
17863
17864  # Only process if variable expands to non-empty
17865
17866  if test "x$FOUND_MAKE" != x; then
17867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17868
17869  # First separate the path from the arguments. This will split at the first
17870  # space.
17871  complete="$FOUND_MAKE"
17872  path="${complete%% *}"
17873  tmp="$complete EOL"
17874  arguments="${tmp#* }"
17875
17876  # Input might be given as Windows format, start by converting to
17877  # unix format.
17878  new_path=`$CYGPATH -u "$path"`
17879
17880  # Now try to locate executable using which
17881  new_path=`$WHICH "$new_path" 2> /dev/null`
17882  # bat and cmd files are not always considered executable in cygwin causing which
17883  # to not find them
17884  if test "x$new_path" = x \
17885      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17886      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17887    new_path=`$CYGPATH -u "$path"`
17888  fi
17889  if test "x$new_path" = x; then
17890    # Oops. Which didn't find the executable.
17891    # The splitting of arguments from the executable at a space might have been incorrect,
17892    # since paths with space are more likely in Windows. Give it another try with the whole
17893    # argument.
17894    path="$complete"
17895    arguments="EOL"
17896    new_path=`$CYGPATH -u "$path"`
17897    new_path=`$WHICH "$new_path" 2> /dev/null`
17898    # bat and cmd files are not always considered executable in cygwin causing which
17899    # to not find them
17900    if test "x$new_path" = x \
17901        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17902        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17903      new_path=`$CYGPATH -u "$path"`
17904    fi
17905    if test "x$new_path" = x; then
17906      # It's still not found. Now this is an unrecoverable error.
17907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17908$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17909      has_space=`$ECHO "$complete" | $GREP " "`
17910      if test "x$has_space" != x; then
17911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17913      fi
17914      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17915    fi
17916  fi
17917
17918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17921  # "foo.exe" is OK but "foo" is an error.
17922  #
17923  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17924  # It is also a way to make sure we got the proper file name for the real test later on.
17925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17926  if test "x$test_shortpath" = x; then
17927    # Short path failed, file does not exist as specified.
17928    # Try adding .exe or .cmd
17929    if test -f "${new_path}.exe"; then
17930      input_to_shortpath="${new_path}.exe"
17931    elif test -f "${new_path}.cmd"; then
17932      input_to_shortpath="${new_path}.cmd"
17933    else
17934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17935$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17936      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17937$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17938      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17939    fi
17940  else
17941    input_to_shortpath="$new_path"
17942  fi
17943
17944  # Call helper function which possibly converts this using DOS-style short mode.
17945  # If so, the updated path is stored in $new_path.
17946  new_path="$input_to_shortpath"
17947
17948  input_path="$input_to_shortpath"
17949  # Check if we need to convert this using DOS-style short mode. If the path
17950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17951  # take no chances and rewrite it.
17952  # Note: m4 eats our [], so we need to use [ and ] instead.
17953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17954  if test "x$has_forbidden_chars" != x; then
17955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17956    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17957    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17958    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17959      # Going to short mode and back again did indeed matter. Since short mode is
17960      # case insensitive, let's make it lowercase to improve readability.
17961      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17962      # Now convert it back to Unix-style (cygpath)
17963      input_path=`$CYGPATH -u "$shortmode_path"`
17964      new_path="$input_path"
17965    fi
17966  fi
17967
17968  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17969  if test "x$test_cygdrive_prefix" = x; then
17970    # As a simple fix, exclude /usr/bin since it's not a real path.
17971    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17972      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17973      # a path prefixed by /cygdrive for fixpath to work.
17974      new_path="$CYGWIN_ROOT_PATH$input_path"
17975    fi
17976  fi
17977
17978  # remove trailing .exe if any
17979  new_path="${new_path/%.exe/}"
17980
17981    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17982
17983  # First separate the path from the arguments. This will split at the first
17984  # space.
17985  complete="$FOUND_MAKE"
17986  path="${complete%% *}"
17987  tmp="$complete EOL"
17988  arguments="${tmp#* }"
17989
17990  # Input might be given as Windows format, start by converting to
17991  # unix format.
17992  new_path="$path"
17993
17994  windows_path="$new_path"
17995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17996    unix_path=`$CYGPATH -u "$windows_path"`
17997    new_path="$unix_path"
17998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18000    new_path="$unix_path"
18001  fi
18002
18003
18004  # Now try to locate executable using which
18005  new_path=`$WHICH "$new_path" 2> /dev/null`
18006
18007  if test "x$new_path" = x; then
18008    # Oops. Which didn't find the executable.
18009    # The splitting of arguments from the executable at a space might have been incorrect,
18010    # since paths with space are more likely in Windows. Give it another try with the whole
18011    # argument.
18012    path="$complete"
18013    arguments="EOL"
18014    new_path="$path"
18015
18016  windows_path="$new_path"
18017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18018    unix_path=`$CYGPATH -u "$windows_path"`
18019    new_path="$unix_path"
18020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18022    new_path="$unix_path"
18023  fi
18024
18025
18026    new_path=`$WHICH "$new_path" 2> /dev/null`
18027    # bat and cmd files are not always considered executable in MSYS causing which
18028    # to not find them
18029    if test "x$new_path" = x \
18030        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18031        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18032      new_path="$path"
18033
18034  windows_path="$new_path"
18035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18036    unix_path=`$CYGPATH -u "$windows_path"`
18037    new_path="$unix_path"
18038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18040    new_path="$unix_path"
18041  fi
18042
18043    fi
18044
18045    if test "x$new_path" = x; then
18046      # It's still not found. Now this is an unrecoverable error.
18047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18048$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18049      has_space=`$ECHO "$complete" | $GREP " "`
18050      if test "x$has_space" != x; then
18051        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18052$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18053      fi
18054      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18055    fi
18056  fi
18057
18058  # Now new_path has a complete unix path to the binary
18059  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18060    # Keep paths in /bin as-is, but remove trailing .exe if any
18061    new_path="${new_path/%.exe/}"
18062    # Do not save /bin paths to all_fixpath_prefixes!
18063  else
18064    # Not in mixed or Windows style, start by that.
18065    new_path=`cmd //c echo $new_path`
18066
18067  input_path="$new_path"
18068  # Check if we need to convert this using DOS-style short mode. If the path
18069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18070  # take no chances and rewrite it.
18071  # Note: m4 eats our [], so we need to use [ and ] instead.
18072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18073  if test "x$has_forbidden_chars" != x; then
18074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18075    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18076  fi
18077
18078    # Output is in $new_path
18079
18080  windows_path="$new_path"
18081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18082    unix_path=`$CYGPATH -u "$windows_path"`
18083    new_path="$unix_path"
18084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18086    new_path="$unix_path"
18087  fi
18088
18089    # remove trailing .exe if any
18090    new_path="${new_path/%.exe/}"
18091
18092    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18093    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18094  fi
18095
18096    else
18097      # We're on a unix platform. Hooray! :)
18098      # First separate the path from the arguments. This will split at the first
18099      # space.
18100      complete="$FOUND_MAKE"
18101      path="${complete%% *}"
18102      tmp="$complete EOL"
18103      arguments="${tmp#* }"
18104
18105      # Cannot rely on the command "which" here since it doesn't always work.
18106      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18107      if test -z "$is_absolute_path"; then
18108        # Path to executable is not absolute. Find it.
18109        IFS_save="$IFS"
18110        IFS=:
18111        for p in $PATH; do
18112          if test -f "$p/$path" && test -x "$p/$path"; then
18113            new_path="$p/$path"
18114            break
18115          fi
18116        done
18117        IFS="$IFS_save"
18118      else
18119        # This is an absolute path, we can use it without further modifications.
18120        new_path="$path"
18121      fi
18122
18123      if test "x$new_path" = x; then
18124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18125$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18126        has_space=`$ECHO "$complete" | $GREP " "`
18127        if test "x$has_space" != x; then
18128          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18129$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18130        fi
18131        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18132      fi
18133    fi
18134
18135    # Now join together the path and the arguments once again
18136    if test "x$arguments" != xEOL; then
18137      new_complete="$new_path ${arguments% *}"
18138    else
18139      new_complete="$new_path"
18140    fi
18141
18142    if test "x$complete" != "x$new_complete"; then
18143      FOUND_MAKE="$new_complete"
18144      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18145$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18146    fi
18147  fi
18148
18149        fi
18150      fi
18151    fi
18152  fi
18153
18154
18155    if test "x$FOUND_MAKE" = x; then
18156      for ac_prog in make
18157do
18158  # Extract the first word of "$ac_prog", so it can be a program name with args.
18159set dummy $ac_prog; ac_word=$2
18160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18161$as_echo_n "checking for $ac_word... " >&6; }
18162if ${ac_cv_path_CHECK_MAKE+:} false; then :
18163  $as_echo_n "(cached) " >&6
18164else
18165  case $CHECK_MAKE in
18166  [\\/]* | ?:[\\/]*)
18167  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18168  ;;
18169  *)
18170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18171for as_dir in $PATH
18172do
18173  IFS=$as_save_IFS
18174  test -z "$as_dir" && as_dir=.
18175    for ac_exec_ext in '' $ac_executable_extensions; do
18176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18177    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18179    break 2
18180  fi
18181done
18182  done
18183IFS=$as_save_IFS
18184
18185  ;;
18186esac
18187fi
18188CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18189if test -n "$CHECK_MAKE"; then
18190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18191$as_echo "$CHECK_MAKE" >&6; }
18192else
18193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18194$as_echo "no" >&6; }
18195fi
18196
18197
18198  test -n "$CHECK_MAKE" && break
18199done
18200
18201
18202  MAKE_CANDIDATE=""$CHECK_MAKE""
18203  DESCRIPTION="make in PATH"
18204
18205  # On Cygwin, we require a newer version of make than on other platforms
18206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18207    MAKE_VERSION_EXPR="-e 4\."
18208    MAKE_REQUIRED_VERSION="4.0"
18209   else
18210    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18211    MAKE_REQUIRED_VERSION="3.81"
18212  fi
18213
18214  if test "x$MAKE_CANDIDATE" != x; then
18215    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18216$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18217    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18218    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18219    if test "x$IS_GNU_MAKE" = x; then
18220      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18221$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18222    else
18223      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18224      if test "x$IS_MODERN_MAKE" = x; then
18225        { $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
18226$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;}
18227      else
18228        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18229          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18230            MAKE_EXPECTED_ENV='cygwin'
18231          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18232            MAKE_EXPECTED_ENV='msys'
18233          else
18234            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18235          fi
18236          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18237          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18238        else
18239          # Not relevant for non-Windows
18240          IS_MAKE_CORRECT_ENV=true
18241        fi
18242        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18243          { $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
18244$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;}
18245        else
18246          FOUND_MAKE=$MAKE_CANDIDATE
18247
18248  # Only process if variable expands to non-empty
18249
18250  if test "x$FOUND_MAKE" != x; then
18251    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18252
18253  # First separate the path from the arguments. This will split at the first
18254  # space.
18255  complete="$FOUND_MAKE"
18256  path="${complete%% *}"
18257  tmp="$complete EOL"
18258  arguments="${tmp#* }"
18259
18260  # Input might be given as Windows format, start by converting to
18261  # unix format.
18262  new_path=`$CYGPATH -u "$path"`
18263
18264  # Now try to locate executable using which
18265  new_path=`$WHICH "$new_path" 2> /dev/null`
18266  # bat and cmd files are not always considered executable in cygwin causing which
18267  # to not find them
18268  if test "x$new_path" = x \
18269      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18270      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18271    new_path=`$CYGPATH -u "$path"`
18272  fi
18273  if test "x$new_path" = x; then
18274    # Oops. Which didn't find the executable.
18275    # The splitting of arguments from the executable at a space might have been incorrect,
18276    # since paths with space are more likely in Windows. Give it another try with the whole
18277    # argument.
18278    path="$complete"
18279    arguments="EOL"
18280    new_path=`$CYGPATH -u "$path"`
18281    new_path=`$WHICH "$new_path" 2> /dev/null`
18282    # bat and cmd files are not always considered executable in cygwin causing which
18283    # to not find them
18284    if test "x$new_path" = x \
18285        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18286        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18287      new_path=`$CYGPATH -u "$path"`
18288    fi
18289    if test "x$new_path" = x; then
18290      # It's still not found. Now this is an unrecoverable error.
18291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18292$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18293      has_space=`$ECHO "$complete" | $GREP " "`
18294      if test "x$has_space" != x; then
18295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18297      fi
18298      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18299    fi
18300  fi
18301
18302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18305  # "foo.exe" is OK but "foo" is an error.
18306  #
18307  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18308  # It is also a way to make sure we got the proper file name for the real test later on.
18309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18310  if test "x$test_shortpath" = x; then
18311    # Short path failed, file does not exist as specified.
18312    # Try adding .exe or .cmd
18313    if test -f "${new_path}.exe"; then
18314      input_to_shortpath="${new_path}.exe"
18315    elif test -f "${new_path}.cmd"; then
18316      input_to_shortpath="${new_path}.cmd"
18317    else
18318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18319$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18320      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18321$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18322      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18323    fi
18324  else
18325    input_to_shortpath="$new_path"
18326  fi
18327
18328  # Call helper function which possibly converts this using DOS-style short mode.
18329  # If so, the updated path is stored in $new_path.
18330  new_path="$input_to_shortpath"
18331
18332  input_path="$input_to_shortpath"
18333  # Check if we need to convert this using DOS-style short mode. If the path
18334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18335  # take no chances and rewrite it.
18336  # Note: m4 eats our [], so we need to use [ and ] instead.
18337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18338  if test "x$has_forbidden_chars" != x; then
18339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18343      # Going to short mode and back again did indeed matter. Since short mode is
18344      # case insensitive, let's make it lowercase to improve readability.
18345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18346      # Now convert it back to Unix-style (cygpath)
18347      input_path=`$CYGPATH -u "$shortmode_path"`
18348      new_path="$input_path"
18349    fi
18350  fi
18351
18352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18353  if test "x$test_cygdrive_prefix" = x; then
18354    # As a simple fix, exclude /usr/bin since it's not a real path.
18355    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18357      # a path prefixed by /cygdrive for fixpath to work.
18358      new_path="$CYGWIN_ROOT_PATH$input_path"
18359    fi
18360  fi
18361
18362  # remove trailing .exe if any
18363  new_path="${new_path/%.exe/}"
18364
18365    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18366
18367  # First separate the path from the arguments. This will split at the first
18368  # space.
18369  complete="$FOUND_MAKE"
18370  path="${complete%% *}"
18371  tmp="$complete EOL"
18372  arguments="${tmp#* }"
18373
18374  # Input might be given as Windows format, start by converting to
18375  # unix format.
18376  new_path="$path"
18377
18378  windows_path="$new_path"
18379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18380    unix_path=`$CYGPATH -u "$windows_path"`
18381    new_path="$unix_path"
18382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18384    new_path="$unix_path"
18385  fi
18386
18387
18388  # Now try to locate executable using which
18389  new_path=`$WHICH "$new_path" 2> /dev/null`
18390
18391  if test "x$new_path" = x; then
18392    # Oops. Which didn't find the executable.
18393    # The splitting of arguments from the executable at a space might have been incorrect,
18394    # since paths with space are more likely in Windows. Give it another try with the whole
18395    # argument.
18396    path="$complete"
18397    arguments="EOL"
18398    new_path="$path"
18399
18400  windows_path="$new_path"
18401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18402    unix_path=`$CYGPATH -u "$windows_path"`
18403    new_path="$unix_path"
18404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18406    new_path="$unix_path"
18407  fi
18408
18409
18410    new_path=`$WHICH "$new_path" 2> /dev/null`
18411    # bat and cmd files are not always considered executable in MSYS causing which
18412    # to not find them
18413    if test "x$new_path" = x \
18414        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18415        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18416      new_path="$path"
18417
18418  windows_path="$new_path"
18419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18420    unix_path=`$CYGPATH -u "$windows_path"`
18421    new_path="$unix_path"
18422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18424    new_path="$unix_path"
18425  fi
18426
18427    fi
18428
18429    if test "x$new_path" = x; then
18430      # It's still not found. Now this is an unrecoverable error.
18431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18432$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18433      has_space=`$ECHO "$complete" | $GREP " "`
18434      if test "x$has_space" != x; then
18435        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18437      fi
18438      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18439    fi
18440  fi
18441
18442  # Now new_path has a complete unix path to the binary
18443  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18444    # Keep paths in /bin as-is, but remove trailing .exe if any
18445    new_path="${new_path/%.exe/}"
18446    # Do not save /bin paths to all_fixpath_prefixes!
18447  else
18448    # Not in mixed or Windows style, start by that.
18449    new_path=`cmd //c echo $new_path`
18450
18451  input_path="$new_path"
18452  # Check if we need to convert this using DOS-style short mode. If the path
18453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18454  # take no chances and rewrite it.
18455  # Note: m4 eats our [], so we need to use [ and ] instead.
18456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18457  if test "x$has_forbidden_chars" != x; then
18458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18460  fi
18461
18462    # Output is in $new_path
18463
18464  windows_path="$new_path"
18465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18466    unix_path=`$CYGPATH -u "$windows_path"`
18467    new_path="$unix_path"
18468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18470    new_path="$unix_path"
18471  fi
18472
18473    # remove trailing .exe if any
18474    new_path="${new_path/%.exe/}"
18475
18476    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18477    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18478  fi
18479
18480    else
18481      # We're on a unix platform. Hooray! :)
18482      # First separate the path from the arguments. This will split at the first
18483      # space.
18484      complete="$FOUND_MAKE"
18485      path="${complete%% *}"
18486      tmp="$complete EOL"
18487      arguments="${tmp#* }"
18488
18489      # Cannot rely on the command "which" here since it doesn't always work.
18490      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18491      if test -z "$is_absolute_path"; then
18492        # Path to executable is not absolute. Find it.
18493        IFS_save="$IFS"
18494        IFS=:
18495        for p in $PATH; do
18496          if test -f "$p/$path" && test -x "$p/$path"; then
18497            new_path="$p/$path"
18498            break
18499          fi
18500        done
18501        IFS="$IFS_save"
18502      else
18503        # This is an absolute path, we can use it without further modifications.
18504        new_path="$path"
18505      fi
18506
18507      if test "x$new_path" = x; then
18508        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18509$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18510        has_space=`$ECHO "$complete" | $GREP " "`
18511        if test "x$has_space" != x; then
18512          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18513$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18514        fi
18515        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18516      fi
18517    fi
18518
18519    # Now join together the path and the arguments once again
18520    if test "x$arguments" != xEOL; then
18521      new_complete="$new_path ${arguments% *}"
18522    else
18523      new_complete="$new_path"
18524    fi
18525
18526    if test "x$complete" != "x$new_complete"; then
18527      FOUND_MAKE="$new_complete"
18528      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18529$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18530    fi
18531  fi
18532
18533        fi
18534      fi
18535    fi
18536  fi
18537
18538    fi
18539
18540    if test "x$FOUND_MAKE" = x; then
18541      if test "x$TOOLCHAIN_PATH" != x; then
18542        # We have a toolchain path, check that as well before giving up.
18543        OLD_PATH=$PATH
18544        PATH=$TOOLCHAIN_PATH:$PATH
18545        for ac_prog in gmake
18546do
18547  # Extract the first word of "$ac_prog", so it can be a program name with args.
18548set dummy $ac_prog; ac_word=$2
18549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18550$as_echo_n "checking for $ac_word... " >&6; }
18551if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18552  $as_echo_n "(cached) " >&6
18553else
18554  case $CHECK_TOOLSDIR_GMAKE in
18555  [\\/]* | ?:[\\/]*)
18556  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18557  ;;
18558  *)
18559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18560for as_dir in $PATH
18561do
18562  IFS=$as_save_IFS
18563  test -z "$as_dir" && as_dir=.
18564    for ac_exec_ext in '' $ac_executable_extensions; do
18565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18566    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18568    break 2
18569  fi
18570done
18571  done
18572IFS=$as_save_IFS
18573
18574  ;;
18575esac
18576fi
18577CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18578if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18580$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18581else
18582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18583$as_echo "no" >&6; }
18584fi
18585
18586
18587  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18588done
18589
18590
18591  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18592  DESCRIPTION="gmake in tools-dir"
18593
18594  # On Cygwin, we require a newer version of make than on other platforms
18595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18596    MAKE_VERSION_EXPR="-e 4\."
18597    MAKE_REQUIRED_VERSION="4.0"
18598   else
18599    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18600    MAKE_REQUIRED_VERSION="3.81"
18601  fi
18602
18603  if test "x$MAKE_CANDIDATE" != x; then
18604    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18605$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18606    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18607    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18608    if test "x$IS_GNU_MAKE" = x; then
18609      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18610$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18611    else
18612      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18613      if test "x$IS_MODERN_MAKE" = x; then
18614        { $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
18615$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;}
18616      else
18617        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18618          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18619            MAKE_EXPECTED_ENV='cygwin'
18620          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18621            MAKE_EXPECTED_ENV='msys'
18622          else
18623            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18624          fi
18625          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18626          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18627        else
18628          # Not relevant for non-Windows
18629          IS_MAKE_CORRECT_ENV=true
18630        fi
18631        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18632          { $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
18633$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;}
18634        else
18635          FOUND_MAKE=$MAKE_CANDIDATE
18636
18637  # Only process if variable expands to non-empty
18638
18639  if test "x$FOUND_MAKE" != x; then
18640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18641
18642  # First separate the path from the arguments. This will split at the first
18643  # space.
18644  complete="$FOUND_MAKE"
18645  path="${complete%% *}"
18646  tmp="$complete EOL"
18647  arguments="${tmp#* }"
18648
18649  # Input might be given as Windows format, start by converting to
18650  # unix format.
18651  new_path=`$CYGPATH -u "$path"`
18652
18653  # Now try to locate executable using which
18654  new_path=`$WHICH "$new_path" 2> /dev/null`
18655  # bat and cmd files are not always considered executable in cygwin causing which
18656  # to not find them
18657  if test "x$new_path" = x \
18658      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18659      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18660    new_path=`$CYGPATH -u "$path"`
18661  fi
18662  if test "x$new_path" = x; then
18663    # Oops. Which didn't find the executable.
18664    # The splitting of arguments from the executable at a space might have been incorrect,
18665    # since paths with space are more likely in Windows. Give it another try with the whole
18666    # argument.
18667    path="$complete"
18668    arguments="EOL"
18669    new_path=`$CYGPATH -u "$path"`
18670    new_path=`$WHICH "$new_path" 2> /dev/null`
18671    # bat and cmd files are not always considered executable in cygwin causing which
18672    # to not find them
18673    if test "x$new_path" = x \
18674        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18675        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18676      new_path=`$CYGPATH -u "$path"`
18677    fi
18678    if test "x$new_path" = x; then
18679      # It's still not found. Now this is an unrecoverable error.
18680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18681$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18682      has_space=`$ECHO "$complete" | $GREP " "`
18683      if test "x$has_space" != x; then
18684        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18685$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18686      fi
18687      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18688    fi
18689  fi
18690
18691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18694  # "foo.exe" is OK but "foo" is an error.
18695  #
18696  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18697  # It is also a way to make sure we got the proper file name for the real test later on.
18698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18699  if test "x$test_shortpath" = x; then
18700    # Short path failed, file does not exist as specified.
18701    # Try adding .exe or .cmd
18702    if test -f "${new_path}.exe"; then
18703      input_to_shortpath="${new_path}.exe"
18704    elif test -f "${new_path}.cmd"; then
18705      input_to_shortpath="${new_path}.cmd"
18706    else
18707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18708$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18709      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18710$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18711      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18712    fi
18713  else
18714    input_to_shortpath="$new_path"
18715  fi
18716
18717  # Call helper function which possibly converts this using DOS-style short mode.
18718  # If so, the updated path is stored in $new_path.
18719  new_path="$input_to_shortpath"
18720
18721  input_path="$input_to_shortpath"
18722  # Check if we need to convert this using DOS-style short mode. If the path
18723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18724  # take no chances and rewrite it.
18725  # Note: m4 eats our [], so we need to use [ and ] instead.
18726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18727  if test "x$has_forbidden_chars" != x; then
18728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18732      # Going to short mode and back again did indeed matter. Since short mode is
18733      # case insensitive, let's make it lowercase to improve readability.
18734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18735      # Now convert it back to Unix-style (cygpath)
18736      input_path=`$CYGPATH -u "$shortmode_path"`
18737      new_path="$input_path"
18738    fi
18739  fi
18740
18741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18742  if test "x$test_cygdrive_prefix" = x; then
18743    # As a simple fix, exclude /usr/bin since it's not a real path.
18744    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18746      # a path prefixed by /cygdrive for fixpath to work.
18747      new_path="$CYGWIN_ROOT_PATH$input_path"
18748    fi
18749  fi
18750
18751  # remove trailing .exe if any
18752  new_path="${new_path/%.exe/}"
18753
18754    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18755
18756  # First separate the path from the arguments. This will split at the first
18757  # space.
18758  complete="$FOUND_MAKE"
18759  path="${complete%% *}"
18760  tmp="$complete EOL"
18761  arguments="${tmp#* }"
18762
18763  # Input might be given as Windows format, start by converting to
18764  # unix format.
18765  new_path="$path"
18766
18767  windows_path="$new_path"
18768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18769    unix_path=`$CYGPATH -u "$windows_path"`
18770    new_path="$unix_path"
18771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18773    new_path="$unix_path"
18774  fi
18775
18776
18777  # Now try to locate executable using which
18778  new_path=`$WHICH "$new_path" 2> /dev/null`
18779
18780  if test "x$new_path" = x; then
18781    # Oops. Which didn't find the executable.
18782    # The splitting of arguments from the executable at a space might have been incorrect,
18783    # since paths with space are more likely in Windows. Give it another try with the whole
18784    # argument.
18785    path="$complete"
18786    arguments="EOL"
18787    new_path="$path"
18788
18789  windows_path="$new_path"
18790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18791    unix_path=`$CYGPATH -u "$windows_path"`
18792    new_path="$unix_path"
18793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18795    new_path="$unix_path"
18796  fi
18797
18798
18799    new_path=`$WHICH "$new_path" 2> /dev/null`
18800    # bat and cmd files are not always considered executable in MSYS causing which
18801    # to not find them
18802    if test "x$new_path" = x \
18803        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18804        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18805      new_path="$path"
18806
18807  windows_path="$new_path"
18808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18809    unix_path=`$CYGPATH -u "$windows_path"`
18810    new_path="$unix_path"
18811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18813    new_path="$unix_path"
18814  fi
18815
18816    fi
18817
18818    if test "x$new_path" = x; then
18819      # It's still not found. Now this is an unrecoverable error.
18820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18821$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18822      has_space=`$ECHO "$complete" | $GREP " "`
18823      if test "x$has_space" != x; then
18824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18826      fi
18827      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18828    fi
18829  fi
18830
18831  # Now new_path has a complete unix path to the binary
18832  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18833    # Keep paths in /bin as-is, but remove trailing .exe if any
18834    new_path="${new_path/%.exe/}"
18835    # Do not save /bin paths to all_fixpath_prefixes!
18836  else
18837    # Not in mixed or Windows style, start by that.
18838    new_path=`cmd //c echo $new_path`
18839
18840  input_path="$new_path"
18841  # Check if we need to convert this using DOS-style short mode. If the path
18842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18843  # take no chances and rewrite it.
18844  # Note: m4 eats our [], so we need to use [ and ] instead.
18845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18846  if test "x$has_forbidden_chars" != x; then
18847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18848    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18849  fi
18850
18851    # Output is in $new_path
18852
18853  windows_path="$new_path"
18854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18855    unix_path=`$CYGPATH -u "$windows_path"`
18856    new_path="$unix_path"
18857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18859    new_path="$unix_path"
18860  fi
18861
18862    # remove trailing .exe if any
18863    new_path="${new_path/%.exe/}"
18864
18865    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18866    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18867  fi
18868
18869    else
18870      # We're on a unix platform. Hooray! :)
18871      # First separate the path from the arguments. This will split at the first
18872      # space.
18873      complete="$FOUND_MAKE"
18874      path="${complete%% *}"
18875      tmp="$complete EOL"
18876      arguments="${tmp#* }"
18877
18878      # Cannot rely on the command "which" here since it doesn't always work.
18879      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18880      if test -z "$is_absolute_path"; then
18881        # Path to executable is not absolute. Find it.
18882        IFS_save="$IFS"
18883        IFS=:
18884        for p in $PATH; do
18885          if test -f "$p/$path" && test -x "$p/$path"; then
18886            new_path="$p/$path"
18887            break
18888          fi
18889        done
18890        IFS="$IFS_save"
18891      else
18892        # This is an absolute path, we can use it without further modifications.
18893        new_path="$path"
18894      fi
18895
18896      if test "x$new_path" = x; then
18897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18898$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18899        has_space=`$ECHO "$complete" | $GREP " "`
18900        if test "x$has_space" != x; then
18901          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18902$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18903        fi
18904        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18905      fi
18906    fi
18907
18908    # Now join together the path and the arguments once again
18909    if test "x$arguments" != xEOL; then
18910      new_complete="$new_path ${arguments% *}"
18911    else
18912      new_complete="$new_path"
18913    fi
18914
18915    if test "x$complete" != "x$new_complete"; then
18916      FOUND_MAKE="$new_complete"
18917      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18918$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18919    fi
18920  fi
18921
18922        fi
18923      fi
18924    fi
18925  fi
18926
18927        if test "x$FOUND_MAKE" = x; then
18928          for ac_prog in make
18929do
18930  # Extract the first word of "$ac_prog", so it can be a program name with args.
18931set dummy $ac_prog; ac_word=$2
18932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18933$as_echo_n "checking for $ac_word... " >&6; }
18934if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18935  $as_echo_n "(cached) " >&6
18936else
18937  case $CHECK_TOOLSDIR_MAKE in
18938  [\\/]* | ?:[\\/]*)
18939  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18940  ;;
18941  *)
18942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18943for as_dir in $PATH
18944do
18945  IFS=$as_save_IFS
18946  test -z "$as_dir" && as_dir=.
18947    for ac_exec_ext in '' $ac_executable_extensions; do
18948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18949    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18951    break 2
18952  fi
18953done
18954  done
18955IFS=$as_save_IFS
18956
18957  ;;
18958esac
18959fi
18960CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18961if test -n "$CHECK_TOOLSDIR_MAKE"; then
18962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18963$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18964else
18965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18966$as_echo "no" >&6; }
18967fi
18968
18969
18970  test -n "$CHECK_TOOLSDIR_MAKE" && break
18971done
18972
18973
18974  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18975  DESCRIPTION="make in tools-dir"
18976
18977  # On Cygwin, we require a newer version of make than on other platforms
18978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18979    MAKE_VERSION_EXPR="-e 4\."
18980    MAKE_REQUIRED_VERSION="4.0"
18981   else
18982    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18983    MAKE_REQUIRED_VERSION="3.81"
18984  fi
18985
18986  if test "x$MAKE_CANDIDATE" != x; then
18987    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18988$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18989    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18990    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18991    if test "x$IS_GNU_MAKE" = x; then
18992      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18993$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18994    else
18995      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18996      if test "x$IS_MODERN_MAKE" = x; then
18997        { $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
18998$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;}
18999      else
19000        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19001          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19002            MAKE_EXPECTED_ENV='cygwin'
19003          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19004            MAKE_EXPECTED_ENV='msys'
19005          else
19006            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19007          fi
19008          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19009          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19010        else
19011          # Not relevant for non-Windows
19012          IS_MAKE_CORRECT_ENV=true
19013        fi
19014        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19015          { $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
19016$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;}
19017        else
19018          FOUND_MAKE=$MAKE_CANDIDATE
19019
19020  # Only process if variable expands to non-empty
19021
19022  if test "x$FOUND_MAKE" != x; then
19023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19024
19025  # First separate the path from the arguments. This will split at the first
19026  # space.
19027  complete="$FOUND_MAKE"
19028  path="${complete%% *}"
19029  tmp="$complete EOL"
19030  arguments="${tmp#* }"
19031
19032  # Input might be given as Windows format, start by converting to
19033  # unix format.
19034  new_path=`$CYGPATH -u "$path"`
19035
19036  # Now try to locate executable using which
19037  new_path=`$WHICH "$new_path" 2> /dev/null`
19038  # bat and cmd files are not always considered executable in cygwin causing which
19039  # to not find them
19040  if test "x$new_path" = x \
19041      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19042      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19043    new_path=`$CYGPATH -u "$path"`
19044  fi
19045  if test "x$new_path" = x; then
19046    # Oops. Which didn't find the executable.
19047    # The splitting of arguments from the executable at a space might have been incorrect,
19048    # since paths with space are more likely in Windows. Give it another try with the whole
19049    # argument.
19050    path="$complete"
19051    arguments="EOL"
19052    new_path=`$CYGPATH -u "$path"`
19053    new_path=`$WHICH "$new_path" 2> /dev/null`
19054    # bat and cmd files are not always considered executable in cygwin causing which
19055    # to not find them
19056    if test "x$new_path" = x \
19057        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19058        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19059      new_path=`$CYGPATH -u "$path"`
19060    fi
19061    if test "x$new_path" = x; then
19062      # It's still not found. Now this is an unrecoverable error.
19063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19064$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19065      has_space=`$ECHO "$complete" | $GREP " "`
19066      if test "x$has_space" != x; then
19067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19069      fi
19070      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19071    fi
19072  fi
19073
19074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19077  # "foo.exe" is OK but "foo" is an error.
19078  #
19079  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19080  # It is also a way to make sure we got the proper file name for the real test later on.
19081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19082  if test "x$test_shortpath" = x; then
19083    # Short path failed, file does not exist as specified.
19084    # Try adding .exe or .cmd
19085    if test -f "${new_path}.exe"; then
19086      input_to_shortpath="${new_path}.exe"
19087    elif test -f "${new_path}.cmd"; then
19088      input_to_shortpath="${new_path}.cmd"
19089    else
19090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19091$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19092      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19093$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19094      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19095    fi
19096  else
19097    input_to_shortpath="$new_path"
19098  fi
19099
19100  # Call helper function which possibly converts this using DOS-style short mode.
19101  # If so, the updated path is stored in $new_path.
19102  new_path="$input_to_shortpath"
19103
19104  input_path="$input_to_shortpath"
19105  # Check if we need to convert this using DOS-style short mode. If the path
19106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19107  # take no chances and rewrite it.
19108  # Note: m4 eats our [], so we need to use [ and ] instead.
19109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19110  if test "x$has_forbidden_chars" != x; then
19111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19115      # Going to short mode and back again did indeed matter. Since short mode is
19116      # case insensitive, let's make it lowercase to improve readability.
19117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19118      # Now convert it back to Unix-style (cygpath)
19119      input_path=`$CYGPATH -u "$shortmode_path"`
19120      new_path="$input_path"
19121    fi
19122  fi
19123
19124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19125  if test "x$test_cygdrive_prefix" = x; then
19126    # As a simple fix, exclude /usr/bin since it's not a real path.
19127    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19129      # a path prefixed by /cygdrive for fixpath to work.
19130      new_path="$CYGWIN_ROOT_PATH$input_path"
19131    fi
19132  fi
19133
19134  # remove trailing .exe if any
19135  new_path="${new_path/%.exe/}"
19136
19137    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19138
19139  # First separate the path from the arguments. This will split at the first
19140  # space.
19141  complete="$FOUND_MAKE"
19142  path="${complete%% *}"
19143  tmp="$complete EOL"
19144  arguments="${tmp#* }"
19145
19146  # Input might be given as Windows format, start by converting to
19147  # unix format.
19148  new_path="$path"
19149
19150  windows_path="$new_path"
19151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19152    unix_path=`$CYGPATH -u "$windows_path"`
19153    new_path="$unix_path"
19154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19156    new_path="$unix_path"
19157  fi
19158
19159
19160  # Now try to locate executable using which
19161  new_path=`$WHICH "$new_path" 2> /dev/null`
19162
19163  if test "x$new_path" = x; then
19164    # Oops. Which didn't find the executable.
19165    # The splitting of arguments from the executable at a space might have been incorrect,
19166    # since paths with space are more likely in Windows. Give it another try with the whole
19167    # argument.
19168    path="$complete"
19169    arguments="EOL"
19170    new_path="$path"
19171
19172  windows_path="$new_path"
19173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19174    unix_path=`$CYGPATH -u "$windows_path"`
19175    new_path="$unix_path"
19176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19178    new_path="$unix_path"
19179  fi
19180
19181
19182    new_path=`$WHICH "$new_path" 2> /dev/null`
19183    # bat and cmd files are not always considered executable in MSYS causing which
19184    # to not find them
19185    if test "x$new_path" = x \
19186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19188      new_path="$path"
19189
19190  windows_path="$new_path"
19191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19192    unix_path=`$CYGPATH -u "$windows_path"`
19193    new_path="$unix_path"
19194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19196    new_path="$unix_path"
19197  fi
19198
19199    fi
19200
19201    if test "x$new_path" = x; then
19202      # It's still not found. Now this is an unrecoverable error.
19203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19204$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19205      has_space=`$ECHO "$complete" | $GREP " "`
19206      if test "x$has_space" != x; then
19207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19209      fi
19210      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19211    fi
19212  fi
19213
19214  # Now new_path has a complete unix path to the binary
19215  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19216    # Keep paths in /bin as-is, but remove trailing .exe if any
19217    new_path="${new_path/%.exe/}"
19218    # Do not save /bin paths to all_fixpath_prefixes!
19219  else
19220    # Not in mixed or Windows style, start by that.
19221    new_path=`cmd //c echo $new_path`
19222
19223  input_path="$new_path"
19224  # Check if we need to convert this using DOS-style short mode. If the path
19225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19226  # take no chances and rewrite it.
19227  # Note: m4 eats our [], so we need to use [ and ] instead.
19228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19229  if test "x$has_forbidden_chars" != x; then
19230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19232  fi
19233
19234    # Output is in $new_path
19235
19236  windows_path="$new_path"
19237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19238    unix_path=`$CYGPATH -u "$windows_path"`
19239    new_path="$unix_path"
19240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19242    new_path="$unix_path"
19243  fi
19244
19245    # remove trailing .exe if any
19246    new_path="${new_path/%.exe/}"
19247
19248    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19249    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19250  fi
19251
19252    else
19253      # We're on a unix platform. Hooray! :)
19254      # First separate the path from the arguments. This will split at the first
19255      # space.
19256      complete="$FOUND_MAKE"
19257      path="${complete%% *}"
19258      tmp="$complete EOL"
19259      arguments="${tmp#* }"
19260
19261      # Cannot rely on the command "which" here since it doesn't always work.
19262      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19263      if test -z "$is_absolute_path"; then
19264        # Path to executable is not absolute. Find it.
19265        IFS_save="$IFS"
19266        IFS=:
19267        for p in $PATH; do
19268          if test -f "$p/$path" && test -x "$p/$path"; then
19269            new_path="$p/$path"
19270            break
19271          fi
19272        done
19273        IFS="$IFS_save"
19274      else
19275        # This is an absolute path, we can use it without further modifications.
19276        new_path="$path"
19277      fi
19278
19279      if test "x$new_path" = x; then
19280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19281$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19282        has_space=`$ECHO "$complete" | $GREP " "`
19283        if test "x$has_space" != x; then
19284          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19286        fi
19287        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19288      fi
19289    fi
19290
19291    # Now join together the path and the arguments once again
19292    if test "x$arguments" != xEOL; then
19293      new_complete="$new_path ${arguments% *}"
19294    else
19295      new_complete="$new_path"
19296    fi
19297
19298    if test "x$complete" != "x$new_complete"; then
19299      FOUND_MAKE="$new_complete"
19300      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19301$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19302    fi
19303  fi
19304
19305        fi
19306      fi
19307    fi
19308  fi
19309
19310        fi
19311        PATH=$OLD_PATH
19312      fi
19313    fi
19314
19315    if test "x$FOUND_MAKE" = x; then
19316      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
19317    fi
19318
19319  else
19320    # The variable is set, but is it from the command line or the environment?
19321
19322    # Try to remove the string !MAKE! from our list.
19323    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19324    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19325      # If it failed, the variable was not from the command line. Ignore it,
19326      # but warn the user (except for BASH, which is always set by the calling BASH).
19327      if test "xMAKE" != xBASH; then
19328        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19329$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19330      fi
19331      # Try to locate tool using the code snippet
19332
19333    # Try our hardest to locate a correct version of GNU make
19334    for ac_prog in gmake
19335do
19336  # Extract the first word of "$ac_prog", so it can be a program name with args.
19337set dummy $ac_prog; ac_word=$2
19338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19339$as_echo_n "checking for $ac_word... " >&6; }
19340if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19341  $as_echo_n "(cached) " >&6
19342else
19343  case $CHECK_GMAKE in
19344  [\\/]* | ?:[\\/]*)
19345  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19346  ;;
19347  *)
19348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19349for as_dir in $PATH
19350do
19351  IFS=$as_save_IFS
19352  test -z "$as_dir" && as_dir=.
19353    for ac_exec_ext in '' $ac_executable_extensions; do
19354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19355    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19357    break 2
19358  fi
19359done
19360  done
19361IFS=$as_save_IFS
19362
19363  ;;
19364esac
19365fi
19366CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19367if test -n "$CHECK_GMAKE"; then
19368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19369$as_echo "$CHECK_GMAKE" >&6; }
19370else
19371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19372$as_echo "no" >&6; }
19373fi
19374
19375
19376  test -n "$CHECK_GMAKE" && break
19377done
19378
19379
19380  MAKE_CANDIDATE=""$CHECK_GMAKE""
19381  DESCRIPTION="gmake in PATH"
19382
19383  # On Cygwin, we require a newer version of make than on other platforms
19384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19385    MAKE_VERSION_EXPR="-e 4\."
19386    MAKE_REQUIRED_VERSION="4.0"
19387   else
19388    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19389    MAKE_REQUIRED_VERSION="3.81"
19390  fi
19391
19392  if test "x$MAKE_CANDIDATE" != x; then
19393    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19394$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19395    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19396    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19397    if test "x$IS_GNU_MAKE" = x; then
19398      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19399$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19400    else
19401      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19402      if test "x$IS_MODERN_MAKE" = x; then
19403        { $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
19404$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;}
19405      else
19406        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19407          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19408            MAKE_EXPECTED_ENV='cygwin'
19409          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19410            MAKE_EXPECTED_ENV='msys'
19411          else
19412            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19413          fi
19414          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19415          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19416        else
19417          # Not relevant for non-Windows
19418          IS_MAKE_CORRECT_ENV=true
19419        fi
19420        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19421          { $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
19422$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;}
19423        else
19424          FOUND_MAKE=$MAKE_CANDIDATE
19425
19426  # Only process if variable expands to non-empty
19427
19428  if test "x$FOUND_MAKE" != x; then
19429    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19430
19431  # First separate the path from the arguments. This will split at the first
19432  # space.
19433  complete="$FOUND_MAKE"
19434  path="${complete%% *}"
19435  tmp="$complete EOL"
19436  arguments="${tmp#* }"
19437
19438  # Input might be given as Windows format, start by converting to
19439  # unix format.
19440  new_path=`$CYGPATH -u "$path"`
19441
19442  # Now try to locate executable using which
19443  new_path=`$WHICH "$new_path" 2> /dev/null`
19444  # bat and cmd files are not always considered executable in cygwin causing which
19445  # to not find them
19446  if test "x$new_path" = x \
19447      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19448      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19449    new_path=`$CYGPATH -u "$path"`
19450  fi
19451  if test "x$new_path" = x; then
19452    # Oops. Which didn't find the executable.
19453    # The splitting of arguments from the executable at a space might have been incorrect,
19454    # since paths with space are more likely in Windows. Give it another try with the whole
19455    # argument.
19456    path="$complete"
19457    arguments="EOL"
19458    new_path=`$CYGPATH -u "$path"`
19459    new_path=`$WHICH "$new_path" 2> /dev/null`
19460    # bat and cmd files are not always considered executable in cygwin causing which
19461    # to not find them
19462    if test "x$new_path" = x \
19463        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19464        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19465      new_path=`$CYGPATH -u "$path"`
19466    fi
19467    if test "x$new_path" = x; then
19468      # It's still not found. Now this is an unrecoverable error.
19469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19470$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19471      has_space=`$ECHO "$complete" | $GREP " "`
19472      if test "x$has_space" != x; then
19473        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19474$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19475      fi
19476      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19477    fi
19478  fi
19479
19480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19483  # "foo.exe" is OK but "foo" is an error.
19484  #
19485  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19486  # It is also a way to make sure we got the proper file name for the real test later on.
19487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19488  if test "x$test_shortpath" = x; then
19489    # Short path failed, file does not exist as specified.
19490    # Try adding .exe or .cmd
19491    if test -f "${new_path}.exe"; then
19492      input_to_shortpath="${new_path}.exe"
19493    elif test -f "${new_path}.cmd"; then
19494      input_to_shortpath="${new_path}.cmd"
19495    else
19496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19497$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19498      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19499$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19500      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19501    fi
19502  else
19503    input_to_shortpath="$new_path"
19504  fi
19505
19506  # Call helper function which possibly converts this using DOS-style short mode.
19507  # If so, the updated path is stored in $new_path.
19508  new_path="$input_to_shortpath"
19509
19510  input_path="$input_to_shortpath"
19511  # Check if we need to convert this using DOS-style short mode. If the path
19512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19513  # take no chances and rewrite it.
19514  # Note: m4 eats our [], so we need to use [ and ] instead.
19515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19516  if test "x$has_forbidden_chars" != x; then
19517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19518    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19519    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19520    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19521      # Going to short mode and back again did indeed matter. Since short mode is
19522      # case insensitive, let's make it lowercase to improve readability.
19523      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19524      # Now convert it back to Unix-style (cygpath)
19525      input_path=`$CYGPATH -u "$shortmode_path"`
19526      new_path="$input_path"
19527    fi
19528  fi
19529
19530  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19531  if test "x$test_cygdrive_prefix" = x; then
19532    # As a simple fix, exclude /usr/bin since it's not a real path.
19533    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19534      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19535      # a path prefixed by /cygdrive for fixpath to work.
19536      new_path="$CYGWIN_ROOT_PATH$input_path"
19537    fi
19538  fi
19539
19540  # remove trailing .exe if any
19541  new_path="${new_path/%.exe/}"
19542
19543    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19544
19545  # First separate the path from the arguments. This will split at the first
19546  # space.
19547  complete="$FOUND_MAKE"
19548  path="${complete%% *}"
19549  tmp="$complete EOL"
19550  arguments="${tmp#* }"
19551
19552  # Input might be given as Windows format, start by converting to
19553  # unix format.
19554  new_path="$path"
19555
19556  windows_path="$new_path"
19557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19558    unix_path=`$CYGPATH -u "$windows_path"`
19559    new_path="$unix_path"
19560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19562    new_path="$unix_path"
19563  fi
19564
19565
19566  # Now try to locate executable using which
19567  new_path=`$WHICH "$new_path" 2> /dev/null`
19568
19569  if test "x$new_path" = x; then
19570    # Oops. Which didn't find the executable.
19571    # The splitting of arguments from the executable at a space might have been incorrect,
19572    # since paths with space are more likely in Windows. Give it another try with the whole
19573    # argument.
19574    path="$complete"
19575    arguments="EOL"
19576    new_path="$path"
19577
19578  windows_path="$new_path"
19579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19580    unix_path=`$CYGPATH -u "$windows_path"`
19581    new_path="$unix_path"
19582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19584    new_path="$unix_path"
19585  fi
19586
19587
19588    new_path=`$WHICH "$new_path" 2> /dev/null`
19589    # bat and cmd files are not always considered executable in MSYS causing which
19590    # to not find them
19591    if test "x$new_path" = x \
19592        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19593        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19594      new_path="$path"
19595
19596  windows_path="$new_path"
19597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19598    unix_path=`$CYGPATH -u "$windows_path"`
19599    new_path="$unix_path"
19600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19602    new_path="$unix_path"
19603  fi
19604
19605    fi
19606
19607    if test "x$new_path" = x; then
19608      # It's still not found. Now this is an unrecoverable error.
19609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19610$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19611      has_space=`$ECHO "$complete" | $GREP " "`
19612      if test "x$has_space" != x; then
19613        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19614$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19615      fi
19616      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19617    fi
19618  fi
19619
19620  # Now new_path has a complete unix path to the binary
19621  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19622    # Keep paths in /bin as-is, but remove trailing .exe if any
19623    new_path="${new_path/%.exe/}"
19624    # Do not save /bin paths to all_fixpath_prefixes!
19625  else
19626    # Not in mixed or Windows style, start by that.
19627    new_path=`cmd //c echo $new_path`
19628
19629  input_path="$new_path"
19630  # Check if we need to convert this using DOS-style short mode. If the path
19631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19632  # take no chances and rewrite it.
19633  # Note: m4 eats our [], so we need to use [ and ] instead.
19634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19635  if test "x$has_forbidden_chars" != x; then
19636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19638  fi
19639
19640    # Output is in $new_path
19641
19642  windows_path="$new_path"
19643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19644    unix_path=`$CYGPATH -u "$windows_path"`
19645    new_path="$unix_path"
19646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19648    new_path="$unix_path"
19649  fi
19650
19651    # remove trailing .exe if any
19652    new_path="${new_path/%.exe/}"
19653
19654    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19655    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19656  fi
19657
19658    else
19659      # We're on a unix platform. Hooray! :)
19660      # First separate the path from the arguments. This will split at the first
19661      # space.
19662      complete="$FOUND_MAKE"
19663      path="${complete%% *}"
19664      tmp="$complete EOL"
19665      arguments="${tmp#* }"
19666
19667      # Cannot rely on the command "which" here since it doesn't always work.
19668      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19669      if test -z "$is_absolute_path"; then
19670        # Path to executable is not absolute. Find it.
19671        IFS_save="$IFS"
19672        IFS=:
19673        for p in $PATH; do
19674          if test -f "$p/$path" && test -x "$p/$path"; then
19675            new_path="$p/$path"
19676            break
19677          fi
19678        done
19679        IFS="$IFS_save"
19680      else
19681        # This is an absolute path, we can use it without further modifications.
19682        new_path="$path"
19683      fi
19684
19685      if test "x$new_path" = x; then
19686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19687$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19688        has_space=`$ECHO "$complete" | $GREP " "`
19689        if test "x$has_space" != x; then
19690          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19691$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19692        fi
19693        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19694      fi
19695    fi
19696
19697    # Now join together the path and the arguments once again
19698    if test "x$arguments" != xEOL; then
19699      new_complete="$new_path ${arguments% *}"
19700    else
19701      new_complete="$new_path"
19702    fi
19703
19704    if test "x$complete" != "x$new_complete"; then
19705      FOUND_MAKE="$new_complete"
19706      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19707$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19708    fi
19709  fi
19710
19711        fi
19712      fi
19713    fi
19714  fi
19715
19716
19717    if test "x$FOUND_MAKE" = x; then
19718      for ac_prog in make
19719do
19720  # Extract the first word of "$ac_prog", so it can be a program name with args.
19721set dummy $ac_prog; ac_word=$2
19722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19723$as_echo_n "checking for $ac_word... " >&6; }
19724if ${ac_cv_path_CHECK_MAKE+:} false; then :
19725  $as_echo_n "(cached) " >&6
19726else
19727  case $CHECK_MAKE in
19728  [\\/]* | ?:[\\/]*)
19729  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19730  ;;
19731  *)
19732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19733for as_dir in $PATH
19734do
19735  IFS=$as_save_IFS
19736  test -z "$as_dir" && as_dir=.
19737    for ac_exec_ext in '' $ac_executable_extensions; do
19738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19739    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19741    break 2
19742  fi
19743done
19744  done
19745IFS=$as_save_IFS
19746
19747  ;;
19748esac
19749fi
19750CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19751if test -n "$CHECK_MAKE"; then
19752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19753$as_echo "$CHECK_MAKE" >&6; }
19754else
19755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19756$as_echo "no" >&6; }
19757fi
19758
19759
19760  test -n "$CHECK_MAKE" && break
19761done
19762
19763
19764  MAKE_CANDIDATE=""$CHECK_MAKE""
19765  DESCRIPTION="make in PATH"
19766
19767  # On Cygwin, we require a newer version of make than on other platforms
19768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19769    MAKE_VERSION_EXPR="-e 4\."
19770    MAKE_REQUIRED_VERSION="4.0"
19771   else
19772    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19773    MAKE_REQUIRED_VERSION="3.81"
19774  fi
19775
19776  if test "x$MAKE_CANDIDATE" != x; then
19777    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19778$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19779    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19780    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19781    if test "x$IS_GNU_MAKE" = x; then
19782      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19783$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19784    else
19785      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19786      if test "x$IS_MODERN_MAKE" = x; then
19787        { $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
19788$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;}
19789      else
19790        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19791          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19792            MAKE_EXPECTED_ENV='cygwin'
19793          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19794            MAKE_EXPECTED_ENV='msys'
19795          else
19796            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19797          fi
19798          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19799          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19800        else
19801          # Not relevant for non-Windows
19802          IS_MAKE_CORRECT_ENV=true
19803        fi
19804        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19805          { $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
19806$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;}
19807        else
19808          FOUND_MAKE=$MAKE_CANDIDATE
19809
19810  # Only process if variable expands to non-empty
19811
19812  if test "x$FOUND_MAKE" != x; then
19813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19814
19815  # First separate the path from the arguments. This will split at the first
19816  # space.
19817  complete="$FOUND_MAKE"
19818  path="${complete%% *}"
19819  tmp="$complete EOL"
19820  arguments="${tmp#* }"
19821
19822  # Input might be given as Windows format, start by converting to
19823  # unix format.
19824  new_path=`$CYGPATH -u "$path"`
19825
19826  # Now try to locate executable using which
19827  new_path=`$WHICH "$new_path" 2> /dev/null`
19828  # bat and cmd files are not always considered executable in cygwin causing which
19829  # to not find them
19830  if test "x$new_path" = x \
19831      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19832      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19833    new_path=`$CYGPATH -u "$path"`
19834  fi
19835  if test "x$new_path" = x; then
19836    # Oops. Which didn't find the executable.
19837    # The splitting of arguments from the executable at a space might have been incorrect,
19838    # since paths with space are more likely in Windows. Give it another try with the whole
19839    # argument.
19840    path="$complete"
19841    arguments="EOL"
19842    new_path=`$CYGPATH -u "$path"`
19843    new_path=`$WHICH "$new_path" 2> /dev/null`
19844    # bat and cmd files are not always considered executable in cygwin causing which
19845    # to not find them
19846    if test "x$new_path" = x \
19847        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19848        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19849      new_path=`$CYGPATH -u "$path"`
19850    fi
19851    if test "x$new_path" = x; then
19852      # It's still not found. Now this is an unrecoverable error.
19853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19854$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19855      has_space=`$ECHO "$complete" | $GREP " "`
19856      if test "x$has_space" != x; then
19857        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19858$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19859      fi
19860      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19861    fi
19862  fi
19863
19864  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19865  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19866  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19867  # "foo.exe" is OK but "foo" is an error.
19868  #
19869  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19870  # It is also a way to make sure we got the proper file name for the real test later on.
19871  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19872  if test "x$test_shortpath" = x; then
19873    # Short path failed, file does not exist as specified.
19874    # Try adding .exe or .cmd
19875    if test -f "${new_path}.exe"; then
19876      input_to_shortpath="${new_path}.exe"
19877    elif test -f "${new_path}.cmd"; then
19878      input_to_shortpath="${new_path}.cmd"
19879    else
19880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19881$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19882      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19883$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19884      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19885    fi
19886  else
19887    input_to_shortpath="$new_path"
19888  fi
19889
19890  # Call helper function which possibly converts this using DOS-style short mode.
19891  # If so, the updated path is stored in $new_path.
19892  new_path="$input_to_shortpath"
19893
19894  input_path="$input_to_shortpath"
19895  # Check if we need to convert this using DOS-style short mode. If the path
19896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19897  # take no chances and rewrite it.
19898  # Note: m4 eats our [], so we need to use [ and ] instead.
19899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19900  if test "x$has_forbidden_chars" != x; then
19901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19902    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19903    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19904    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19905      # Going to short mode and back again did indeed matter. Since short mode is
19906      # case insensitive, let's make it lowercase to improve readability.
19907      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19908      # Now convert it back to Unix-style (cygpath)
19909      input_path=`$CYGPATH -u "$shortmode_path"`
19910      new_path="$input_path"
19911    fi
19912  fi
19913
19914  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19915  if test "x$test_cygdrive_prefix" = x; then
19916    # As a simple fix, exclude /usr/bin since it's not a real path.
19917    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19918      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19919      # a path prefixed by /cygdrive for fixpath to work.
19920      new_path="$CYGWIN_ROOT_PATH$input_path"
19921    fi
19922  fi
19923
19924  # remove trailing .exe if any
19925  new_path="${new_path/%.exe/}"
19926
19927    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19928
19929  # First separate the path from the arguments. This will split at the first
19930  # space.
19931  complete="$FOUND_MAKE"
19932  path="${complete%% *}"
19933  tmp="$complete EOL"
19934  arguments="${tmp#* }"
19935
19936  # Input might be given as Windows format, start by converting to
19937  # unix format.
19938  new_path="$path"
19939
19940  windows_path="$new_path"
19941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19942    unix_path=`$CYGPATH -u "$windows_path"`
19943    new_path="$unix_path"
19944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19946    new_path="$unix_path"
19947  fi
19948
19949
19950  # Now try to locate executable using which
19951  new_path=`$WHICH "$new_path" 2> /dev/null`
19952
19953  if test "x$new_path" = x; then
19954    # Oops. Which didn't find the executable.
19955    # The splitting of arguments from the executable at a space might have been incorrect,
19956    # since paths with space are more likely in Windows. Give it another try with the whole
19957    # argument.
19958    path="$complete"
19959    arguments="EOL"
19960    new_path="$path"
19961
19962  windows_path="$new_path"
19963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19964    unix_path=`$CYGPATH -u "$windows_path"`
19965    new_path="$unix_path"
19966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19968    new_path="$unix_path"
19969  fi
19970
19971
19972    new_path=`$WHICH "$new_path" 2> /dev/null`
19973    # bat and cmd files are not always considered executable in MSYS causing which
19974    # to not find them
19975    if test "x$new_path" = x \
19976        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19977        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19978      new_path="$path"
19979
19980  windows_path="$new_path"
19981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19982    unix_path=`$CYGPATH -u "$windows_path"`
19983    new_path="$unix_path"
19984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19986    new_path="$unix_path"
19987  fi
19988
19989    fi
19990
19991    if test "x$new_path" = x; then
19992      # It's still not found. Now this is an unrecoverable error.
19993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19994$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19995      has_space=`$ECHO "$complete" | $GREP " "`
19996      if test "x$has_space" != x; then
19997        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19998$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19999      fi
20000      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20001    fi
20002  fi
20003
20004  # Now new_path has a complete unix path to the binary
20005  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20006    # Keep paths in /bin as-is, but remove trailing .exe if any
20007    new_path="${new_path/%.exe/}"
20008    # Do not save /bin paths to all_fixpath_prefixes!
20009  else
20010    # Not in mixed or Windows style, start by that.
20011    new_path=`cmd //c echo $new_path`
20012
20013  input_path="$new_path"
20014  # Check if we need to convert this using DOS-style short mode. If the path
20015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20016  # take no chances and rewrite it.
20017  # Note: m4 eats our [], so we need to use [ and ] instead.
20018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20019  if test "x$has_forbidden_chars" != x; then
20020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20022  fi
20023
20024    # Output is in $new_path
20025
20026  windows_path="$new_path"
20027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20028    unix_path=`$CYGPATH -u "$windows_path"`
20029    new_path="$unix_path"
20030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20032    new_path="$unix_path"
20033  fi
20034
20035    # remove trailing .exe if any
20036    new_path="${new_path/%.exe/}"
20037
20038    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20039    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20040  fi
20041
20042    else
20043      # We're on a unix platform. Hooray! :)
20044      # First separate the path from the arguments. This will split at the first
20045      # space.
20046      complete="$FOUND_MAKE"
20047      path="${complete%% *}"
20048      tmp="$complete EOL"
20049      arguments="${tmp#* }"
20050
20051      # Cannot rely on the command "which" here since it doesn't always work.
20052      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20053      if test -z "$is_absolute_path"; then
20054        # Path to executable is not absolute. Find it.
20055        IFS_save="$IFS"
20056        IFS=:
20057        for p in $PATH; do
20058          if test -f "$p/$path" && test -x "$p/$path"; then
20059            new_path="$p/$path"
20060            break
20061          fi
20062        done
20063        IFS="$IFS_save"
20064      else
20065        # This is an absolute path, we can use it without further modifications.
20066        new_path="$path"
20067      fi
20068
20069      if test "x$new_path" = x; then
20070        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20071$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20072        has_space=`$ECHO "$complete" | $GREP " "`
20073        if test "x$has_space" != x; then
20074          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20075$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20076        fi
20077        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20078      fi
20079    fi
20080
20081    # Now join together the path and the arguments once again
20082    if test "x$arguments" != xEOL; then
20083      new_complete="$new_path ${arguments% *}"
20084    else
20085      new_complete="$new_path"
20086    fi
20087
20088    if test "x$complete" != "x$new_complete"; then
20089      FOUND_MAKE="$new_complete"
20090      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20091$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20092    fi
20093  fi
20094
20095        fi
20096      fi
20097    fi
20098  fi
20099
20100    fi
20101
20102    if test "x$FOUND_MAKE" = x; then
20103      if test "x$TOOLCHAIN_PATH" != x; then
20104        # We have a toolchain path, check that as well before giving up.
20105        OLD_PATH=$PATH
20106        PATH=$TOOLCHAIN_PATH:$PATH
20107        for ac_prog in gmake
20108do
20109  # Extract the first word of "$ac_prog", so it can be a program name with args.
20110set dummy $ac_prog; ac_word=$2
20111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20112$as_echo_n "checking for $ac_word... " >&6; }
20113if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20114  $as_echo_n "(cached) " >&6
20115else
20116  case $CHECK_TOOLSDIR_GMAKE in
20117  [\\/]* | ?:[\\/]*)
20118  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20119  ;;
20120  *)
20121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20122for as_dir in $PATH
20123do
20124  IFS=$as_save_IFS
20125  test -z "$as_dir" && as_dir=.
20126    for ac_exec_ext in '' $ac_executable_extensions; do
20127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20128    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20130    break 2
20131  fi
20132done
20133  done
20134IFS=$as_save_IFS
20135
20136  ;;
20137esac
20138fi
20139CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20140if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20142$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20143else
20144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20145$as_echo "no" >&6; }
20146fi
20147
20148
20149  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20150done
20151
20152
20153  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20154  DESCRIPTION="gmake in tools-dir"
20155
20156  # On Cygwin, we require a newer version of make than on other platforms
20157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20158    MAKE_VERSION_EXPR="-e 4\."
20159    MAKE_REQUIRED_VERSION="4.0"
20160   else
20161    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20162    MAKE_REQUIRED_VERSION="3.81"
20163  fi
20164
20165  if test "x$MAKE_CANDIDATE" != x; then
20166    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20167$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20168    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20169    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20170    if test "x$IS_GNU_MAKE" = x; then
20171      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20172$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20173    else
20174      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20175      if test "x$IS_MODERN_MAKE" = x; then
20176        { $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
20177$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;}
20178      else
20179        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20180          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20181            MAKE_EXPECTED_ENV='cygwin'
20182          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20183            MAKE_EXPECTED_ENV='msys'
20184          else
20185            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20186          fi
20187          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20188          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20189        else
20190          # Not relevant for non-Windows
20191          IS_MAKE_CORRECT_ENV=true
20192        fi
20193        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20194          { $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
20195$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;}
20196        else
20197          FOUND_MAKE=$MAKE_CANDIDATE
20198
20199  # Only process if variable expands to non-empty
20200
20201  if test "x$FOUND_MAKE" != x; then
20202    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20203
20204  # First separate the path from the arguments. This will split at the first
20205  # space.
20206  complete="$FOUND_MAKE"
20207  path="${complete%% *}"
20208  tmp="$complete EOL"
20209  arguments="${tmp#* }"
20210
20211  # Input might be given as Windows format, start by converting to
20212  # unix format.
20213  new_path=`$CYGPATH -u "$path"`
20214
20215  # Now try to locate executable using which
20216  new_path=`$WHICH "$new_path" 2> /dev/null`
20217  # bat and cmd files are not always considered executable in cygwin causing which
20218  # to not find them
20219  if test "x$new_path" = x \
20220      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20221      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20222    new_path=`$CYGPATH -u "$path"`
20223  fi
20224  if test "x$new_path" = x; then
20225    # Oops. Which didn't find the executable.
20226    # The splitting of arguments from the executable at a space might have been incorrect,
20227    # since paths with space are more likely in Windows. Give it another try with the whole
20228    # argument.
20229    path="$complete"
20230    arguments="EOL"
20231    new_path=`$CYGPATH -u "$path"`
20232    new_path=`$WHICH "$new_path" 2> /dev/null`
20233    # bat and cmd files are not always considered executable in cygwin causing which
20234    # to not find them
20235    if test "x$new_path" = x \
20236        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20237        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20238      new_path=`$CYGPATH -u "$path"`
20239    fi
20240    if test "x$new_path" = x; then
20241      # It's still not found. Now this is an unrecoverable error.
20242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20243$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20244      has_space=`$ECHO "$complete" | $GREP " "`
20245      if test "x$has_space" != x; then
20246        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20247$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20248      fi
20249      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20250    fi
20251  fi
20252
20253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20256  # "foo.exe" is OK but "foo" is an error.
20257  #
20258  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20259  # It is also a way to make sure we got the proper file name for the real test later on.
20260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20261  if test "x$test_shortpath" = x; then
20262    # Short path failed, file does not exist as specified.
20263    # Try adding .exe or .cmd
20264    if test -f "${new_path}.exe"; then
20265      input_to_shortpath="${new_path}.exe"
20266    elif test -f "${new_path}.cmd"; then
20267      input_to_shortpath="${new_path}.cmd"
20268    else
20269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20270$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20271      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20272$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20273      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20274    fi
20275  else
20276    input_to_shortpath="$new_path"
20277  fi
20278
20279  # Call helper function which possibly converts this using DOS-style short mode.
20280  # If so, the updated path is stored in $new_path.
20281  new_path="$input_to_shortpath"
20282
20283  input_path="$input_to_shortpath"
20284  # Check if we need to convert this using DOS-style short mode. If the path
20285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20286  # take no chances and rewrite it.
20287  # Note: m4 eats our [], so we need to use [ and ] instead.
20288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20289  if test "x$has_forbidden_chars" != x; then
20290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20294      # Going to short mode and back again did indeed matter. Since short mode is
20295      # case insensitive, let's make it lowercase to improve readability.
20296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20297      # Now convert it back to Unix-style (cygpath)
20298      input_path=`$CYGPATH -u "$shortmode_path"`
20299      new_path="$input_path"
20300    fi
20301  fi
20302
20303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20304  if test "x$test_cygdrive_prefix" = x; then
20305    # As a simple fix, exclude /usr/bin since it's not a real path.
20306    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20308      # a path prefixed by /cygdrive for fixpath to work.
20309      new_path="$CYGWIN_ROOT_PATH$input_path"
20310    fi
20311  fi
20312
20313  # remove trailing .exe if any
20314  new_path="${new_path/%.exe/}"
20315
20316    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20317
20318  # First separate the path from the arguments. This will split at the first
20319  # space.
20320  complete="$FOUND_MAKE"
20321  path="${complete%% *}"
20322  tmp="$complete EOL"
20323  arguments="${tmp#* }"
20324
20325  # Input might be given as Windows format, start by converting to
20326  # unix format.
20327  new_path="$path"
20328
20329  windows_path="$new_path"
20330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20331    unix_path=`$CYGPATH -u "$windows_path"`
20332    new_path="$unix_path"
20333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20335    new_path="$unix_path"
20336  fi
20337
20338
20339  # Now try to locate executable using which
20340  new_path=`$WHICH "$new_path" 2> /dev/null`
20341
20342  if test "x$new_path" = x; then
20343    # Oops. Which didn't find the executable.
20344    # The splitting of arguments from the executable at a space might have been incorrect,
20345    # since paths with space are more likely in Windows. Give it another try with the whole
20346    # argument.
20347    path="$complete"
20348    arguments="EOL"
20349    new_path="$path"
20350
20351  windows_path="$new_path"
20352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20353    unix_path=`$CYGPATH -u "$windows_path"`
20354    new_path="$unix_path"
20355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20357    new_path="$unix_path"
20358  fi
20359
20360
20361    new_path=`$WHICH "$new_path" 2> /dev/null`
20362    # bat and cmd files are not always considered executable in MSYS causing which
20363    # to not find them
20364    if test "x$new_path" = x \
20365        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20366        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20367      new_path="$path"
20368
20369  windows_path="$new_path"
20370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20371    unix_path=`$CYGPATH -u "$windows_path"`
20372    new_path="$unix_path"
20373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20375    new_path="$unix_path"
20376  fi
20377
20378    fi
20379
20380    if test "x$new_path" = x; then
20381      # It's still not found. Now this is an unrecoverable error.
20382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20383$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20384      has_space=`$ECHO "$complete" | $GREP " "`
20385      if test "x$has_space" != x; then
20386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20388      fi
20389      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20390    fi
20391  fi
20392
20393  # Now new_path has a complete unix path to the binary
20394  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20395    # Keep paths in /bin as-is, but remove trailing .exe if any
20396    new_path="${new_path/%.exe/}"
20397    # Do not save /bin paths to all_fixpath_prefixes!
20398  else
20399    # Not in mixed or Windows style, start by that.
20400    new_path=`cmd //c echo $new_path`
20401
20402  input_path="$new_path"
20403  # Check if we need to convert this using DOS-style short mode. If the path
20404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20405  # take no chances and rewrite it.
20406  # Note: m4 eats our [], so we need to use [ and ] instead.
20407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20408  if test "x$has_forbidden_chars" != x; then
20409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20411  fi
20412
20413    # Output is in $new_path
20414
20415  windows_path="$new_path"
20416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20417    unix_path=`$CYGPATH -u "$windows_path"`
20418    new_path="$unix_path"
20419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20421    new_path="$unix_path"
20422  fi
20423
20424    # remove trailing .exe if any
20425    new_path="${new_path/%.exe/}"
20426
20427    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20428    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20429  fi
20430
20431    else
20432      # We're on a unix platform. Hooray! :)
20433      # First separate the path from the arguments. This will split at the first
20434      # space.
20435      complete="$FOUND_MAKE"
20436      path="${complete%% *}"
20437      tmp="$complete EOL"
20438      arguments="${tmp#* }"
20439
20440      # Cannot rely on the command "which" here since it doesn't always work.
20441      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20442      if test -z "$is_absolute_path"; then
20443        # Path to executable is not absolute. Find it.
20444        IFS_save="$IFS"
20445        IFS=:
20446        for p in $PATH; do
20447          if test -f "$p/$path" && test -x "$p/$path"; then
20448            new_path="$p/$path"
20449            break
20450          fi
20451        done
20452        IFS="$IFS_save"
20453      else
20454        # This is an absolute path, we can use it without further modifications.
20455        new_path="$path"
20456      fi
20457
20458      if test "x$new_path" = x; then
20459        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20460$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20461        has_space=`$ECHO "$complete" | $GREP " "`
20462        if test "x$has_space" != x; then
20463          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20464$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20465        fi
20466        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20467      fi
20468    fi
20469
20470    # Now join together the path and the arguments once again
20471    if test "x$arguments" != xEOL; then
20472      new_complete="$new_path ${arguments% *}"
20473    else
20474      new_complete="$new_path"
20475    fi
20476
20477    if test "x$complete" != "x$new_complete"; then
20478      FOUND_MAKE="$new_complete"
20479      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20480$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20481    fi
20482  fi
20483
20484        fi
20485      fi
20486    fi
20487  fi
20488
20489        if test "x$FOUND_MAKE" = x; then
20490          for ac_prog in make
20491do
20492  # Extract the first word of "$ac_prog", so it can be a program name with args.
20493set dummy $ac_prog; ac_word=$2
20494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20495$as_echo_n "checking for $ac_word... " >&6; }
20496if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20497  $as_echo_n "(cached) " >&6
20498else
20499  case $CHECK_TOOLSDIR_MAKE in
20500  [\\/]* | ?:[\\/]*)
20501  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20502  ;;
20503  *)
20504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20505for as_dir in $PATH
20506do
20507  IFS=$as_save_IFS
20508  test -z "$as_dir" && as_dir=.
20509    for ac_exec_ext in '' $ac_executable_extensions; do
20510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20511    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20513    break 2
20514  fi
20515done
20516  done
20517IFS=$as_save_IFS
20518
20519  ;;
20520esac
20521fi
20522CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20523if test -n "$CHECK_TOOLSDIR_MAKE"; then
20524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20525$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20526else
20527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20528$as_echo "no" >&6; }
20529fi
20530
20531
20532  test -n "$CHECK_TOOLSDIR_MAKE" && break
20533done
20534
20535
20536  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20537  DESCRIPTION="make in tools-dir"
20538
20539  # On Cygwin, we require a newer version of make than on other platforms
20540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20541    MAKE_VERSION_EXPR="-e 4\."
20542    MAKE_REQUIRED_VERSION="4.0"
20543   else
20544    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20545    MAKE_REQUIRED_VERSION="3.81"
20546  fi
20547
20548  if test "x$MAKE_CANDIDATE" != x; then
20549    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20550$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20551    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20552    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20553    if test "x$IS_GNU_MAKE" = x; then
20554      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20555$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20556    else
20557      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20558      if test "x$IS_MODERN_MAKE" = x; then
20559        { $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
20560$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;}
20561      else
20562        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20563          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20564            MAKE_EXPECTED_ENV='cygwin'
20565          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20566            MAKE_EXPECTED_ENV='msys'
20567          else
20568            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20569          fi
20570          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20571          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20572        else
20573          # Not relevant for non-Windows
20574          IS_MAKE_CORRECT_ENV=true
20575        fi
20576        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20577          { $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
20578$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;}
20579        else
20580          FOUND_MAKE=$MAKE_CANDIDATE
20581
20582  # Only process if variable expands to non-empty
20583
20584  if test "x$FOUND_MAKE" != x; then
20585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20586
20587  # First separate the path from the arguments. This will split at the first
20588  # space.
20589  complete="$FOUND_MAKE"
20590  path="${complete%% *}"
20591  tmp="$complete EOL"
20592  arguments="${tmp#* }"
20593
20594  # Input might be given as Windows format, start by converting to
20595  # unix format.
20596  new_path=`$CYGPATH -u "$path"`
20597
20598  # Now try to locate executable using which
20599  new_path=`$WHICH "$new_path" 2> /dev/null`
20600  # bat and cmd files are not always considered executable in cygwin causing which
20601  # to not find them
20602  if test "x$new_path" = x \
20603      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20604      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20605    new_path=`$CYGPATH -u "$path"`
20606  fi
20607  if test "x$new_path" = x; then
20608    # Oops. Which didn't find the executable.
20609    # The splitting of arguments from the executable at a space might have been incorrect,
20610    # since paths with space are more likely in Windows. Give it another try with the whole
20611    # argument.
20612    path="$complete"
20613    arguments="EOL"
20614    new_path=`$CYGPATH -u "$path"`
20615    new_path=`$WHICH "$new_path" 2> /dev/null`
20616    # bat and cmd files are not always considered executable in cygwin causing which
20617    # to not find them
20618    if test "x$new_path" = x \
20619        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20620        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20621      new_path=`$CYGPATH -u "$path"`
20622    fi
20623    if test "x$new_path" = x; then
20624      # It's still not found. Now this is an unrecoverable error.
20625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20626$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20627      has_space=`$ECHO "$complete" | $GREP " "`
20628      if test "x$has_space" != x; then
20629        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20630$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20631      fi
20632      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20633    fi
20634  fi
20635
20636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20639  # "foo.exe" is OK but "foo" is an error.
20640  #
20641  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20642  # It is also a way to make sure we got the proper file name for the real test later on.
20643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20644  if test "x$test_shortpath" = x; then
20645    # Short path failed, file does not exist as specified.
20646    # Try adding .exe or .cmd
20647    if test -f "${new_path}.exe"; then
20648      input_to_shortpath="${new_path}.exe"
20649    elif test -f "${new_path}.cmd"; then
20650      input_to_shortpath="${new_path}.cmd"
20651    else
20652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20653$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20654      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20655$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20656      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20657    fi
20658  else
20659    input_to_shortpath="$new_path"
20660  fi
20661
20662  # Call helper function which possibly converts this using DOS-style short mode.
20663  # If so, the updated path is stored in $new_path.
20664  new_path="$input_to_shortpath"
20665
20666  input_path="$input_to_shortpath"
20667  # Check if we need to convert this using DOS-style short mode. If the path
20668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20669  # take no chances and rewrite it.
20670  # Note: m4 eats our [], so we need to use [ and ] instead.
20671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20672  if test "x$has_forbidden_chars" != x; then
20673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20677      # Going to short mode and back again did indeed matter. Since short mode is
20678      # case insensitive, let's make it lowercase to improve readability.
20679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20680      # Now convert it back to Unix-style (cygpath)
20681      input_path=`$CYGPATH -u "$shortmode_path"`
20682      new_path="$input_path"
20683    fi
20684  fi
20685
20686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20687  if test "x$test_cygdrive_prefix" = x; then
20688    # As a simple fix, exclude /usr/bin since it's not a real path.
20689    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20691      # a path prefixed by /cygdrive for fixpath to work.
20692      new_path="$CYGWIN_ROOT_PATH$input_path"
20693    fi
20694  fi
20695
20696  # remove trailing .exe if any
20697  new_path="${new_path/%.exe/}"
20698
20699    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20700
20701  # First separate the path from the arguments. This will split at the first
20702  # space.
20703  complete="$FOUND_MAKE"
20704  path="${complete%% *}"
20705  tmp="$complete EOL"
20706  arguments="${tmp#* }"
20707
20708  # Input might be given as Windows format, start by converting to
20709  # unix format.
20710  new_path="$path"
20711
20712  windows_path="$new_path"
20713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20714    unix_path=`$CYGPATH -u "$windows_path"`
20715    new_path="$unix_path"
20716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20718    new_path="$unix_path"
20719  fi
20720
20721
20722  # Now try to locate executable using which
20723  new_path=`$WHICH "$new_path" 2> /dev/null`
20724
20725  if test "x$new_path" = x; then
20726    # Oops. Which didn't find the executable.
20727    # The splitting of arguments from the executable at a space might have been incorrect,
20728    # since paths with space are more likely in Windows. Give it another try with the whole
20729    # argument.
20730    path="$complete"
20731    arguments="EOL"
20732    new_path="$path"
20733
20734  windows_path="$new_path"
20735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20736    unix_path=`$CYGPATH -u "$windows_path"`
20737    new_path="$unix_path"
20738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20740    new_path="$unix_path"
20741  fi
20742
20743
20744    new_path=`$WHICH "$new_path" 2> /dev/null`
20745    # bat and cmd files are not always considered executable in MSYS causing which
20746    # to not find them
20747    if test "x$new_path" = x \
20748        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20749        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20750      new_path="$path"
20751
20752  windows_path="$new_path"
20753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20754    unix_path=`$CYGPATH -u "$windows_path"`
20755    new_path="$unix_path"
20756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20758    new_path="$unix_path"
20759  fi
20760
20761    fi
20762
20763    if test "x$new_path" = x; then
20764      # It's still not found. Now this is an unrecoverable error.
20765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20766$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20767      has_space=`$ECHO "$complete" | $GREP " "`
20768      if test "x$has_space" != x; then
20769        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20770$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20771      fi
20772      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20773    fi
20774  fi
20775
20776  # Now new_path has a complete unix path to the binary
20777  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20778    # Keep paths in /bin as-is, but remove trailing .exe if any
20779    new_path="${new_path/%.exe/}"
20780    # Do not save /bin paths to all_fixpath_prefixes!
20781  else
20782    # Not in mixed or Windows style, start by that.
20783    new_path=`cmd //c echo $new_path`
20784
20785  input_path="$new_path"
20786  # Check if we need to convert this using DOS-style short mode. If the path
20787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20788  # take no chances and rewrite it.
20789  # Note: m4 eats our [], so we need to use [ and ] instead.
20790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20791  if test "x$has_forbidden_chars" != x; then
20792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20794  fi
20795
20796    # Output is in $new_path
20797
20798  windows_path="$new_path"
20799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20800    unix_path=`$CYGPATH -u "$windows_path"`
20801    new_path="$unix_path"
20802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20804    new_path="$unix_path"
20805  fi
20806
20807    # remove trailing .exe if any
20808    new_path="${new_path/%.exe/}"
20809
20810    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20811    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20812  fi
20813
20814    else
20815      # We're on a unix platform. Hooray! :)
20816      # First separate the path from the arguments. This will split at the first
20817      # space.
20818      complete="$FOUND_MAKE"
20819      path="${complete%% *}"
20820      tmp="$complete EOL"
20821      arguments="${tmp#* }"
20822
20823      # Cannot rely on the command "which" here since it doesn't always work.
20824      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20825      if test -z "$is_absolute_path"; then
20826        # Path to executable is not absolute. Find it.
20827        IFS_save="$IFS"
20828        IFS=:
20829        for p in $PATH; do
20830          if test -f "$p/$path" && test -x "$p/$path"; then
20831            new_path="$p/$path"
20832            break
20833          fi
20834        done
20835        IFS="$IFS_save"
20836      else
20837        # This is an absolute path, we can use it without further modifications.
20838        new_path="$path"
20839      fi
20840
20841      if test "x$new_path" = x; then
20842        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20843$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20844        has_space=`$ECHO "$complete" | $GREP " "`
20845        if test "x$has_space" != x; then
20846          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20847$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20848        fi
20849        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20850      fi
20851    fi
20852
20853    # Now join together the path and the arguments once again
20854    if test "x$arguments" != xEOL; then
20855      new_complete="$new_path ${arguments% *}"
20856    else
20857      new_complete="$new_path"
20858    fi
20859
20860    if test "x$complete" != "x$new_complete"; then
20861      FOUND_MAKE="$new_complete"
20862      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20863$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20864    fi
20865  fi
20866
20867        fi
20868      fi
20869    fi
20870  fi
20871
20872        fi
20873        PATH=$OLD_PATH
20874      fi
20875    fi
20876
20877    if test "x$FOUND_MAKE" = x; then
20878      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
20879    fi
20880
20881    else
20882      # If it succeeded, then it was overridden by the user. We will use it
20883      # for the tool.
20884
20885      # First remove it from the list of overridden variables, so we can test
20886      # for unknown variables in the end.
20887      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20888
20889      # Check if we try to supply an empty value
20890      if test "x$MAKE" = x; then
20891        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20892$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20893        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20894$as_echo_n "checking for MAKE... " >&6; }
20895        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20896$as_echo "disabled" >&6; }
20897      else
20898        # Check if the provided tool contains a complete path.
20899        tool_specified="$MAKE"
20900        tool_basename="${tool_specified##*/}"
20901        if test "x$tool_basename" = "x$tool_specified"; then
20902          # A command without a complete path is provided, search $PATH.
20903          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20904$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20905          # Extract the first word of "$tool_basename", so it can be a program name with args.
20906set dummy $tool_basename; ac_word=$2
20907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20908$as_echo_n "checking for $ac_word... " >&6; }
20909if ${ac_cv_path_MAKE+:} false; then :
20910  $as_echo_n "(cached) " >&6
20911else
20912  case $MAKE in
20913  [\\/]* | ?:[\\/]*)
20914  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20915  ;;
20916  *)
20917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20918for as_dir in $PATH
20919do
20920  IFS=$as_save_IFS
20921  test -z "$as_dir" && as_dir=.
20922    for ac_exec_ext in '' $ac_executable_extensions; do
20923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20924    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20926    break 2
20927  fi
20928done
20929  done
20930IFS=$as_save_IFS
20931
20932  ;;
20933esac
20934fi
20935MAKE=$ac_cv_path_MAKE
20936if test -n "$MAKE"; then
20937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20938$as_echo "$MAKE" >&6; }
20939else
20940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20941$as_echo "no" >&6; }
20942fi
20943
20944
20945          if test "x$MAKE" = x; then
20946            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20947          fi
20948        else
20949          # Otherwise we believe it is a complete path. Use it as it is.
20950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20951$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20952          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20953$as_echo_n "checking for MAKE... " >&6; }
20954          if test ! -x "$tool_specified"; then
20955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20956$as_echo "not found" >&6; }
20957            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20958          fi
20959          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20960$as_echo "$tool_specified" >&6; }
20961        fi
20962      fi
20963    fi
20964
20965    # If MAKE was set by user, verify the version
20966
20967  MAKE_CANDIDATE=""$MAKE""
20968  DESCRIPTION="user supplied MAKE=$MAKE"
20969
20970  # On Cygwin, we require a newer version of make than on other platforms
20971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20972    MAKE_VERSION_EXPR="-e 4\."
20973    MAKE_REQUIRED_VERSION="4.0"
20974   else
20975    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20976    MAKE_REQUIRED_VERSION="3.81"
20977  fi
20978
20979  if test "x$MAKE_CANDIDATE" != x; then
20980    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20981$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20982    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20983    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20984    if test "x$IS_GNU_MAKE" = x; then
20985      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20986$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20987    else
20988      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20989      if test "x$IS_MODERN_MAKE" = x; then
20990        { $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
20991$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;}
20992      else
20993        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20994          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20995            MAKE_EXPECTED_ENV='cygwin'
20996          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20997            MAKE_EXPECTED_ENV='msys'
20998          else
20999            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21000          fi
21001          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21002          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21003        else
21004          # Not relevant for non-Windows
21005          IS_MAKE_CORRECT_ENV=true
21006        fi
21007        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21008          { $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
21009$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;}
21010        else
21011          FOUND_MAKE=$MAKE_CANDIDATE
21012
21013  # Only process if variable expands to non-empty
21014
21015  if test "x$FOUND_MAKE" != x; then
21016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21017
21018  # First separate the path from the arguments. This will split at the first
21019  # space.
21020  complete="$FOUND_MAKE"
21021  path="${complete%% *}"
21022  tmp="$complete EOL"
21023  arguments="${tmp#* }"
21024
21025  # Input might be given as Windows format, start by converting to
21026  # unix format.
21027  new_path=`$CYGPATH -u "$path"`
21028
21029  # Now try to locate executable using which
21030  new_path=`$WHICH "$new_path" 2> /dev/null`
21031  # bat and cmd files are not always considered executable in cygwin causing which
21032  # to not find them
21033  if test "x$new_path" = x \
21034      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21035      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21036    new_path=`$CYGPATH -u "$path"`
21037  fi
21038  if test "x$new_path" = x; then
21039    # Oops. Which didn't find the executable.
21040    # The splitting of arguments from the executable at a space might have been incorrect,
21041    # since paths with space are more likely in Windows. Give it another try with the whole
21042    # argument.
21043    path="$complete"
21044    arguments="EOL"
21045    new_path=`$CYGPATH -u "$path"`
21046    new_path=`$WHICH "$new_path" 2> /dev/null`
21047    # bat and cmd files are not always considered executable in cygwin causing which
21048    # to not find them
21049    if test "x$new_path" = x \
21050        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21051        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21052      new_path=`$CYGPATH -u "$path"`
21053    fi
21054    if test "x$new_path" = x; then
21055      # It's still not found. Now this is an unrecoverable error.
21056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21057$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21058      has_space=`$ECHO "$complete" | $GREP " "`
21059      if test "x$has_space" != x; then
21060        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21061$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21062      fi
21063      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21064    fi
21065  fi
21066
21067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21070  # "foo.exe" is OK but "foo" is an error.
21071  #
21072  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21073  # It is also a way to make sure we got the proper file name for the real test later on.
21074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21075  if test "x$test_shortpath" = x; then
21076    # Short path failed, file does not exist as specified.
21077    # Try adding .exe or .cmd
21078    if test -f "${new_path}.exe"; then
21079      input_to_shortpath="${new_path}.exe"
21080    elif test -f "${new_path}.cmd"; then
21081      input_to_shortpath="${new_path}.cmd"
21082    else
21083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21084$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21085      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21086$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21087      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21088    fi
21089  else
21090    input_to_shortpath="$new_path"
21091  fi
21092
21093  # Call helper function which possibly converts this using DOS-style short mode.
21094  # If so, the updated path is stored in $new_path.
21095  new_path="$input_to_shortpath"
21096
21097  input_path="$input_to_shortpath"
21098  # Check if we need to convert this using DOS-style short mode. If the path
21099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21100  # take no chances and rewrite it.
21101  # Note: m4 eats our [], so we need to use [ and ] instead.
21102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21103  if test "x$has_forbidden_chars" != x; then
21104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21108      # Going to short mode and back again did indeed matter. Since short mode is
21109      # case insensitive, let's make it lowercase to improve readability.
21110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21111      # Now convert it back to Unix-style (cygpath)
21112      input_path=`$CYGPATH -u "$shortmode_path"`
21113      new_path="$input_path"
21114    fi
21115  fi
21116
21117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21118  if test "x$test_cygdrive_prefix" = x; then
21119    # As a simple fix, exclude /usr/bin since it's not a real path.
21120    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21122      # a path prefixed by /cygdrive for fixpath to work.
21123      new_path="$CYGWIN_ROOT_PATH$input_path"
21124    fi
21125  fi
21126
21127  # remove trailing .exe if any
21128  new_path="${new_path/%.exe/}"
21129
21130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21131
21132  # First separate the path from the arguments. This will split at the first
21133  # space.
21134  complete="$FOUND_MAKE"
21135  path="${complete%% *}"
21136  tmp="$complete EOL"
21137  arguments="${tmp#* }"
21138
21139  # Input might be given as Windows format, start by converting to
21140  # unix format.
21141  new_path="$path"
21142
21143  windows_path="$new_path"
21144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21145    unix_path=`$CYGPATH -u "$windows_path"`
21146    new_path="$unix_path"
21147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21149    new_path="$unix_path"
21150  fi
21151
21152
21153  # Now try to locate executable using which
21154  new_path=`$WHICH "$new_path" 2> /dev/null`
21155
21156  if test "x$new_path" = x; then
21157    # Oops. Which didn't find the executable.
21158    # The splitting of arguments from the executable at a space might have been incorrect,
21159    # since paths with space are more likely in Windows. Give it another try with the whole
21160    # argument.
21161    path="$complete"
21162    arguments="EOL"
21163    new_path="$path"
21164
21165  windows_path="$new_path"
21166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21167    unix_path=`$CYGPATH -u "$windows_path"`
21168    new_path="$unix_path"
21169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21171    new_path="$unix_path"
21172  fi
21173
21174
21175    new_path=`$WHICH "$new_path" 2> /dev/null`
21176    # bat and cmd files are not always considered executable in MSYS causing which
21177    # to not find them
21178    if test "x$new_path" = x \
21179        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21180        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21181      new_path="$path"
21182
21183  windows_path="$new_path"
21184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21185    unix_path=`$CYGPATH -u "$windows_path"`
21186    new_path="$unix_path"
21187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21189    new_path="$unix_path"
21190  fi
21191
21192    fi
21193
21194    if test "x$new_path" = x; then
21195      # It's still not found. Now this is an unrecoverable error.
21196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21197$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21198      has_space=`$ECHO "$complete" | $GREP " "`
21199      if test "x$has_space" != x; then
21200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21202      fi
21203      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21204    fi
21205  fi
21206
21207  # Now new_path has a complete unix path to the binary
21208  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21209    # Keep paths in /bin as-is, but remove trailing .exe if any
21210    new_path="${new_path/%.exe/}"
21211    # Do not save /bin paths to all_fixpath_prefixes!
21212  else
21213    # Not in mixed or Windows style, start by that.
21214    new_path=`cmd //c echo $new_path`
21215
21216  input_path="$new_path"
21217  # Check if we need to convert this using DOS-style short mode. If the path
21218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21219  # take no chances and rewrite it.
21220  # Note: m4 eats our [], so we need to use [ and ] instead.
21221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21222  if test "x$has_forbidden_chars" != x; then
21223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21225  fi
21226
21227    # Output is in $new_path
21228
21229  windows_path="$new_path"
21230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21231    unix_path=`$CYGPATH -u "$windows_path"`
21232    new_path="$unix_path"
21233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21235    new_path="$unix_path"
21236  fi
21237
21238    # remove trailing .exe if any
21239    new_path="${new_path/%.exe/}"
21240
21241    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21242    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21243  fi
21244
21245    else
21246      # We're on a unix platform. Hooray! :)
21247      # First separate the path from the arguments. This will split at the first
21248      # space.
21249      complete="$FOUND_MAKE"
21250      path="${complete%% *}"
21251      tmp="$complete EOL"
21252      arguments="${tmp#* }"
21253
21254      # Cannot rely on the command "which" here since it doesn't always work.
21255      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21256      if test -z "$is_absolute_path"; then
21257        # Path to executable is not absolute. Find it.
21258        IFS_save="$IFS"
21259        IFS=:
21260        for p in $PATH; do
21261          if test -f "$p/$path" && test -x "$p/$path"; then
21262            new_path="$p/$path"
21263            break
21264          fi
21265        done
21266        IFS="$IFS_save"
21267      else
21268        # This is an absolute path, we can use it without further modifications.
21269        new_path="$path"
21270      fi
21271
21272      if test "x$new_path" = x; then
21273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21274$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21275        has_space=`$ECHO "$complete" | $GREP " "`
21276        if test "x$has_space" != x; then
21277          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21278$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21279        fi
21280        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21281      fi
21282    fi
21283
21284    # Now join together the path and the arguments once again
21285    if test "x$arguments" != xEOL; then
21286      new_complete="$new_path ${arguments% *}"
21287    else
21288      new_complete="$new_path"
21289    fi
21290
21291    if test "x$complete" != "x$new_complete"; then
21292      FOUND_MAKE="$new_complete"
21293      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21294$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21295    fi
21296  fi
21297
21298        fi
21299      fi
21300    fi
21301  fi
21302
21303    if test "x$FOUND_MAKE" = x; then
21304      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21305    fi
21306
21307  fi
21308
21309
21310  MAKE=$FOUND_MAKE
21311
21312  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21313$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21314
21315
21316  # Check if make supports the output sync option and if so, setup using it.
21317  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21318$as_echo_n "checking if make --output-sync is supported... " >&6; }
21319  if $MAKE --version -O > /dev/null 2>&1; then
21320    OUTPUT_SYNC_SUPPORTED=true
21321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21322$as_echo "yes" >&6; }
21323    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21324$as_echo_n "checking for output-sync value... " >&6; }
21325
21326# Check whether --with-output-sync was given.
21327if test "${with_output_sync+set}" = set; then :
21328  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21329fi
21330
21331    if test "x$OUTPUT_SYNC" = "x"; then
21332      OUTPUT_SYNC=none
21333    fi
21334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21335$as_echo "$OUTPUT_SYNC" >&6; }
21336    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21337      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21338    fi
21339  else
21340    OUTPUT_SYNC_SUPPORTED=false
21341    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21342$as_echo "no" >&6; }
21343  fi
21344
21345
21346
21347
21348
21349
21350  # Test if find supports -delete
21351  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21352$as_echo_n "checking if find supports -delete... " >&6; }
21353  FIND_DELETE="-delete"
21354
21355  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21356
21357  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21358
21359  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21360  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21361    # No, it does not.
21362    $RM $DELETEDIR/TestIfFindSupportsDelete
21363    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21364      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21365      FIND_DELETE="-print | $XARGS $RM"
21366    else
21367      FIND_DELETE="-exec $RM \{\} \+"
21368    fi
21369    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21370$as_echo "no" >&6; }
21371  else
21372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21373$as_echo "yes" >&6; }
21374  fi
21375  $RMDIR $DELETEDIR
21376
21377
21378
21379  # Test which kind of tar was found
21380  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21381    TAR_TYPE="gnu"
21382  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21383    TAR_TYPE="bsd"
21384  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21385    TAR_TYPE="bsd"
21386  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21387    TAR_TYPE="solaris"
21388  fi
21389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21390$as_echo_n "checking what type of tar was found... " >&6; }
21391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21392$as_echo "$TAR_TYPE" >&6; }
21393
21394  TAR_CREATE_FILE_PARAM=""
21395
21396  if test "x$TAR_TYPE" = "xgnu"; then
21397    TAR_INCLUDE_PARAM="T"
21398    TAR_SUPPORTS_TRANSFORM="true"
21399    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21400      # When using gnu tar for Solaris targets, need to use compatibility mode
21401      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21402    fi
21403  else
21404    TAR_INCLUDE_PARAM="I"
21405    TAR_SUPPORTS_TRANSFORM="false"
21406  fi
21407
21408
21409
21410
21411
21412
21413  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21414  # This is a problem for the grep resident on AIX.
21415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21416$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21417  # Multiple subsequent spaces..
21418  STACK_SPACES='aaa   bbb   ccc'
21419  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21420  # patterns in it.
21421  STACK_LIST=${STACK_SPACES// /$'\n'}
21422  NEEDLE_SPACES='ccc bbb aaa'
21423  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21424  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21425  if test "x$RESULT" == "x"; then
21426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21427$as_echo "yes" >&6; }
21428  else
21429    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21430      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21431    fi
21432    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21433  fi
21434
21435
21436  # These tools might not be installed by default,
21437  # need hint on how to install them.
21438
21439
21440
21441  # Publish this variable in the help.
21442
21443
21444  if [ -z "${UNZIP+x}" ]; then
21445    # The variable is not set by user, try to locate tool using the code snippet
21446    for ac_prog in unzip
21447do
21448  # Extract the first word of "$ac_prog", so it can be a program name with args.
21449set dummy $ac_prog; ac_word=$2
21450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21451$as_echo_n "checking for $ac_word... " >&6; }
21452if ${ac_cv_path_UNZIP+:} false; then :
21453  $as_echo_n "(cached) " >&6
21454else
21455  case $UNZIP in
21456  [\\/]* | ?:[\\/]*)
21457  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21458  ;;
21459  *)
21460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21461for as_dir in $PATH
21462do
21463  IFS=$as_save_IFS
21464  test -z "$as_dir" && as_dir=.
21465    for ac_exec_ext in '' $ac_executable_extensions; do
21466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21467    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21469    break 2
21470  fi
21471done
21472  done
21473IFS=$as_save_IFS
21474
21475  ;;
21476esac
21477fi
21478UNZIP=$ac_cv_path_UNZIP
21479if test -n "$UNZIP"; then
21480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21481$as_echo "$UNZIP" >&6; }
21482else
21483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21484$as_echo "no" >&6; }
21485fi
21486
21487
21488  test -n "$UNZIP" && break
21489done
21490
21491  else
21492    # The variable is set, but is it from the command line or the environment?
21493
21494    # Try to remove the string !UNZIP! from our list.
21495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21497      # If it failed, the variable was not from the command line. Ignore it,
21498      # but warn the user (except for BASH, which is always set by the calling BASH).
21499      if test "xUNZIP" != xBASH; then
21500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21501$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21502      fi
21503      # Try to locate tool using the code snippet
21504      for ac_prog in unzip
21505do
21506  # Extract the first word of "$ac_prog", so it can be a program name with args.
21507set dummy $ac_prog; ac_word=$2
21508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21509$as_echo_n "checking for $ac_word... " >&6; }
21510if ${ac_cv_path_UNZIP+:} false; then :
21511  $as_echo_n "(cached) " >&6
21512else
21513  case $UNZIP in
21514  [\\/]* | ?:[\\/]*)
21515  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21516  ;;
21517  *)
21518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21519for as_dir in $PATH
21520do
21521  IFS=$as_save_IFS
21522  test -z "$as_dir" && as_dir=.
21523    for ac_exec_ext in '' $ac_executable_extensions; do
21524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21525    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21527    break 2
21528  fi
21529done
21530  done
21531IFS=$as_save_IFS
21532
21533  ;;
21534esac
21535fi
21536UNZIP=$ac_cv_path_UNZIP
21537if test -n "$UNZIP"; then
21538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21539$as_echo "$UNZIP" >&6; }
21540else
21541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21542$as_echo "no" >&6; }
21543fi
21544
21545
21546  test -n "$UNZIP" && break
21547done
21548
21549    else
21550      # If it succeeded, then it was overridden by the user. We will use it
21551      # for the tool.
21552
21553      # First remove it from the list of overridden variables, so we can test
21554      # for unknown variables in the end.
21555      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21556
21557      # Check if we try to supply an empty value
21558      if test "x$UNZIP" = x; then
21559        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21560$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21562$as_echo_n "checking for UNZIP... " >&6; }
21563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21564$as_echo "disabled" >&6; }
21565      else
21566        # Check if the provided tool contains a complete path.
21567        tool_specified="$UNZIP"
21568        tool_basename="${tool_specified##*/}"
21569        if test "x$tool_basename" = "x$tool_specified"; then
21570          # A command without a complete path is provided, search $PATH.
21571          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21572$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21573          # Extract the first word of "$tool_basename", so it can be a program name with args.
21574set dummy $tool_basename; ac_word=$2
21575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21576$as_echo_n "checking for $ac_word... " >&6; }
21577if ${ac_cv_path_UNZIP+:} false; then :
21578  $as_echo_n "(cached) " >&6
21579else
21580  case $UNZIP in
21581  [\\/]* | ?:[\\/]*)
21582  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21583  ;;
21584  *)
21585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21586for as_dir in $PATH
21587do
21588  IFS=$as_save_IFS
21589  test -z "$as_dir" && as_dir=.
21590    for ac_exec_ext in '' $ac_executable_extensions; do
21591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21592    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21594    break 2
21595  fi
21596done
21597  done
21598IFS=$as_save_IFS
21599
21600  ;;
21601esac
21602fi
21603UNZIP=$ac_cv_path_UNZIP
21604if test -n "$UNZIP"; then
21605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21606$as_echo "$UNZIP" >&6; }
21607else
21608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21609$as_echo "no" >&6; }
21610fi
21611
21612
21613          if test "x$UNZIP" = x; then
21614            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21615          fi
21616        else
21617          # Otherwise we believe it is a complete path. Use it as it is.
21618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21619$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21620          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21621$as_echo_n "checking for UNZIP... " >&6; }
21622          if test ! -x "$tool_specified"; then
21623            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21624$as_echo "not found" >&6; }
21625            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21626          fi
21627          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21628$as_echo "$tool_specified" >&6; }
21629        fi
21630      fi
21631    fi
21632
21633  fi
21634
21635
21636
21637  if test "x$UNZIP" = x; then
21638    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21639  fi
21640
21641
21642  # Since zip uses "ZIP" as a environment variable for passing options, we need
21643  # to name our variable differently, hence ZIPEXE.
21644
21645
21646
21647  # Publish this variable in the help.
21648
21649
21650  if [ -z "${ZIPEXE+x}" ]; then
21651    # The variable is not set by user, try to locate tool using the code snippet
21652    for ac_prog in zip
21653do
21654  # Extract the first word of "$ac_prog", so it can be a program name with args.
21655set dummy $ac_prog; ac_word=$2
21656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21657$as_echo_n "checking for $ac_word... " >&6; }
21658if ${ac_cv_path_ZIPEXE+:} false; then :
21659  $as_echo_n "(cached) " >&6
21660else
21661  case $ZIPEXE in
21662  [\\/]* | ?:[\\/]*)
21663  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21664  ;;
21665  *)
21666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21667for as_dir in $PATH
21668do
21669  IFS=$as_save_IFS
21670  test -z "$as_dir" && as_dir=.
21671    for ac_exec_ext in '' $ac_executable_extensions; do
21672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21673    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21675    break 2
21676  fi
21677done
21678  done
21679IFS=$as_save_IFS
21680
21681  ;;
21682esac
21683fi
21684ZIPEXE=$ac_cv_path_ZIPEXE
21685if test -n "$ZIPEXE"; then
21686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21687$as_echo "$ZIPEXE" >&6; }
21688else
21689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21690$as_echo "no" >&6; }
21691fi
21692
21693
21694  test -n "$ZIPEXE" && break
21695done
21696
21697  else
21698    # The variable is set, but is it from the command line or the environment?
21699
21700    # Try to remove the string !ZIPEXE! from our list.
21701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21703      # If it failed, the variable was not from the command line. Ignore it,
21704      # but warn the user (except for BASH, which is always set by the calling BASH).
21705      if test "xZIPEXE" != xBASH; then
21706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21707$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21708      fi
21709      # Try to locate tool using the code snippet
21710      for ac_prog in zip
21711do
21712  # Extract the first word of "$ac_prog", so it can be a program name with args.
21713set dummy $ac_prog; ac_word=$2
21714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21715$as_echo_n "checking for $ac_word... " >&6; }
21716if ${ac_cv_path_ZIPEXE+:} false; then :
21717  $as_echo_n "(cached) " >&6
21718else
21719  case $ZIPEXE in
21720  [\\/]* | ?:[\\/]*)
21721  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21722  ;;
21723  *)
21724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21725for as_dir in $PATH
21726do
21727  IFS=$as_save_IFS
21728  test -z "$as_dir" && as_dir=.
21729    for ac_exec_ext in '' $ac_executable_extensions; do
21730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21731    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21733    break 2
21734  fi
21735done
21736  done
21737IFS=$as_save_IFS
21738
21739  ;;
21740esac
21741fi
21742ZIPEXE=$ac_cv_path_ZIPEXE
21743if test -n "$ZIPEXE"; then
21744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21745$as_echo "$ZIPEXE" >&6; }
21746else
21747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21748$as_echo "no" >&6; }
21749fi
21750
21751
21752  test -n "$ZIPEXE" && break
21753done
21754
21755    else
21756      # If it succeeded, then it was overridden by the user. We will use it
21757      # for the tool.
21758
21759      # First remove it from the list of overridden variables, so we can test
21760      # for unknown variables in the end.
21761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21762
21763      # Check if we try to supply an empty value
21764      if test "x$ZIPEXE" = x; then
21765        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21766$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21767        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21768$as_echo_n "checking for ZIPEXE... " >&6; }
21769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21770$as_echo "disabled" >&6; }
21771      else
21772        # Check if the provided tool contains a complete path.
21773        tool_specified="$ZIPEXE"
21774        tool_basename="${tool_specified##*/}"
21775        if test "x$tool_basename" = "x$tool_specified"; then
21776          # A command without a complete path is provided, search $PATH.
21777          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21778$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21779          # Extract the first word of "$tool_basename", so it can be a program name with args.
21780set dummy $tool_basename; ac_word=$2
21781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21782$as_echo_n "checking for $ac_word... " >&6; }
21783if ${ac_cv_path_ZIPEXE+:} false; then :
21784  $as_echo_n "(cached) " >&6
21785else
21786  case $ZIPEXE in
21787  [\\/]* | ?:[\\/]*)
21788  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21789  ;;
21790  *)
21791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21792for as_dir in $PATH
21793do
21794  IFS=$as_save_IFS
21795  test -z "$as_dir" && as_dir=.
21796    for ac_exec_ext in '' $ac_executable_extensions; do
21797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21798    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21800    break 2
21801  fi
21802done
21803  done
21804IFS=$as_save_IFS
21805
21806  ;;
21807esac
21808fi
21809ZIPEXE=$ac_cv_path_ZIPEXE
21810if test -n "$ZIPEXE"; then
21811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21812$as_echo "$ZIPEXE" >&6; }
21813else
21814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21815$as_echo "no" >&6; }
21816fi
21817
21818
21819          if test "x$ZIPEXE" = x; then
21820            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21821          fi
21822        else
21823          # Otherwise we believe it is a complete path. Use it as it is.
21824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21825$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21826          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21827$as_echo_n "checking for ZIPEXE... " >&6; }
21828          if test ! -x "$tool_specified"; then
21829            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21830$as_echo "not found" >&6; }
21831            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21832          fi
21833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21834$as_echo "$tool_specified" >&6; }
21835        fi
21836      fi
21837    fi
21838
21839  fi
21840
21841
21842
21843  if test "x$ZIPEXE" = x; then
21844    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21845  fi
21846
21847
21848
21849  # Non-required basic tools
21850
21851
21852
21853  # Publish this variable in the help.
21854
21855
21856  if [ -z "${LDD+x}" ]; then
21857    # The variable is not set by user, try to locate tool using the code snippet
21858    for ac_prog in ldd
21859do
21860  # Extract the first word of "$ac_prog", so it can be a program name with args.
21861set dummy $ac_prog; ac_word=$2
21862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21863$as_echo_n "checking for $ac_word... " >&6; }
21864if ${ac_cv_path_LDD+:} false; then :
21865  $as_echo_n "(cached) " >&6
21866else
21867  case $LDD in
21868  [\\/]* | ?:[\\/]*)
21869  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21870  ;;
21871  *)
21872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21873for as_dir in $PATH
21874do
21875  IFS=$as_save_IFS
21876  test -z "$as_dir" && as_dir=.
21877    for ac_exec_ext in '' $ac_executable_extensions; do
21878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21879    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21881    break 2
21882  fi
21883done
21884  done
21885IFS=$as_save_IFS
21886
21887  ;;
21888esac
21889fi
21890LDD=$ac_cv_path_LDD
21891if test -n "$LDD"; then
21892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21893$as_echo "$LDD" >&6; }
21894else
21895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21896$as_echo "no" >&6; }
21897fi
21898
21899
21900  test -n "$LDD" && break
21901done
21902
21903  else
21904    # The variable is set, but is it from the command line or the environment?
21905
21906    # Try to remove the string !LDD! from our list.
21907    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21908    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21909      # If it failed, the variable was not from the command line. Ignore it,
21910      # but warn the user (except for BASH, which is always set by the calling BASH).
21911      if test "xLDD" != xBASH; then
21912        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21913$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21914      fi
21915      # Try to locate tool using the code snippet
21916      for ac_prog in ldd
21917do
21918  # Extract the first word of "$ac_prog", so it can be a program name with args.
21919set dummy $ac_prog; ac_word=$2
21920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21921$as_echo_n "checking for $ac_word... " >&6; }
21922if ${ac_cv_path_LDD+:} false; then :
21923  $as_echo_n "(cached) " >&6
21924else
21925  case $LDD in
21926  [\\/]* | ?:[\\/]*)
21927  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21928  ;;
21929  *)
21930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21931for as_dir in $PATH
21932do
21933  IFS=$as_save_IFS
21934  test -z "$as_dir" && as_dir=.
21935    for ac_exec_ext in '' $ac_executable_extensions; do
21936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21937    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21939    break 2
21940  fi
21941done
21942  done
21943IFS=$as_save_IFS
21944
21945  ;;
21946esac
21947fi
21948LDD=$ac_cv_path_LDD
21949if test -n "$LDD"; then
21950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21951$as_echo "$LDD" >&6; }
21952else
21953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21954$as_echo "no" >&6; }
21955fi
21956
21957
21958  test -n "$LDD" && break
21959done
21960
21961    else
21962      # If it succeeded, then it was overridden by the user. We will use it
21963      # for the tool.
21964
21965      # First remove it from the list of overridden variables, so we can test
21966      # for unknown variables in the end.
21967      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21968
21969      # Check if we try to supply an empty value
21970      if test "x$LDD" = x; then
21971        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21972$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21973        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21974$as_echo_n "checking for LDD... " >&6; }
21975        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21976$as_echo "disabled" >&6; }
21977      else
21978        # Check if the provided tool contains a complete path.
21979        tool_specified="$LDD"
21980        tool_basename="${tool_specified##*/}"
21981        if test "x$tool_basename" = "x$tool_specified"; then
21982          # A command without a complete path is provided, search $PATH.
21983          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21984$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21985          # Extract the first word of "$tool_basename", so it can be a program name with args.
21986set dummy $tool_basename; ac_word=$2
21987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21988$as_echo_n "checking for $ac_word... " >&6; }
21989if ${ac_cv_path_LDD+:} false; then :
21990  $as_echo_n "(cached) " >&6
21991else
21992  case $LDD in
21993  [\\/]* | ?:[\\/]*)
21994  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21995  ;;
21996  *)
21997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21998for as_dir in $PATH
21999do
22000  IFS=$as_save_IFS
22001  test -z "$as_dir" && as_dir=.
22002    for ac_exec_ext in '' $ac_executable_extensions; do
22003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22004    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22006    break 2
22007  fi
22008done
22009  done
22010IFS=$as_save_IFS
22011
22012  ;;
22013esac
22014fi
22015LDD=$ac_cv_path_LDD
22016if test -n "$LDD"; then
22017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22018$as_echo "$LDD" >&6; }
22019else
22020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22021$as_echo "no" >&6; }
22022fi
22023
22024
22025          if test "x$LDD" = x; then
22026            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22027          fi
22028        else
22029          # Otherwise we believe it is a complete path. Use it as it is.
22030          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22031$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22032          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22033$as_echo_n "checking for LDD... " >&6; }
22034          if test ! -x "$tool_specified"; then
22035            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22036$as_echo "not found" >&6; }
22037            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22038          fi
22039          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22040$as_echo "$tool_specified" >&6; }
22041        fi
22042      fi
22043    fi
22044
22045  fi
22046
22047
22048  if test "x$LDD" = "x"; then
22049    # List shared lib dependencies is used for
22050    # debug output and checking for forbidden dependencies.
22051    # We can build without it.
22052    LDD="true"
22053  fi
22054
22055
22056  # Publish this variable in the help.
22057
22058
22059  if [ -z "${OTOOL+x}" ]; then
22060    # The variable is not set by user, try to locate tool using the code snippet
22061    for ac_prog in otool
22062do
22063  # Extract the first word of "$ac_prog", so it can be a program name with args.
22064set dummy $ac_prog; ac_word=$2
22065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22066$as_echo_n "checking for $ac_word... " >&6; }
22067if ${ac_cv_path_OTOOL+:} false; then :
22068  $as_echo_n "(cached) " >&6
22069else
22070  case $OTOOL in
22071  [\\/]* | ?:[\\/]*)
22072  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22073  ;;
22074  *)
22075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22076for as_dir in $PATH
22077do
22078  IFS=$as_save_IFS
22079  test -z "$as_dir" && as_dir=.
22080    for ac_exec_ext in '' $ac_executable_extensions; do
22081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22082    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22084    break 2
22085  fi
22086done
22087  done
22088IFS=$as_save_IFS
22089
22090  ;;
22091esac
22092fi
22093OTOOL=$ac_cv_path_OTOOL
22094if test -n "$OTOOL"; then
22095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22096$as_echo "$OTOOL" >&6; }
22097else
22098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22099$as_echo "no" >&6; }
22100fi
22101
22102
22103  test -n "$OTOOL" && break
22104done
22105
22106  else
22107    # The variable is set, but is it from the command line or the environment?
22108
22109    # Try to remove the string !OTOOL! from our list.
22110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22112      # If it failed, the variable was not from the command line. Ignore it,
22113      # but warn the user (except for BASH, which is always set by the calling BASH).
22114      if test "xOTOOL" != xBASH; then
22115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22116$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22117      fi
22118      # Try to locate tool using the code snippet
22119      for ac_prog in otool
22120do
22121  # Extract the first word of "$ac_prog", so it can be a program name with args.
22122set dummy $ac_prog; ac_word=$2
22123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22124$as_echo_n "checking for $ac_word... " >&6; }
22125if ${ac_cv_path_OTOOL+:} false; then :
22126  $as_echo_n "(cached) " >&6
22127else
22128  case $OTOOL in
22129  [\\/]* | ?:[\\/]*)
22130  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22131  ;;
22132  *)
22133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22134for as_dir in $PATH
22135do
22136  IFS=$as_save_IFS
22137  test -z "$as_dir" && as_dir=.
22138    for ac_exec_ext in '' $ac_executable_extensions; do
22139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22140    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22142    break 2
22143  fi
22144done
22145  done
22146IFS=$as_save_IFS
22147
22148  ;;
22149esac
22150fi
22151OTOOL=$ac_cv_path_OTOOL
22152if test -n "$OTOOL"; then
22153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22154$as_echo "$OTOOL" >&6; }
22155else
22156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22157$as_echo "no" >&6; }
22158fi
22159
22160
22161  test -n "$OTOOL" && break
22162done
22163
22164    else
22165      # If it succeeded, then it was overridden by the user. We will use it
22166      # for the tool.
22167
22168      # First remove it from the list of overridden variables, so we can test
22169      # for unknown variables in the end.
22170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22171
22172      # Check if we try to supply an empty value
22173      if test "x$OTOOL" = x; then
22174        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22175$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22177$as_echo_n "checking for OTOOL... " >&6; }
22178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22179$as_echo "disabled" >&6; }
22180      else
22181        # Check if the provided tool contains a complete path.
22182        tool_specified="$OTOOL"
22183        tool_basename="${tool_specified##*/}"
22184        if test "x$tool_basename" = "x$tool_specified"; then
22185          # A command without a complete path is provided, search $PATH.
22186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22187$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22188          # Extract the first word of "$tool_basename", so it can be a program name with args.
22189set dummy $tool_basename; ac_word=$2
22190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22191$as_echo_n "checking for $ac_word... " >&6; }
22192if ${ac_cv_path_OTOOL+:} false; then :
22193  $as_echo_n "(cached) " >&6
22194else
22195  case $OTOOL in
22196  [\\/]* | ?:[\\/]*)
22197  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22198  ;;
22199  *)
22200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22201for as_dir in $PATH
22202do
22203  IFS=$as_save_IFS
22204  test -z "$as_dir" && as_dir=.
22205    for ac_exec_ext in '' $ac_executable_extensions; do
22206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22207    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22209    break 2
22210  fi
22211done
22212  done
22213IFS=$as_save_IFS
22214
22215  ;;
22216esac
22217fi
22218OTOOL=$ac_cv_path_OTOOL
22219if test -n "$OTOOL"; then
22220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22221$as_echo "$OTOOL" >&6; }
22222else
22223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22224$as_echo "no" >&6; }
22225fi
22226
22227
22228          if test "x$OTOOL" = x; then
22229            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22230          fi
22231        else
22232          # Otherwise we believe it is a complete path. Use it as it is.
22233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22234$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22235          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22236$as_echo_n "checking for OTOOL... " >&6; }
22237          if test ! -x "$tool_specified"; then
22238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22239$as_echo "not found" >&6; }
22240            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22241          fi
22242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22243$as_echo "$tool_specified" >&6; }
22244        fi
22245      fi
22246    fi
22247
22248  fi
22249
22250
22251  if test "x$OTOOL" = "x"; then
22252    OTOOL="true"
22253  fi
22254
22255
22256  # Publish this variable in the help.
22257
22258
22259  if [ -z "${READELF+x}" ]; then
22260    # The variable is not set by user, try to locate tool using the code snippet
22261    for ac_prog in greadelf readelf
22262do
22263  # Extract the first word of "$ac_prog", so it can be a program name with args.
22264set dummy $ac_prog; ac_word=$2
22265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22266$as_echo_n "checking for $ac_word... " >&6; }
22267if ${ac_cv_path_READELF+:} false; then :
22268  $as_echo_n "(cached) " >&6
22269else
22270  case $READELF in
22271  [\\/]* | ?:[\\/]*)
22272  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22273  ;;
22274  *)
22275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22276for as_dir in $PATH
22277do
22278  IFS=$as_save_IFS
22279  test -z "$as_dir" && as_dir=.
22280    for ac_exec_ext in '' $ac_executable_extensions; do
22281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22282    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22284    break 2
22285  fi
22286done
22287  done
22288IFS=$as_save_IFS
22289
22290  ;;
22291esac
22292fi
22293READELF=$ac_cv_path_READELF
22294if test -n "$READELF"; then
22295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22296$as_echo "$READELF" >&6; }
22297else
22298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22299$as_echo "no" >&6; }
22300fi
22301
22302
22303  test -n "$READELF" && break
22304done
22305
22306  else
22307    # The variable is set, but is it from the command line or the environment?
22308
22309    # Try to remove the string !READELF! from our list.
22310    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22311    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22312      # If it failed, the variable was not from the command line. Ignore it,
22313      # but warn the user (except for BASH, which is always set by the calling BASH).
22314      if test "xREADELF" != xBASH; then
22315        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22316$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22317      fi
22318      # Try to locate tool using the code snippet
22319      for ac_prog in greadelf readelf
22320do
22321  # Extract the first word of "$ac_prog", so it can be a program name with args.
22322set dummy $ac_prog; ac_word=$2
22323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22324$as_echo_n "checking for $ac_word... " >&6; }
22325if ${ac_cv_path_READELF+:} false; then :
22326  $as_echo_n "(cached) " >&6
22327else
22328  case $READELF in
22329  [\\/]* | ?:[\\/]*)
22330  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22331  ;;
22332  *)
22333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22334for as_dir in $PATH
22335do
22336  IFS=$as_save_IFS
22337  test -z "$as_dir" && as_dir=.
22338    for ac_exec_ext in '' $ac_executable_extensions; do
22339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22340    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22342    break 2
22343  fi
22344done
22345  done
22346IFS=$as_save_IFS
22347
22348  ;;
22349esac
22350fi
22351READELF=$ac_cv_path_READELF
22352if test -n "$READELF"; then
22353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22354$as_echo "$READELF" >&6; }
22355else
22356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22357$as_echo "no" >&6; }
22358fi
22359
22360
22361  test -n "$READELF" && break
22362done
22363
22364    else
22365      # If it succeeded, then it was overridden by the user. We will use it
22366      # for the tool.
22367
22368      # First remove it from the list of overridden variables, so we can test
22369      # for unknown variables in the end.
22370      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22371
22372      # Check if we try to supply an empty value
22373      if test "x$READELF" = x; then
22374        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22375$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22377$as_echo_n "checking for READELF... " >&6; }
22378        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22379$as_echo "disabled" >&6; }
22380      else
22381        # Check if the provided tool contains a complete path.
22382        tool_specified="$READELF"
22383        tool_basename="${tool_specified##*/}"
22384        if test "x$tool_basename" = "x$tool_specified"; then
22385          # A command without a complete path is provided, search $PATH.
22386          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22387$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22388          # Extract the first word of "$tool_basename", so it can be a program name with args.
22389set dummy $tool_basename; ac_word=$2
22390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22391$as_echo_n "checking for $ac_word... " >&6; }
22392if ${ac_cv_path_READELF+:} false; then :
22393  $as_echo_n "(cached) " >&6
22394else
22395  case $READELF in
22396  [\\/]* | ?:[\\/]*)
22397  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22398  ;;
22399  *)
22400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22401for as_dir in $PATH
22402do
22403  IFS=$as_save_IFS
22404  test -z "$as_dir" && as_dir=.
22405    for ac_exec_ext in '' $ac_executable_extensions; do
22406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22407    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22409    break 2
22410  fi
22411done
22412  done
22413IFS=$as_save_IFS
22414
22415  ;;
22416esac
22417fi
22418READELF=$ac_cv_path_READELF
22419if test -n "$READELF"; then
22420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22421$as_echo "$READELF" >&6; }
22422else
22423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22424$as_echo "no" >&6; }
22425fi
22426
22427
22428          if test "x$READELF" = x; then
22429            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22430          fi
22431        else
22432          # Otherwise we believe it is a complete path. Use it as it is.
22433          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22434$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22435          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22436$as_echo_n "checking for READELF... " >&6; }
22437          if test ! -x "$tool_specified"; then
22438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22439$as_echo "not found" >&6; }
22440            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22441          fi
22442          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22443$as_echo "$tool_specified" >&6; }
22444        fi
22445      fi
22446    fi
22447
22448  fi
22449
22450
22451
22452
22453  # Publish this variable in the help.
22454
22455
22456  if [ -z "${DOT+x}" ]; then
22457    # The variable is not set by user, try to locate tool using the code snippet
22458    for ac_prog in dot
22459do
22460  # Extract the first word of "$ac_prog", so it can be a program name with args.
22461set dummy $ac_prog; ac_word=$2
22462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22463$as_echo_n "checking for $ac_word... " >&6; }
22464if ${ac_cv_path_DOT+:} false; then :
22465  $as_echo_n "(cached) " >&6
22466else
22467  case $DOT in
22468  [\\/]* | ?:[\\/]*)
22469  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22470  ;;
22471  *)
22472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22473for as_dir in $PATH
22474do
22475  IFS=$as_save_IFS
22476  test -z "$as_dir" && as_dir=.
22477    for ac_exec_ext in '' $ac_executable_extensions; do
22478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22479    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22481    break 2
22482  fi
22483done
22484  done
22485IFS=$as_save_IFS
22486
22487  ;;
22488esac
22489fi
22490DOT=$ac_cv_path_DOT
22491if test -n "$DOT"; then
22492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22493$as_echo "$DOT" >&6; }
22494else
22495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22496$as_echo "no" >&6; }
22497fi
22498
22499
22500  test -n "$DOT" && break
22501done
22502
22503  else
22504    # The variable is set, but is it from the command line or the environment?
22505
22506    # Try to remove the string !DOT! from our list.
22507    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22508    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22509      # If it failed, the variable was not from the command line. Ignore it,
22510      # but warn the user (except for BASH, which is always set by the calling BASH).
22511      if test "xDOT" != xBASH; then
22512        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22513$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22514      fi
22515      # Try to locate tool using the code snippet
22516      for ac_prog in dot
22517do
22518  # Extract the first word of "$ac_prog", so it can be a program name with args.
22519set dummy $ac_prog; ac_word=$2
22520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22521$as_echo_n "checking for $ac_word... " >&6; }
22522if ${ac_cv_path_DOT+:} false; then :
22523  $as_echo_n "(cached) " >&6
22524else
22525  case $DOT in
22526  [\\/]* | ?:[\\/]*)
22527  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22528  ;;
22529  *)
22530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22531for as_dir in $PATH
22532do
22533  IFS=$as_save_IFS
22534  test -z "$as_dir" && as_dir=.
22535    for ac_exec_ext in '' $ac_executable_extensions; do
22536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22537    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22539    break 2
22540  fi
22541done
22542  done
22543IFS=$as_save_IFS
22544
22545  ;;
22546esac
22547fi
22548DOT=$ac_cv_path_DOT
22549if test -n "$DOT"; then
22550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22551$as_echo "$DOT" >&6; }
22552else
22553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22554$as_echo "no" >&6; }
22555fi
22556
22557
22558  test -n "$DOT" && break
22559done
22560
22561    else
22562      # If it succeeded, then it was overridden by the user. We will use it
22563      # for the tool.
22564
22565      # First remove it from the list of overridden variables, so we can test
22566      # for unknown variables in the end.
22567      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22568
22569      # Check if we try to supply an empty value
22570      if test "x$DOT" = x; then
22571        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22572$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22573        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22574$as_echo_n "checking for DOT... " >&6; }
22575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22576$as_echo "disabled" >&6; }
22577      else
22578        # Check if the provided tool contains a complete path.
22579        tool_specified="$DOT"
22580        tool_basename="${tool_specified##*/}"
22581        if test "x$tool_basename" = "x$tool_specified"; then
22582          # A command without a complete path is provided, search $PATH.
22583          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22584$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22585          # Extract the first word of "$tool_basename", so it can be a program name with args.
22586set dummy $tool_basename; ac_word=$2
22587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22588$as_echo_n "checking for $ac_word... " >&6; }
22589if ${ac_cv_path_DOT+:} false; then :
22590  $as_echo_n "(cached) " >&6
22591else
22592  case $DOT in
22593  [\\/]* | ?:[\\/]*)
22594  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22595  ;;
22596  *)
22597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22598for as_dir in $PATH
22599do
22600  IFS=$as_save_IFS
22601  test -z "$as_dir" && as_dir=.
22602    for ac_exec_ext in '' $ac_executable_extensions; do
22603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22604    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22606    break 2
22607  fi
22608done
22609  done
22610IFS=$as_save_IFS
22611
22612  ;;
22613esac
22614fi
22615DOT=$ac_cv_path_DOT
22616if test -n "$DOT"; then
22617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22618$as_echo "$DOT" >&6; }
22619else
22620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22621$as_echo "no" >&6; }
22622fi
22623
22624
22625          if test "x$DOT" = x; then
22626            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22627          fi
22628        else
22629          # Otherwise we believe it is a complete path. Use it as it is.
22630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22631$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22632          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22633$as_echo_n "checking for DOT... " >&6; }
22634          if test ! -x "$tool_specified"; then
22635            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22636$as_echo "not found" >&6; }
22637            as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22638          fi
22639          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22640$as_echo "$tool_specified" >&6; }
22641        fi
22642      fi
22643    fi
22644
22645  fi
22646
22647
22648
22649
22650  # Publish this variable in the help.
22651
22652
22653  if [ -z "${HG+x}" ]; then
22654    # The variable is not set by user, try to locate tool using the code snippet
22655    for ac_prog in hg
22656do
22657  # Extract the first word of "$ac_prog", so it can be a program name with args.
22658set dummy $ac_prog; ac_word=$2
22659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22660$as_echo_n "checking for $ac_word... " >&6; }
22661if ${ac_cv_path_HG+:} false; then :
22662  $as_echo_n "(cached) " >&6
22663else
22664  case $HG in
22665  [\\/]* | ?:[\\/]*)
22666  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22667  ;;
22668  *)
22669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22670for as_dir in $PATH
22671do
22672  IFS=$as_save_IFS
22673  test -z "$as_dir" && as_dir=.
22674    for ac_exec_ext in '' $ac_executable_extensions; do
22675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22676    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22678    break 2
22679  fi
22680done
22681  done
22682IFS=$as_save_IFS
22683
22684  ;;
22685esac
22686fi
22687HG=$ac_cv_path_HG
22688if test -n "$HG"; then
22689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22690$as_echo "$HG" >&6; }
22691else
22692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22693$as_echo "no" >&6; }
22694fi
22695
22696
22697  test -n "$HG" && break
22698done
22699
22700  else
22701    # The variable is set, but is it from the command line or the environment?
22702
22703    # Try to remove the string !HG! from our list.
22704    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22705    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22706      # If it failed, the variable was not from the command line. Ignore it,
22707      # but warn the user (except for BASH, which is always set by the calling BASH).
22708      if test "xHG" != xBASH; then
22709        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22710$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22711      fi
22712      # Try to locate tool using the code snippet
22713      for ac_prog in hg
22714do
22715  # Extract the first word of "$ac_prog", so it can be a program name with args.
22716set dummy $ac_prog; ac_word=$2
22717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22718$as_echo_n "checking for $ac_word... " >&6; }
22719if ${ac_cv_path_HG+:} false; then :
22720  $as_echo_n "(cached) " >&6
22721else
22722  case $HG in
22723  [\\/]* | ?:[\\/]*)
22724  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22725  ;;
22726  *)
22727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22728for as_dir in $PATH
22729do
22730  IFS=$as_save_IFS
22731  test -z "$as_dir" && as_dir=.
22732    for ac_exec_ext in '' $ac_executable_extensions; do
22733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22734    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22736    break 2
22737  fi
22738done
22739  done
22740IFS=$as_save_IFS
22741
22742  ;;
22743esac
22744fi
22745HG=$ac_cv_path_HG
22746if test -n "$HG"; then
22747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22748$as_echo "$HG" >&6; }
22749else
22750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22751$as_echo "no" >&6; }
22752fi
22753
22754
22755  test -n "$HG" && break
22756done
22757
22758    else
22759      # If it succeeded, then it was overridden by the user. We will use it
22760      # for the tool.
22761
22762      # First remove it from the list of overridden variables, so we can test
22763      # for unknown variables in the end.
22764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22765
22766      # Check if we try to supply an empty value
22767      if test "x$HG" = x; then
22768        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22769$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22771$as_echo_n "checking for HG... " >&6; }
22772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22773$as_echo "disabled" >&6; }
22774      else
22775        # Check if the provided tool contains a complete path.
22776        tool_specified="$HG"
22777        tool_basename="${tool_specified##*/}"
22778        if test "x$tool_basename" = "x$tool_specified"; then
22779          # A command without a complete path is provided, search $PATH.
22780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22781$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22782          # Extract the first word of "$tool_basename", so it can be a program name with args.
22783set dummy $tool_basename; ac_word=$2
22784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22785$as_echo_n "checking for $ac_word... " >&6; }
22786if ${ac_cv_path_HG+:} false; then :
22787  $as_echo_n "(cached) " >&6
22788else
22789  case $HG in
22790  [\\/]* | ?:[\\/]*)
22791  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22792  ;;
22793  *)
22794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22795for as_dir in $PATH
22796do
22797  IFS=$as_save_IFS
22798  test -z "$as_dir" && as_dir=.
22799    for ac_exec_ext in '' $ac_executable_extensions; do
22800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22801    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22803    break 2
22804  fi
22805done
22806  done
22807IFS=$as_save_IFS
22808
22809  ;;
22810esac
22811fi
22812HG=$ac_cv_path_HG
22813if test -n "$HG"; then
22814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22815$as_echo "$HG" >&6; }
22816else
22817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22818$as_echo "no" >&6; }
22819fi
22820
22821
22822          if test "x$HG" = x; then
22823            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22824          fi
22825        else
22826          # Otherwise we believe it is a complete path. Use it as it is.
22827          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22828$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22829          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22830$as_echo_n "checking for HG... " >&6; }
22831          if test ! -x "$tool_specified"; then
22832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22833$as_echo "not found" >&6; }
22834            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22835          fi
22836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22837$as_echo "$tool_specified" >&6; }
22838        fi
22839      fi
22840    fi
22841
22842  fi
22843
22844
22845
22846
22847  # Publish this variable in the help.
22848
22849
22850  if [ -z "${STAT+x}" ]; then
22851    # The variable is not set by user, try to locate tool using the code snippet
22852    for ac_prog in stat
22853do
22854  # Extract the first word of "$ac_prog", so it can be a program name with args.
22855set dummy $ac_prog; ac_word=$2
22856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22857$as_echo_n "checking for $ac_word... " >&6; }
22858if ${ac_cv_path_STAT+:} false; then :
22859  $as_echo_n "(cached) " >&6
22860else
22861  case $STAT in
22862  [\\/]* | ?:[\\/]*)
22863  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22864  ;;
22865  *)
22866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22867for as_dir in $PATH
22868do
22869  IFS=$as_save_IFS
22870  test -z "$as_dir" && as_dir=.
22871    for ac_exec_ext in '' $ac_executable_extensions; do
22872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22873    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22875    break 2
22876  fi
22877done
22878  done
22879IFS=$as_save_IFS
22880
22881  ;;
22882esac
22883fi
22884STAT=$ac_cv_path_STAT
22885if test -n "$STAT"; then
22886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22887$as_echo "$STAT" >&6; }
22888else
22889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22890$as_echo "no" >&6; }
22891fi
22892
22893
22894  test -n "$STAT" && break
22895done
22896
22897  else
22898    # The variable is set, but is it from the command line or the environment?
22899
22900    # Try to remove the string !STAT! from our list.
22901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22903      # If it failed, the variable was not from the command line. Ignore it,
22904      # but warn the user (except for BASH, which is always set by the calling BASH).
22905      if test "xSTAT" != xBASH; then
22906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22907$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22908      fi
22909      # Try to locate tool using the code snippet
22910      for ac_prog in stat
22911do
22912  # Extract the first word of "$ac_prog", so it can be a program name with args.
22913set dummy $ac_prog; ac_word=$2
22914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22915$as_echo_n "checking for $ac_word... " >&6; }
22916if ${ac_cv_path_STAT+:} false; then :
22917  $as_echo_n "(cached) " >&6
22918else
22919  case $STAT in
22920  [\\/]* | ?:[\\/]*)
22921  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22922  ;;
22923  *)
22924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22925for as_dir in $PATH
22926do
22927  IFS=$as_save_IFS
22928  test -z "$as_dir" && as_dir=.
22929    for ac_exec_ext in '' $ac_executable_extensions; do
22930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22931    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22933    break 2
22934  fi
22935done
22936  done
22937IFS=$as_save_IFS
22938
22939  ;;
22940esac
22941fi
22942STAT=$ac_cv_path_STAT
22943if test -n "$STAT"; then
22944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22945$as_echo "$STAT" >&6; }
22946else
22947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22948$as_echo "no" >&6; }
22949fi
22950
22951
22952  test -n "$STAT" && break
22953done
22954
22955    else
22956      # If it succeeded, then it was overridden by the user. We will use it
22957      # for the tool.
22958
22959      # First remove it from the list of overridden variables, so we can test
22960      # for unknown variables in the end.
22961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22962
22963      # Check if we try to supply an empty value
22964      if test "x$STAT" = x; then
22965        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22966$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22968$as_echo_n "checking for STAT... " >&6; }
22969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22970$as_echo "disabled" >&6; }
22971      else
22972        # Check if the provided tool contains a complete path.
22973        tool_specified="$STAT"
22974        tool_basename="${tool_specified##*/}"
22975        if test "x$tool_basename" = "x$tool_specified"; then
22976          # A command without a complete path is provided, search $PATH.
22977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22978$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22979          # Extract the first word of "$tool_basename", so it can be a program name with args.
22980set dummy $tool_basename; ac_word=$2
22981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22982$as_echo_n "checking for $ac_word... " >&6; }
22983if ${ac_cv_path_STAT+:} false; then :
22984  $as_echo_n "(cached) " >&6
22985else
22986  case $STAT in
22987  [\\/]* | ?:[\\/]*)
22988  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22989  ;;
22990  *)
22991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22992for as_dir in $PATH
22993do
22994  IFS=$as_save_IFS
22995  test -z "$as_dir" && as_dir=.
22996    for ac_exec_ext in '' $ac_executable_extensions; do
22997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22998    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23000    break 2
23001  fi
23002done
23003  done
23004IFS=$as_save_IFS
23005
23006  ;;
23007esac
23008fi
23009STAT=$ac_cv_path_STAT
23010if test -n "$STAT"; then
23011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23012$as_echo "$STAT" >&6; }
23013else
23014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23015$as_echo "no" >&6; }
23016fi
23017
23018
23019          if test "x$STAT" = x; then
23020            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23021          fi
23022        else
23023          # Otherwise we believe it is a complete path. Use it as it is.
23024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23025$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23026          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23027$as_echo_n "checking for STAT... " >&6; }
23028          if test ! -x "$tool_specified"; then
23029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23030$as_echo "not found" >&6; }
23031            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23032          fi
23033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23034$as_echo "$tool_specified" >&6; }
23035        fi
23036      fi
23037    fi
23038
23039  fi
23040
23041
23042
23043
23044  # Publish this variable in the help.
23045
23046
23047  if [ -z "${TIME+x}" ]; then
23048    # The variable is not set by user, try to locate tool using the code snippet
23049    for ac_prog in time
23050do
23051  # Extract the first word of "$ac_prog", so it can be a program name with args.
23052set dummy $ac_prog; ac_word=$2
23053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23054$as_echo_n "checking for $ac_word... " >&6; }
23055if ${ac_cv_path_TIME+:} false; then :
23056  $as_echo_n "(cached) " >&6
23057else
23058  case $TIME in
23059  [\\/]* | ?:[\\/]*)
23060  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23061  ;;
23062  *)
23063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23064for as_dir in $PATH
23065do
23066  IFS=$as_save_IFS
23067  test -z "$as_dir" && as_dir=.
23068    for ac_exec_ext in '' $ac_executable_extensions; do
23069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23070    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23072    break 2
23073  fi
23074done
23075  done
23076IFS=$as_save_IFS
23077
23078  ;;
23079esac
23080fi
23081TIME=$ac_cv_path_TIME
23082if test -n "$TIME"; then
23083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23084$as_echo "$TIME" >&6; }
23085else
23086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23087$as_echo "no" >&6; }
23088fi
23089
23090
23091  test -n "$TIME" && break
23092done
23093
23094  else
23095    # The variable is set, but is it from the command line or the environment?
23096
23097    # Try to remove the string !TIME! from our list.
23098    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23099    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23100      # If it failed, the variable was not from the command line. Ignore it,
23101      # but warn the user (except for BASH, which is always set by the calling BASH).
23102      if test "xTIME" != xBASH; then
23103        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23104$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23105      fi
23106      # Try to locate tool using the code snippet
23107      for ac_prog in time
23108do
23109  # Extract the first word of "$ac_prog", so it can be a program name with args.
23110set dummy $ac_prog; ac_word=$2
23111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23112$as_echo_n "checking for $ac_word... " >&6; }
23113if ${ac_cv_path_TIME+:} false; then :
23114  $as_echo_n "(cached) " >&6
23115else
23116  case $TIME in
23117  [\\/]* | ?:[\\/]*)
23118  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23119  ;;
23120  *)
23121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23122for as_dir in $PATH
23123do
23124  IFS=$as_save_IFS
23125  test -z "$as_dir" && as_dir=.
23126    for ac_exec_ext in '' $ac_executable_extensions; do
23127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23128    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23130    break 2
23131  fi
23132done
23133  done
23134IFS=$as_save_IFS
23135
23136  ;;
23137esac
23138fi
23139TIME=$ac_cv_path_TIME
23140if test -n "$TIME"; then
23141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23142$as_echo "$TIME" >&6; }
23143else
23144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23145$as_echo "no" >&6; }
23146fi
23147
23148
23149  test -n "$TIME" && break
23150done
23151
23152    else
23153      # If it succeeded, then it was overridden by the user. We will use it
23154      # for the tool.
23155
23156      # First remove it from the list of overridden variables, so we can test
23157      # for unknown variables in the end.
23158      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23159
23160      # Check if we try to supply an empty value
23161      if test "x$TIME" = x; then
23162        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23163$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23164        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23165$as_echo_n "checking for TIME... " >&6; }
23166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23167$as_echo "disabled" >&6; }
23168      else
23169        # Check if the provided tool contains a complete path.
23170        tool_specified="$TIME"
23171        tool_basename="${tool_specified##*/}"
23172        if test "x$tool_basename" = "x$tool_specified"; then
23173          # A command without a complete path is provided, search $PATH.
23174          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23175$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23176          # Extract the first word of "$tool_basename", so it can be a program name with args.
23177set dummy $tool_basename; ac_word=$2
23178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23179$as_echo_n "checking for $ac_word... " >&6; }
23180if ${ac_cv_path_TIME+:} false; then :
23181  $as_echo_n "(cached) " >&6
23182else
23183  case $TIME in
23184  [\\/]* | ?:[\\/]*)
23185  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23186  ;;
23187  *)
23188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23189for as_dir in $PATH
23190do
23191  IFS=$as_save_IFS
23192  test -z "$as_dir" && as_dir=.
23193    for ac_exec_ext in '' $ac_executable_extensions; do
23194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23195    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23197    break 2
23198  fi
23199done
23200  done
23201IFS=$as_save_IFS
23202
23203  ;;
23204esac
23205fi
23206TIME=$ac_cv_path_TIME
23207if test -n "$TIME"; then
23208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23209$as_echo "$TIME" >&6; }
23210else
23211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23212$as_echo "no" >&6; }
23213fi
23214
23215
23216          if test "x$TIME" = x; then
23217            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23218          fi
23219        else
23220          # Otherwise we believe it is a complete path. Use it as it is.
23221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23222$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23223          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23224$as_echo_n "checking for TIME... " >&6; }
23225          if test ! -x "$tool_specified"; then
23226            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23227$as_echo "not found" >&6; }
23228            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23229          fi
23230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23231$as_echo "$tool_specified" >&6; }
23232        fi
23233      fi
23234    fi
23235
23236  fi
23237
23238
23239
23240
23241  # Publish this variable in the help.
23242
23243
23244  if [ -z "${FLOCK+x}" ]; then
23245    # The variable is not set by user, try to locate tool using the code snippet
23246    for ac_prog in flock
23247do
23248  # Extract the first word of "$ac_prog", so it can be a program name with args.
23249set dummy $ac_prog; ac_word=$2
23250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23251$as_echo_n "checking for $ac_word... " >&6; }
23252if ${ac_cv_path_FLOCK+:} false; then :
23253  $as_echo_n "(cached) " >&6
23254else
23255  case $FLOCK in
23256  [\\/]* | ?:[\\/]*)
23257  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23258  ;;
23259  *)
23260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23261for as_dir in $PATH
23262do
23263  IFS=$as_save_IFS
23264  test -z "$as_dir" && as_dir=.
23265    for ac_exec_ext in '' $ac_executable_extensions; do
23266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23267    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23269    break 2
23270  fi
23271done
23272  done
23273IFS=$as_save_IFS
23274
23275  ;;
23276esac
23277fi
23278FLOCK=$ac_cv_path_FLOCK
23279if test -n "$FLOCK"; then
23280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23281$as_echo "$FLOCK" >&6; }
23282else
23283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23284$as_echo "no" >&6; }
23285fi
23286
23287
23288  test -n "$FLOCK" && break
23289done
23290
23291  else
23292    # The variable is set, but is it from the command line or the environment?
23293
23294    # Try to remove the string !FLOCK! from our list.
23295    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23296    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23297      # If it failed, the variable was not from the command line. Ignore it,
23298      # but warn the user (except for BASH, which is always set by the calling BASH).
23299      if test "xFLOCK" != xBASH; then
23300        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23301$as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23302      fi
23303      # Try to locate tool using the code snippet
23304      for ac_prog in flock
23305do
23306  # Extract the first word of "$ac_prog", so it can be a program name with args.
23307set dummy $ac_prog; ac_word=$2
23308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23309$as_echo_n "checking for $ac_word... " >&6; }
23310if ${ac_cv_path_FLOCK+:} false; then :
23311  $as_echo_n "(cached) " >&6
23312else
23313  case $FLOCK in
23314  [\\/]* | ?:[\\/]*)
23315  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23316  ;;
23317  *)
23318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23319for as_dir in $PATH
23320do
23321  IFS=$as_save_IFS
23322  test -z "$as_dir" && as_dir=.
23323    for ac_exec_ext in '' $ac_executable_extensions; do
23324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23325    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23327    break 2
23328  fi
23329done
23330  done
23331IFS=$as_save_IFS
23332
23333  ;;
23334esac
23335fi
23336FLOCK=$ac_cv_path_FLOCK
23337if test -n "$FLOCK"; then
23338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23339$as_echo "$FLOCK" >&6; }
23340else
23341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23342$as_echo "no" >&6; }
23343fi
23344
23345
23346  test -n "$FLOCK" && break
23347done
23348
23349    else
23350      # If it succeeded, then it was overridden by the user. We will use it
23351      # for the tool.
23352
23353      # First remove it from the list of overridden variables, so we can test
23354      # for unknown variables in the end.
23355      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23356
23357      # Check if we try to supply an empty value
23358      if test "x$FLOCK" = x; then
23359        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23360$as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23361        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23362$as_echo_n "checking for FLOCK... " >&6; }
23363        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23364$as_echo "disabled" >&6; }
23365      else
23366        # Check if the provided tool contains a complete path.
23367        tool_specified="$FLOCK"
23368        tool_basename="${tool_specified##*/}"
23369        if test "x$tool_basename" = "x$tool_specified"; then
23370          # A command without a complete path is provided, search $PATH.
23371          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23372$as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23373          # Extract the first word of "$tool_basename", so it can be a program name with args.
23374set dummy $tool_basename; ac_word=$2
23375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23376$as_echo_n "checking for $ac_word... " >&6; }
23377if ${ac_cv_path_FLOCK+:} false; then :
23378  $as_echo_n "(cached) " >&6
23379else
23380  case $FLOCK in
23381  [\\/]* | ?:[\\/]*)
23382  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23383  ;;
23384  *)
23385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23386for as_dir in $PATH
23387do
23388  IFS=$as_save_IFS
23389  test -z "$as_dir" && as_dir=.
23390    for ac_exec_ext in '' $ac_executable_extensions; do
23391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23392    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23394    break 2
23395  fi
23396done
23397  done
23398IFS=$as_save_IFS
23399
23400  ;;
23401esac
23402fi
23403FLOCK=$ac_cv_path_FLOCK
23404if test -n "$FLOCK"; then
23405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23406$as_echo "$FLOCK" >&6; }
23407else
23408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23409$as_echo "no" >&6; }
23410fi
23411
23412
23413          if test "x$FLOCK" = x; then
23414            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23415          fi
23416        else
23417          # Otherwise we believe it is a complete path. Use it as it is.
23418          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23419$as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23420          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23421$as_echo_n "checking for FLOCK... " >&6; }
23422          if test ! -x "$tool_specified"; then
23423            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23424$as_echo "not found" >&6; }
23425            as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23426          fi
23427          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23428$as_echo "$tool_specified" >&6; }
23429        fi
23430      fi
23431    fi
23432
23433  fi
23434
23435
23436  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23437  # be in the user path.
23438
23439
23440  # Publish this variable in the help.
23441
23442
23443  if [ -z "${DTRACE+x}" ]; then
23444    # The variable is not set by user, try to locate tool using the code snippet
23445    for ac_prog in dtrace
23446do
23447  # Extract the first word of "$ac_prog", so it can be a program name with args.
23448set dummy $ac_prog; ac_word=$2
23449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23450$as_echo_n "checking for $ac_word... " >&6; }
23451if ${ac_cv_path_DTRACE+:} false; then :
23452  $as_echo_n "(cached) " >&6
23453else
23454  case $DTRACE in
23455  [\\/]* | ?:[\\/]*)
23456  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23457  ;;
23458  *)
23459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23460as_dummy="$PATH:/usr/sbin"
23461for as_dir in $as_dummy
23462do
23463  IFS=$as_save_IFS
23464  test -z "$as_dir" && as_dir=.
23465    for ac_exec_ext in '' $ac_executable_extensions; do
23466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23467    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23469    break 2
23470  fi
23471done
23472  done
23473IFS=$as_save_IFS
23474
23475  ;;
23476esac
23477fi
23478DTRACE=$ac_cv_path_DTRACE
23479if test -n "$DTRACE"; then
23480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23481$as_echo "$DTRACE" >&6; }
23482else
23483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23484$as_echo "no" >&6; }
23485fi
23486
23487
23488  test -n "$DTRACE" && break
23489done
23490
23491  else
23492    # The variable is set, but is it from the command line or the environment?
23493
23494    # Try to remove the string !DTRACE! from our list.
23495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23497      # If it failed, the variable was not from the command line. Ignore it,
23498      # but warn the user (except for BASH, which is always set by the calling BASH).
23499      if test "xDTRACE" != xBASH; then
23500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23501$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23502      fi
23503      # Try to locate tool using the code snippet
23504      for ac_prog in dtrace
23505do
23506  # Extract the first word of "$ac_prog", so it can be a program name with args.
23507set dummy $ac_prog; ac_word=$2
23508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23509$as_echo_n "checking for $ac_word... " >&6; }
23510if ${ac_cv_path_DTRACE+:} false; then :
23511  $as_echo_n "(cached) " >&6
23512else
23513  case $DTRACE in
23514  [\\/]* | ?:[\\/]*)
23515  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23516  ;;
23517  *)
23518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23519as_dummy="$PATH:/usr/sbin"
23520for as_dir in $as_dummy
23521do
23522  IFS=$as_save_IFS
23523  test -z "$as_dir" && as_dir=.
23524    for ac_exec_ext in '' $ac_executable_extensions; do
23525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23526    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23528    break 2
23529  fi
23530done
23531  done
23532IFS=$as_save_IFS
23533
23534  ;;
23535esac
23536fi
23537DTRACE=$ac_cv_path_DTRACE
23538if test -n "$DTRACE"; then
23539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23540$as_echo "$DTRACE" >&6; }
23541else
23542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23543$as_echo "no" >&6; }
23544fi
23545
23546
23547  test -n "$DTRACE" && break
23548done
23549
23550    else
23551      # If it succeeded, then it was overridden by the user. We will use it
23552      # for the tool.
23553
23554      # First remove it from the list of overridden variables, so we can test
23555      # for unknown variables in the end.
23556      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23557
23558      # Check if we try to supply an empty value
23559      if test "x$DTRACE" = x; then
23560        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23561$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23562        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23563$as_echo_n "checking for DTRACE... " >&6; }
23564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23565$as_echo "disabled" >&6; }
23566      else
23567        # Check if the provided tool contains a complete path.
23568        tool_specified="$DTRACE"
23569        tool_basename="${tool_specified##*/}"
23570        if test "x$tool_basename" = "x$tool_specified"; then
23571          # A command without a complete path is provided, search $PATH.
23572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23573$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23574          # Extract the first word of "$tool_basename", so it can be a program name with args.
23575set dummy $tool_basename; ac_word=$2
23576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23577$as_echo_n "checking for $ac_word... " >&6; }
23578if ${ac_cv_path_DTRACE+:} false; then :
23579  $as_echo_n "(cached) " >&6
23580else
23581  case $DTRACE in
23582  [\\/]* | ?:[\\/]*)
23583  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23584  ;;
23585  *)
23586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23587for as_dir in $PATH
23588do
23589  IFS=$as_save_IFS
23590  test -z "$as_dir" && as_dir=.
23591    for ac_exec_ext in '' $ac_executable_extensions; do
23592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23593    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23595    break 2
23596  fi
23597done
23598  done
23599IFS=$as_save_IFS
23600
23601  ;;
23602esac
23603fi
23604DTRACE=$ac_cv_path_DTRACE
23605if test -n "$DTRACE"; then
23606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23607$as_echo "$DTRACE" >&6; }
23608else
23609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23610$as_echo "no" >&6; }
23611fi
23612
23613
23614          if test "x$DTRACE" = x; then
23615            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23616          fi
23617        else
23618          # Otherwise we believe it is a complete path. Use it as it is.
23619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23620$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23621          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23622$as_echo_n "checking for DTRACE... " >&6; }
23623          if test ! -x "$tool_specified"; then
23624            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23625$as_echo "not found" >&6; }
23626            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23627          fi
23628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23629$as_echo "$tool_specified" >&6; }
23630        fi
23631      fi
23632    fi
23633
23634  fi
23635
23636
23637
23638
23639  # Publish this variable in the help.
23640
23641
23642  if [ -z "${PATCH+x}" ]; then
23643    # The variable is not set by user, try to locate tool using the code snippet
23644    for ac_prog in gpatch patch
23645do
23646  # Extract the first word of "$ac_prog", so it can be a program name with args.
23647set dummy $ac_prog; ac_word=$2
23648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23649$as_echo_n "checking for $ac_word... " >&6; }
23650if ${ac_cv_path_PATCH+:} false; then :
23651  $as_echo_n "(cached) " >&6
23652else
23653  case $PATCH in
23654  [\\/]* | ?:[\\/]*)
23655  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23656  ;;
23657  *)
23658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23659for as_dir in $PATH
23660do
23661  IFS=$as_save_IFS
23662  test -z "$as_dir" && as_dir=.
23663    for ac_exec_ext in '' $ac_executable_extensions; do
23664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23665    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23667    break 2
23668  fi
23669done
23670  done
23671IFS=$as_save_IFS
23672
23673  ;;
23674esac
23675fi
23676PATCH=$ac_cv_path_PATCH
23677if test -n "$PATCH"; then
23678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23679$as_echo "$PATCH" >&6; }
23680else
23681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23682$as_echo "no" >&6; }
23683fi
23684
23685
23686  test -n "$PATCH" && break
23687done
23688
23689  else
23690    # The variable is set, but is it from the command line or the environment?
23691
23692    # Try to remove the string !PATCH! from our list.
23693    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23694    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23695      # If it failed, the variable was not from the command line. Ignore it,
23696      # but warn the user (except for BASH, which is always set by the calling BASH).
23697      if test "xPATCH" != xBASH; then
23698        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23699$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23700      fi
23701      # Try to locate tool using the code snippet
23702      for ac_prog in gpatch patch
23703do
23704  # Extract the first word of "$ac_prog", so it can be a program name with args.
23705set dummy $ac_prog; ac_word=$2
23706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23707$as_echo_n "checking for $ac_word... " >&6; }
23708if ${ac_cv_path_PATCH+:} false; then :
23709  $as_echo_n "(cached) " >&6
23710else
23711  case $PATCH in
23712  [\\/]* | ?:[\\/]*)
23713  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23714  ;;
23715  *)
23716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23717for as_dir in $PATH
23718do
23719  IFS=$as_save_IFS
23720  test -z "$as_dir" && as_dir=.
23721    for ac_exec_ext in '' $ac_executable_extensions; do
23722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23723    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23725    break 2
23726  fi
23727done
23728  done
23729IFS=$as_save_IFS
23730
23731  ;;
23732esac
23733fi
23734PATCH=$ac_cv_path_PATCH
23735if test -n "$PATCH"; then
23736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23737$as_echo "$PATCH" >&6; }
23738else
23739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23740$as_echo "no" >&6; }
23741fi
23742
23743
23744  test -n "$PATCH" && break
23745done
23746
23747    else
23748      # If it succeeded, then it was overridden by the user. We will use it
23749      # for the tool.
23750
23751      # First remove it from the list of overridden variables, so we can test
23752      # for unknown variables in the end.
23753      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23754
23755      # Check if we try to supply an empty value
23756      if test "x$PATCH" = x; then
23757        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23758$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23759        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23760$as_echo_n "checking for PATCH... " >&6; }
23761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23762$as_echo "disabled" >&6; }
23763      else
23764        # Check if the provided tool contains a complete path.
23765        tool_specified="$PATCH"
23766        tool_basename="${tool_specified##*/}"
23767        if test "x$tool_basename" = "x$tool_specified"; then
23768          # A command without a complete path is provided, search $PATH.
23769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23770$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23771          # Extract the first word of "$tool_basename", so it can be a program name with args.
23772set dummy $tool_basename; ac_word=$2
23773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23774$as_echo_n "checking for $ac_word... " >&6; }
23775if ${ac_cv_path_PATCH+:} false; then :
23776  $as_echo_n "(cached) " >&6
23777else
23778  case $PATCH in
23779  [\\/]* | ?:[\\/]*)
23780  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23781  ;;
23782  *)
23783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23784for as_dir in $PATH
23785do
23786  IFS=$as_save_IFS
23787  test -z "$as_dir" && as_dir=.
23788    for ac_exec_ext in '' $ac_executable_extensions; do
23789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23790    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23792    break 2
23793  fi
23794done
23795  done
23796IFS=$as_save_IFS
23797
23798  ;;
23799esac
23800fi
23801PATCH=$ac_cv_path_PATCH
23802if test -n "$PATCH"; then
23803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23804$as_echo "$PATCH" >&6; }
23805else
23806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23807$as_echo "no" >&6; }
23808fi
23809
23810
23811          if test "x$PATCH" = x; then
23812            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23813          fi
23814        else
23815          # Otherwise we believe it is a complete path. Use it as it is.
23816          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23817$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23818          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23819$as_echo_n "checking for PATCH... " >&6; }
23820          if test ! -x "$tool_specified"; then
23821            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23822$as_echo "not found" >&6; }
23823            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23824          fi
23825          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23826$as_echo "$tool_specified" >&6; }
23827        fi
23828      fi
23829    fi
23830
23831  fi
23832
23833
23834  # Check if it's GNU time
23835  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23836  if test "x$IS_GNU_TIME" != x; then
23837    IS_GNU_TIME=yes
23838  else
23839    IS_GNU_TIME=no
23840  fi
23841
23842
23843  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23844
23845
23846
23847  # Publish this variable in the help.
23848
23849
23850  if [ -z "${DSYMUTIL+x}" ]; then
23851    # The variable is not set by user, try to locate tool using the code snippet
23852    for ac_prog in dsymutil
23853do
23854  # Extract the first word of "$ac_prog", so it can be a program name with args.
23855set dummy $ac_prog; ac_word=$2
23856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23857$as_echo_n "checking for $ac_word... " >&6; }
23858if ${ac_cv_path_DSYMUTIL+:} false; then :
23859  $as_echo_n "(cached) " >&6
23860else
23861  case $DSYMUTIL in
23862  [\\/]* | ?:[\\/]*)
23863  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23864  ;;
23865  *)
23866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23867for as_dir in $PATH
23868do
23869  IFS=$as_save_IFS
23870  test -z "$as_dir" && as_dir=.
23871    for ac_exec_ext in '' $ac_executable_extensions; do
23872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23873    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23875    break 2
23876  fi
23877done
23878  done
23879IFS=$as_save_IFS
23880
23881  ;;
23882esac
23883fi
23884DSYMUTIL=$ac_cv_path_DSYMUTIL
23885if test -n "$DSYMUTIL"; then
23886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23887$as_echo "$DSYMUTIL" >&6; }
23888else
23889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23890$as_echo "no" >&6; }
23891fi
23892
23893
23894  test -n "$DSYMUTIL" && break
23895done
23896
23897  else
23898    # The variable is set, but is it from the command line or the environment?
23899
23900    # Try to remove the string !DSYMUTIL! from our list.
23901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23903      # If it failed, the variable was not from the command line. Ignore it,
23904      # but warn the user (except for BASH, which is always set by the calling BASH).
23905      if test "xDSYMUTIL" != xBASH; then
23906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23907$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23908      fi
23909      # Try to locate tool using the code snippet
23910      for ac_prog in dsymutil
23911do
23912  # Extract the first word of "$ac_prog", so it can be a program name with args.
23913set dummy $ac_prog; ac_word=$2
23914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23915$as_echo_n "checking for $ac_word... " >&6; }
23916if ${ac_cv_path_DSYMUTIL+:} false; then :
23917  $as_echo_n "(cached) " >&6
23918else
23919  case $DSYMUTIL in
23920  [\\/]* | ?:[\\/]*)
23921  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23922  ;;
23923  *)
23924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23925for as_dir in $PATH
23926do
23927  IFS=$as_save_IFS
23928  test -z "$as_dir" && as_dir=.
23929    for ac_exec_ext in '' $ac_executable_extensions; do
23930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23931    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23933    break 2
23934  fi
23935done
23936  done
23937IFS=$as_save_IFS
23938
23939  ;;
23940esac
23941fi
23942DSYMUTIL=$ac_cv_path_DSYMUTIL
23943if test -n "$DSYMUTIL"; then
23944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23945$as_echo "$DSYMUTIL" >&6; }
23946else
23947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23948$as_echo "no" >&6; }
23949fi
23950
23951
23952  test -n "$DSYMUTIL" && break
23953done
23954
23955    else
23956      # If it succeeded, then it was overridden by the user. We will use it
23957      # for the tool.
23958
23959      # First remove it from the list of overridden variables, so we can test
23960      # for unknown variables in the end.
23961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23962
23963      # Check if we try to supply an empty value
23964      if test "x$DSYMUTIL" = x; then
23965        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23966$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23968$as_echo_n "checking for DSYMUTIL... " >&6; }
23969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23970$as_echo "disabled" >&6; }
23971      else
23972        # Check if the provided tool contains a complete path.
23973        tool_specified="$DSYMUTIL"
23974        tool_basename="${tool_specified##*/}"
23975        if test "x$tool_basename" = "x$tool_specified"; then
23976          # A command without a complete path is provided, search $PATH.
23977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23978$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23979          # Extract the first word of "$tool_basename", so it can be a program name with args.
23980set dummy $tool_basename; ac_word=$2
23981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23982$as_echo_n "checking for $ac_word... " >&6; }
23983if ${ac_cv_path_DSYMUTIL+:} false; then :
23984  $as_echo_n "(cached) " >&6
23985else
23986  case $DSYMUTIL in
23987  [\\/]* | ?:[\\/]*)
23988  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23989  ;;
23990  *)
23991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23992for as_dir in $PATH
23993do
23994  IFS=$as_save_IFS
23995  test -z "$as_dir" && as_dir=.
23996    for ac_exec_ext in '' $ac_executable_extensions; do
23997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23998    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24000    break 2
24001  fi
24002done
24003  done
24004IFS=$as_save_IFS
24005
24006  ;;
24007esac
24008fi
24009DSYMUTIL=$ac_cv_path_DSYMUTIL
24010if test -n "$DSYMUTIL"; then
24011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24012$as_echo "$DSYMUTIL" >&6; }
24013else
24014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24015$as_echo "no" >&6; }
24016fi
24017
24018
24019          if test "x$DSYMUTIL" = x; then
24020            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24021          fi
24022        else
24023          # Otherwise we believe it is a complete path. Use it as it is.
24024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
24025$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
24026          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24027$as_echo_n "checking for DSYMUTIL... " >&6; }
24028          if test ! -x "$tool_specified"; then
24029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24030$as_echo "not found" >&6; }
24031            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
24032          fi
24033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24034$as_echo "$tool_specified" >&6; }
24035        fi
24036      fi
24037    fi
24038
24039  fi
24040
24041
24042
24043  if test "x$DSYMUTIL" = x; then
24044    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
24045  fi
24046
24047
24048
24049
24050
24051  # Publish this variable in the help.
24052
24053
24054  if [ -z "${XATTR+x}" ]; then
24055    # The variable is not set by user, try to locate tool using the code snippet
24056    for ac_prog in xattr
24057do
24058  # Extract the first word of "$ac_prog", so it can be a program name with args.
24059set dummy $ac_prog; ac_word=$2
24060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24061$as_echo_n "checking for $ac_word... " >&6; }
24062if ${ac_cv_path_XATTR+:} false; then :
24063  $as_echo_n "(cached) " >&6
24064else
24065  case $XATTR in
24066  [\\/]* | ?:[\\/]*)
24067  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24068  ;;
24069  *)
24070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24071for as_dir in $PATH
24072do
24073  IFS=$as_save_IFS
24074  test -z "$as_dir" && as_dir=.
24075    for ac_exec_ext in '' $ac_executable_extensions; do
24076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24077    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24079    break 2
24080  fi
24081done
24082  done
24083IFS=$as_save_IFS
24084
24085  ;;
24086esac
24087fi
24088XATTR=$ac_cv_path_XATTR
24089if test -n "$XATTR"; then
24090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24091$as_echo "$XATTR" >&6; }
24092else
24093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24094$as_echo "no" >&6; }
24095fi
24096
24097
24098  test -n "$XATTR" && break
24099done
24100
24101  else
24102    # The variable is set, but is it from the command line or the environment?
24103
24104    # Try to remove the string !XATTR! from our list.
24105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
24106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24107      # If it failed, the variable was not from the command line. Ignore it,
24108      # but warn the user (except for BASH, which is always set by the calling BASH).
24109      if test "xXATTR" != xBASH; then
24110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
24111$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
24112      fi
24113      # Try to locate tool using the code snippet
24114      for ac_prog in xattr
24115do
24116  # Extract the first word of "$ac_prog", so it can be a program name with args.
24117set dummy $ac_prog; ac_word=$2
24118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24119$as_echo_n "checking for $ac_word... " >&6; }
24120if ${ac_cv_path_XATTR+:} false; then :
24121  $as_echo_n "(cached) " >&6
24122else
24123  case $XATTR in
24124  [\\/]* | ?:[\\/]*)
24125  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24126  ;;
24127  *)
24128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24129for as_dir in $PATH
24130do
24131  IFS=$as_save_IFS
24132  test -z "$as_dir" && as_dir=.
24133    for ac_exec_ext in '' $ac_executable_extensions; do
24134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24135    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24137    break 2
24138  fi
24139done
24140  done
24141IFS=$as_save_IFS
24142
24143  ;;
24144esac
24145fi
24146XATTR=$ac_cv_path_XATTR
24147if test -n "$XATTR"; then
24148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24149$as_echo "$XATTR" >&6; }
24150else
24151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24152$as_echo "no" >&6; }
24153fi
24154
24155
24156  test -n "$XATTR" && break
24157done
24158
24159    else
24160      # If it succeeded, then it was overridden by the user. We will use it
24161      # for the tool.
24162
24163      # First remove it from the list of overridden variables, so we can test
24164      # for unknown variables in the end.
24165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24166
24167      # Check if we try to supply an empty value
24168      if test "x$XATTR" = x; then
24169        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24170$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24172$as_echo_n "checking for XATTR... " >&6; }
24173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24174$as_echo "disabled" >&6; }
24175      else
24176        # Check if the provided tool contains a complete path.
24177        tool_specified="$XATTR"
24178        tool_basename="${tool_specified##*/}"
24179        if test "x$tool_basename" = "x$tool_specified"; then
24180          # A command without a complete path is provided, search $PATH.
24181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24182$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24183          # Extract the first word of "$tool_basename", so it can be a program name with args.
24184set dummy $tool_basename; ac_word=$2
24185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24186$as_echo_n "checking for $ac_word... " >&6; }
24187if ${ac_cv_path_XATTR+:} false; then :
24188  $as_echo_n "(cached) " >&6
24189else
24190  case $XATTR in
24191  [\\/]* | ?:[\\/]*)
24192  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24193  ;;
24194  *)
24195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24196for as_dir in $PATH
24197do
24198  IFS=$as_save_IFS
24199  test -z "$as_dir" && as_dir=.
24200    for ac_exec_ext in '' $ac_executable_extensions; do
24201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24202    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24204    break 2
24205  fi
24206done
24207  done
24208IFS=$as_save_IFS
24209
24210  ;;
24211esac
24212fi
24213XATTR=$ac_cv_path_XATTR
24214if test -n "$XATTR"; then
24215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24216$as_echo "$XATTR" >&6; }
24217else
24218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24219$as_echo "no" >&6; }
24220fi
24221
24222
24223          if test "x$XATTR" = x; then
24224            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24225          fi
24226        else
24227          # Otherwise we believe it is a complete path. Use it as it is.
24228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24229$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24230          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24231$as_echo_n "checking for XATTR... " >&6; }
24232          if test ! -x "$tool_specified"; then
24233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24234$as_echo "not found" >&6; }
24235            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24236          fi
24237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24238$as_echo "$tool_specified" >&6; }
24239        fi
24240      fi
24241    fi
24242
24243  fi
24244
24245
24246
24247  if test "x$XATTR" = x; then
24248    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24249  fi
24250
24251
24252
24253
24254  # Publish this variable in the help.
24255
24256
24257  if [ -z "${CODESIGN+x}" ]; then
24258    # The variable is not set by user, try to locate tool using the code snippet
24259    for ac_prog in codesign
24260do
24261  # Extract the first word of "$ac_prog", so it can be a program name with args.
24262set dummy $ac_prog; ac_word=$2
24263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24264$as_echo_n "checking for $ac_word... " >&6; }
24265if ${ac_cv_path_CODESIGN+:} false; then :
24266  $as_echo_n "(cached) " >&6
24267else
24268  case $CODESIGN in
24269  [\\/]* | ?:[\\/]*)
24270  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24271  ;;
24272  *)
24273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24274for as_dir in $PATH
24275do
24276  IFS=$as_save_IFS
24277  test -z "$as_dir" && as_dir=.
24278    for ac_exec_ext in '' $ac_executable_extensions; do
24279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24280    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24282    break 2
24283  fi
24284done
24285  done
24286IFS=$as_save_IFS
24287
24288  ;;
24289esac
24290fi
24291CODESIGN=$ac_cv_path_CODESIGN
24292if test -n "$CODESIGN"; then
24293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24294$as_echo "$CODESIGN" >&6; }
24295else
24296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24297$as_echo "no" >&6; }
24298fi
24299
24300
24301  test -n "$CODESIGN" && break
24302done
24303
24304  else
24305    # The variable is set, but is it from the command line or the environment?
24306
24307    # Try to remove the string !CODESIGN! from our list.
24308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24310      # If it failed, the variable was not from the command line. Ignore it,
24311      # but warn the user (except for BASH, which is always set by the calling BASH).
24312      if test "xCODESIGN" != xBASH; then
24313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24314$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24315      fi
24316      # Try to locate tool using the code snippet
24317      for ac_prog in codesign
24318do
24319  # Extract the first word of "$ac_prog", so it can be a program name with args.
24320set dummy $ac_prog; ac_word=$2
24321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24322$as_echo_n "checking for $ac_word... " >&6; }
24323if ${ac_cv_path_CODESIGN+:} false; then :
24324  $as_echo_n "(cached) " >&6
24325else
24326  case $CODESIGN in
24327  [\\/]* | ?:[\\/]*)
24328  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24329  ;;
24330  *)
24331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24332for as_dir in $PATH
24333do
24334  IFS=$as_save_IFS
24335  test -z "$as_dir" && as_dir=.
24336    for ac_exec_ext in '' $ac_executable_extensions; do
24337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24338    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24340    break 2
24341  fi
24342done
24343  done
24344IFS=$as_save_IFS
24345
24346  ;;
24347esac
24348fi
24349CODESIGN=$ac_cv_path_CODESIGN
24350if test -n "$CODESIGN"; then
24351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24352$as_echo "$CODESIGN" >&6; }
24353else
24354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24355$as_echo "no" >&6; }
24356fi
24357
24358
24359  test -n "$CODESIGN" && break
24360done
24361
24362    else
24363      # If it succeeded, then it was overridden by the user. We will use it
24364      # for the tool.
24365
24366      # First remove it from the list of overridden variables, so we can test
24367      # for unknown variables in the end.
24368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24369
24370      # Check if we try to supply an empty value
24371      if test "x$CODESIGN" = x; then
24372        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24373$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24375$as_echo_n "checking for CODESIGN... " >&6; }
24376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24377$as_echo "disabled" >&6; }
24378      else
24379        # Check if the provided tool contains a complete path.
24380        tool_specified="$CODESIGN"
24381        tool_basename="${tool_specified##*/}"
24382        if test "x$tool_basename" = "x$tool_specified"; then
24383          # A command without a complete path is provided, search $PATH.
24384          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24385$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24386          # Extract the first word of "$tool_basename", so it can be a program name with args.
24387set dummy $tool_basename; ac_word=$2
24388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24389$as_echo_n "checking for $ac_word... " >&6; }
24390if ${ac_cv_path_CODESIGN+:} false; then :
24391  $as_echo_n "(cached) " >&6
24392else
24393  case $CODESIGN in
24394  [\\/]* | ?:[\\/]*)
24395  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24396  ;;
24397  *)
24398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24399for as_dir in $PATH
24400do
24401  IFS=$as_save_IFS
24402  test -z "$as_dir" && as_dir=.
24403    for ac_exec_ext in '' $ac_executable_extensions; do
24404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24405    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24407    break 2
24408  fi
24409done
24410  done
24411IFS=$as_save_IFS
24412
24413  ;;
24414esac
24415fi
24416CODESIGN=$ac_cv_path_CODESIGN
24417if test -n "$CODESIGN"; then
24418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24419$as_echo "$CODESIGN" >&6; }
24420else
24421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24422$as_echo "no" >&6; }
24423fi
24424
24425
24426          if test "x$CODESIGN" = x; then
24427            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24428          fi
24429        else
24430          # Otherwise we believe it is a complete path. Use it as it is.
24431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24432$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24433          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24434$as_echo_n "checking for CODESIGN... " >&6; }
24435          if test ! -x "$tool_specified"; then
24436            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24437$as_echo "not found" >&6; }
24438            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24439          fi
24440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24441$as_echo "$tool_specified" >&6; }
24442        fi
24443      fi
24444    fi
24445
24446  fi
24447
24448
24449    if test "x$CODESIGN" != "x"; then
24450      # Verify that the openjdk_codesign certificate is present
24451      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24452$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24453      $RM codesign-testfile
24454      $TOUCH codesign-testfile
24455      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24456      $RM codesign-testfile
24457      if test "x$CODESIGN" = x; then
24458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24459$as_echo "no" >&6; }
24460      else
24461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24462$as_echo "yes" >&6; }
24463      fi
24464    fi
24465
24466
24467
24468  # Publish this variable in the help.
24469
24470
24471  if [ -z "${SETFILE+x}" ]; then
24472    # The variable is not set by user, try to locate tool using the code snippet
24473    for ac_prog in SetFile
24474do
24475  # Extract the first word of "$ac_prog", so it can be a program name with args.
24476set dummy $ac_prog; ac_word=$2
24477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24478$as_echo_n "checking for $ac_word... " >&6; }
24479if ${ac_cv_path_SETFILE+:} false; then :
24480  $as_echo_n "(cached) " >&6
24481else
24482  case $SETFILE in
24483  [\\/]* | ?:[\\/]*)
24484  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24485  ;;
24486  *)
24487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24488for as_dir in $PATH
24489do
24490  IFS=$as_save_IFS
24491  test -z "$as_dir" && as_dir=.
24492    for ac_exec_ext in '' $ac_executable_extensions; do
24493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24494    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24496    break 2
24497  fi
24498done
24499  done
24500IFS=$as_save_IFS
24501
24502  ;;
24503esac
24504fi
24505SETFILE=$ac_cv_path_SETFILE
24506if test -n "$SETFILE"; then
24507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24508$as_echo "$SETFILE" >&6; }
24509else
24510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24511$as_echo "no" >&6; }
24512fi
24513
24514
24515  test -n "$SETFILE" && break
24516done
24517
24518  else
24519    # The variable is set, but is it from the command line or the environment?
24520
24521    # Try to remove the string !SETFILE! from our list.
24522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24524      # If it failed, the variable was not from the command line. Ignore it,
24525      # but warn the user (except for BASH, which is always set by the calling BASH).
24526      if test "xSETFILE" != xBASH; then
24527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24528$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24529      fi
24530      # Try to locate tool using the code snippet
24531      for ac_prog in SetFile
24532do
24533  # Extract the first word of "$ac_prog", so it can be a program name with args.
24534set dummy $ac_prog; ac_word=$2
24535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24536$as_echo_n "checking for $ac_word... " >&6; }
24537if ${ac_cv_path_SETFILE+:} false; then :
24538  $as_echo_n "(cached) " >&6
24539else
24540  case $SETFILE in
24541  [\\/]* | ?:[\\/]*)
24542  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24543  ;;
24544  *)
24545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24546for as_dir in $PATH
24547do
24548  IFS=$as_save_IFS
24549  test -z "$as_dir" && as_dir=.
24550    for ac_exec_ext in '' $ac_executable_extensions; do
24551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24552    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24554    break 2
24555  fi
24556done
24557  done
24558IFS=$as_save_IFS
24559
24560  ;;
24561esac
24562fi
24563SETFILE=$ac_cv_path_SETFILE
24564if test -n "$SETFILE"; then
24565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24566$as_echo "$SETFILE" >&6; }
24567else
24568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24569$as_echo "no" >&6; }
24570fi
24571
24572
24573  test -n "$SETFILE" && break
24574done
24575
24576    else
24577      # If it succeeded, then it was overridden by the user. We will use it
24578      # for the tool.
24579
24580      # First remove it from the list of overridden variables, so we can test
24581      # for unknown variables in the end.
24582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24583
24584      # Check if we try to supply an empty value
24585      if test "x$SETFILE" = x; then
24586        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24587$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24588        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24589$as_echo_n "checking for SETFILE... " >&6; }
24590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24591$as_echo "disabled" >&6; }
24592      else
24593        # Check if the provided tool contains a complete path.
24594        tool_specified="$SETFILE"
24595        tool_basename="${tool_specified##*/}"
24596        if test "x$tool_basename" = "x$tool_specified"; then
24597          # A command without a complete path is provided, search $PATH.
24598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24599$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24600          # Extract the first word of "$tool_basename", so it can be a program name with args.
24601set dummy $tool_basename; ac_word=$2
24602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24603$as_echo_n "checking for $ac_word... " >&6; }
24604if ${ac_cv_path_SETFILE+:} false; then :
24605  $as_echo_n "(cached) " >&6
24606else
24607  case $SETFILE in
24608  [\\/]* | ?:[\\/]*)
24609  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24610  ;;
24611  *)
24612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24613for as_dir in $PATH
24614do
24615  IFS=$as_save_IFS
24616  test -z "$as_dir" && as_dir=.
24617    for ac_exec_ext in '' $ac_executable_extensions; do
24618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24619    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24621    break 2
24622  fi
24623done
24624  done
24625IFS=$as_save_IFS
24626
24627  ;;
24628esac
24629fi
24630SETFILE=$ac_cv_path_SETFILE
24631if test -n "$SETFILE"; then
24632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24633$as_echo "$SETFILE" >&6; }
24634else
24635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24636$as_echo "no" >&6; }
24637fi
24638
24639
24640          if test "x$SETFILE" = x; then
24641            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24642          fi
24643        else
24644          # Otherwise we believe it is a complete path. Use it as it is.
24645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24646$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24647          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24648$as_echo_n "checking for SETFILE... " >&6; }
24649          if test ! -x "$tool_specified"; then
24650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24651$as_echo "not found" >&6; }
24652            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24653          fi
24654          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24655$as_echo "$tool_specified" >&6; }
24656        fi
24657      fi
24658    fi
24659
24660  fi
24661
24662
24663
24664  if test "x$SETFILE" = x; then
24665    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24666  fi
24667
24668
24669  fi
24670
24671
24672  # Check bash version
24673  # Extra [ ] to stop m4 mangling
24674   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24675  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24676$as_echo_n "checking bash version... " >&6; }
24677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24678$as_echo "$BASH_VER" >&6; }
24679
24680  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24681  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24682  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24683    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24684  fi
24685
24686  # Test if bash supports pipefail.
24687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24688$as_echo_n "checking if bash supports pipefail... " >&6; }
24689  if ${BASH} -c 'set -o pipefail'; then
24690    BASH_ARGS="$BASH_ARGS -o pipefail"
24691    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24692$as_echo "yes" >&6; }
24693  else
24694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24695$as_echo "no" >&6; }
24696  fi
24697
24698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24699$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24700  if ${BASH} -e -c 'true'; then
24701    BASH_ARGS="$BASH_ARGS -e"
24702    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24703$as_echo "yes" >&6; }
24704  else
24705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24706$as_echo "no" >&6; }
24707  fi
24708
24709
24710
24711
24712# Check if pkg-config is available.
24713
24714
24715if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24716	if test -n "$ac_tool_prefix"; then
24717  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24718set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24720$as_echo_n "checking for $ac_word... " >&6; }
24721if ${ac_cv_path_PKG_CONFIG+:} false; then :
24722  $as_echo_n "(cached) " >&6
24723else
24724  case $PKG_CONFIG in
24725  [\\/]* | ?:[\\/]*)
24726  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24727  ;;
24728  *)
24729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24730for as_dir in $PATH
24731do
24732  IFS=$as_save_IFS
24733  test -z "$as_dir" && as_dir=.
24734    for ac_exec_ext in '' $ac_executable_extensions; do
24735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24736    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24738    break 2
24739  fi
24740done
24741  done
24742IFS=$as_save_IFS
24743
24744  ;;
24745esac
24746fi
24747PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24748if test -n "$PKG_CONFIG"; then
24749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24750$as_echo "$PKG_CONFIG" >&6; }
24751else
24752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24753$as_echo "no" >&6; }
24754fi
24755
24756
24757fi
24758if test -z "$ac_cv_path_PKG_CONFIG"; then
24759  ac_pt_PKG_CONFIG=$PKG_CONFIG
24760  # Extract the first word of "pkg-config", so it can be a program name with args.
24761set dummy pkg-config; ac_word=$2
24762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24763$as_echo_n "checking for $ac_word... " >&6; }
24764if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24765  $as_echo_n "(cached) " >&6
24766else
24767  case $ac_pt_PKG_CONFIG in
24768  [\\/]* | ?:[\\/]*)
24769  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24770  ;;
24771  *)
24772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24773for as_dir in $PATH
24774do
24775  IFS=$as_save_IFS
24776  test -z "$as_dir" && as_dir=.
24777    for ac_exec_ext in '' $ac_executable_extensions; do
24778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24779    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24781    break 2
24782  fi
24783done
24784  done
24785IFS=$as_save_IFS
24786
24787  ;;
24788esac
24789fi
24790ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24791if test -n "$ac_pt_PKG_CONFIG"; then
24792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24793$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24794else
24795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24796$as_echo "no" >&6; }
24797fi
24798
24799  if test "x$ac_pt_PKG_CONFIG" = x; then
24800    PKG_CONFIG=""
24801  else
24802    case $cross_compiling:$ac_tool_warned in
24803yes:)
24804{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24805$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24806ac_tool_warned=yes ;;
24807esac
24808    PKG_CONFIG=$ac_pt_PKG_CONFIG
24809  fi
24810else
24811  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24812fi
24813
24814fi
24815if test -n "$PKG_CONFIG"; then
24816	_pkg_min_version=0.9.0
24817	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24818$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24819	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24820		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24821$as_echo "yes" >&6; }
24822	else
24823		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24824$as_echo "no" >&6; }
24825		PKG_CONFIG=""
24826	fi
24827
24828fi
24829
24830# After basic tools have been setup, we can check build os specific details.
24831
24832  ###############################################################################
24833
24834  # Note that this is the build platform OS version!
24835
24836  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24837  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24838  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24839  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24840
24841
24842
24843
24844
24845# Misc basic settings
24846
24847
24848# Check whether --with-default-make-target was given.
24849if test "${with_default_make_target+set}" = set; then :
24850  withval=$with_default_make_target;
24851fi
24852
24853  if test "x$with_default_make_target" = "x" \
24854      || test "x$with_default_make_target" = "xyes"; then
24855    DEFAULT_MAKE_TARGET="exploded-image"
24856  elif test "x$with_default_make_target" = "xno"; then
24857    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24858  else
24859    DEFAULT_MAKE_TARGET="$with_default_make_target"
24860  fi
24861
24862
24863
24864
24865###############################################################################
24866#
24867# Determine OpenJDK variants, options and version numbers.
24868#
24869###############################################################################
24870
24871# We need build & target for this.
24872
24873  # Should we build a JDK without a graphical UI?
24874  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24875$as_echo_n "checking headless only... " >&6; }
24876  # Check whether --enable-headless-only was given.
24877if test "${enable_headless_only+set}" = set; then :
24878  enableval=$enable_headless_only;
24879fi
24880
24881
24882  if test "x$enable_headless_only" = "xyes"; then
24883    ENABLE_HEADLESS_ONLY="true"
24884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24885$as_echo "yes" >&6; }
24886  elif test "x$enable_headless_only" = "xno"; then
24887    ENABLE_HEADLESS_ONLY="false"
24888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24889$as_echo "no" >&6; }
24890  elif test "x$enable_headless_only" = "x"; then
24891    ENABLE_HEADLESS_ONLY="false"
24892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24893$as_echo "no" >&6; }
24894  else
24895    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24896  fi
24897
24898
24899
24900  # Should we build the complete docs, or just a lightweight version?
24901  # Check whether --enable-full-docs was given.
24902if test "${enable_full_docs+set}" = set; then :
24903  enableval=$enable_full_docs;
24904fi
24905
24906
24907  # Verify dependencies
24908  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24909$as_echo_n "checking for graphviz dot... " >&6; }
24910  if test "x$DOT" != "x"; then
24911    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24912$as_echo "yes" >&6; }
24913  else
24914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24915$as_echo "no, cannot generate full docs" >&6; }
24916    FULL_DOCS_DEP_MISSING=true
24917  fi
24918
24919  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
24920$as_echo_n "checking for pandoc... " >&6; }
24921  if test "x$PANDOC" != "x"; then
24922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24923$as_echo "yes" >&6; }
24924  else
24925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24926$as_echo "no, cannot generate full docs" >&6; }
24927    FULL_DOCS_DEP_MISSING=true
24928  fi
24929
24930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
24931$as_echo_n "checking full docs... " >&6; }
24932  if test "x$enable_full_docs" = xyes; then
24933    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
24934      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24935$as_echo "no, missing dependencies" >&6; }
24936
24937  # Print a helpful message on how to acquire the necessary build dependency.
24938  # dot is the help tag: freetype, cups, alsa etc
24939  MISSING_DEPENDENCY=dot
24940
24941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24942    cygwin_help $MISSING_DEPENDENCY
24943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24944    msys_help $MISSING_DEPENDENCY
24945  else
24946    PKGHANDLER_COMMAND=
24947
24948    case $PKGHANDLER in
24949      apt-get)
24950        apt_help     $MISSING_DEPENDENCY ;;
24951      yum)
24952        yum_help     $MISSING_DEPENDENCY ;;
24953      brew)
24954        brew_help    $MISSING_DEPENDENCY ;;
24955      port)
24956        port_help    $MISSING_DEPENDENCY ;;
24957      pkgutil)
24958        pkgutil_help $MISSING_DEPENDENCY ;;
24959      pkgadd)
24960        pkgadd_help  $MISSING_DEPENDENCY ;;
24961    esac
24962
24963    if test "x$PKGHANDLER_COMMAND" != x; then
24964      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24965    fi
24966  fi
24967
24968      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
24969    else
24970      ENABLE_FULL_DOCS=true
24971      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
24972$as_echo "yes, forced" >&6; }
24973    fi
24974  elif test "x$enable_full_docs" = xno; then
24975    ENABLE_FULL_DOCS=false
24976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
24977$as_echo "no, forced" >&6; }
24978  elif test "x$enable_full_docs" = x; then
24979    # Check for prerequisites
24980    if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
24981      ENABLE_FULL_DOCS=false
24982      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24983$as_echo "no, missing dependencies" >&6; }
24984    else
24985      ENABLE_FULL_DOCS=true
24986      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
24987$as_echo "yes, dependencies present" >&6; }
24988    fi
24989  else
24990    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
24991  fi
24992
24993
24994
24995  # Choose cacerts source file
24996
24997# Check whether --with-cacerts-file was given.
24998if test "${with_cacerts_file+set}" = set; then :
24999  withval=$with_cacerts_file;
25000fi
25001
25002  if test "x$with_cacerts_file" != x; then
25003    CACERTS_FILE=$with_cacerts_file
25004  fi
25005
25006
25007  # Enable or disable unlimited crypto
25008  # Check whether --enable-unlimited-crypto was given.
25009if test "${enable_unlimited_crypto+set}" = set; then :
25010  enableval=$enable_unlimited_crypto;
25011else
25012  enable_unlimited_crypto=yes
25013fi
25014
25015  if test "x$enable_unlimited_crypto" = "xyes"; then
25016    UNLIMITED_CRYPTO=true
25017  else
25018    UNLIMITED_CRYPTO=false
25019  fi
25020
25021
25022  # Should we build the serviceability agent (SA)?
25023  INCLUDE_SA=true
25024  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
25025    INCLUDE_SA=false
25026  fi
25027  if test "x$OPENJDK_TARGET_OS" = xaix ; then
25028    INCLUDE_SA=false
25029  fi
25030
25031
25032  # Compress jars
25033  COMPRESS_JARS=false
25034
25035
25036
25037  # Setup default copyright year. Mostly overridden when building close to a new year.
25038
25039# Check whether --with-copyright-year was given.
25040if test "${with_copyright_year+set}" = set; then :
25041  withval=$with_copyright_year;
25042fi
25043
25044  if test "x$with_copyright_year" = xyes; then
25045    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
25046  elif test "x$with_copyright_year" != x; then
25047    COPYRIGHT_YEAR="$with_copyright_year"
25048  else
25049    COPYRIGHT_YEAR=`$DATE +'%Y'`
25050  fi
25051
25052
25053
25054  # Check whether --enable-keep-packaged-modules was given.
25055if test "${enable_keep_packaged_modules+set}" = set; then :
25056  enableval=$enable_keep_packaged_modules;
25057fi
25058
25059
25060  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
25061$as_echo_n "checking if packaged modules are kept... " >&6; }
25062  if test "x$enable_keep_packaged_modules" = "xyes"; then
25063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25064$as_echo "yes" >&6; }
25065    JLINK_KEEP_PACKAGED_MODULES=true
25066  elif test "x$enable_keep_packaged_modules" = "xno"; then
25067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25068$as_echo "no" >&6; }
25069    JLINK_KEEP_PACKAGED_MODULES=false
25070  elif test "x$enable_keep_packaged_modules" = "x"; then
25071    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
25072$as_echo "yes (default)" >&6; }
25073    JLINK_KEEP_PACKAGED_MODULES=true
25074  else
25075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
25076$as_echo "error" >&6; }
25077    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
25078  fi
25079
25080
25081
25082
25083  # Warn user that old version arguments are deprecated.
25084
25085
25086# Check whether --with-milestone was given.
25087if test "${with_milestone+set}" = set; then :
25088  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
25089$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
25090fi
25091
25092
25093
25094
25095# Check whether --with-update-version was given.
25096if test "${with_update_version+set}" = set; then :
25097  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
25098$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
25099fi
25100
25101
25102
25103
25104# Check whether --with-user-release-suffix was given.
25105if test "${with_user_release_suffix+set}" = set; then :
25106  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
25107$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
25108fi
25109
25110
25111
25112
25113# Check whether --with-build-number was given.
25114if test "${with_build_number+set}" = set; then :
25115  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
25116$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
25117fi
25118
25119
25120
25121  # Source the version numbers file
25122  . $AUTOCONF_DIR/version-numbers
25123
25124  # Some non-version number information is set in that file
25125
25126
25127
25128
25129
25130
25131
25132
25133
25134  # Override version from arguments
25135
25136  # If --with-version-string is set, process it first. It is possible to
25137  # override parts with more specific flags, since these are processed later.
25138
25139# Check whether --with-version-string was given.
25140if test "${with_version_string+set}" = set; then :
25141  withval=$with_version_string;
25142fi
25143
25144  if test "x$with_version_string" = xyes; then
25145    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
25146  elif test "x$with_version_string" != x; then
25147    # Additional [] needed to keep m4 from mangling shell constructs.
25148    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
25149      VERSION_MAJOR=${BASH_REMATCH[1]}
25150      VERSION_MINOR=${BASH_REMATCH[3]}
25151      VERSION_SECURITY=${BASH_REMATCH[5]}
25152      VERSION_PATCH=${BASH_REMATCH[7]}
25153      VERSION_PRE=${BASH_REMATCH[9]}
25154      version_plus_separator=${BASH_REMATCH[11]}
25155      VERSION_BUILD=${BASH_REMATCH[12]}
25156      VERSION_OPT=${BASH_REMATCH[14]}
25157      # Unspecified numerical fields are interpreted as 0.
25158      if test "x$VERSION_MINOR" = x; then
25159        VERSION_MINOR=0
25160      fi
25161      if test "x$VERSION_SECURITY" = x; then
25162        VERSION_SECURITY=0
25163      fi
25164      if test "x$VERSION_PATCH" = x; then
25165        VERSION_PATCH=0
25166      fi
25167      if test "x$version_plus_separator" != x \
25168          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25169        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25170      fi
25171      # Stop the version part process from setting default values.
25172      # We still allow them to explicitly override though.
25173      NO_DEFAULT_VERSION_PARTS=true
25174    else
25175      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25176    fi
25177  fi
25178
25179
25180# Check whether --with-version-pre was given.
25181if test "${with_version_pre+set}" = set; then :
25182  withval=$with_version_pre; with_version_pre_present=true
25183else
25184  with_version_pre_present=false
25185fi
25186
25187
25188  if test "x$with_version_pre_present" = xtrue; then
25189    if test "x$with_version_pre" = xyes; then
25190      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25191    elif test "x$with_version_pre" = xno; then
25192      # Interpret --without-* as empty string instead of the literal "no"
25193      VERSION_PRE=
25194    else
25195      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25196       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25197      if test "x$VERSION_PRE" != "x$with_version_pre"; then
25198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25199$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25200      fi
25201    fi
25202  else
25203    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25204      # Default is to use "internal" as pre
25205      VERSION_PRE="internal"
25206    fi
25207  fi
25208
25209
25210# Check whether --with-version-opt was given.
25211if test "${with_version_opt+set}" = set; then :
25212  withval=$with_version_opt; with_version_opt_present=true
25213else
25214  with_version_opt_present=false
25215fi
25216
25217
25218  if test "x$with_version_opt_present" = xtrue; then
25219    if test "x$with_version_opt" = xyes; then
25220      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25221    elif test "x$with_version_opt" = xno; then
25222      # Interpret --without-* as empty string instead of the literal "no"
25223      VERSION_OPT=
25224    else
25225      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25226       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25227      if test "x$VERSION_OPT" != "x$with_version_opt"; then
25228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25229$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25230      fi
25231    fi
25232  else
25233    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25234      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25235      # Outer [ ] to quote m4.
25236       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25237      VERSION_OPT="adhoc.$USERNAME.$basedirname"
25238    fi
25239  fi
25240
25241
25242# Check whether --with-version-build was given.
25243if test "${with_version_build+set}" = set; then :
25244  withval=$with_version_build; with_version_build_present=true
25245else
25246  with_version_build_present=false
25247fi
25248
25249
25250  if test "x$with_version_build_present" = xtrue; then
25251    if test "x$with_version_build" = xyes; then
25252      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25253    elif test "x$with_version_build" = xno; then
25254      # Interpret --without-* as empty string instead of the literal "no"
25255      VERSION_BUILD=
25256    elif test "x$with_version_build" = x; then
25257      VERSION_BUILD=
25258    else
25259
25260  # Additional [] needed to keep m4 from mangling shell constructs.
25261  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25262    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25263  fi
25264  # Extract the version number without leading zeros.
25265  cleaned_value=${BASH_REMATCH[1]}
25266  if test "x$cleaned_value" = x; then
25267    # Special case for zero
25268    cleaned_value=${BASH_REMATCH[2]}
25269  fi
25270
25271  if test $cleaned_value -gt 255; then
25272    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25273  fi
25274  if test "x$cleaned_value" != "x$with_version_build"; then
25275    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25276$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25277  fi
25278  VERSION_BUILD=$cleaned_value
25279
25280    fi
25281  else
25282    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25283      # Default is to not have a build number.
25284      VERSION_BUILD=""
25285      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25286      VERSION_BUILD=0
25287    fi
25288  fi
25289
25290
25291# Check whether --with-version-major was given.
25292if test "${with_version_major+set}" = set; then :
25293  withval=$with_version_major; with_version_major_present=true
25294else
25295  with_version_major_present=false
25296fi
25297
25298
25299  if test "x$with_version_major_present" = xtrue; then
25300    if test "x$with_version_major" = xyes; then
25301      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25302    else
25303
25304  # Additional [] needed to keep m4 from mangling shell constructs.
25305  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25306    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25307  fi
25308  # Extract the version number without leading zeros.
25309  cleaned_value=${BASH_REMATCH[1]}
25310  if test "x$cleaned_value" = x; then
25311    # Special case for zero
25312    cleaned_value=${BASH_REMATCH[2]}
25313  fi
25314
25315  if test $cleaned_value -gt 255; then
25316    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25317  fi
25318  if test "x$cleaned_value" != "x$with_version_major"; then
25319    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25320$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25321  fi
25322  VERSION_MAJOR=$cleaned_value
25323
25324    fi
25325  else
25326    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25327      # Default is to get value from version-numbers
25328      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25329    fi
25330  fi
25331
25332
25333# Check whether --with-version-minor was given.
25334if test "${with_version_minor+set}" = set; then :
25335  withval=$with_version_minor; with_version_minor_present=true
25336else
25337  with_version_minor_present=false
25338fi
25339
25340
25341  if test "x$with_version_minor_present" = xtrue; then
25342    if test "x$with_version_minor" = xyes; then
25343      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25344    elif test "x$with_version_minor" = xno; then
25345      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25346      VERSION_MINOR=0
25347    elif test "x$with_version_minor" = x; then
25348      VERSION_MINOR=0
25349    else
25350
25351  # Additional [] needed to keep m4 from mangling shell constructs.
25352  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25353    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25354  fi
25355  # Extract the version number without leading zeros.
25356  cleaned_value=${BASH_REMATCH[1]}
25357  if test "x$cleaned_value" = x; then
25358    # Special case for zero
25359    cleaned_value=${BASH_REMATCH[2]}
25360  fi
25361
25362  if test $cleaned_value -gt 255; then
25363    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25364  fi
25365  if test "x$cleaned_value" != "x$with_version_minor"; then
25366    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25367$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25368  fi
25369  VERSION_MINOR=$cleaned_value
25370
25371    fi
25372  else
25373    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25374      # Default is 0, if unspecified
25375      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25376    fi
25377  fi
25378
25379
25380# Check whether --with-version-security was given.
25381if test "${with_version_security+set}" = set; then :
25382  withval=$with_version_security; with_version_security_present=true
25383else
25384  with_version_security_present=false
25385fi
25386
25387
25388  if test "x$with_version_security_present" = xtrue; then
25389    if test "x$with_version_security" = xyes; then
25390      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25391    elif test "x$with_version_security" = xno; then
25392      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25393      VERSION_SECURITY=0
25394    elif test "x$with_version_security" = x; then
25395      VERSION_SECURITY=0
25396    else
25397
25398  # Additional [] needed to keep m4 from mangling shell constructs.
25399  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25400    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25401  fi
25402  # Extract the version number without leading zeros.
25403  cleaned_value=${BASH_REMATCH[1]}
25404  if test "x$cleaned_value" = x; then
25405    # Special case for zero
25406    cleaned_value=${BASH_REMATCH[2]}
25407  fi
25408
25409  if test $cleaned_value -gt 255; then
25410    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25411  fi
25412  if test "x$cleaned_value" != "x$with_version_security"; then
25413    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25414$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25415  fi
25416  VERSION_SECURITY=$cleaned_value
25417
25418    fi
25419  else
25420    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25421      # Default is 0, if unspecified
25422      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25423    fi
25424  fi
25425
25426
25427# Check whether --with-version-patch was given.
25428if test "${with_version_patch+set}" = set; then :
25429  withval=$with_version_patch; with_version_patch_present=true
25430else
25431  with_version_patch_present=false
25432fi
25433
25434
25435  if test "x$with_version_patch_present" = xtrue; then
25436    if test "x$with_version_patch" = xyes; then
25437      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25438    elif test "x$with_version_patch" = xno; then
25439      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25440      VERSION_PATCH=0
25441    elif test "x$with_version_patch" = x; then
25442      VERSION_PATCH=0
25443    else
25444
25445  # Additional [] needed to keep m4 from mangling shell constructs.
25446  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25447    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25448  fi
25449  # Extract the version number without leading zeros.
25450  cleaned_value=${BASH_REMATCH[1]}
25451  if test "x$cleaned_value" = x; then
25452    # Special case for zero
25453    cleaned_value=${BASH_REMATCH[2]}
25454  fi
25455
25456  if test $cleaned_value -gt 255; then
25457    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25458  fi
25459  if test "x$cleaned_value" != "x$with_version_patch"; then
25460    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25461$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25462  fi
25463  VERSION_PATCH=$cleaned_value
25464
25465    fi
25466  else
25467    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25468      # Default is 0, if unspecified
25469      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25470    fi
25471  fi
25472
25473  # Calculate derived version properties
25474
25475  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25476  if test "x$VERSION_PRE" = x; then
25477    VERSION_IS_GA=true
25478  else
25479    VERSION_IS_GA=false
25480  fi
25481
25482  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25483  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25484
25485  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25486  # Strip trailing zeroes from stripped_version_number
25487  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25488  VERSION_NUMBER=$stripped_version_number
25489
25490  # The complete version string, with additional build information
25491  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25492    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25493  else
25494    # If either build or opt is set, we need a + separator
25495    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25496  fi
25497
25498  # The short version string, just VERSION_NUMBER and PRE, if present.
25499  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25500
25501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25502$as_echo_n "checking for version string... " >&6; }
25503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25504$as_echo "$VERSION_STRING" >&6; }
25505
25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520###############################################################################
25521#
25522# Setup BootJDK, used to bootstrap the build.
25523#
25524###############################################################################
25525
25526
25527  BOOT_JDK_FOUND=no
25528
25529# Check whether --with-boot-jdk was given.
25530if test "${with_boot_jdk+set}" = set; then :
25531  withval=$with_boot_jdk;
25532fi
25533
25534
25535  # We look for the Boot JDK through various means, going from more certain to
25536  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25537  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25538  # must check if this is indeed valid; otherwise we'll continue looking.
25539
25540  # Test: Is bootjdk explicitly set by command line arguments?
25541
25542  if test "x$BOOT_JDK_FOUND" = xno; then
25543    # Now execute the test
25544
25545  if test "x$with_boot_jdk" != x; then
25546    BOOT_JDK=$with_boot_jdk
25547    BOOT_JDK_FOUND=maybe
25548    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25549$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25550  fi
25551
25552
25553    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25554    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25555      # Do we have a bin/java?
25556      if test ! -x "$BOOT_JDK/bin/java"; then
25557        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25559        BOOT_JDK_FOUND=no
25560      else
25561        # Do we have a bin/javac?
25562        if test ! -x "$BOOT_JDK/bin/javac"; then
25563          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25565          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25566$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25567          BOOT_JDK_FOUND=no
25568        else
25569          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25570          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25571
25572          # Extra M4 quote needed to protect [] in grep expression.
25573          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25574          if test "x$FOUND_CORRECT_VERSION" = x; then
25575            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25577            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25578$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25579            BOOT_JDK_FOUND=no
25580          else
25581            # We're done! :-)
25582            BOOT_JDK_FOUND=yes
25583
25584  # Only process if variable expands to non-empty
25585
25586  if test "x$BOOT_JDK" != x; then
25587    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25588
25589  # Input might be given as Windows format, start by converting to
25590  # unix format.
25591  path="$BOOT_JDK"
25592  new_path=`$CYGPATH -u "$path"`
25593
25594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25597  # "foo.exe" is OK but "foo" is an error.
25598  #
25599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25600  # It is also a way to make sure we got the proper file name for the real test later on.
25601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25602  if test "x$test_shortpath" = x; then
25603    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25604$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25605    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25606  fi
25607
25608  # Call helper function which possibly converts this using DOS-style short mode.
25609  # If so, the updated path is stored in $new_path.
25610
25611  input_path="$new_path"
25612  # Check if we need to convert this using DOS-style short mode. If the path
25613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25614  # take no chances and rewrite it.
25615  # Note: m4 eats our [], so we need to use [ and ] instead.
25616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25617  if test "x$has_forbidden_chars" != x; then
25618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25622      # Going to short mode and back again did indeed matter. Since short mode is
25623      # case insensitive, let's make it lowercase to improve readability.
25624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25625      # Now convert it back to Unix-style (cygpath)
25626      input_path=`$CYGPATH -u "$shortmode_path"`
25627      new_path="$input_path"
25628    fi
25629  fi
25630
25631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25632  if test "x$test_cygdrive_prefix" = x; then
25633    # As a simple fix, exclude /usr/bin since it's not a real path.
25634    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25636      # a path prefixed by /cygdrive for fixpath to work.
25637      new_path="$CYGWIN_ROOT_PATH$input_path"
25638    fi
25639  fi
25640
25641
25642  if test "x$path" != "x$new_path"; then
25643    BOOT_JDK="$new_path"
25644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25645$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25646  fi
25647
25648    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25649
25650  path="$BOOT_JDK"
25651  has_colon=`$ECHO $path | $GREP ^.:`
25652  new_path="$path"
25653  if test "x$has_colon" = x; then
25654    # Not in mixed or Windows style, start by that.
25655    new_path=`cmd //c echo $path`
25656  fi
25657
25658
25659  input_path="$new_path"
25660  # Check if we need to convert this using DOS-style short mode. If the path
25661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25662  # take no chances and rewrite it.
25663  # Note: m4 eats our [], so we need to use [ and ] instead.
25664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25665  if test "x$has_forbidden_chars" != x; then
25666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25667    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25668  fi
25669
25670
25671  windows_path="$new_path"
25672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25673    unix_path=`$CYGPATH -u "$windows_path"`
25674    new_path="$unix_path"
25675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25677    new_path="$unix_path"
25678  fi
25679
25680  if test "x$path" != "x$new_path"; then
25681    BOOT_JDK="$new_path"
25682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25683$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25684  fi
25685
25686  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25687  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25688
25689    else
25690      # We're on a unix platform. Hooray! :)
25691      path="$BOOT_JDK"
25692      has_space=`$ECHO "$path" | $GREP " "`
25693      if test "x$has_space" != x; then
25694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25695$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25696        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25697      fi
25698
25699      # Use eval to expand a potential ~
25700      eval path="$path"
25701      if test ! -f "$path" && test ! -d "$path"; then
25702        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25703      fi
25704
25705      if test -d "$path"; then
25706        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25707      else
25708        dir="`$DIRNAME "$path"`"
25709        base="`$BASENAME "$path"`"
25710        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25711      fi
25712    fi
25713  fi
25714
25715            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25716$as_echo_n "checking for Boot JDK... " >&6; }
25717            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25718$as_echo "$BOOT_JDK" >&6; }
25719            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25720$as_echo_n "checking Boot JDK version... " >&6; }
25721            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25723$as_echo "$BOOT_JDK_VERSION" >&6; }
25724          fi # end check jdk version
25725        fi # end check javac
25726      fi # end check java
25727    fi # end check boot jdk found
25728  fi
25729
25730  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25731    # Having specified an argument which is incorrect will produce an instant failure;
25732    # we should not go on looking
25733    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25734  fi
25735
25736  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25737
25738  if test "x$BOOT_JDK_FOUND" = xno; then
25739    # Now execute the test
25740
25741  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25742    # First check at user selected default
25743
25744  if test "x$BOOT_JDK_FOUND" = xno; then
25745    # Now execute the test
25746
25747  if test -x /usr/libexec/java_home; then
25748    BOOT_JDK=`/usr/libexec/java_home `
25749    BOOT_JDK_FOUND=maybe
25750    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25751$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25752  fi
25753
25754
25755    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25756    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25757      # Do we have a bin/java?
25758      if test ! -x "$BOOT_JDK/bin/java"; then
25759        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25761        BOOT_JDK_FOUND=no
25762      else
25763        # Do we have a bin/javac?
25764        if test ! -x "$BOOT_JDK/bin/javac"; then
25765          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25767          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25768$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25769          BOOT_JDK_FOUND=no
25770        else
25771          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25772          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25773
25774          # Extra M4 quote needed to protect [] in grep expression.
25775          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25776          if test "x$FOUND_CORRECT_VERSION" = x; then
25777            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25779            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25780$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25781            BOOT_JDK_FOUND=no
25782          else
25783            # We're done! :-)
25784            BOOT_JDK_FOUND=yes
25785
25786  # Only process if variable expands to non-empty
25787
25788  if test "x$BOOT_JDK" != x; then
25789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25790
25791  # Input might be given as Windows format, start by converting to
25792  # unix format.
25793  path="$BOOT_JDK"
25794  new_path=`$CYGPATH -u "$path"`
25795
25796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25799  # "foo.exe" is OK but "foo" is an error.
25800  #
25801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25802  # It is also a way to make sure we got the proper file name for the real test later on.
25803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25804  if test "x$test_shortpath" = x; then
25805    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25806$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25807    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25808  fi
25809
25810  # Call helper function which possibly converts this using DOS-style short mode.
25811  # If so, the updated path is stored in $new_path.
25812
25813  input_path="$new_path"
25814  # Check if we need to convert this using DOS-style short mode. If the path
25815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25816  # take no chances and rewrite it.
25817  # Note: m4 eats our [], so we need to use [ and ] instead.
25818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25819  if test "x$has_forbidden_chars" != x; then
25820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25824      # Going to short mode and back again did indeed matter. Since short mode is
25825      # case insensitive, let's make it lowercase to improve readability.
25826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25827      # Now convert it back to Unix-style (cygpath)
25828      input_path=`$CYGPATH -u "$shortmode_path"`
25829      new_path="$input_path"
25830    fi
25831  fi
25832
25833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25834  if test "x$test_cygdrive_prefix" = x; then
25835    # As a simple fix, exclude /usr/bin since it's not a real path.
25836    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25838      # a path prefixed by /cygdrive for fixpath to work.
25839      new_path="$CYGWIN_ROOT_PATH$input_path"
25840    fi
25841  fi
25842
25843
25844  if test "x$path" != "x$new_path"; then
25845    BOOT_JDK="$new_path"
25846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25847$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25848  fi
25849
25850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25851
25852  path="$BOOT_JDK"
25853  has_colon=`$ECHO $path | $GREP ^.:`
25854  new_path="$path"
25855  if test "x$has_colon" = x; then
25856    # Not in mixed or Windows style, start by that.
25857    new_path=`cmd //c echo $path`
25858  fi
25859
25860
25861  input_path="$new_path"
25862  # Check if we need to convert this using DOS-style short mode. If the path
25863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25864  # take no chances and rewrite it.
25865  # Note: m4 eats our [], so we need to use [ and ] instead.
25866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25867  if test "x$has_forbidden_chars" != x; then
25868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25870  fi
25871
25872
25873  windows_path="$new_path"
25874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25875    unix_path=`$CYGPATH -u "$windows_path"`
25876    new_path="$unix_path"
25877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25879    new_path="$unix_path"
25880  fi
25881
25882  if test "x$path" != "x$new_path"; then
25883    BOOT_JDK="$new_path"
25884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25885$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25886  fi
25887
25888  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25889  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25890
25891    else
25892      # We're on a unix platform. Hooray! :)
25893      path="$BOOT_JDK"
25894      has_space=`$ECHO "$path" | $GREP " "`
25895      if test "x$has_space" != x; then
25896        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25897$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25898        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25899      fi
25900
25901      # Use eval to expand a potential ~
25902      eval path="$path"
25903      if test ! -f "$path" && test ! -d "$path"; then
25904        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25905      fi
25906
25907      if test -d "$path"; then
25908        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25909      else
25910        dir="`$DIRNAME "$path"`"
25911        base="`$BASENAME "$path"`"
25912        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25913      fi
25914    fi
25915  fi
25916
25917            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25918$as_echo_n "checking for Boot JDK... " >&6; }
25919            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25920$as_echo "$BOOT_JDK" >&6; }
25921            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25922$as_echo_n "checking Boot JDK version... " >&6; }
25923            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25925$as_echo "$BOOT_JDK_VERSION" >&6; }
25926          fi # end check jdk version
25927        fi # end check javac
25928      fi # end check java
25929    fi # end check boot jdk found
25930  fi
25931
25932    # If that did not work out (e.g. too old), try explicit versions instead
25933
25934  if test "x$BOOT_JDK_FOUND" = xno; then
25935    # Now execute the test
25936
25937  if test -x /usr/libexec/java_home; then
25938    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25939    BOOT_JDK_FOUND=maybe
25940    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25941$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25942  fi
25943
25944
25945    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25946    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25947      # Do we have a bin/java?
25948      if test ! -x "$BOOT_JDK/bin/java"; then
25949        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25951        BOOT_JDK_FOUND=no
25952      else
25953        # Do we have a bin/javac?
25954        if test ! -x "$BOOT_JDK/bin/javac"; then
25955          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25956$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25957          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25958$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25959          BOOT_JDK_FOUND=no
25960        else
25961          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25962          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25963
25964          # Extra M4 quote needed to protect [] in grep expression.
25965          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25966          if test "x$FOUND_CORRECT_VERSION" = x; then
25967            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25969            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25970$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25971            BOOT_JDK_FOUND=no
25972          else
25973            # We're done! :-)
25974            BOOT_JDK_FOUND=yes
25975
25976  # Only process if variable expands to non-empty
25977
25978  if test "x$BOOT_JDK" != x; then
25979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25980
25981  # Input might be given as Windows format, start by converting to
25982  # unix format.
25983  path="$BOOT_JDK"
25984  new_path=`$CYGPATH -u "$path"`
25985
25986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25989  # "foo.exe" is OK but "foo" is an error.
25990  #
25991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25992  # It is also a way to make sure we got the proper file name for the real test later on.
25993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25994  if test "x$test_shortpath" = 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 $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25998  fi
25999
26000  # Call helper function which possibly converts this using DOS-style short mode.
26001  # If so, the updated path is stored in $new_path.
26002
26003  input_path="$new_path"
26004  # Check if we need to convert this using DOS-style short mode. If the path
26005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26006  # take no chances and rewrite it.
26007  # Note: m4 eats our [], so we need to use [ and ] instead.
26008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26009  if test "x$has_forbidden_chars" != x; then
26010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26014      # Going to short mode and back again did indeed matter. Since short mode is
26015      # case insensitive, let's make it lowercase to improve readability.
26016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26017      # Now convert it back to Unix-style (cygpath)
26018      input_path=`$CYGPATH -u "$shortmode_path"`
26019      new_path="$input_path"
26020    fi
26021  fi
26022
26023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26024  if test "x$test_cygdrive_prefix" = x; then
26025    # As a simple fix, exclude /usr/bin since it's not a real path.
26026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26028      # a path prefixed by /cygdrive for fixpath to work.
26029      new_path="$CYGWIN_ROOT_PATH$input_path"
26030    fi
26031  fi
26032
26033
26034  if test "x$path" != "x$new_path"; then
26035    BOOT_JDK="$new_path"
26036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26037$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26038  fi
26039
26040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26041
26042  path="$BOOT_JDK"
26043  has_colon=`$ECHO $path | $GREP ^.:`
26044  new_path="$path"
26045  if test "x$has_colon" = x; then
26046    # Not in mixed or Windows style, start by that.
26047    new_path=`cmd //c echo $path`
26048  fi
26049
26050
26051  input_path="$new_path"
26052  # Check if we need to convert this using DOS-style short mode. If the path
26053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26054  # take no chances and rewrite it.
26055  # Note: m4 eats our [], so we need to use [ and ] instead.
26056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26057  if test "x$has_forbidden_chars" != x; then
26058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26060  fi
26061
26062
26063  windows_path="$new_path"
26064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26065    unix_path=`$CYGPATH -u "$windows_path"`
26066    new_path="$unix_path"
26067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26069    new_path="$unix_path"
26070  fi
26071
26072  if test "x$path" != "x$new_path"; then
26073    BOOT_JDK="$new_path"
26074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26076  fi
26077
26078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26080
26081    else
26082      # We're on a unix platform. Hooray! :)
26083      path="$BOOT_JDK"
26084      has_space=`$ECHO "$path" | $GREP " "`
26085      if test "x$has_space" != x; then
26086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26087$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26089      fi
26090
26091      # Use eval to expand a potential ~
26092      eval path="$path"
26093      if test ! -f "$path" && test ! -d "$path"; then
26094        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26095      fi
26096
26097      if test -d "$path"; then
26098        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26099      else
26100        dir="`$DIRNAME "$path"`"
26101        base="`$BASENAME "$path"`"
26102        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26103      fi
26104    fi
26105  fi
26106
26107            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26108$as_echo_n "checking for Boot JDK... " >&6; }
26109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26110$as_echo "$BOOT_JDK" >&6; }
26111            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26112$as_echo_n "checking Boot JDK version... " >&6; }
26113            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26114            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26115$as_echo "$BOOT_JDK_VERSION" >&6; }
26116          fi # end check jdk version
26117        fi # end check javac
26118      fi # end check java
26119    fi # end check boot jdk found
26120  fi
26121
26122
26123  if test "x$BOOT_JDK_FOUND" = xno; then
26124    # Now execute the test
26125
26126  if test -x /usr/libexec/java_home; then
26127    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
26128    BOOT_JDK_FOUND=maybe
26129    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
26130$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
26131  fi
26132
26133
26134    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26135    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26136      # Do we have a bin/java?
26137      if test ! -x "$BOOT_JDK/bin/java"; then
26138        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26140        BOOT_JDK_FOUND=no
26141      else
26142        # Do we have a bin/javac?
26143        if test ! -x "$BOOT_JDK/bin/javac"; then
26144          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26146          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26147$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26148          BOOT_JDK_FOUND=no
26149        else
26150          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26151          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26152
26153          # Extra M4 quote needed to protect [] in grep expression.
26154          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26155          if test "x$FOUND_CORRECT_VERSION" = x; then
26156            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26158            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26159$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26160            BOOT_JDK_FOUND=no
26161          else
26162            # We're done! :-)
26163            BOOT_JDK_FOUND=yes
26164
26165  # Only process if variable expands to non-empty
26166
26167  if test "x$BOOT_JDK" != x; then
26168    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26169
26170  # Input might be given as Windows format, start by converting to
26171  # unix format.
26172  path="$BOOT_JDK"
26173  new_path=`$CYGPATH -u "$path"`
26174
26175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26178  # "foo.exe" is OK but "foo" is an error.
26179  #
26180  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26181  # It is also a way to make sure we got the proper file name for the real test later on.
26182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26183  if test "x$test_shortpath" = x; then
26184    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26185$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26186    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26187  fi
26188
26189  # Call helper function which possibly converts this using DOS-style short mode.
26190  # If so, the updated path is stored in $new_path.
26191
26192  input_path="$new_path"
26193  # Check if we need to convert this using DOS-style short mode. If the path
26194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26195  # take no chances and rewrite it.
26196  # Note: m4 eats our [], so we need to use [ and ] instead.
26197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26198  if test "x$has_forbidden_chars" != x; then
26199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26200    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26201    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26202    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26203      # Going to short mode and back again did indeed matter. Since short mode is
26204      # case insensitive, let's make it lowercase to improve readability.
26205      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26206      # Now convert it back to Unix-style (cygpath)
26207      input_path=`$CYGPATH -u "$shortmode_path"`
26208      new_path="$input_path"
26209    fi
26210  fi
26211
26212  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26213  if test "x$test_cygdrive_prefix" = x; then
26214    # As a simple fix, exclude /usr/bin since it's not a real path.
26215    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26216      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26217      # a path prefixed by /cygdrive for fixpath to work.
26218      new_path="$CYGWIN_ROOT_PATH$input_path"
26219    fi
26220  fi
26221
26222
26223  if test "x$path" != "x$new_path"; then
26224    BOOT_JDK="$new_path"
26225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26226$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26227  fi
26228
26229    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26230
26231  path="$BOOT_JDK"
26232  has_colon=`$ECHO $path | $GREP ^.:`
26233  new_path="$path"
26234  if test "x$has_colon" = x; then
26235    # Not in mixed or Windows style, start by that.
26236    new_path=`cmd //c echo $path`
26237  fi
26238
26239
26240  input_path="$new_path"
26241  # Check if we need to convert this using DOS-style short mode. If the path
26242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26243  # take no chances and rewrite it.
26244  # Note: m4 eats our [], so we need to use [ and ] instead.
26245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26246  if test "x$has_forbidden_chars" != x; then
26247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26248    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26249  fi
26250
26251
26252  windows_path="$new_path"
26253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26254    unix_path=`$CYGPATH -u "$windows_path"`
26255    new_path="$unix_path"
26256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26258    new_path="$unix_path"
26259  fi
26260
26261  if test "x$path" != "x$new_path"; then
26262    BOOT_JDK="$new_path"
26263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26264$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26265  fi
26266
26267  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26268  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26269
26270    else
26271      # We're on a unix platform. Hooray! :)
26272      path="$BOOT_JDK"
26273      has_space=`$ECHO "$path" | $GREP " "`
26274      if test "x$has_space" != x; then
26275        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26276$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26277        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26278      fi
26279
26280      # Use eval to expand a potential ~
26281      eval path="$path"
26282      if test ! -f "$path" && test ! -d "$path"; then
26283        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26284      fi
26285
26286      if test -d "$path"; then
26287        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26288      else
26289        dir="`$DIRNAME "$path"`"
26290        base="`$BASENAME "$path"`"
26291        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26292      fi
26293    fi
26294  fi
26295
26296            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26297$as_echo_n "checking for Boot JDK... " >&6; }
26298            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26299$as_echo "$BOOT_JDK" >&6; }
26300            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26301$as_echo_n "checking Boot JDK version... " >&6; }
26302            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26304$as_echo "$BOOT_JDK_VERSION" >&6; }
26305          fi # end check jdk version
26306        fi # end check javac
26307      fi # end check java
26308    fi # end check boot jdk found
26309  fi
26310
26311
26312  if test "x$BOOT_JDK_FOUND" = xno; then
26313    # Now execute the test
26314
26315  if test -x /usr/libexec/java_home; then
26316    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26317    BOOT_JDK_FOUND=maybe
26318    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26319$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26320  fi
26321
26322
26323    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26324    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26325      # Do we have a bin/java?
26326      if test ! -x "$BOOT_JDK/bin/java"; then
26327        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26329        BOOT_JDK_FOUND=no
26330      else
26331        # Do we have a bin/javac?
26332        if test ! -x "$BOOT_JDK/bin/javac"; then
26333          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26334$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26335          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26336$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26337          BOOT_JDK_FOUND=no
26338        else
26339          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26340          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26341
26342          # Extra M4 quote needed to protect [] in grep expression.
26343          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26344          if test "x$FOUND_CORRECT_VERSION" = x; then
26345            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26346$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26347            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26348$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26349            BOOT_JDK_FOUND=no
26350          else
26351            # We're done! :-)
26352            BOOT_JDK_FOUND=yes
26353
26354  # Only process if variable expands to non-empty
26355
26356  if test "x$BOOT_JDK" != x; then
26357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26358
26359  # Input might be given as Windows format, start by converting to
26360  # unix format.
26361  path="$BOOT_JDK"
26362  new_path=`$CYGPATH -u "$path"`
26363
26364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26367  # "foo.exe" is OK but "foo" is an error.
26368  #
26369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26370  # It is also a way to make sure we got the proper file name for the real test later on.
26371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26372  if test "x$test_shortpath" = x; then
26373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26374$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26375    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26376  fi
26377
26378  # Call helper function which possibly converts this using DOS-style short mode.
26379  # If so, the updated path is stored in $new_path.
26380
26381  input_path="$new_path"
26382  # Check if we need to convert this using DOS-style short mode. If the path
26383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26384  # take no chances and rewrite it.
26385  # Note: m4 eats our [], so we need to use [ and ] instead.
26386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26387  if test "x$has_forbidden_chars" != x; then
26388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26392      # Going to short mode and back again did indeed matter. Since short mode is
26393      # case insensitive, let's make it lowercase to improve readability.
26394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26395      # Now convert it back to Unix-style (cygpath)
26396      input_path=`$CYGPATH -u "$shortmode_path"`
26397      new_path="$input_path"
26398    fi
26399  fi
26400
26401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26402  if test "x$test_cygdrive_prefix" = x; then
26403    # As a simple fix, exclude /usr/bin since it's not a real path.
26404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26406      # a path prefixed by /cygdrive for fixpath to work.
26407      new_path="$CYGWIN_ROOT_PATH$input_path"
26408    fi
26409  fi
26410
26411
26412  if test "x$path" != "x$new_path"; then
26413    BOOT_JDK="$new_path"
26414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26415$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26416  fi
26417
26418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26419
26420  path="$BOOT_JDK"
26421  has_colon=`$ECHO $path | $GREP ^.:`
26422  new_path="$path"
26423  if test "x$has_colon" = x; then
26424    # Not in mixed or Windows style, start by that.
26425    new_path=`cmd //c echo $path`
26426  fi
26427
26428
26429  input_path="$new_path"
26430  # Check if we need to convert this using DOS-style short mode. If the path
26431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26432  # take no chances and rewrite it.
26433  # Note: m4 eats our [], so we need to use [ and ] instead.
26434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26435  if test "x$has_forbidden_chars" != x; then
26436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26438  fi
26439
26440
26441  windows_path="$new_path"
26442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26443    unix_path=`$CYGPATH -u "$windows_path"`
26444    new_path="$unix_path"
26445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26447    new_path="$unix_path"
26448  fi
26449
26450  if test "x$path" != "x$new_path"; then
26451    BOOT_JDK="$new_path"
26452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26453$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26454  fi
26455
26456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26458
26459    else
26460      # We're on a unix platform. Hooray! :)
26461      path="$BOOT_JDK"
26462      has_space=`$ECHO "$path" | $GREP " "`
26463      if test "x$has_space" != x; then
26464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26465$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26466        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26467      fi
26468
26469      # Use eval to expand a potential ~
26470      eval path="$path"
26471      if test ! -f "$path" && test ! -d "$path"; then
26472        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26473      fi
26474
26475      if test -d "$path"; then
26476        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26477      else
26478        dir="`$DIRNAME "$path"`"
26479        base="`$BASENAME "$path"`"
26480        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26481      fi
26482    fi
26483  fi
26484
26485            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26486$as_echo_n "checking for Boot JDK... " >&6; }
26487            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26488$as_echo "$BOOT_JDK" >&6; }
26489            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26490$as_echo_n "checking Boot JDK version... " >&6; }
26491            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26493$as_echo "$BOOT_JDK_VERSION" >&6; }
26494          fi # end check jdk version
26495        fi # end check javac
26496      fi # end check java
26497    fi # end check boot jdk found
26498  fi
26499
26500  fi
26501
26502
26503    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26504    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26505      # Do we have a bin/java?
26506      if test ! -x "$BOOT_JDK/bin/java"; then
26507        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26508$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26509        BOOT_JDK_FOUND=no
26510      else
26511        # Do we have a bin/javac?
26512        if test ! -x "$BOOT_JDK/bin/javac"; then
26513          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26515          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26516$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26517          BOOT_JDK_FOUND=no
26518        else
26519          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26520          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26521
26522          # Extra M4 quote needed to protect [] in grep expression.
26523          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26524          if test "x$FOUND_CORRECT_VERSION" = x; then
26525            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26527            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26528$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26529            BOOT_JDK_FOUND=no
26530          else
26531            # We're done! :-)
26532            BOOT_JDK_FOUND=yes
26533
26534  # Only process if variable expands to non-empty
26535
26536  if test "x$BOOT_JDK" != x; then
26537    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26538
26539  # Input might be given as Windows format, start by converting to
26540  # unix format.
26541  path="$BOOT_JDK"
26542  new_path=`$CYGPATH -u "$path"`
26543
26544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26547  # "foo.exe" is OK but "foo" is an error.
26548  #
26549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26550  # It is also a way to make sure we got the proper file name for the real test later on.
26551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26552  if test "x$test_shortpath" = x; then
26553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26554$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26555    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26556  fi
26557
26558  # Call helper function which possibly converts this using DOS-style short mode.
26559  # If so, the updated path is stored in $new_path.
26560
26561  input_path="$new_path"
26562  # Check if we need to convert this using DOS-style short mode. If the path
26563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26564  # take no chances and rewrite it.
26565  # Note: m4 eats our [], so we need to use [ and ] instead.
26566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26567  if test "x$has_forbidden_chars" != x; then
26568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26572      # Going to short mode and back again did indeed matter. Since short mode is
26573      # case insensitive, let's make it lowercase to improve readability.
26574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26575      # Now convert it back to Unix-style (cygpath)
26576      input_path=`$CYGPATH -u "$shortmode_path"`
26577      new_path="$input_path"
26578    fi
26579  fi
26580
26581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26582  if test "x$test_cygdrive_prefix" = x; then
26583    # As a simple fix, exclude /usr/bin since it's not a real path.
26584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26586      # a path prefixed by /cygdrive for fixpath to work.
26587      new_path="$CYGWIN_ROOT_PATH$input_path"
26588    fi
26589  fi
26590
26591
26592  if test "x$path" != "x$new_path"; then
26593    BOOT_JDK="$new_path"
26594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26595$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26596  fi
26597
26598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26599
26600  path="$BOOT_JDK"
26601  has_colon=`$ECHO $path | $GREP ^.:`
26602  new_path="$path"
26603  if test "x$has_colon" = x; then
26604    # Not in mixed or Windows style, start by that.
26605    new_path=`cmd //c echo $path`
26606  fi
26607
26608
26609  input_path="$new_path"
26610  # Check if we need to convert this using DOS-style short mode. If the path
26611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26612  # take no chances and rewrite it.
26613  # Note: m4 eats our [], so we need to use [ and ] instead.
26614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26615  if test "x$has_forbidden_chars" != x; then
26616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26618  fi
26619
26620
26621  windows_path="$new_path"
26622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26623    unix_path=`$CYGPATH -u "$windows_path"`
26624    new_path="$unix_path"
26625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26627    new_path="$unix_path"
26628  fi
26629
26630  if test "x$path" != "x$new_path"; then
26631    BOOT_JDK="$new_path"
26632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26633$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26634  fi
26635
26636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26638
26639    else
26640      # We're on a unix platform. Hooray! :)
26641      path="$BOOT_JDK"
26642      has_space=`$ECHO "$path" | $GREP " "`
26643      if test "x$has_space" != x; then
26644        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26645$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26646        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26647      fi
26648
26649      # Use eval to expand a potential ~
26650      eval path="$path"
26651      if test ! -f "$path" && test ! -d "$path"; then
26652        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26653      fi
26654
26655      if test -d "$path"; then
26656        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26657      else
26658        dir="`$DIRNAME "$path"`"
26659        base="`$BASENAME "$path"`"
26660        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26661      fi
26662    fi
26663  fi
26664
26665            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26666$as_echo_n "checking for Boot JDK... " >&6; }
26667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26668$as_echo "$BOOT_JDK" >&6; }
26669            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26670$as_echo_n "checking Boot JDK version... " >&6; }
26671            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26673$as_echo "$BOOT_JDK_VERSION" >&6; }
26674          fi # end check jdk version
26675        fi # end check javac
26676      fi # end check java
26677    fi # end check boot jdk found
26678  fi
26679
26680
26681  # Test: Is $JAVA_HOME set?
26682
26683  if test "x$BOOT_JDK_FOUND" = xno; then
26684    # Now execute the test
26685
26686  if test "x$JAVA_HOME" != x; then
26687    JAVA_HOME_PROCESSED="$JAVA_HOME"
26688
26689  # Only process if variable expands to non-empty
26690
26691  if test "x$JAVA_HOME_PROCESSED" != x; then
26692    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26693
26694  # Input might be given as Windows format, start by converting to
26695  # unix format.
26696  path="$JAVA_HOME_PROCESSED"
26697  new_path=`$CYGPATH -u "$path"`
26698
26699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26702  # "foo.exe" is OK but "foo" is an error.
26703  #
26704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26705  # It is also a way to make sure we got the proper file name for the real test later on.
26706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26707  if test "x$test_shortpath" = x; then
26708    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26709$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26710    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26711  fi
26712
26713  # Call helper function which possibly converts this using DOS-style short mode.
26714  # If so, the updated path is stored in $new_path.
26715
26716  input_path="$new_path"
26717  # Check if we need to convert this using DOS-style short mode. If the path
26718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26719  # take no chances and rewrite it.
26720  # Note: m4 eats our [], so we need to use [ and ] instead.
26721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26722  if test "x$has_forbidden_chars" != x; then
26723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26727      # Going to short mode and back again did indeed matter. Since short mode is
26728      # case insensitive, let's make it lowercase to improve readability.
26729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26730      # Now convert it back to Unix-style (cygpath)
26731      input_path=`$CYGPATH -u "$shortmode_path"`
26732      new_path="$input_path"
26733    fi
26734  fi
26735
26736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26737  if test "x$test_cygdrive_prefix" = x; then
26738    # As a simple fix, exclude /usr/bin since it's not a real path.
26739    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26741      # a path prefixed by /cygdrive for fixpath to work.
26742      new_path="$CYGWIN_ROOT_PATH$input_path"
26743    fi
26744  fi
26745
26746
26747  if test "x$path" != "x$new_path"; then
26748    JAVA_HOME_PROCESSED="$new_path"
26749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26750$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26751  fi
26752
26753    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26754
26755  path="$JAVA_HOME_PROCESSED"
26756  has_colon=`$ECHO $path | $GREP ^.:`
26757  new_path="$path"
26758  if test "x$has_colon" = x; then
26759    # Not in mixed or Windows style, start by that.
26760    new_path=`cmd //c echo $path`
26761  fi
26762
26763
26764  input_path="$new_path"
26765  # Check if we need to convert this using DOS-style short mode. If the path
26766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26767  # take no chances and rewrite it.
26768  # Note: m4 eats our [], so we need to use [ and ] instead.
26769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26770  if test "x$has_forbidden_chars" != x; then
26771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26773  fi
26774
26775
26776  windows_path="$new_path"
26777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26778    unix_path=`$CYGPATH -u "$windows_path"`
26779    new_path="$unix_path"
26780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26782    new_path="$unix_path"
26783  fi
26784
26785  if test "x$path" != "x$new_path"; then
26786    JAVA_HOME_PROCESSED="$new_path"
26787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26788$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26789  fi
26790
26791  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26792  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26793
26794    else
26795      # We're on a unix platform. Hooray! :)
26796      path="$JAVA_HOME_PROCESSED"
26797      has_space=`$ECHO "$path" | $GREP " "`
26798      if test "x$has_space" != x; then
26799        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26800$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26801        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26802      fi
26803
26804      # Use eval to expand a potential ~
26805      eval path="$path"
26806      if test ! -f "$path" && test ! -d "$path"; then
26807        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26808      fi
26809
26810      if test -d "$path"; then
26811        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26812      else
26813        dir="`$DIRNAME "$path"`"
26814        base="`$BASENAME "$path"`"
26815        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26816      fi
26817    fi
26818  fi
26819
26820    if test ! -d "$JAVA_HOME_PROCESSED"; then
26821      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26822$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26823    else
26824      # Aha, the user has set a JAVA_HOME
26825      # let us use that as the Boot JDK.
26826      BOOT_JDK="$JAVA_HOME_PROCESSED"
26827      BOOT_JDK_FOUND=maybe
26828      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26829$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26830    fi
26831  fi
26832
26833
26834    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26835    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26836      # Do we have a bin/java?
26837      if test ! -x "$BOOT_JDK/bin/java"; then
26838        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26839$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26840        BOOT_JDK_FOUND=no
26841      else
26842        # Do we have a bin/javac?
26843        if test ! -x "$BOOT_JDK/bin/javac"; then
26844          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26845$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26846          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26847$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26848          BOOT_JDK_FOUND=no
26849        else
26850          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26851          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26852
26853          # Extra M4 quote needed to protect [] in grep expression.
26854          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26855          if test "x$FOUND_CORRECT_VERSION" = x; then
26856            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26858            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26859$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26860            BOOT_JDK_FOUND=no
26861          else
26862            # We're done! :-)
26863            BOOT_JDK_FOUND=yes
26864
26865  # Only process if variable expands to non-empty
26866
26867  if test "x$BOOT_JDK" != x; then
26868    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26869
26870  # Input might be given as Windows format, start by converting to
26871  # unix format.
26872  path="$BOOT_JDK"
26873  new_path=`$CYGPATH -u "$path"`
26874
26875  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26876  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26877  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26878  # "foo.exe" is OK but "foo" is an error.
26879  #
26880  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26881  # It is also a way to make sure we got the proper file name for the real test later on.
26882  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26883  if test "x$test_shortpath" = x; then
26884    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26885$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26886    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26887  fi
26888
26889  # Call helper function which possibly converts this using DOS-style short mode.
26890  # If so, the updated path is stored in $new_path.
26891
26892  input_path="$new_path"
26893  # Check if we need to convert this using DOS-style short mode. If the path
26894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26895  # take no chances and rewrite it.
26896  # Note: m4 eats our [], so we need to use [ and ] instead.
26897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26898  if test "x$has_forbidden_chars" != x; then
26899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26900    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26901    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26902    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26903      # Going to short mode and back again did indeed matter. Since short mode is
26904      # case insensitive, let's make it lowercase to improve readability.
26905      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26906      # Now convert it back to Unix-style (cygpath)
26907      input_path=`$CYGPATH -u "$shortmode_path"`
26908      new_path="$input_path"
26909    fi
26910  fi
26911
26912  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26913  if test "x$test_cygdrive_prefix" = x; then
26914    # As a simple fix, exclude /usr/bin since it's not a real path.
26915    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26916      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26917      # a path prefixed by /cygdrive for fixpath to work.
26918      new_path="$CYGWIN_ROOT_PATH$input_path"
26919    fi
26920  fi
26921
26922
26923  if test "x$path" != "x$new_path"; then
26924    BOOT_JDK="$new_path"
26925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26926$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26927  fi
26928
26929    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26930
26931  path="$BOOT_JDK"
26932  has_colon=`$ECHO $path | $GREP ^.:`
26933  new_path="$path"
26934  if test "x$has_colon" = x; then
26935    # Not in mixed or Windows style, start by that.
26936    new_path=`cmd //c echo $path`
26937  fi
26938
26939
26940  input_path="$new_path"
26941  # Check if we need to convert this using DOS-style short mode. If the path
26942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26943  # take no chances and rewrite it.
26944  # Note: m4 eats our [], so we need to use [ and ] instead.
26945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26946  if test "x$has_forbidden_chars" != x; then
26947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26948    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26949  fi
26950
26951
26952  windows_path="$new_path"
26953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26954    unix_path=`$CYGPATH -u "$windows_path"`
26955    new_path="$unix_path"
26956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26958    new_path="$unix_path"
26959  fi
26960
26961  if test "x$path" != "x$new_path"; then
26962    BOOT_JDK="$new_path"
26963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26964$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26965  fi
26966
26967  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26968  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26969
26970    else
26971      # We're on a unix platform. Hooray! :)
26972      path="$BOOT_JDK"
26973      has_space=`$ECHO "$path" | $GREP " "`
26974      if test "x$has_space" != x; then
26975        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26976$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26977        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26978      fi
26979
26980      # Use eval to expand a potential ~
26981      eval path="$path"
26982      if test ! -f "$path" && test ! -d "$path"; then
26983        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26984      fi
26985
26986      if test -d "$path"; then
26987        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26988      else
26989        dir="`$DIRNAME "$path"`"
26990        base="`$BASENAME "$path"`"
26991        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26992      fi
26993    fi
26994  fi
26995
26996            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26997$as_echo_n "checking for Boot JDK... " >&6; }
26998            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26999$as_echo "$BOOT_JDK" >&6; }
27000            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27001$as_echo_n "checking Boot JDK version... " >&6; }
27002            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27003            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27004$as_echo "$BOOT_JDK_VERSION" >&6; }
27005          fi # end check jdk version
27006        fi # end check javac
27007      fi # end check java
27008    fi # end check boot jdk found
27009  fi
27010
27011
27012  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
27013
27014  if test "x$BOOT_JDK_FOUND" = xno; then
27015    # Now execute the test
27016
27017  # Extract the first word of "javac", so it can be a program name with args.
27018set dummy javac; ac_word=$2
27019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27020$as_echo_n "checking for $ac_word... " >&6; }
27021if ${ac_cv_path_JAVAC_CHECK+:} false; then :
27022  $as_echo_n "(cached) " >&6
27023else
27024  case $JAVAC_CHECK in
27025  [\\/]* | ?:[\\/]*)
27026  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
27027  ;;
27028  *)
27029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27030for as_dir in $PATH
27031do
27032  IFS=$as_save_IFS
27033  test -z "$as_dir" && as_dir=.
27034    for ac_exec_ext in '' $ac_executable_extensions; do
27035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27036    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
27037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27038    break 2
27039  fi
27040done
27041  done
27042IFS=$as_save_IFS
27043
27044  ;;
27045esac
27046fi
27047JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
27048if test -n "$JAVAC_CHECK"; then
27049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
27050$as_echo "$JAVAC_CHECK" >&6; }
27051else
27052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27053$as_echo "no" >&6; }
27054fi
27055
27056
27057  # Extract the first word of "java", so it can be a program name with args.
27058set dummy java; ac_word=$2
27059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27060$as_echo_n "checking for $ac_word... " >&6; }
27061if ${ac_cv_path_JAVA_CHECK+:} false; then :
27062  $as_echo_n "(cached) " >&6
27063else
27064  case $JAVA_CHECK in
27065  [\\/]* | ?:[\\/]*)
27066  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
27067  ;;
27068  *)
27069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27070for as_dir in $PATH
27071do
27072  IFS=$as_save_IFS
27073  test -z "$as_dir" && as_dir=.
27074    for ac_exec_ext in '' $ac_executable_extensions; do
27075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27076    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
27077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27078    break 2
27079  fi
27080done
27081  done
27082IFS=$as_save_IFS
27083
27084  ;;
27085esac
27086fi
27087JAVA_CHECK=$ac_cv_path_JAVA_CHECK
27088if test -n "$JAVA_CHECK"; then
27089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
27090$as_echo "$JAVA_CHECK" >&6; }
27091else
27092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27093$as_echo "no" >&6; }
27094fi
27095
27096
27097  BINARY="$JAVAC_CHECK"
27098  if test "x$JAVAC_CHECK" = x; then
27099    BINARY="$JAVA_CHECK"
27100  fi
27101  if test "x$BINARY" != x; then
27102    # So there is a java(c) binary, it might be part of a JDK.
27103    # Lets find the JDK/JRE directory by following symbolic links.
27104    # Linux/GNU systems often have links from /usr/bin/java to
27105    # /etc/alternatives/java to the real JDK binary.
27106
27107  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27108    # Follow a chain of symbolic links. Use readlink
27109    # where it exists, else fall back to horribly
27110    # complicated shell code.
27111    if test "x$READLINK_TESTED" != yes; then
27112      # On MacOSX there is a readlink tool with a different
27113      # purpose than the GNU readlink tool. Check the found readlink.
27114      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27115      if test "x$ISGNU" = x; then
27116        # A readlink that we do not know how to use.
27117        # Are there other non-GNU readlinks out there?
27118        READLINK_TESTED=yes
27119        READLINK=
27120      fi
27121    fi
27122
27123    if test "x$READLINK" != x; then
27124      BINARY=`$READLINK -f $BINARY`
27125    else
27126      # Save the current directory for restoring afterwards
27127      STARTDIR=$PWD
27128      COUNTER=0
27129      sym_link_dir=`$DIRNAME $BINARY`
27130      sym_link_file=`$BASENAME $BINARY`
27131      cd $sym_link_dir
27132      # Use -P flag to resolve symlinks in directories.
27133      cd `$THEPWDCMD -P`
27134      sym_link_dir=`$THEPWDCMD -P`
27135      # Resolve file symlinks
27136      while test $COUNTER -lt 20; do
27137        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27138        if test "x$ISLINK" == x; then
27139          # This is not a symbolic link! We are done!
27140          break
27141        fi
27142        # Again resolve directory symlinks since the target of the just found
27143        # link could be in a different directory
27144        cd `$DIRNAME $ISLINK`
27145        sym_link_dir=`$THEPWDCMD -P`
27146        sym_link_file=`$BASENAME $ISLINK`
27147        let COUNTER=COUNTER+1
27148      done
27149      cd $STARTDIR
27150      BINARY=$sym_link_dir/$sym_link_file
27151    fi
27152  fi
27153
27154    BOOT_JDK=`dirname "$BINARY"`
27155    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
27156    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
27157      # Looks like we found ourselves an JDK
27158      BOOT_JDK_FOUND=maybe
27159      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27160$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27161    fi
27162  fi
27163
27164
27165    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27166    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27167      # Do we have a bin/java?
27168      if test ! -x "$BOOT_JDK/bin/java"; then
27169        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27171        BOOT_JDK_FOUND=no
27172      else
27173        # Do we have a bin/javac?
27174        if test ! -x "$BOOT_JDK/bin/javac"; then
27175          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27177          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27178$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27179          BOOT_JDK_FOUND=no
27180        else
27181          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27182          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27183
27184          # Extra M4 quote needed to protect [] in grep expression.
27185          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27186          if test "x$FOUND_CORRECT_VERSION" = x; then
27187            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27189            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27190$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27191            BOOT_JDK_FOUND=no
27192          else
27193            # We're done! :-)
27194            BOOT_JDK_FOUND=yes
27195
27196  # Only process if variable expands to non-empty
27197
27198  if test "x$BOOT_JDK" != x; then
27199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27200
27201  # Input might be given as Windows format, start by converting to
27202  # unix format.
27203  path="$BOOT_JDK"
27204  new_path=`$CYGPATH -u "$path"`
27205
27206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27209  # "foo.exe" is OK but "foo" is an error.
27210  #
27211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27212  # It is also a way to make sure we got the proper file name for the real test later on.
27213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27214  if test "x$test_shortpath" = x; then
27215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27216$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27217    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27218  fi
27219
27220  # Call helper function which possibly converts this using DOS-style short mode.
27221  # If so, the updated path is stored in $new_path.
27222
27223  input_path="$new_path"
27224  # Check if we need to convert this using DOS-style short mode. If the path
27225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27226  # take no chances and rewrite it.
27227  # Note: m4 eats our [], so we need to use [ and ] instead.
27228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27229  if test "x$has_forbidden_chars" != x; then
27230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27234      # Going to short mode and back again did indeed matter. Since short mode is
27235      # case insensitive, let's make it lowercase to improve readability.
27236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27237      # Now convert it back to Unix-style (cygpath)
27238      input_path=`$CYGPATH -u "$shortmode_path"`
27239      new_path="$input_path"
27240    fi
27241  fi
27242
27243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27244  if test "x$test_cygdrive_prefix" = x; then
27245    # As a simple fix, exclude /usr/bin since it's not a real path.
27246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27248      # a path prefixed by /cygdrive for fixpath to work.
27249      new_path="$CYGWIN_ROOT_PATH$input_path"
27250    fi
27251  fi
27252
27253
27254  if test "x$path" != "x$new_path"; then
27255    BOOT_JDK="$new_path"
27256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27258  fi
27259
27260    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27261
27262  path="$BOOT_JDK"
27263  has_colon=`$ECHO $path | $GREP ^.:`
27264  new_path="$path"
27265  if test "x$has_colon" = x; then
27266    # Not in mixed or Windows style, start by that.
27267    new_path=`cmd //c echo $path`
27268  fi
27269
27270
27271  input_path="$new_path"
27272  # Check if we need to convert this using DOS-style short mode. If the path
27273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27274  # take no chances and rewrite it.
27275  # Note: m4 eats our [], so we need to use [ and ] instead.
27276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27277  if test "x$has_forbidden_chars" != x; then
27278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27280  fi
27281
27282
27283  windows_path="$new_path"
27284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27285    unix_path=`$CYGPATH -u "$windows_path"`
27286    new_path="$unix_path"
27287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27289    new_path="$unix_path"
27290  fi
27291
27292  if test "x$path" != "x$new_path"; then
27293    BOOT_JDK="$new_path"
27294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27296  fi
27297
27298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27300
27301    else
27302      # We're on a unix platform. Hooray! :)
27303      path="$BOOT_JDK"
27304      has_space=`$ECHO "$path" | $GREP " "`
27305      if test "x$has_space" != x; then
27306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27307$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27308        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27309      fi
27310
27311      # Use eval to expand a potential ~
27312      eval path="$path"
27313      if test ! -f "$path" && test ! -d "$path"; then
27314        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27315      fi
27316
27317      if test -d "$path"; then
27318        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27319      else
27320        dir="`$DIRNAME "$path"`"
27321        base="`$BASENAME "$path"`"
27322        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27323      fi
27324    fi
27325  fi
27326
27327            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27328$as_echo_n "checking for Boot JDK... " >&6; }
27329            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27330$as_echo "$BOOT_JDK" >&6; }
27331            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27332$as_echo_n "checking Boot JDK version... " >&6; }
27333            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27334            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27335$as_echo "$BOOT_JDK_VERSION" >&6; }
27336          fi # end check jdk version
27337        fi # end check javac
27338      fi # end check java
27339    fi # end check boot jdk found
27340  fi
27341
27342
27343  # Test: Is there a JDK installed in default, well-known locations?
27344
27345  if test "x$BOOT_JDK_FOUND" = xno; then
27346    # Now execute the test
27347
27348  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27349
27350  if test "x$BOOT_JDK_FOUND" = xno; then
27351    # Now execute the test
27352
27353  if test "x$ProgramW6432" != x; then
27354    VIRTUAL_DIR="$ProgramW6432/Java"
27355
27356  windows_path="$VIRTUAL_DIR"
27357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27358    unix_path=`$CYGPATH -u "$windows_path"`
27359    VIRTUAL_DIR="$unix_path"
27360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27362    VIRTUAL_DIR="$unix_path"
27363  fi
27364
27365
27366  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27367  BOOT_JDK_SUFFIX=""
27368  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27369  if test "x$ALL_JDKS_FOUND" != x; then
27370    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27371
27372  if test "x$BOOT_JDK_FOUND" = xno; then
27373    # Now execute the test
27374
27375        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27376        if test -d "$BOOT_JDK"; then
27377          BOOT_JDK_FOUND=maybe
27378          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27379$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27380        fi
27381
27382
27383    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27384    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27385      # Do we have a bin/java?
27386      if test ! -x "$BOOT_JDK/bin/java"; then
27387        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27388$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27389        BOOT_JDK_FOUND=no
27390      else
27391        # Do we have a bin/javac?
27392        if test ! -x "$BOOT_JDK/bin/javac"; then
27393          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27395          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27396$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27397          BOOT_JDK_FOUND=no
27398        else
27399          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27400          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27401
27402          # Extra M4 quote needed to protect [] in grep expression.
27403          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27404          if test "x$FOUND_CORRECT_VERSION" = x; then
27405            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27407            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27408$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27409            BOOT_JDK_FOUND=no
27410          else
27411            # We're done! :-)
27412            BOOT_JDK_FOUND=yes
27413
27414  # Only process if variable expands to non-empty
27415
27416  if test "x$BOOT_JDK" != x; then
27417    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27418
27419  # Input might be given as Windows format, start by converting to
27420  # unix format.
27421  path="$BOOT_JDK"
27422  new_path=`$CYGPATH -u "$path"`
27423
27424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27427  # "foo.exe" is OK but "foo" is an error.
27428  #
27429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27430  # It is also a way to make sure we got the proper file name for the real test later on.
27431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27432  if test "x$test_shortpath" = x; then
27433    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27434$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27435    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27436  fi
27437
27438  # Call helper function which possibly converts this using DOS-style short mode.
27439  # If so, the updated path is stored in $new_path.
27440
27441  input_path="$new_path"
27442  # Check if we need to convert this using DOS-style short mode. If the path
27443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27444  # take no chances and rewrite it.
27445  # Note: m4 eats our [], so we need to use [ and ] instead.
27446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27447  if test "x$has_forbidden_chars" != x; then
27448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27452      # Going to short mode and back again did indeed matter. Since short mode is
27453      # case insensitive, let's make it lowercase to improve readability.
27454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27455      # Now convert it back to Unix-style (cygpath)
27456      input_path=`$CYGPATH -u "$shortmode_path"`
27457      new_path="$input_path"
27458    fi
27459  fi
27460
27461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27462  if test "x$test_cygdrive_prefix" = x; then
27463    # As a simple fix, exclude /usr/bin since it's not a real path.
27464    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27466      # a path prefixed by /cygdrive for fixpath to work.
27467      new_path="$CYGWIN_ROOT_PATH$input_path"
27468    fi
27469  fi
27470
27471
27472  if test "x$path" != "x$new_path"; then
27473    BOOT_JDK="$new_path"
27474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27475$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27476  fi
27477
27478    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27479
27480  path="$BOOT_JDK"
27481  has_colon=`$ECHO $path | $GREP ^.:`
27482  new_path="$path"
27483  if test "x$has_colon" = x; then
27484    # Not in mixed or Windows style, start by that.
27485    new_path=`cmd //c echo $path`
27486  fi
27487
27488
27489  input_path="$new_path"
27490  # Check if we need to convert this using DOS-style short mode. If the path
27491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27492  # take no chances and rewrite it.
27493  # Note: m4 eats our [], so we need to use [ and ] instead.
27494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27495  if test "x$has_forbidden_chars" != x; then
27496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27498  fi
27499
27500
27501  windows_path="$new_path"
27502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27503    unix_path=`$CYGPATH -u "$windows_path"`
27504    new_path="$unix_path"
27505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27507    new_path="$unix_path"
27508  fi
27509
27510  if test "x$path" != "x$new_path"; then
27511    BOOT_JDK="$new_path"
27512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27513$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27514  fi
27515
27516  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27517  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27518
27519    else
27520      # We're on a unix platform. Hooray! :)
27521      path="$BOOT_JDK"
27522      has_space=`$ECHO "$path" | $GREP " "`
27523      if test "x$has_space" != x; then
27524        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27525$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27526        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27527      fi
27528
27529      # Use eval to expand a potential ~
27530      eval path="$path"
27531      if test ! -f "$path" && test ! -d "$path"; then
27532        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27533      fi
27534
27535      if test -d "$path"; then
27536        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27537      else
27538        dir="`$DIRNAME "$path"`"
27539        base="`$BASENAME "$path"`"
27540        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27541      fi
27542    fi
27543  fi
27544
27545            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27546$as_echo_n "checking for Boot JDK... " >&6; }
27547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27548$as_echo "$BOOT_JDK" >&6; }
27549            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27550$as_echo_n "checking Boot JDK version... " >&6; }
27551            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27553$as_echo "$BOOT_JDK_VERSION" >&6; }
27554          fi # end check jdk version
27555        fi # end check javac
27556      fi # end check java
27557    fi # end check boot jdk found
27558  fi
27559
27560    done
27561  fi
27562
27563  fi
27564
27565
27566    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27567    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27568      # Do we have a bin/java?
27569      if test ! -x "$BOOT_JDK/bin/java"; then
27570        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27572        BOOT_JDK_FOUND=no
27573      else
27574        # Do we have a bin/javac?
27575        if test ! -x "$BOOT_JDK/bin/javac"; then
27576          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27578          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27579$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27580          BOOT_JDK_FOUND=no
27581        else
27582          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27583          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27584
27585          # Extra M4 quote needed to protect [] in grep expression.
27586          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27587          if test "x$FOUND_CORRECT_VERSION" = x; then
27588            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27590            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27591$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27592            BOOT_JDK_FOUND=no
27593          else
27594            # We're done! :-)
27595            BOOT_JDK_FOUND=yes
27596
27597  # Only process if variable expands to non-empty
27598
27599  if test "x$BOOT_JDK" != x; then
27600    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27601
27602  # Input might be given as Windows format, start by converting to
27603  # unix format.
27604  path="$BOOT_JDK"
27605  new_path=`$CYGPATH -u "$path"`
27606
27607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27610  # "foo.exe" is OK but "foo" is an error.
27611  #
27612  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27613  # It is also a way to make sure we got the proper file name for the real test later on.
27614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27615  if test "x$test_shortpath" = x; then
27616    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27617$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27618    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27619  fi
27620
27621  # Call helper function which possibly converts this using DOS-style short mode.
27622  # If so, the updated path is stored in $new_path.
27623
27624  input_path="$new_path"
27625  # Check if we need to convert this using DOS-style short mode. If the path
27626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27627  # take no chances and rewrite it.
27628  # Note: m4 eats our [], so we need to use [ and ] instead.
27629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27630  if test "x$has_forbidden_chars" != x; then
27631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27635      # Going to short mode and back again did indeed matter. Since short mode is
27636      # case insensitive, let's make it lowercase to improve readability.
27637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27638      # Now convert it back to Unix-style (cygpath)
27639      input_path=`$CYGPATH -u "$shortmode_path"`
27640      new_path="$input_path"
27641    fi
27642  fi
27643
27644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27645  if test "x$test_cygdrive_prefix" = x; then
27646    # As a simple fix, exclude /usr/bin since it's not a real path.
27647    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27649      # a path prefixed by /cygdrive for fixpath to work.
27650      new_path="$CYGWIN_ROOT_PATH$input_path"
27651    fi
27652  fi
27653
27654
27655  if test "x$path" != "x$new_path"; then
27656    BOOT_JDK="$new_path"
27657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27658$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27659  fi
27660
27661    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27662
27663  path="$BOOT_JDK"
27664  has_colon=`$ECHO $path | $GREP ^.:`
27665  new_path="$path"
27666  if test "x$has_colon" = x; then
27667    # Not in mixed or Windows style, start by that.
27668    new_path=`cmd //c echo $path`
27669  fi
27670
27671
27672  input_path="$new_path"
27673  # Check if we need to convert this using DOS-style short mode. If the path
27674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27675  # take no chances and rewrite it.
27676  # Note: m4 eats our [], so we need to use [ and ] instead.
27677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27678  if test "x$has_forbidden_chars" != x; then
27679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27681  fi
27682
27683
27684  windows_path="$new_path"
27685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27686    unix_path=`$CYGPATH -u "$windows_path"`
27687    new_path="$unix_path"
27688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27690    new_path="$unix_path"
27691  fi
27692
27693  if test "x$path" != "x$new_path"; then
27694    BOOT_JDK="$new_path"
27695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27696$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27697  fi
27698
27699  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27700  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27701
27702    else
27703      # We're on a unix platform. Hooray! :)
27704      path="$BOOT_JDK"
27705      has_space=`$ECHO "$path" | $GREP " "`
27706      if test "x$has_space" != x; then
27707        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27708$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27709        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27710      fi
27711
27712      # Use eval to expand a potential ~
27713      eval path="$path"
27714      if test ! -f "$path" && test ! -d "$path"; then
27715        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27716      fi
27717
27718      if test -d "$path"; then
27719        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27720      else
27721        dir="`$DIRNAME "$path"`"
27722        base="`$BASENAME "$path"`"
27723        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27724      fi
27725    fi
27726  fi
27727
27728            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27729$as_echo_n "checking for Boot JDK... " >&6; }
27730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27731$as_echo "$BOOT_JDK" >&6; }
27732            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27733$as_echo_n "checking Boot JDK version... " >&6; }
27734            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27736$as_echo "$BOOT_JDK_VERSION" >&6; }
27737          fi # end check jdk version
27738        fi # end check javac
27739      fi # end check java
27740    fi # end check boot jdk found
27741  fi
27742
27743
27744  if test "x$BOOT_JDK_FOUND" = xno; then
27745    # Now execute the test
27746
27747  if test "x$PROGRAMW6432" != x; then
27748    VIRTUAL_DIR="$PROGRAMW6432/Java"
27749
27750  windows_path="$VIRTUAL_DIR"
27751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27752    unix_path=`$CYGPATH -u "$windows_path"`
27753    VIRTUAL_DIR="$unix_path"
27754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27756    VIRTUAL_DIR="$unix_path"
27757  fi
27758
27759
27760  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27761  BOOT_JDK_SUFFIX=""
27762  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27763  if test "x$ALL_JDKS_FOUND" != x; then
27764    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27765
27766  if test "x$BOOT_JDK_FOUND" = xno; then
27767    # Now execute the test
27768
27769        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27770        if test -d "$BOOT_JDK"; then
27771          BOOT_JDK_FOUND=maybe
27772          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27773$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27774        fi
27775
27776
27777    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27778    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27779      # Do we have a bin/java?
27780      if test ! -x "$BOOT_JDK/bin/java"; then
27781        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27783        BOOT_JDK_FOUND=no
27784      else
27785        # Do we have a bin/javac?
27786        if test ! -x "$BOOT_JDK/bin/javac"; then
27787          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27789          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27790$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27791          BOOT_JDK_FOUND=no
27792        else
27793          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27794          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27795
27796          # Extra M4 quote needed to protect [] in grep expression.
27797          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27798          if test "x$FOUND_CORRECT_VERSION" = x; then
27799            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27801            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27802$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27803            BOOT_JDK_FOUND=no
27804          else
27805            # We're done! :-)
27806            BOOT_JDK_FOUND=yes
27807
27808  # Only process if variable expands to non-empty
27809
27810  if test "x$BOOT_JDK" != x; then
27811    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27812
27813  # Input might be given as Windows format, start by converting to
27814  # unix format.
27815  path="$BOOT_JDK"
27816  new_path=`$CYGPATH -u "$path"`
27817
27818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27821  # "foo.exe" is OK but "foo" is an error.
27822  #
27823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27824  # It is also a way to make sure we got the proper file name for the real test later on.
27825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27826  if test "x$test_shortpath" = x; then
27827    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27829    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27830  fi
27831
27832  # Call helper function which possibly converts this using DOS-style short mode.
27833  # If so, the updated path is stored in $new_path.
27834
27835  input_path="$new_path"
27836  # Check if we need to convert this using DOS-style short mode. If the path
27837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27838  # take no chances and rewrite it.
27839  # Note: m4 eats our [], so we need to use [ and ] instead.
27840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27841  if test "x$has_forbidden_chars" != x; then
27842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27846      # Going to short mode and back again did indeed matter. Since short mode is
27847      # case insensitive, let's make it lowercase to improve readability.
27848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27849      # Now convert it back to Unix-style (cygpath)
27850      input_path=`$CYGPATH -u "$shortmode_path"`
27851      new_path="$input_path"
27852    fi
27853  fi
27854
27855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27856  if test "x$test_cygdrive_prefix" = x; then
27857    # As a simple fix, exclude /usr/bin since it's not a real path.
27858    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27860      # a path prefixed by /cygdrive for fixpath to work.
27861      new_path="$CYGWIN_ROOT_PATH$input_path"
27862    fi
27863  fi
27864
27865
27866  if test "x$path" != "x$new_path"; then
27867    BOOT_JDK="$new_path"
27868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27869$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27870  fi
27871
27872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27873
27874  path="$BOOT_JDK"
27875  has_colon=`$ECHO $path | $GREP ^.:`
27876  new_path="$path"
27877  if test "x$has_colon" = x; then
27878    # Not in mixed or Windows style, start by that.
27879    new_path=`cmd //c echo $path`
27880  fi
27881
27882
27883  input_path="$new_path"
27884  # Check if we need to convert this using DOS-style short mode. If the path
27885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27886  # take no chances and rewrite it.
27887  # Note: m4 eats our [], so we need to use [ and ] instead.
27888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27889  if test "x$has_forbidden_chars" != x; then
27890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27892  fi
27893
27894
27895  windows_path="$new_path"
27896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27897    unix_path=`$CYGPATH -u "$windows_path"`
27898    new_path="$unix_path"
27899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27901    new_path="$unix_path"
27902  fi
27903
27904  if test "x$path" != "x$new_path"; then
27905    BOOT_JDK="$new_path"
27906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27907$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27908  fi
27909
27910  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27911  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27912
27913    else
27914      # We're on a unix platform. Hooray! :)
27915      path="$BOOT_JDK"
27916      has_space=`$ECHO "$path" | $GREP " "`
27917      if test "x$has_space" != x; then
27918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27919$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27920        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27921      fi
27922
27923      # Use eval to expand a potential ~
27924      eval path="$path"
27925      if test ! -f "$path" && test ! -d "$path"; then
27926        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27927      fi
27928
27929      if test -d "$path"; then
27930        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27931      else
27932        dir="`$DIRNAME "$path"`"
27933        base="`$BASENAME "$path"`"
27934        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27935      fi
27936    fi
27937  fi
27938
27939            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27940$as_echo_n "checking for Boot JDK... " >&6; }
27941            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27942$as_echo "$BOOT_JDK" >&6; }
27943            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27944$as_echo_n "checking Boot JDK version... " >&6; }
27945            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27946            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27947$as_echo "$BOOT_JDK_VERSION" >&6; }
27948          fi # end check jdk version
27949        fi # end check javac
27950      fi # end check java
27951    fi # end check boot jdk found
27952  fi
27953
27954    done
27955  fi
27956
27957  fi
27958
27959
27960    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27961    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27962      # Do we have a bin/java?
27963      if test ! -x "$BOOT_JDK/bin/java"; then
27964        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27966        BOOT_JDK_FOUND=no
27967      else
27968        # Do we have a bin/javac?
27969        if test ! -x "$BOOT_JDK/bin/javac"; then
27970          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27972          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27973$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27974          BOOT_JDK_FOUND=no
27975        else
27976          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27977          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27978
27979          # Extra M4 quote needed to protect [] in grep expression.
27980          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27981          if test "x$FOUND_CORRECT_VERSION" = x; then
27982            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27984            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27985$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27986            BOOT_JDK_FOUND=no
27987          else
27988            # We're done! :-)
27989            BOOT_JDK_FOUND=yes
27990
27991  # Only process if variable expands to non-empty
27992
27993  if test "x$BOOT_JDK" != x; then
27994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27995
27996  # Input might be given as Windows format, start by converting to
27997  # unix format.
27998  path="$BOOT_JDK"
27999  new_path=`$CYGPATH -u "$path"`
28000
28001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28004  # "foo.exe" is OK but "foo" is an error.
28005  #
28006  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28007  # It is also a way to make sure we got the proper file name for the real test later on.
28008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28009  if test "x$test_shortpath" = x; then
28010    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28011$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28012    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28013  fi
28014
28015  # Call helper function which possibly converts this using DOS-style short mode.
28016  # If so, the updated path is stored in $new_path.
28017
28018  input_path="$new_path"
28019  # Check if we need to convert this using DOS-style short mode. If the path
28020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28021  # take no chances and rewrite it.
28022  # Note: m4 eats our [], so we need to use [ and ] instead.
28023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28024  if test "x$has_forbidden_chars" != x; then
28025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28029      # Going to short mode and back again did indeed matter. Since short mode is
28030      # case insensitive, let's make it lowercase to improve readability.
28031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28032      # Now convert it back to Unix-style (cygpath)
28033      input_path=`$CYGPATH -u "$shortmode_path"`
28034      new_path="$input_path"
28035    fi
28036  fi
28037
28038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28039  if test "x$test_cygdrive_prefix" = x; then
28040    # As a simple fix, exclude /usr/bin since it's not a real path.
28041    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28043      # a path prefixed by /cygdrive for fixpath to work.
28044      new_path="$CYGWIN_ROOT_PATH$input_path"
28045    fi
28046  fi
28047
28048
28049  if test "x$path" != "x$new_path"; then
28050    BOOT_JDK="$new_path"
28051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28052$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28053  fi
28054
28055    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28056
28057  path="$BOOT_JDK"
28058  has_colon=`$ECHO $path | $GREP ^.:`
28059  new_path="$path"
28060  if test "x$has_colon" = x; then
28061    # Not in mixed or Windows style, start by that.
28062    new_path=`cmd //c echo $path`
28063  fi
28064
28065
28066  input_path="$new_path"
28067  # Check if we need to convert this using DOS-style short mode. If the path
28068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28069  # take no chances and rewrite it.
28070  # Note: m4 eats our [], so we need to use [ and ] instead.
28071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28072  if test "x$has_forbidden_chars" != x; then
28073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28075  fi
28076
28077
28078  windows_path="$new_path"
28079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28080    unix_path=`$CYGPATH -u "$windows_path"`
28081    new_path="$unix_path"
28082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28084    new_path="$unix_path"
28085  fi
28086
28087  if test "x$path" != "x$new_path"; then
28088    BOOT_JDK="$new_path"
28089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28090$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28091  fi
28092
28093  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28094  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28095
28096    else
28097      # We're on a unix platform. Hooray! :)
28098      path="$BOOT_JDK"
28099      has_space=`$ECHO "$path" | $GREP " "`
28100      if test "x$has_space" != x; then
28101        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28102$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28103        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28104      fi
28105
28106      # Use eval to expand a potential ~
28107      eval path="$path"
28108      if test ! -f "$path" && test ! -d "$path"; then
28109        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28110      fi
28111
28112      if test -d "$path"; then
28113        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28114      else
28115        dir="`$DIRNAME "$path"`"
28116        base="`$BASENAME "$path"`"
28117        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28118      fi
28119    fi
28120  fi
28121
28122            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28123$as_echo_n "checking for Boot JDK... " >&6; }
28124            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28125$as_echo "$BOOT_JDK" >&6; }
28126            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28127$as_echo_n "checking Boot JDK version... " >&6; }
28128            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28129            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28130$as_echo "$BOOT_JDK_VERSION" >&6; }
28131          fi # end check jdk version
28132        fi # end check javac
28133      fi # end check java
28134    fi # end check boot jdk found
28135  fi
28136
28137
28138  if test "x$BOOT_JDK_FOUND" = xno; then
28139    # Now execute the test
28140
28141  if test "x$PROGRAMFILES" != x; then
28142    VIRTUAL_DIR="$PROGRAMFILES/Java"
28143
28144  windows_path="$VIRTUAL_DIR"
28145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28146    unix_path=`$CYGPATH -u "$windows_path"`
28147    VIRTUAL_DIR="$unix_path"
28148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28150    VIRTUAL_DIR="$unix_path"
28151  fi
28152
28153
28154  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28155  BOOT_JDK_SUFFIX=""
28156  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28157  if test "x$ALL_JDKS_FOUND" != x; then
28158    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28159
28160  if test "x$BOOT_JDK_FOUND" = xno; then
28161    # Now execute the test
28162
28163        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28164        if test -d "$BOOT_JDK"; then
28165          BOOT_JDK_FOUND=maybe
28166          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28167$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28168        fi
28169
28170
28171    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28172    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28173      # Do we have a bin/java?
28174      if test ! -x "$BOOT_JDK/bin/java"; then
28175        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28177        BOOT_JDK_FOUND=no
28178      else
28179        # Do we have a bin/javac?
28180        if test ! -x "$BOOT_JDK/bin/javac"; then
28181          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28183          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28184$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28185          BOOT_JDK_FOUND=no
28186        else
28187          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28188          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28189
28190          # Extra M4 quote needed to protect [] in grep expression.
28191          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28192          if test "x$FOUND_CORRECT_VERSION" = x; then
28193            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28194$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28195            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28196$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28197            BOOT_JDK_FOUND=no
28198          else
28199            # We're done! :-)
28200            BOOT_JDK_FOUND=yes
28201
28202  # Only process if variable expands to non-empty
28203
28204  if test "x$BOOT_JDK" != x; then
28205    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28206
28207  # Input might be given as Windows format, start by converting to
28208  # unix format.
28209  path="$BOOT_JDK"
28210  new_path=`$CYGPATH -u "$path"`
28211
28212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28215  # "foo.exe" is OK but "foo" is an error.
28216  #
28217  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28218  # It is also a way to make sure we got the proper file name for the real test later on.
28219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28220  if test "x$test_shortpath" = x; then
28221    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28222$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28223    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28224  fi
28225
28226  # Call helper function which possibly converts this using DOS-style short mode.
28227  # If so, the updated path is stored in $new_path.
28228
28229  input_path="$new_path"
28230  # Check if we need to convert this using DOS-style short mode. If the path
28231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28232  # take no chances and rewrite it.
28233  # Note: m4 eats our [], so we need to use [ and ] instead.
28234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28235  if test "x$has_forbidden_chars" != x; then
28236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28240      # Going to short mode and back again did indeed matter. Since short mode is
28241      # case insensitive, let's make it lowercase to improve readability.
28242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28243      # Now convert it back to Unix-style (cygpath)
28244      input_path=`$CYGPATH -u "$shortmode_path"`
28245      new_path="$input_path"
28246    fi
28247  fi
28248
28249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28250  if test "x$test_cygdrive_prefix" = x; then
28251    # As a simple fix, exclude /usr/bin since it's not a real path.
28252    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28254      # a path prefixed by /cygdrive for fixpath to work.
28255      new_path="$CYGWIN_ROOT_PATH$input_path"
28256    fi
28257  fi
28258
28259
28260  if test "x$path" != "x$new_path"; then
28261    BOOT_JDK="$new_path"
28262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28263$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28264  fi
28265
28266    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28267
28268  path="$BOOT_JDK"
28269  has_colon=`$ECHO $path | $GREP ^.:`
28270  new_path="$path"
28271  if test "x$has_colon" = x; then
28272    # Not in mixed or Windows style, start by that.
28273    new_path=`cmd //c echo $path`
28274  fi
28275
28276
28277  input_path="$new_path"
28278  # Check if we need to convert this using DOS-style short mode. If the path
28279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28280  # take no chances and rewrite it.
28281  # Note: m4 eats our [], so we need to use [ and ] instead.
28282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28283  if test "x$has_forbidden_chars" != x; then
28284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28286  fi
28287
28288
28289  windows_path="$new_path"
28290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28291    unix_path=`$CYGPATH -u "$windows_path"`
28292    new_path="$unix_path"
28293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28295    new_path="$unix_path"
28296  fi
28297
28298  if test "x$path" != "x$new_path"; then
28299    BOOT_JDK="$new_path"
28300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28301$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28302  fi
28303
28304  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28305  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28306
28307    else
28308      # We're on a unix platform. Hooray! :)
28309      path="$BOOT_JDK"
28310      has_space=`$ECHO "$path" | $GREP " "`
28311      if test "x$has_space" != x; then
28312        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28313$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28314        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28315      fi
28316
28317      # Use eval to expand a potential ~
28318      eval path="$path"
28319      if test ! -f "$path" && test ! -d "$path"; then
28320        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28321      fi
28322
28323      if test -d "$path"; then
28324        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28325      else
28326        dir="`$DIRNAME "$path"`"
28327        base="`$BASENAME "$path"`"
28328        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28329      fi
28330    fi
28331  fi
28332
28333            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28334$as_echo_n "checking for Boot JDK... " >&6; }
28335            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28336$as_echo "$BOOT_JDK" >&6; }
28337            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28338$as_echo_n "checking Boot JDK version... " >&6; }
28339            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28341$as_echo "$BOOT_JDK_VERSION" >&6; }
28342          fi # end check jdk version
28343        fi # end check javac
28344      fi # end check java
28345    fi # end check boot jdk found
28346  fi
28347
28348    done
28349  fi
28350
28351  fi
28352
28353
28354    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28355    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28356      # Do we have a bin/java?
28357      if test ! -x "$BOOT_JDK/bin/java"; then
28358        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28360        BOOT_JDK_FOUND=no
28361      else
28362        # Do we have a bin/javac?
28363        if test ! -x "$BOOT_JDK/bin/javac"; then
28364          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28365$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28366          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28367$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28368          BOOT_JDK_FOUND=no
28369        else
28370          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28371          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28372
28373          # Extra M4 quote needed to protect [] in grep expression.
28374          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28375          if test "x$FOUND_CORRECT_VERSION" = x; then
28376            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28378            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28379$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28380            BOOT_JDK_FOUND=no
28381          else
28382            # We're done! :-)
28383            BOOT_JDK_FOUND=yes
28384
28385  # Only process if variable expands to non-empty
28386
28387  if test "x$BOOT_JDK" != x; then
28388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28389
28390  # Input might be given as Windows format, start by converting to
28391  # unix format.
28392  path="$BOOT_JDK"
28393  new_path=`$CYGPATH -u "$path"`
28394
28395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28398  # "foo.exe" is OK but "foo" is an error.
28399  #
28400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28401  # It is also a way to make sure we got the proper file name for the real test later on.
28402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28403  if test "x$test_shortpath" = x; then
28404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28405$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28406    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28407  fi
28408
28409  # Call helper function which possibly converts this using DOS-style short mode.
28410  # If so, the updated path is stored in $new_path.
28411
28412  input_path="$new_path"
28413  # Check if we need to convert this using DOS-style short mode. If the path
28414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28415  # take no chances and rewrite it.
28416  # Note: m4 eats our [], so we need to use [ and ] instead.
28417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28418  if test "x$has_forbidden_chars" != x; then
28419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28423      # Going to short mode and back again did indeed matter. Since short mode is
28424      # case insensitive, let's make it lowercase to improve readability.
28425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28426      # Now convert it back to Unix-style (cygpath)
28427      input_path=`$CYGPATH -u "$shortmode_path"`
28428      new_path="$input_path"
28429    fi
28430  fi
28431
28432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28433  if test "x$test_cygdrive_prefix" = x; then
28434    # As a simple fix, exclude /usr/bin since it's not a real path.
28435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28437      # a path prefixed by /cygdrive for fixpath to work.
28438      new_path="$CYGWIN_ROOT_PATH$input_path"
28439    fi
28440  fi
28441
28442
28443  if test "x$path" != "x$new_path"; then
28444    BOOT_JDK="$new_path"
28445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28446$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28447  fi
28448
28449    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28450
28451  path="$BOOT_JDK"
28452  has_colon=`$ECHO $path | $GREP ^.:`
28453  new_path="$path"
28454  if test "x$has_colon" = x; then
28455    # Not in mixed or Windows style, start by that.
28456    new_path=`cmd //c echo $path`
28457  fi
28458
28459
28460  input_path="$new_path"
28461  # Check if we need to convert this using DOS-style short mode. If the path
28462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28463  # take no chances and rewrite it.
28464  # Note: m4 eats our [], so we need to use [ and ] instead.
28465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28466  if test "x$has_forbidden_chars" != x; then
28467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28469  fi
28470
28471
28472  windows_path="$new_path"
28473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28474    unix_path=`$CYGPATH -u "$windows_path"`
28475    new_path="$unix_path"
28476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28478    new_path="$unix_path"
28479  fi
28480
28481  if test "x$path" != "x$new_path"; then
28482    BOOT_JDK="$new_path"
28483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28485  fi
28486
28487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28489
28490    else
28491      # We're on a unix platform. Hooray! :)
28492      path="$BOOT_JDK"
28493      has_space=`$ECHO "$path" | $GREP " "`
28494      if test "x$has_space" != x; then
28495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28496$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28497        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28498      fi
28499
28500      # Use eval to expand a potential ~
28501      eval path="$path"
28502      if test ! -f "$path" && test ! -d "$path"; then
28503        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28504      fi
28505
28506      if test -d "$path"; then
28507        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28508      else
28509        dir="`$DIRNAME "$path"`"
28510        base="`$BASENAME "$path"`"
28511        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28512      fi
28513    fi
28514  fi
28515
28516            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28517$as_echo_n "checking for Boot JDK... " >&6; }
28518            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28519$as_echo "$BOOT_JDK" >&6; }
28520            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28521$as_echo_n "checking Boot JDK version... " >&6; }
28522            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28523            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28524$as_echo "$BOOT_JDK_VERSION" >&6; }
28525          fi # end check jdk version
28526        fi # end check javac
28527      fi # end check java
28528    fi # end check boot jdk found
28529  fi
28530
28531
28532  if test "x$BOOT_JDK_FOUND" = xno; then
28533    # Now execute the test
28534
28535  if test "x$ProgramFiles" != x; then
28536    VIRTUAL_DIR="$ProgramFiles/Java"
28537
28538  windows_path="$VIRTUAL_DIR"
28539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28540    unix_path=`$CYGPATH -u "$windows_path"`
28541    VIRTUAL_DIR="$unix_path"
28542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28544    VIRTUAL_DIR="$unix_path"
28545  fi
28546
28547
28548  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28549  BOOT_JDK_SUFFIX=""
28550  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28551  if test "x$ALL_JDKS_FOUND" != x; then
28552    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28553
28554  if test "x$BOOT_JDK_FOUND" = xno; then
28555    # Now execute the test
28556
28557        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28558        if test -d "$BOOT_JDK"; then
28559          BOOT_JDK_FOUND=maybe
28560          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28561$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28562        fi
28563
28564
28565    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28566    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28567      # Do we have a bin/java?
28568      if test ! -x "$BOOT_JDK/bin/java"; then
28569        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28571        BOOT_JDK_FOUND=no
28572      else
28573        # Do we have a bin/javac?
28574        if test ! -x "$BOOT_JDK/bin/javac"; then
28575          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28577          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28578$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28579          BOOT_JDK_FOUND=no
28580        else
28581          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28582          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28583
28584          # Extra M4 quote needed to protect [] in grep expression.
28585          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28586          if test "x$FOUND_CORRECT_VERSION" = x; then
28587            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28589            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28590$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28591            BOOT_JDK_FOUND=no
28592          else
28593            # We're done! :-)
28594            BOOT_JDK_FOUND=yes
28595
28596  # Only process if variable expands to non-empty
28597
28598  if test "x$BOOT_JDK" != x; then
28599    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28600
28601  # Input might be given as Windows format, start by converting to
28602  # unix format.
28603  path="$BOOT_JDK"
28604  new_path=`$CYGPATH -u "$path"`
28605
28606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28609  # "foo.exe" is OK but "foo" is an error.
28610  #
28611  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28612  # It is also a way to make sure we got the proper file name for the real test later on.
28613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28614  if test "x$test_shortpath" = x; then
28615    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28616$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28617    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28618  fi
28619
28620  # Call helper function which possibly converts this using DOS-style short mode.
28621  # If so, the updated path is stored in $new_path.
28622
28623  input_path="$new_path"
28624  # Check if we need to convert this using DOS-style short mode. If the path
28625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28626  # take no chances and rewrite it.
28627  # Note: m4 eats our [], so we need to use [ and ] instead.
28628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28629  if test "x$has_forbidden_chars" != x; then
28630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28634      # Going to short mode and back again did indeed matter. Since short mode is
28635      # case insensitive, let's make it lowercase to improve readability.
28636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28637      # Now convert it back to Unix-style (cygpath)
28638      input_path=`$CYGPATH -u "$shortmode_path"`
28639      new_path="$input_path"
28640    fi
28641  fi
28642
28643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28644  if test "x$test_cygdrive_prefix" = x; then
28645    # As a simple fix, exclude /usr/bin since it's not a real path.
28646    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28648      # a path prefixed by /cygdrive for fixpath to work.
28649      new_path="$CYGWIN_ROOT_PATH$input_path"
28650    fi
28651  fi
28652
28653
28654  if test "x$path" != "x$new_path"; then
28655    BOOT_JDK="$new_path"
28656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28658  fi
28659
28660    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28661
28662  path="$BOOT_JDK"
28663  has_colon=`$ECHO $path | $GREP ^.:`
28664  new_path="$path"
28665  if test "x$has_colon" = x; then
28666    # Not in mixed or Windows style, start by that.
28667    new_path=`cmd //c echo $path`
28668  fi
28669
28670
28671  input_path="$new_path"
28672  # Check if we need to convert this using DOS-style short mode. If the path
28673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28674  # take no chances and rewrite it.
28675  # Note: m4 eats our [], so we need to use [ and ] instead.
28676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28677  if test "x$has_forbidden_chars" != x; then
28678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28680  fi
28681
28682
28683  windows_path="$new_path"
28684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28685    unix_path=`$CYGPATH -u "$windows_path"`
28686    new_path="$unix_path"
28687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28689    new_path="$unix_path"
28690  fi
28691
28692  if test "x$path" != "x$new_path"; then
28693    BOOT_JDK="$new_path"
28694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28695$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28696  fi
28697
28698  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28699  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28700
28701    else
28702      # We're on a unix platform. Hooray! :)
28703      path="$BOOT_JDK"
28704      has_space=`$ECHO "$path" | $GREP " "`
28705      if test "x$has_space" != x; then
28706        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28707$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28708        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28709      fi
28710
28711      # Use eval to expand a potential ~
28712      eval path="$path"
28713      if test ! -f "$path" && test ! -d "$path"; then
28714        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28715      fi
28716
28717      if test -d "$path"; then
28718        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28719      else
28720        dir="`$DIRNAME "$path"`"
28721        base="`$BASENAME "$path"`"
28722        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28723      fi
28724    fi
28725  fi
28726
28727            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28728$as_echo_n "checking for Boot JDK... " >&6; }
28729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28730$as_echo "$BOOT_JDK" >&6; }
28731            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28732$as_echo_n "checking Boot JDK version... " >&6; }
28733            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28735$as_echo "$BOOT_JDK_VERSION" >&6; }
28736          fi # end check jdk version
28737        fi # end check javac
28738      fi # end check java
28739    fi # end check boot jdk found
28740  fi
28741
28742    done
28743  fi
28744
28745  fi
28746
28747
28748    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28749    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28750      # Do we have a bin/java?
28751      if test ! -x "$BOOT_JDK/bin/java"; then
28752        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28754        BOOT_JDK_FOUND=no
28755      else
28756        # Do we have a bin/javac?
28757        if test ! -x "$BOOT_JDK/bin/javac"; then
28758          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28760          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28761$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28762          BOOT_JDK_FOUND=no
28763        else
28764          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28765          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28766
28767          # Extra M4 quote needed to protect [] in grep expression.
28768          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28769          if test "x$FOUND_CORRECT_VERSION" = x; then
28770            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28772            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28773$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28774            BOOT_JDK_FOUND=no
28775          else
28776            # We're done! :-)
28777            BOOT_JDK_FOUND=yes
28778
28779  # Only process if variable expands to non-empty
28780
28781  if test "x$BOOT_JDK" != x; then
28782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28783
28784  # Input might be given as Windows format, start by converting to
28785  # unix format.
28786  path="$BOOT_JDK"
28787  new_path=`$CYGPATH -u "$path"`
28788
28789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28792  # "foo.exe" is OK but "foo" is an error.
28793  #
28794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28795  # It is also a way to make sure we got the proper file name for the real test later on.
28796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28797  if test "x$test_shortpath" = x; then
28798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28799$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28800    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28801  fi
28802
28803  # Call helper function which possibly converts this using DOS-style short mode.
28804  # If so, the updated path is stored in $new_path.
28805
28806  input_path="$new_path"
28807  # Check if we need to convert this using DOS-style short mode. If the path
28808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28809  # take no chances and rewrite it.
28810  # Note: m4 eats our [], so we need to use [ and ] instead.
28811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28812  if test "x$has_forbidden_chars" != x; then
28813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28817      # Going to short mode and back again did indeed matter. Since short mode is
28818      # case insensitive, let's make it lowercase to improve readability.
28819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28820      # Now convert it back to Unix-style (cygpath)
28821      input_path=`$CYGPATH -u "$shortmode_path"`
28822      new_path="$input_path"
28823    fi
28824  fi
28825
28826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28827  if test "x$test_cygdrive_prefix" = x; then
28828    # As a simple fix, exclude /usr/bin since it's not a real path.
28829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28831      # a path prefixed by /cygdrive for fixpath to work.
28832      new_path="$CYGWIN_ROOT_PATH$input_path"
28833    fi
28834  fi
28835
28836
28837  if test "x$path" != "x$new_path"; then
28838    BOOT_JDK="$new_path"
28839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28840$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28841  fi
28842
28843    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28844
28845  path="$BOOT_JDK"
28846  has_colon=`$ECHO $path | $GREP ^.:`
28847  new_path="$path"
28848  if test "x$has_colon" = x; then
28849    # Not in mixed or Windows style, start by that.
28850    new_path=`cmd //c echo $path`
28851  fi
28852
28853
28854  input_path="$new_path"
28855  # Check if we need to convert this using DOS-style short mode. If the path
28856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28857  # take no chances and rewrite it.
28858  # Note: m4 eats our [], so we need to use [ and ] instead.
28859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28860  if test "x$has_forbidden_chars" != x; then
28861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28863  fi
28864
28865
28866  windows_path="$new_path"
28867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28868    unix_path=`$CYGPATH -u "$windows_path"`
28869    new_path="$unix_path"
28870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28872    new_path="$unix_path"
28873  fi
28874
28875  if test "x$path" != "x$new_path"; then
28876    BOOT_JDK="$new_path"
28877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28879  fi
28880
28881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28883
28884    else
28885      # We're on a unix platform. Hooray! :)
28886      path="$BOOT_JDK"
28887      has_space=`$ECHO "$path" | $GREP " "`
28888      if test "x$has_space" != x; then
28889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28890$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28891        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28892      fi
28893
28894      # Use eval to expand a potential ~
28895      eval path="$path"
28896      if test ! -f "$path" && test ! -d "$path"; then
28897        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28898      fi
28899
28900      if test -d "$path"; then
28901        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28902      else
28903        dir="`$DIRNAME "$path"`"
28904        base="`$BASENAME "$path"`"
28905        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28906      fi
28907    fi
28908  fi
28909
28910            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28911$as_echo_n "checking for Boot JDK... " >&6; }
28912            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28913$as_echo "$BOOT_JDK" >&6; }
28914            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28915$as_echo_n "checking Boot JDK version... " >&6; }
28916            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28917            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28918$as_echo "$BOOT_JDK_VERSION" >&6; }
28919          fi # end check jdk version
28920        fi # end check javac
28921      fi # end check java
28922    fi # end check boot jdk found
28923  fi
28924
28925
28926  if test "x$BOOT_JDK_FOUND" = xno; then
28927    # Now execute the test
28928
28929  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28930  BOOT_JDK_SUFFIX=""
28931  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28932  if test "x$ALL_JDKS_FOUND" != x; then
28933    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28934
28935  if test "x$BOOT_JDK_FOUND" = xno; then
28936    # Now execute the test
28937
28938        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28939        if test -d "$BOOT_JDK"; then
28940          BOOT_JDK_FOUND=maybe
28941          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28942$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28943        fi
28944
28945
28946    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28947    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28948      # Do we have a bin/java?
28949      if test ! -x "$BOOT_JDK/bin/java"; then
28950        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28952        BOOT_JDK_FOUND=no
28953      else
28954        # Do we have a bin/javac?
28955        if test ! -x "$BOOT_JDK/bin/javac"; then
28956          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28958          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28959$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28960          BOOT_JDK_FOUND=no
28961        else
28962          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28963          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28964
28965          # Extra M4 quote needed to protect [] in grep expression.
28966          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28967          if test "x$FOUND_CORRECT_VERSION" = x; then
28968            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28969$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28970            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28971$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28972            BOOT_JDK_FOUND=no
28973          else
28974            # We're done! :-)
28975            BOOT_JDK_FOUND=yes
28976
28977  # Only process if variable expands to non-empty
28978
28979  if test "x$BOOT_JDK" != x; then
28980    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28981
28982  # Input might be given as Windows format, start by converting to
28983  # unix format.
28984  path="$BOOT_JDK"
28985  new_path=`$CYGPATH -u "$path"`
28986
28987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28990  # "foo.exe" is OK but "foo" is an error.
28991  #
28992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28993  # It is also a way to make sure we got the proper file name for the real test later on.
28994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28995  if test "x$test_shortpath" = x; then
28996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28997$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28998    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28999  fi
29000
29001  # Call helper function which possibly converts this using DOS-style short mode.
29002  # If so, the updated path is stored in $new_path.
29003
29004  input_path="$new_path"
29005  # Check if we need to convert this using DOS-style short mode. If the path
29006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29007  # take no chances and rewrite it.
29008  # Note: m4 eats our [], so we need to use [ and ] instead.
29009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29010  if test "x$has_forbidden_chars" != x; then
29011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29015      # Going to short mode and back again did indeed matter. Since short mode is
29016      # case insensitive, let's make it lowercase to improve readability.
29017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29018      # Now convert it back to Unix-style (cygpath)
29019      input_path=`$CYGPATH -u "$shortmode_path"`
29020      new_path="$input_path"
29021    fi
29022  fi
29023
29024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29025  if test "x$test_cygdrive_prefix" = x; then
29026    # As a simple fix, exclude /usr/bin since it's not a real path.
29027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29029      # a path prefixed by /cygdrive for fixpath to work.
29030      new_path="$CYGWIN_ROOT_PATH$input_path"
29031    fi
29032  fi
29033
29034
29035  if test "x$path" != "x$new_path"; then
29036    BOOT_JDK="$new_path"
29037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29038$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29039  fi
29040
29041    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29042
29043  path="$BOOT_JDK"
29044  has_colon=`$ECHO $path | $GREP ^.:`
29045  new_path="$path"
29046  if test "x$has_colon" = x; then
29047    # Not in mixed or Windows style, start by that.
29048    new_path=`cmd //c echo $path`
29049  fi
29050
29051
29052  input_path="$new_path"
29053  # Check if we need to convert this using DOS-style short mode. If the path
29054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29055  # take no chances and rewrite it.
29056  # Note: m4 eats our [], so we need to use [ and ] instead.
29057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29058  if test "x$has_forbidden_chars" != x; then
29059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29061  fi
29062
29063
29064  windows_path="$new_path"
29065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29066    unix_path=`$CYGPATH -u "$windows_path"`
29067    new_path="$unix_path"
29068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29070    new_path="$unix_path"
29071  fi
29072
29073  if test "x$path" != "x$new_path"; then
29074    BOOT_JDK="$new_path"
29075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29076$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29077  fi
29078
29079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29081
29082    else
29083      # We're on a unix platform. Hooray! :)
29084      path="$BOOT_JDK"
29085      has_space=`$ECHO "$path" | $GREP " "`
29086      if test "x$has_space" != x; then
29087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29088$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29089        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29090      fi
29091
29092      # Use eval to expand a potential ~
29093      eval path="$path"
29094      if test ! -f "$path" && test ! -d "$path"; then
29095        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29096      fi
29097
29098      if test -d "$path"; then
29099        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29100      else
29101        dir="`$DIRNAME "$path"`"
29102        base="`$BASENAME "$path"`"
29103        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29104      fi
29105    fi
29106  fi
29107
29108            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29109$as_echo_n "checking for Boot JDK... " >&6; }
29110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29111$as_echo "$BOOT_JDK" >&6; }
29112            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29113$as_echo_n "checking Boot JDK version... " >&6; }
29114            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29115            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29116$as_echo "$BOOT_JDK_VERSION" >&6; }
29117          fi # end check jdk version
29118        fi # end check javac
29119      fi # end check java
29120    fi # end check boot jdk found
29121  fi
29122
29123    done
29124  fi
29125
29126
29127    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29128    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29129      # Do we have a bin/java?
29130      if test ! -x "$BOOT_JDK/bin/java"; then
29131        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29133        BOOT_JDK_FOUND=no
29134      else
29135        # Do we have a bin/javac?
29136        if test ! -x "$BOOT_JDK/bin/javac"; then
29137          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29139          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29140$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29141          BOOT_JDK_FOUND=no
29142        else
29143          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29144          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29145
29146          # Extra M4 quote needed to protect [] in grep expression.
29147          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29148          if test "x$FOUND_CORRECT_VERSION" = x; then
29149            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29151            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29152$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29153            BOOT_JDK_FOUND=no
29154          else
29155            # We're done! :-)
29156            BOOT_JDK_FOUND=yes
29157
29158  # Only process if variable expands to non-empty
29159
29160  if test "x$BOOT_JDK" != x; then
29161    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29162
29163  # Input might be given as Windows format, start by converting to
29164  # unix format.
29165  path="$BOOT_JDK"
29166  new_path=`$CYGPATH -u "$path"`
29167
29168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29171  # "foo.exe" is OK but "foo" is an error.
29172  #
29173  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29174  # It is also a way to make sure we got the proper file name for the real test later on.
29175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29176  if test "x$test_shortpath" = x; then
29177    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29178$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29179    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29180  fi
29181
29182  # Call helper function which possibly converts this using DOS-style short mode.
29183  # If so, the updated path is stored in $new_path.
29184
29185  input_path="$new_path"
29186  # Check if we need to convert this using DOS-style short mode. If the path
29187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29188  # take no chances and rewrite it.
29189  # Note: m4 eats our [], so we need to use [ and ] instead.
29190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29191  if test "x$has_forbidden_chars" != x; then
29192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29196      # Going to short mode and back again did indeed matter. Since short mode is
29197      # case insensitive, let's make it lowercase to improve readability.
29198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29199      # Now convert it back to Unix-style (cygpath)
29200      input_path=`$CYGPATH -u "$shortmode_path"`
29201      new_path="$input_path"
29202    fi
29203  fi
29204
29205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29206  if test "x$test_cygdrive_prefix" = x; then
29207    # As a simple fix, exclude /usr/bin since it's not a real path.
29208    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29210      # a path prefixed by /cygdrive for fixpath to work.
29211      new_path="$CYGWIN_ROOT_PATH$input_path"
29212    fi
29213  fi
29214
29215
29216  if test "x$path" != "x$new_path"; then
29217    BOOT_JDK="$new_path"
29218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29219$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29220  fi
29221
29222    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29223
29224  path="$BOOT_JDK"
29225  has_colon=`$ECHO $path | $GREP ^.:`
29226  new_path="$path"
29227  if test "x$has_colon" = x; then
29228    # Not in mixed or Windows style, start by that.
29229    new_path=`cmd //c echo $path`
29230  fi
29231
29232
29233  input_path="$new_path"
29234  # Check if we need to convert this using DOS-style short mode. If the path
29235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29236  # take no chances and rewrite it.
29237  # Note: m4 eats our [], so we need to use [ and ] instead.
29238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29239  if test "x$has_forbidden_chars" != x; then
29240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29242  fi
29243
29244
29245  windows_path="$new_path"
29246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29247    unix_path=`$CYGPATH -u "$windows_path"`
29248    new_path="$unix_path"
29249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29251    new_path="$unix_path"
29252  fi
29253
29254  if test "x$path" != "x$new_path"; then
29255    BOOT_JDK="$new_path"
29256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29258  fi
29259
29260  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29261  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29262
29263    else
29264      # We're on a unix platform. Hooray! :)
29265      path="$BOOT_JDK"
29266      has_space=`$ECHO "$path" | $GREP " "`
29267      if test "x$has_space" != x; then
29268        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29270        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29271      fi
29272
29273      # Use eval to expand a potential ~
29274      eval path="$path"
29275      if test ! -f "$path" && test ! -d "$path"; then
29276        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29277      fi
29278
29279      if test -d "$path"; then
29280        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29281      else
29282        dir="`$DIRNAME "$path"`"
29283        base="`$BASENAME "$path"`"
29284        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29285      fi
29286    fi
29287  fi
29288
29289            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29290$as_echo_n "checking for Boot JDK... " >&6; }
29291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29292$as_echo "$BOOT_JDK" >&6; }
29293            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29294$as_echo_n "checking Boot JDK version... " >&6; }
29295            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29296            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29297$as_echo "$BOOT_JDK_VERSION" >&6; }
29298          fi # end check jdk version
29299        fi # end check javac
29300      fi # end check java
29301    fi # end check boot jdk found
29302  fi
29303
29304  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29305
29306  if test "x$BOOT_JDK_FOUND" = xno; then
29307    # Now execute the test
29308
29309  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29310  BOOT_JDK_SUFFIX="/Contents/Home"
29311  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29312  if test "x$ALL_JDKS_FOUND" != x; then
29313    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29314
29315  if test "x$BOOT_JDK_FOUND" = xno; then
29316    # Now execute the test
29317
29318        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29319        if test -d "$BOOT_JDK"; then
29320          BOOT_JDK_FOUND=maybe
29321          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29322$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29323        fi
29324
29325
29326    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29327    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29328      # Do we have a bin/java?
29329      if test ! -x "$BOOT_JDK/bin/java"; then
29330        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29332        BOOT_JDK_FOUND=no
29333      else
29334        # Do we have a bin/javac?
29335        if test ! -x "$BOOT_JDK/bin/javac"; then
29336          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29338          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29339$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29340          BOOT_JDK_FOUND=no
29341        else
29342          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29343          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29344
29345          # Extra M4 quote needed to protect [] in grep expression.
29346          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29347          if test "x$FOUND_CORRECT_VERSION" = x; then
29348            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29350            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29351$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29352            BOOT_JDK_FOUND=no
29353          else
29354            # We're done! :-)
29355            BOOT_JDK_FOUND=yes
29356
29357  # Only process if variable expands to non-empty
29358
29359  if test "x$BOOT_JDK" != x; then
29360    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29361
29362  # Input might be given as Windows format, start by converting to
29363  # unix format.
29364  path="$BOOT_JDK"
29365  new_path=`$CYGPATH -u "$path"`
29366
29367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29370  # "foo.exe" is OK but "foo" is an error.
29371  #
29372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29373  # It is also a way to make sure we got the proper file name for the real test later on.
29374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29375  if test "x$test_shortpath" = x; then
29376    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29377$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29378    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29379  fi
29380
29381  # Call helper function which possibly converts this using DOS-style short mode.
29382  # If so, the updated path is stored in $new_path.
29383
29384  input_path="$new_path"
29385  # Check if we need to convert this using DOS-style short mode. If the path
29386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29387  # take no chances and rewrite it.
29388  # Note: m4 eats our [], so we need to use [ and ] instead.
29389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29390  if test "x$has_forbidden_chars" != x; then
29391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29395      # Going to short mode and back again did indeed matter. Since short mode is
29396      # case insensitive, let's make it lowercase to improve readability.
29397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29398      # Now convert it back to Unix-style (cygpath)
29399      input_path=`$CYGPATH -u "$shortmode_path"`
29400      new_path="$input_path"
29401    fi
29402  fi
29403
29404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29405  if test "x$test_cygdrive_prefix" = x; then
29406    # As a simple fix, exclude /usr/bin since it's not a real path.
29407    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29409      # a path prefixed by /cygdrive for fixpath to work.
29410      new_path="$CYGWIN_ROOT_PATH$input_path"
29411    fi
29412  fi
29413
29414
29415  if test "x$path" != "x$new_path"; then
29416    BOOT_JDK="$new_path"
29417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29418$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29419  fi
29420
29421    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29422
29423  path="$BOOT_JDK"
29424  has_colon=`$ECHO $path | $GREP ^.:`
29425  new_path="$path"
29426  if test "x$has_colon" = x; then
29427    # Not in mixed or Windows style, start by that.
29428    new_path=`cmd //c echo $path`
29429  fi
29430
29431
29432  input_path="$new_path"
29433  # Check if we need to convert this using DOS-style short mode. If the path
29434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29435  # take no chances and rewrite it.
29436  # Note: m4 eats our [], so we need to use [ and ] instead.
29437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29438  if test "x$has_forbidden_chars" != x; then
29439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29441  fi
29442
29443
29444  windows_path="$new_path"
29445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29446    unix_path=`$CYGPATH -u "$windows_path"`
29447    new_path="$unix_path"
29448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29450    new_path="$unix_path"
29451  fi
29452
29453  if test "x$path" != "x$new_path"; then
29454    BOOT_JDK="$new_path"
29455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29456$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29457  fi
29458
29459  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29460  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29461
29462    else
29463      # We're on a unix platform. Hooray! :)
29464      path="$BOOT_JDK"
29465      has_space=`$ECHO "$path" | $GREP " "`
29466      if test "x$has_space" != x; then
29467        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29468$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29469        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29470      fi
29471
29472      # Use eval to expand a potential ~
29473      eval path="$path"
29474      if test ! -f "$path" && test ! -d "$path"; then
29475        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29476      fi
29477
29478      if test -d "$path"; then
29479        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29480      else
29481        dir="`$DIRNAME "$path"`"
29482        base="`$BASENAME "$path"`"
29483        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29484      fi
29485    fi
29486  fi
29487
29488            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29489$as_echo_n "checking for Boot JDK... " >&6; }
29490            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29491$as_echo "$BOOT_JDK" >&6; }
29492            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29493$as_echo_n "checking Boot JDK version... " >&6; }
29494            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29495            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29496$as_echo "$BOOT_JDK_VERSION" >&6; }
29497          fi # end check jdk version
29498        fi # end check javac
29499      fi # end check java
29500    fi # end check boot jdk found
29501  fi
29502
29503    done
29504  fi
29505
29506
29507    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29508    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29509      # Do we have a bin/java?
29510      if test ! -x "$BOOT_JDK/bin/java"; then
29511        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29513        BOOT_JDK_FOUND=no
29514      else
29515        # Do we have a bin/javac?
29516        if test ! -x "$BOOT_JDK/bin/javac"; then
29517          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29519          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29520$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29521          BOOT_JDK_FOUND=no
29522        else
29523          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29524          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29525
29526          # Extra M4 quote needed to protect [] in grep expression.
29527          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29528          if test "x$FOUND_CORRECT_VERSION" = x; then
29529            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29531            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29532$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29533            BOOT_JDK_FOUND=no
29534          else
29535            # We're done! :-)
29536            BOOT_JDK_FOUND=yes
29537
29538  # Only process if variable expands to non-empty
29539
29540  if test "x$BOOT_JDK" != x; then
29541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29542
29543  # Input might be given as Windows format, start by converting to
29544  # unix format.
29545  path="$BOOT_JDK"
29546  new_path=`$CYGPATH -u "$path"`
29547
29548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29551  # "foo.exe" is OK but "foo" is an error.
29552  #
29553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29554  # It is also a way to make sure we got the proper file name for the real test later on.
29555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29556  if test "x$test_shortpath" = x; then
29557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29558$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29559    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29560  fi
29561
29562  # Call helper function which possibly converts this using DOS-style short mode.
29563  # If so, the updated path is stored in $new_path.
29564
29565  input_path="$new_path"
29566  # Check if we need to convert this using DOS-style short mode. If the path
29567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29568  # take no chances and rewrite it.
29569  # Note: m4 eats our [], so we need to use [ and ] instead.
29570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29571  if test "x$has_forbidden_chars" != x; then
29572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29576      # Going to short mode and back again did indeed matter. Since short mode is
29577      # case insensitive, let's make it lowercase to improve readability.
29578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29579      # Now convert it back to Unix-style (cygpath)
29580      input_path=`$CYGPATH -u "$shortmode_path"`
29581      new_path="$input_path"
29582    fi
29583  fi
29584
29585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29586  if test "x$test_cygdrive_prefix" = x; then
29587    # As a simple fix, exclude /usr/bin since it's not a real path.
29588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29590      # a path prefixed by /cygdrive for fixpath to work.
29591      new_path="$CYGWIN_ROOT_PATH$input_path"
29592    fi
29593  fi
29594
29595
29596  if test "x$path" != "x$new_path"; then
29597    BOOT_JDK="$new_path"
29598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29599$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29600  fi
29601
29602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29603
29604  path="$BOOT_JDK"
29605  has_colon=`$ECHO $path | $GREP ^.:`
29606  new_path="$path"
29607  if test "x$has_colon" = x; then
29608    # Not in mixed or Windows style, start by that.
29609    new_path=`cmd //c echo $path`
29610  fi
29611
29612
29613  input_path="$new_path"
29614  # Check if we need to convert this using DOS-style short mode. If the path
29615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29616  # take no chances and rewrite it.
29617  # Note: m4 eats our [], so we need to use [ and ] instead.
29618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29619  if test "x$has_forbidden_chars" != x; then
29620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29622  fi
29623
29624
29625  windows_path="$new_path"
29626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29627    unix_path=`$CYGPATH -u "$windows_path"`
29628    new_path="$unix_path"
29629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29631    new_path="$unix_path"
29632  fi
29633
29634  if test "x$path" != "x$new_path"; then
29635    BOOT_JDK="$new_path"
29636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29637$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29638  fi
29639
29640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29642
29643    else
29644      # We're on a unix platform. Hooray! :)
29645      path="$BOOT_JDK"
29646      has_space=`$ECHO "$path" | $GREP " "`
29647      if test "x$has_space" != x; then
29648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29649$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29650        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29651      fi
29652
29653      # Use eval to expand a potential ~
29654      eval path="$path"
29655      if test ! -f "$path" && test ! -d "$path"; then
29656        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29657      fi
29658
29659      if test -d "$path"; then
29660        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29661      else
29662        dir="`$DIRNAME "$path"`"
29663        base="`$BASENAME "$path"`"
29664        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29665      fi
29666    fi
29667  fi
29668
29669            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29670$as_echo_n "checking for Boot JDK... " >&6; }
29671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29672$as_echo "$BOOT_JDK" >&6; }
29673            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29674$as_echo_n "checking Boot JDK version... " >&6; }
29675            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29677$as_echo "$BOOT_JDK_VERSION" >&6; }
29678          fi # end check jdk version
29679        fi # end check javac
29680      fi # end check java
29681    fi # end check boot jdk found
29682  fi
29683
29684
29685  if test "x$BOOT_JDK_FOUND" = xno; then
29686    # Now execute the test
29687
29688  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29689  BOOT_JDK_SUFFIX="/Contents/Home"
29690  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29691  if test "x$ALL_JDKS_FOUND" != x; then
29692    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29693
29694  if test "x$BOOT_JDK_FOUND" = xno; then
29695    # Now execute the test
29696
29697        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29698        if test -d "$BOOT_JDK"; then
29699          BOOT_JDK_FOUND=maybe
29700          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29701$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29702        fi
29703
29704
29705    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29706    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29707      # Do we have a bin/java?
29708      if test ! -x "$BOOT_JDK/bin/java"; then
29709        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29711        BOOT_JDK_FOUND=no
29712      else
29713        # Do we have a bin/javac?
29714        if test ! -x "$BOOT_JDK/bin/javac"; then
29715          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29716$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29717          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29718$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29719          BOOT_JDK_FOUND=no
29720        else
29721          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29722          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29723
29724          # Extra M4 quote needed to protect [] in grep expression.
29725          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29726          if test "x$FOUND_CORRECT_VERSION" = x; then
29727            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29729            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29730$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29731            BOOT_JDK_FOUND=no
29732          else
29733            # We're done! :-)
29734            BOOT_JDK_FOUND=yes
29735
29736  # Only process if variable expands to non-empty
29737
29738  if test "x$BOOT_JDK" != x; then
29739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29740
29741  # Input might be given as Windows format, start by converting to
29742  # unix format.
29743  path="$BOOT_JDK"
29744  new_path=`$CYGPATH -u "$path"`
29745
29746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29749  # "foo.exe" is OK but "foo" is an error.
29750  #
29751  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29752  # It is also a way to make sure we got the proper file name for the real test later on.
29753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29754  if test "x$test_shortpath" = x; then
29755    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29756$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29757    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29758  fi
29759
29760  # Call helper function which possibly converts this using DOS-style short mode.
29761  # If so, the updated path is stored in $new_path.
29762
29763  input_path="$new_path"
29764  # Check if we need to convert this using DOS-style short mode. If the path
29765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29766  # take no chances and rewrite it.
29767  # Note: m4 eats our [], so we need to use [ and ] instead.
29768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29769  if test "x$has_forbidden_chars" != x; then
29770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29774      # Going to short mode and back again did indeed matter. Since short mode is
29775      # case insensitive, let's make it lowercase to improve readability.
29776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29777      # Now convert it back to Unix-style (cygpath)
29778      input_path=`$CYGPATH -u "$shortmode_path"`
29779      new_path="$input_path"
29780    fi
29781  fi
29782
29783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29784  if test "x$test_cygdrive_prefix" = x; then
29785    # As a simple fix, exclude /usr/bin since it's not a real path.
29786    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29788      # a path prefixed by /cygdrive for fixpath to work.
29789      new_path="$CYGWIN_ROOT_PATH$input_path"
29790    fi
29791  fi
29792
29793
29794  if test "x$path" != "x$new_path"; then
29795    BOOT_JDK="$new_path"
29796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29797$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29798  fi
29799
29800    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29801
29802  path="$BOOT_JDK"
29803  has_colon=`$ECHO $path | $GREP ^.:`
29804  new_path="$path"
29805  if test "x$has_colon" = x; then
29806    # Not in mixed or Windows style, start by that.
29807    new_path=`cmd //c echo $path`
29808  fi
29809
29810
29811  input_path="$new_path"
29812  # Check if we need to convert this using DOS-style short mode. If the path
29813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29814  # take no chances and rewrite it.
29815  # Note: m4 eats our [], so we need to use [ and ] instead.
29816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29817  if test "x$has_forbidden_chars" != x; then
29818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29819    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29820  fi
29821
29822
29823  windows_path="$new_path"
29824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29825    unix_path=`$CYGPATH -u "$windows_path"`
29826    new_path="$unix_path"
29827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29829    new_path="$unix_path"
29830  fi
29831
29832  if test "x$path" != "x$new_path"; then
29833    BOOT_JDK="$new_path"
29834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29835$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29836  fi
29837
29838  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29839  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29840
29841    else
29842      # We're on a unix platform. Hooray! :)
29843      path="$BOOT_JDK"
29844      has_space=`$ECHO "$path" | $GREP " "`
29845      if test "x$has_space" != x; then
29846        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29847$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29848        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29849      fi
29850
29851      # Use eval to expand a potential ~
29852      eval path="$path"
29853      if test ! -f "$path" && test ! -d "$path"; then
29854        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29855      fi
29856
29857      if test -d "$path"; then
29858        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29859      else
29860        dir="`$DIRNAME "$path"`"
29861        base="`$BASENAME "$path"`"
29862        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29863      fi
29864    fi
29865  fi
29866
29867            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29868$as_echo_n "checking for Boot JDK... " >&6; }
29869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29870$as_echo "$BOOT_JDK" >&6; }
29871            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29872$as_echo_n "checking Boot JDK version... " >&6; }
29873            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29874            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29875$as_echo "$BOOT_JDK_VERSION" >&6; }
29876          fi # end check jdk version
29877        fi # end check javac
29878      fi # end check java
29879    fi # end check boot jdk found
29880  fi
29881
29882    done
29883  fi
29884
29885
29886    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29887    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29888      # Do we have a bin/java?
29889      if test ! -x "$BOOT_JDK/bin/java"; then
29890        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29892        BOOT_JDK_FOUND=no
29893      else
29894        # Do we have a bin/javac?
29895        if test ! -x "$BOOT_JDK/bin/javac"; then
29896          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29897$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29898          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29899$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29900          BOOT_JDK_FOUND=no
29901        else
29902          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29903          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29904
29905          # Extra M4 quote needed to protect [] in grep expression.
29906          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29907          if test "x$FOUND_CORRECT_VERSION" = x; then
29908            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29910            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29911$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29912            BOOT_JDK_FOUND=no
29913          else
29914            # We're done! :-)
29915            BOOT_JDK_FOUND=yes
29916
29917  # Only process if variable expands to non-empty
29918
29919  if test "x$BOOT_JDK" != x; then
29920    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29921
29922  # Input might be given as Windows format, start by converting to
29923  # unix format.
29924  path="$BOOT_JDK"
29925  new_path=`$CYGPATH -u "$path"`
29926
29927  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29928  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29929  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29930  # "foo.exe" is OK but "foo" is an error.
29931  #
29932  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29933  # It is also a way to make sure we got the proper file name for the real test later on.
29934  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29935  if test "x$test_shortpath" = x; then
29936    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29937$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29938    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29939  fi
29940
29941  # Call helper function which possibly converts this using DOS-style short mode.
29942  # If so, the updated path is stored in $new_path.
29943
29944  input_path="$new_path"
29945  # Check if we need to convert this using DOS-style short mode. If the path
29946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29947  # take no chances and rewrite it.
29948  # Note: m4 eats our [], so we need to use [ and ] instead.
29949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29950  if test "x$has_forbidden_chars" != x; then
29951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29955      # Going to short mode and back again did indeed matter. Since short mode is
29956      # case insensitive, let's make it lowercase to improve readability.
29957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29958      # Now convert it back to Unix-style (cygpath)
29959      input_path=`$CYGPATH -u "$shortmode_path"`
29960      new_path="$input_path"
29961    fi
29962  fi
29963
29964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29965  if test "x$test_cygdrive_prefix" = x; then
29966    # As a simple fix, exclude /usr/bin since it's not a real path.
29967    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29969      # a path prefixed by /cygdrive for fixpath to work.
29970      new_path="$CYGWIN_ROOT_PATH$input_path"
29971    fi
29972  fi
29973
29974
29975  if test "x$path" != "x$new_path"; then
29976    BOOT_JDK="$new_path"
29977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29978$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29979  fi
29980
29981    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29982
29983  path="$BOOT_JDK"
29984  has_colon=`$ECHO $path | $GREP ^.:`
29985  new_path="$path"
29986  if test "x$has_colon" = x; then
29987    # Not in mixed or Windows style, start by that.
29988    new_path=`cmd //c echo $path`
29989  fi
29990
29991
29992  input_path="$new_path"
29993  # Check if we need to convert this using DOS-style short mode. If the path
29994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29995  # take no chances and rewrite it.
29996  # Note: m4 eats our [], so we need to use [ and ] instead.
29997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29998  if test "x$has_forbidden_chars" != x; then
29999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30001  fi
30002
30003
30004  windows_path="$new_path"
30005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30006    unix_path=`$CYGPATH -u "$windows_path"`
30007    new_path="$unix_path"
30008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30010    new_path="$unix_path"
30011  fi
30012
30013  if test "x$path" != "x$new_path"; then
30014    BOOT_JDK="$new_path"
30015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30016$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30017  fi
30018
30019  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30020  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30021
30022    else
30023      # We're on a unix platform. Hooray! :)
30024      path="$BOOT_JDK"
30025      has_space=`$ECHO "$path" | $GREP " "`
30026      if test "x$has_space" != x; then
30027        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30028$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30029        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30030      fi
30031
30032      # Use eval to expand a potential ~
30033      eval path="$path"
30034      if test ! -f "$path" && test ! -d "$path"; then
30035        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30036      fi
30037
30038      if test -d "$path"; then
30039        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30040      else
30041        dir="`$DIRNAME "$path"`"
30042        base="`$BASENAME "$path"`"
30043        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30044      fi
30045    fi
30046  fi
30047
30048            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30049$as_echo_n "checking for Boot JDK... " >&6; }
30050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30051$as_echo "$BOOT_JDK" >&6; }
30052            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30053$as_echo_n "checking Boot JDK version... " >&6; }
30054            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30055            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30056$as_echo "$BOOT_JDK_VERSION" >&6; }
30057          fi # end check jdk version
30058        fi # end check javac
30059      fi # end check java
30060    fi # end check boot jdk found
30061  fi
30062
30063  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
30064
30065  if test "x$BOOT_JDK_FOUND" = xno; then
30066    # Now execute the test
30067
30068  BOOT_JDK_PREFIX="/usr/lib/jvm"
30069  BOOT_JDK_SUFFIX=""
30070  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
30071  if test "x$ALL_JDKS_FOUND" != x; then
30072    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
30073
30074  if test "x$BOOT_JDK_FOUND" = xno; then
30075    # Now execute the test
30076
30077        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
30078        if test -d "$BOOT_JDK"; then
30079          BOOT_JDK_FOUND=maybe
30080          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
30081$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
30082        fi
30083
30084
30085    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30086    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30087      # Do we have a bin/java?
30088      if test ! -x "$BOOT_JDK/bin/java"; then
30089        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30090$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30091        BOOT_JDK_FOUND=no
30092      else
30093        # Do we have a bin/javac?
30094        if test ! -x "$BOOT_JDK/bin/javac"; then
30095          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30097          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30098$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30099          BOOT_JDK_FOUND=no
30100        else
30101          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30102          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30103
30104          # Extra M4 quote needed to protect [] in grep expression.
30105          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30106          if test "x$FOUND_CORRECT_VERSION" = x; then
30107            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30109            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30110$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30111            BOOT_JDK_FOUND=no
30112          else
30113            # We're done! :-)
30114            BOOT_JDK_FOUND=yes
30115
30116  # Only process if variable expands to non-empty
30117
30118  if test "x$BOOT_JDK" != x; then
30119    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30120
30121  # Input might be given as Windows format, start by converting to
30122  # unix format.
30123  path="$BOOT_JDK"
30124  new_path=`$CYGPATH -u "$path"`
30125
30126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30129  # "foo.exe" is OK but "foo" is an error.
30130  #
30131  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30132  # It is also a way to make sure we got the proper file name for the real test later on.
30133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30134  if test "x$test_shortpath" = x; then
30135    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30136$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30137    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30138  fi
30139
30140  # Call helper function which possibly converts this using DOS-style short mode.
30141  # If so, the updated path is stored in $new_path.
30142
30143  input_path="$new_path"
30144  # Check if we need to convert this using DOS-style short mode. If the path
30145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30146  # take no chances and rewrite it.
30147  # Note: m4 eats our [], so we need to use [ and ] instead.
30148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30149  if test "x$has_forbidden_chars" != x; then
30150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30154      # Going to short mode and back again did indeed matter. Since short mode is
30155      # case insensitive, let's make it lowercase to improve readability.
30156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30157      # Now convert it back to Unix-style (cygpath)
30158      input_path=`$CYGPATH -u "$shortmode_path"`
30159      new_path="$input_path"
30160    fi
30161  fi
30162
30163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30164  if test "x$test_cygdrive_prefix" = x; then
30165    # As a simple fix, exclude /usr/bin since it's not a real path.
30166    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30168      # a path prefixed by /cygdrive for fixpath to work.
30169      new_path="$CYGWIN_ROOT_PATH$input_path"
30170    fi
30171  fi
30172
30173
30174  if test "x$path" != "x$new_path"; then
30175    BOOT_JDK="$new_path"
30176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30177$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30178  fi
30179
30180    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30181
30182  path="$BOOT_JDK"
30183  has_colon=`$ECHO $path | $GREP ^.:`
30184  new_path="$path"
30185  if test "x$has_colon" = x; then
30186    # Not in mixed or Windows style, start by that.
30187    new_path=`cmd //c echo $path`
30188  fi
30189
30190
30191  input_path="$new_path"
30192  # Check if we need to convert this using DOS-style short mode. If the path
30193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30194  # take no chances and rewrite it.
30195  # Note: m4 eats our [], so we need to use [ and ] instead.
30196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30197  if test "x$has_forbidden_chars" != x; then
30198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30200  fi
30201
30202
30203  windows_path="$new_path"
30204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30205    unix_path=`$CYGPATH -u "$windows_path"`
30206    new_path="$unix_path"
30207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30209    new_path="$unix_path"
30210  fi
30211
30212  if test "x$path" != "x$new_path"; then
30213    BOOT_JDK="$new_path"
30214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30215$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30216  fi
30217
30218  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30219  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30220
30221    else
30222      # We're on a unix platform. Hooray! :)
30223      path="$BOOT_JDK"
30224      has_space=`$ECHO "$path" | $GREP " "`
30225      if test "x$has_space" != x; then
30226        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30227$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30228        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30229      fi
30230
30231      # Use eval to expand a potential ~
30232      eval path="$path"
30233      if test ! -f "$path" && test ! -d "$path"; then
30234        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30235      fi
30236
30237      if test -d "$path"; then
30238        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30239      else
30240        dir="`$DIRNAME "$path"`"
30241        base="`$BASENAME "$path"`"
30242        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30243      fi
30244    fi
30245  fi
30246
30247            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30248$as_echo_n "checking for Boot JDK... " >&6; }
30249            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30250$as_echo "$BOOT_JDK" >&6; }
30251            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30252$as_echo_n "checking Boot JDK version... " >&6; }
30253            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30254            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30255$as_echo "$BOOT_JDK_VERSION" >&6; }
30256          fi # end check jdk version
30257        fi # end check javac
30258      fi # end check java
30259    fi # end check boot jdk found
30260  fi
30261
30262    done
30263  fi
30264
30265
30266    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30267    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30268      # Do we have a bin/java?
30269      if test ! -x "$BOOT_JDK/bin/java"; then
30270        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30272        BOOT_JDK_FOUND=no
30273      else
30274        # Do we have a bin/javac?
30275        if test ! -x "$BOOT_JDK/bin/javac"; then
30276          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30277$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30278          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30279$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30280          BOOT_JDK_FOUND=no
30281        else
30282          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30283          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30284
30285          # Extra M4 quote needed to protect [] in grep expression.
30286          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30287          if test "x$FOUND_CORRECT_VERSION" = x; then
30288            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30290            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30291$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30292            BOOT_JDK_FOUND=no
30293          else
30294            # We're done! :-)
30295            BOOT_JDK_FOUND=yes
30296
30297  # Only process if variable expands to non-empty
30298
30299  if test "x$BOOT_JDK" != x; then
30300    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30301
30302  # Input might be given as Windows format, start by converting to
30303  # unix format.
30304  path="$BOOT_JDK"
30305  new_path=`$CYGPATH -u "$path"`
30306
30307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30310  # "foo.exe" is OK but "foo" is an error.
30311  #
30312  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30313  # It is also a way to make sure we got the proper file name for the real test later on.
30314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30315  if test "x$test_shortpath" = x; then
30316    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30317$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30318    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30319  fi
30320
30321  # Call helper function which possibly converts this using DOS-style short mode.
30322  # If so, the updated path is stored in $new_path.
30323
30324  input_path="$new_path"
30325  # Check if we need to convert this using DOS-style short mode. If the path
30326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30327  # take no chances and rewrite it.
30328  # Note: m4 eats our [], so we need to use [ and ] instead.
30329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30330  if test "x$has_forbidden_chars" != x; then
30331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30335      # Going to short mode and back again did indeed matter. Since short mode is
30336      # case insensitive, let's make it lowercase to improve readability.
30337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30338      # Now convert it back to Unix-style (cygpath)
30339      input_path=`$CYGPATH -u "$shortmode_path"`
30340      new_path="$input_path"
30341    fi
30342  fi
30343
30344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30345  if test "x$test_cygdrive_prefix" = x; then
30346    # As a simple fix, exclude /usr/bin since it's not a real path.
30347    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30349      # a path prefixed by /cygdrive for fixpath to work.
30350      new_path="$CYGWIN_ROOT_PATH$input_path"
30351    fi
30352  fi
30353
30354
30355  if test "x$path" != "x$new_path"; then
30356    BOOT_JDK="$new_path"
30357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30358$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30359  fi
30360
30361    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30362
30363  path="$BOOT_JDK"
30364  has_colon=`$ECHO $path | $GREP ^.:`
30365  new_path="$path"
30366  if test "x$has_colon" = x; then
30367    # Not in mixed or Windows style, start by that.
30368    new_path=`cmd //c echo $path`
30369  fi
30370
30371
30372  input_path="$new_path"
30373  # Check if we need to convert this using DOS-style short mode. If the path
30374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30375  # take no chances and rewrite it.
30376  # Note: m4 eats our [], so we need to use [ and ] instead.
30377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30378  if test "x$has_forbidden_chars" != x; then
30379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30381  fi
30382
30383
30384  windows_path="$new_path"
30385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30386    unix_path=`$CYGPATH -u "$windows_path"`
30387    new_path="$unix_path"
30388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30390    new_path="$unix_path"
30391  fi
30392
30393  if test "x$path" != "x$new_path"; then
30394    BOOT_JDK="$new_path"
30395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30396$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30397  fi
30398
30399  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30400  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30401
30402    else
30403      # We're on a unix platform. Hooray! :)
30404      path="$BOOT_JDK"
30405      has_space=`$ECHO "$path" | $GREP " "`
30406      if test "x$has_space" != x; then
30407        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30408$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30409        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30410      fi
30411
30412      # Use eval to expand a potential ~
30413      eval path="$path"
30414      if test ! -f "$path" && test ! -d "$path"; then
30415        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30416      fi
30417
30418      if test -d "$path"; then
30419        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30420      else
30421        dir="`$DIRNAME "$path"`"
30422        base="`$BASENAME "$path"`"
30423        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30424      fi
30425    fi
30426  fi
30427
30428            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30429$as_echo_n "checking for Boot JDK... " >&6; }
30430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30431$as_echo "$BOOT_JDK" >&6; }
30432            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30433$as_echo_n "checking Boot JDK version... " >&6; }
30434            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30435            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30436$as_echo "$BOOT_JDK_VERSION" >&6; }
30437          fi # end check jdk version
30438        fi # end check javac
30439      fi # end check java
30440    fi # end check boot jdk found
30441  fi
30442
30443  fi
30444
30445
30446    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30447    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30448      # Do we have a bin/java?
30449      if test ! -x "$BOOT_JDK/bin/java"; then
30450        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30451$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30452        BOOT_JDK_FOUND=no
30453      else
30454        # Do we have a bin/javac?
30455        if test ! -x "$BOOT_JDK/bin/javac"; then
30456          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30457$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30458          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30459$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30460          BOOT_JDK_FOUND=no
30461        else
30462          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30463          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30464
30465          # Extra M4 quote needed to protect [] in grep expression.
30466          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30467          if test "x$FOUND_CORRECT_VERSION" = x; then
30468            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30469$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30470            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30471$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30472            BOOT_JDK_FOUND=no
30473          else
30474            # We're done! :-)
30475            BOOT_JDK_FOUND=yes
30476
30477  # Only process if variable expands to non-empty
30478
30479  if test "x$BOOT_JDK" != x; then
30480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30481
30482  # Input might be given as Windows format, start by converting to
30483  # unix format.
30484  path="$BOOT_JDK"
30485  new_path=`$CYGPATH -u "$path"`
30486
30487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30490  # "foo.exe" is OK but "foo" is an error.
30491  #
30492  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30493  # It is also a way to make sure we got the proper file name for the real test later on.
30494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30495  if test "x$test_shortpath" = x; then
30496    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30497$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30498    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30499  fi
30500
30501  # Call helper function which possibly converts this using DOS-style short mode.
30502  # If so, the updated path is stored in $new_path.
30503
30504  input_path="$new_path"
30505  # Check if we need to convert this using DOS-style short mode. If the path
30506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30507  # take no chances and rewrite it.
30508  # Note: m4 eats our [], so we need to use [ and ] instead.
30509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30510  if test "x$has_forbidden_chars" != x; then
30511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30515      # Going to short mode and back again did indeed matter. Since short mode is
30516      # case insensitive, let's make it lowercase to improve readability.
30517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30518      # Now convert it back to Unix-style (cygpath)
30519      input_path=`$CYGPATH -u "$shortmode_path"`
30520      new_path="$input_path"
30521    fi
30522  fi
30523
30524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30525  if test "x$test_cygdrive_prefix" = x; then
30526    # As a simple fix, exclude /usr/bin since it's not a real path.
30527    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30529      # a path prefixed by /cygdrive for fixpath to work.
30530      new_path="$CYGWIN_ROOT_PATH$input_path"
30531    fi
30532  fi
30533
30534
30535  if test "x$path" != "x$new_path"; then
30536    BOOT_JDK="$new_path"
30537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30538$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30539  fi
30540
30541    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30542
30543  path="$BOOT_JDK"
30544  has_colon=`$ECHO $path | $GREP ^.:`
30545  new_path="$path"
30546  if test "x$has_colon" = x; then
30547    # Not in mixed or Windows style, start by that.
30548    new_path=`cmd //c echo $path`
30549  fi
30550
30551
30552  input_path="$new_path"
30553  # Check if we need to convert this using DOS-style short mode. If the path
30554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30555  # take no chances and rewrite it.
30556  # Note: m4 eats our [], so we need to use [ and ] instead.
30557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30558  if test "x$has_forbidden_chars" != x; then
30559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30561  fi
30562
30563
30564  windows_path="$new_path"
30565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30566    unix_path=`$CYGPATH -u "$windows_path"`
30567    new_path="$unix_path"
30568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30570    new_path="$unix_path"
30571  fi
30572
30573  if test "x$path" != "x$new_path"; then
30574    BOOT_JDK="$new_path"
30575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30576$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30577  fi
30578
30579  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30580  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30581
30582    else
30583      # We're on a unix platform. Hooray! :)
30584      path="$BOOT_JDK"
30585      has_space=`$ECHO "$path" | $GREP " "`
30586      if test "x$has_space" != x; then
30587        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30588$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30589        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30590      fi
30591
30592      # Use eval to expand a potential ~
30593      eval path="$path"
30594      if test ! -f "$path" && test ! -d "$path"; then
30595        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30596      fi
30597
30598      if test -d "$path"; then
30599        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30600      else
30601        dir="`$DIRNAME "$path"`"
30602        base="`$BASENAME "$path"`"
30603        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30604      fi
30605    fi
30606  fi
30607
30608            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30609$as_echo_n "checking for Boot JDK... " >&6; }
30610            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30611$as_echo "$BOOT_JDK" >&6; }
30612            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30613$as_echo_n "checking Boot JDK version... " >&6; }
30614            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30615            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30616$as_echo "$BOOT_JDK_VERSION" >&6; }
30617          fi # end check jdk version
30618        fi # end check javac
30619      fi # end check java
30620    fi # end check boot jdk found
30621  fi
30622
30623
30624  # If we haven't found anything yet, we've truly lost. Give up.
30625  if test "x$BOOT_JDK_FOUND" = xno; then
30626
30627  # Print a helpful message on how to acquire the necessary build dependency.
30628  # openjdk is the help tag: freetype, cups, alsa etc
30629  MISSING_DEPENDENCY=openjdk
30630
30631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30632    cygwin_help $MISSING_DEPENDENCY
30633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30634    msys_help $MISSING_DEPENDENCY
30635  else
30636    PKGHANDLER_COMMAND=
30637
30638    case $PKGHANDLER in
30639      apt-get)
30640        apt_help     $MISSING_DEPENDENCY ;;
30641      yum)
30642        yum_help     $MISSING_DEPENDENCY ;;
30643      brew)
30644        brew_help    $MISSING_DEPENDENCY ;;
30645      port)
30646        port_help    $MISSING_DEPENDENCY ;;
30647      pkgutil)
30648        pkgutil_help $MISSING_DEPENDENCY ;;
30649      pkgadd)
30650        pkgadd_help  $MISSING_DEPENDENCY ;;
30651    esac
30652
30653    if test "x$PKGHANDLER_COMMAND" != x; then
30654      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30655    fi
30656  fi
30657
30658    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30659$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30660    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30661$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30662    as_fn_error $? "Cannot continue" "$LINENO" 5
30663  fi
30664
30665
30666
30667  # Setup tools from the Boot JDK.
30668
30669  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30670
30671  # Publish this variable in the help.
30672
30673
30674  if [ -z "${JAVA+x}" ]; then
30675    # The variable is not set by user, try to locate tool using the code snippet
30676
30677      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30678$as_echo_n "checking for java in Boot JDK... " >&6; }
30679      JAVA=$BOOT_JDK/bin/java
30680      if test ! -x $JAVA; then
30681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30682$as_echo "not found" >&6; }
30683        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30684$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30685        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30686      fi
30687      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30688$as_echo "ok" >&6; }
30689
30690
30691  else
30692    # The variable is set, but is it from the command line or the environment?
30693
30694    # Try to remove the string !JAVA! from our list.
30695    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30696    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30697      # If it failed, the variable was not from the command line. Ignore it,
30698      # but warn the user (except for BASH, which is always set by the calling BASH).
30699      if test "xJAVA" != xBASH; then
30700        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30701$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30702      fi
30703      # Try to locate tool using the code snippet
30704
30705      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30706$as_echo_n "checking for java in Boot JDK... " >&6; }
30707      JAVA=$BOOT_JDK/bin/java
30708      if test ! -x $JAVA; then
30709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30710$as_echo "not found" >&6; }
30711        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30712$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30713        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30714      fi
30715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30716$as_echo "ok" >&6; }
30717
30718
30719    else
30720      # If it succeeded, then it was overridden by the user. We will use it
30721      # for the tool.
30722
30723      # First remove it from the list of overridden variables, so we can test
30724      # for unknown variables in the end.
30725      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30726
30727      # Check if we try to supply an empty value
30728      if test "x$JAVA" = x; then
30729        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30730$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30731        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30732$as_echo_n "checking for JAVA... " >&6; }
30733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30734$as_echo "disabled" >&6; }
30735      else
30736        # Check if the provided tool contains a complete path.
30737        tool_specified="$JAVA"
30738        tool_basename="${tool_specified##*/}"
30739        if test "x$tool_basename" = "x$tool_specified"; then
30740          # A command without a complete path is provided, search $PATH.
30741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30742$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30743          # Extract the first word of "$tool_basename", so it can be a program name with args.
30744set dummy $tool_basename; ac_word=$2
30745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30746$as_echo_n "checking for $ac_word... " >&6; }
30747if ${ac_cv_path_JAVA+:} false; then :
30748  $as_echo_n "(cached) " >&6
30749else
30750  case $JAVA in
30751  [\\/]* | ?:[\\/]*)
30752  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30753  ;;
30754  *)
30755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30756for as_dir in $PATH
30757do
30758  IFS=$as_save_IFS
30759  test -z "$as_dir" && as_dir=.
30760    for ac_exec_ext in '' $ac_executable_extensions; do
30761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30762    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30764    break 2
30765  fi
30766done
30767  done
30768IFS=$as_save_IFS
30769
30770  ;;
30771esac
30772fi
30773JAVA=$ac_cv_path_JAVA
30774if test -n "$JAVA"; then
30775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30776$as_echo "$JAVA" >&6; }
30777else
30778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30779$as_echo "no" >&6; }
30780fi
30781
30782
30783          if test "x$JAVA" = x; then
30784            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30785          fi
30786        else
30787          # Otherwise we believe it is a complete path. Use it as it is.
30788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30789$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30790          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30791$as_echo_n "checking for JAVA... " >&6; }
30792          if test ! -x "$tool_specified"; then
30793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30794$as_echo "not found" >&6; }
30795            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30796          fi
30797          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30798$as_echo "$tool_specified" >&6; }
30799        fi
30800      fi
30801    fi
30802
30803  fi
30804
30805
30806
30807  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30808
30809  # Publish this variable in the help.
30810
30811
30812  if [ -z "${JAVAC+x}" ]; then
30813    # The variable is not set by user, try to locate tool using the code snippet
30814
30815      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30816$as_echo_n "checking for javac in Boot JDK... " >&6; }
30817      JAVAC=$BOOT_JDK/bin/javac
30818      if test ! -x $JAVAC; then
30819        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30820$as_echo "not found" >&6; }
30821        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30822$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30823        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30824      fi
30825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30826$as_echo "ok" >&6; }
30827
30828
30829  else
30830    # The variable is set, but is it from the command line or the environment?
30831
30832    # Try to remove the string !JAVAC! from our list.
30833    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30834    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30835      # If it failed, the variable was not from the command line. Ignore it,
30836      # but warn the user (except for BASH, which is always set by the calling BASH).
30837      if test "xJAVAC" != xBASH; then
30838        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30839$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30840      fi
30841      # Try to locate tool using the code snippet
30842
30843      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30844$as_echo_n "checking for javac in Boot JDK... " >&6; }
30845      JAVAC=$BOOT_JDK/bin/javac
30846      if test ! -x $JAVAC; then
30847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30848$as_echo "not found" >&6; }
30849        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30850$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30851        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30852      fi
30853      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30854$as_echo "ok" >&6; }
30855
30856
30857    else
30858      # If it succeeded, then it was overridden by the user. We will use it
30859      # for the tool.
30860
30861      # First remove it from the list of overridden variables, so we can test
30862      # for unknown variables in the end.
30863      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30864
30865      # Check if we try to supply an empty value
30866      if test "x$JAVAC" = x; then
30867        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30868$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30869        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30870$as_echo_n "checking for JAVAC... " >&6; }
30871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30872$as_echo "disabled" >&6; }
30873      else
30874        # Check if the provided tool contains a complete path.
30875        tool_specified="$JAVAC"
30876        tool_basename="${tool_specified##*/}"
30877        if test "x$tool_basename" = "x$tool_specified"; then
30878          # A command without a complete path is provided, search $PATH.
30879          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30880$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30881          # Extract the first word of "$tool_basename", so it can be a program name with args.
30882set dummy $tool_basename; ac_word=$2
30883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30884$as_echo_n "checking for $ac_word... " >&6; }
30885if ${ac_cv_path_JAVAC+:} false; then :
30886  $as_echo_n "(cached) " >&6
30887else
30888  case $JAVAC in
30889  [\\/]* | ?:[\\/]*)
30890  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30891  ;;
30892  *)
30893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30894for as_dir in $PATH
30895do
30896  IFS=$as_save_IFS
30897  test -z "$as_dir" && as_dir=.
30898    for ac_exec_ext in '' $ac_executable_extensions; do
30899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30900    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30902    break 2
30903  fi
30904done
30905  done
30906IFS=$as_save_IFS
30907
30908  ;;
30909esac
30910fi
30911JAVAC=$ac_cv_path_JAVAC
30912if test -n "$JAVAC"; then
30913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30914$as_echo "$JAVAC" >&6; }
30915else
30916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30917$as_echo "no" >&6; }
30918fi
30919
30920
30921          if test "x$JAVAC" = x; then
30922            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30923          fi
30924        else
30925          # Otherwise we believe it is a complete path. Use it as it is.
30926          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30927$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30928          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30929$as_echo_n "checking for JAVAC... " >&6; }
30930          if test ! -x "$tool_specified"; then
30931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30932$as_echo "not found" >&6; }
30933            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30934          fi
30935          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30936$as_echo "$tool_specified" >&6; }
30937        fi
30938      fi
30939    fi
30940
30941  fi
30942
30943
30944
30945  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30946
30947  # Publish this variable in the help.
30948
30949
30950  if [ -z "${JAVAH+x}" ]; then
30951    # The variable is not set by user, try to locate tool using the code snippet
30952
30953      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30954$as_echo_n "checking for javah in Boot JDK... " >&6; }
30955      JAVAH=$BOOT_JDK/bin/javah
30956      if test ! -x $JAVAH; then
30957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30958$as_echo "not found" >&6; }
30959        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30960$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30961        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30962      fi
30963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30964$as_echo "ok" >&6; }
30965
30966
30967  else
30968    # The variable is set, but is it from the command line or the environment?
30969
30970    # Try to remove the string !JAVAH! from our list.
30971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30973      # If it failed, the variable was not from the command line. Ignore it,
30974      # but warn the user (except for BASH, which is always set by the calling BASH).
30975      if test "xJAVAH" != xBASH; then
30976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30977$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30978      fi
30979      # Try to locate tool using the code snippet
30980
30981      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30982$as_echo_n "checking for javah in Boot JDK... " >&6; }
30983      JAVAH=$BOOT_JDK/bin/javah
30984      if test ! -x $JAVAH; then
30985        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30986$as_echo "not found" >&6; }
30987        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30988$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30989        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30990      fi
30991      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30992$as_echo "ok" >&6; }
30993
30994
30995    else
30996      # If it succeeded, then it was overridden by the user. We will use it
30997      # for the tool.
30998
30999      # First remove it from the list of overridden variables, so we can test
31000      # for unknown variables in the end.
31001      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31002
31003      # Check if we try to supply an empty value
31004      if test "x$JAVAH" = x; then
31005        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
31006$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
31007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31008$as_echo_n "checking for JAVAH... " >&6; }
31009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31010$as_echo "disabled" >&6; }
31011      else
31012        # Check if the provided tool contains a complete path.
31013        tool_specified="$JAVAH"
31014        tool_basename="${tool_specified##*/}"
31015        if test "x$tool_basename" = "x$tool_specified"; then
31016          # A command without a complete path is provided, search $PATH.
31017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
31018$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
31019          # Extract the first word of "$tool_basename", so it can be a program name with args.
31020set dummy $tool_basename; ac_word=$2
31021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31022$as_echo_n "checking for $ac_word... " >&6; }
31023if ${ac_cv_path_JAVAH+:} false; then :
31024  $as_echo_n "(cached) " >&6
31025else
31026  case $JAVAH in
31027  [\\/]* | ?:[\\/]*)
31028  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
31029  ;;
31030  *)
31031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31032for as_dir in $PATH
31033do
31034  IFS=$as_save_IFS
31035  test -z "$as_dir" && as_dir=.
31036    for ac_exec_ext in '' $ac_executable_extensions; do
31037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31038    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
31039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31040    break 2
31041  fi
31042done
31043  done
31044IFS=$as_save_IFS
31045
31046  ;;
31047esac
31048fi
31049JAVAH=$ac_cv_path_JAVAH
31050if test -n "$JAVAH"; then
31051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
31052$as_echo "$JAVAH" >&6; }
31053else
31054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31055$as_echo "no" >&6; }
31056fi
31057
31058
31059          if test "x$JAVAH" = x; then
31060            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31061          fi
31062        else
31063          # Otherwise we believe it is a complete path. Use it as it is.
31064          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
31065$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
31066          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31067$as_echo_n "checking for JAVAH... " >&6; }
31068          if test ! -x "$tool_specified"; then
31069            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31070$as_echo "not found" >&6; }
31071            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
31072          fi
31073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31074$as_echo "$tool_specified" >&6; }
31075        fi
31076      fi
31077    fi
31078
31079  fi
31080
31081
31082
31083  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31084
31085  # Publish this variable in the help.
31086
31087
31088  if [ -z "${JAR+x}" ]; then
31089    # The variable is not set by user, try to locate tool using the code snippet
31090
31091      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31092$as_echo_n "checking for jar in Boot JDK... " >&6; }
31093      JAR=$BOOT_JDK/bin/jar
31094      if test ! -x $JAR; then
31095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31096$as_echo "not found" >&6; }
31097        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31098$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31099        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31100      fi
31101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31102$as_echo "ok" >&6; }
31103
31104
31105  else
31106    # The variable is set, but is it from the command line or the environment?
31107
31108    # Try to remove the string !JAR! from our list.
31109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
31110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31111      # If it failed, the variable was not from the command line. Ignore it,
31112      # but warn the user (except for BASH, which is always set by the calling BASH).
31113      if test "xJAR" != xBASH; then
31114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
31115$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
31116      fi
31117      # Try to locate tool using the code snippet
31118
31119      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31120$as_echo_n "checking for jar in Boot JDK... " >&6; }
31121      JAR=$BOOT_JDK/bin/jar
31122      if test ! -x $JAR; then
31123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31124$as_echo "not found" >&6; }
31125        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31126$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31127        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31128      fi
31129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31130$as_echo "ok" >&6; }
31131
31132
31133    else
31134      # If it succeeded, then it was overridden by the user. We will use it
31135      # for the tool.
31136
31137      # First remove it from the list of overridden variables, so we can test
31138      # for unknown variables in the end.
31139      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31140
31141      # Check if we try to supply an empty value
31142      if test "x$JAR" = x; then
31143        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
31144$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
31145        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31146$as_echo_n "checking for JAR... " >&6; }
31147        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31148$as_echo "disabled" >&6; }
31149      else
31150        # Check if the provided tool contains a complete path.
31151        tool_specified="$JAR"
31152        tool_basename="${tool_specified##*/}"
31153        if test "x$tool_basename" = "x$tool_specified"; then
31154          # A command without a complete path is provided, search $PATH.
31155          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
31156$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
31157          # Extract the first word of "$tool_basename", so it can be a program name with args.
31158set dummy $tool_basename; ac_word=$2
31159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31160$as_echo_n "checking for $ac_word... " >&6; }
31161if ${ac_cv_path_JAR+:} false; then :
31162  $as_echo_n "(cached) " >&6
31163else
31164  case $JAR in
31165  [\\/]* | ?:[\\/]*)
31166  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31167  ;;
31168  *)
31169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31170for as_dir in $PATH
31171do
31172  IFS=$as_save_IFS
31173  test -z "$as_dir" && as_dir=.
31174    for ac_exec_ext in '' $ac_executable_extensions; do
31175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31176    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31178    break 2
31179  fi
31180done
31181  done
31182IFS=$as_save_IFS
31183
31184  ;;
31185esac
31186fi
31187JAR=$ac_cv_path_JAR
31188if test -n "$JAR"; then
31189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31190$as_echo "$JAR" >&6; }
31191else
31192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31193$as_echo "no" >&6; }
31194fi
31195
31196
31197          if test "x$JAR" = x; then
31198            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31199          fi
31200        else
31201          # Otherwise we believe it is a complete path. Use it as it is.
31202          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31203$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31204          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31205$as_echo_n "checking for JAR... " >&6; }
31206          if test ! -x "$tool_specified"; then
31207            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31208$as_echo "not found" >&6; }
31209            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31210          fi
31211          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31212$as_echo "$tool_specified" >&6; }
31213        fi
31214      fi
31215    fi
31216
31217  fi
31218
31219
31220
31221  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31222
31223  # Publish this variable in the help.
31224
31225
31226  if [ -z "${JARSIGNER+x}" ]; then
31227    # The variable is not set by user, try to locate tool using the code snippet
31228
31229      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31230$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31231      JARSIGNER=$BOOT_JDK/bin/jarsigner
31232      if test ! -x $JARSIGNER; then
31233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31234$as_echo "not found" >&6; }
31235        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31236$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31237        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31238      fi
31239      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31240$as_echo "ok" >&6; }
31241
31242
31243  else
31244    # The variable is set, but is it from the command line or the environment?
31245
31246    # Try to remove the string !JARSIGNER! from our list.
31247    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31248    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31249      # If it failed, the variable was not from the command line. Ignore it,
31250      # but warn the user (except for BASH, which is always set by the calling BASH).
31251      if test "xJARSIGNER" != xBASH; then
31252        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31253$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31254      fi
31255      # Try to locate tool using the code snippet
31256
31257      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31258$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31259      JARSIGNER=$BOOT_JDK/bin/jarsigner
31260      if test ! -x $JARSIGNER; then
31261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31262$as_echo "not found" >&6; }
31263        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31264$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31265        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31266      fi
31267      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31268$as_echo "ok" >&6; }
31269
31270
31271    else
31272      # If it succeeded, then it was overridden by the user. We will use it
31273      # for the tool.
31274
31275      # First remove it from the list of overridden variables, so we can test
31276      # for unknown variables in the end.
31277      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31278
31279      # Check if we try to supply an empty value
31280      if test "x$JARSIGNER" = x; then
31281        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31282$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31283        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31284$as_echo_n "checking for JARSIGNER... " >&6; }
31285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31286$as_echo "disabled" >&6; }
31287      else
31288        # Check if the provided tool contains a complete path.
31289        tool_specified="$JARSIGNER"
31290        tool_basename="${tool_specified##*/}"
31291        if test "x$tool_basename" = "x$tool_specified"; then
31292          # A command without a complete path is provided, search $PATH.
31293          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31294$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31295          # Extract the first word of "$tool_basename", so it can be a program name with args.
31296set dummy $tool_basename; ac_word=$2
31297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31298$as_echo_n "checking for $ac_word... " >&6; }
31299if ${ac_cv_path_JARSIGNER+:} false; then :
31300  $as_echo_n "(cached) " >&6
31301else
31302  case $JARSIGNER in
31303  [\\/]* | ?:[\\/]*)
31304  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31305  ;;
31306  *)
31307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31308for as_dir in $PATH
31309do
31310  IFS=$as_save_IFS
31311  test -z "$as_dir" && as_dir=.
31312    for ac_exec_ext in '' $ac_executable_extensions; do
31313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31314    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31316    break 2
31317  fi
31318done
31319  done
31320IFS=$as_save_IFS
31321
31322  ;;
31323esac
31324fi
31325JARSIGNER=$ac_cv_path_JARSIGNER
31326if test -n "$JARSIGNER"; then
31327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31328$as_echo "$JARSIGNER" >&6; }
31329else
31330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31331$as_echo "no" >&6; }
31332fi
31333
31334
31335          if test "x$JARSIGNER" = x; then
31336            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31337          fi
31338        else
31339          # Otherwise we believe it is a complete path. Use it as it is.
31340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31341$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31342          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31343$as_echo_n "checking for JARSIGNER... " >&6; }
31344          if test ! -x "$tool_specified"; then
31345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31346$as_echo "not found" >&6; }
31347            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31348          fi
31349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31350$as_echo "$tool_specified" >&6; }
31351        fi
31352      fi
31353    fi
31354
31355  fi
31356
31357
31358
31359  # Finally, set some other options...
31360
31361  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31362  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31363
31364
31365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31366$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31367  if "$JAVA" --list-modules > /dev/null 2>&1; then
31368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31369$as_echo "yes" >&6; }
31370    BOOT_JDK_MODULAR="true"
31371  else
31372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31373$as_echo "no" >&6; }
31374    BOOT_JDK_MODULAR="false"
31375  fi
31376
31377
31378
31379
31380  # Check if the boot jdk is 32 or 64 bit
31381  if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
31382    BOOT_JDK_BITS="64"
31383  else
31384    BOOT_JDK_BITS="32"
31385  fi
31386  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31387$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31389$as_echo "$BOOT_JDK_BITS" >&6; }
31390
31391
31392
31393# Check whether --with-build-jdk was given.
31394if test "${with_build_jdk+set}" = set; then :
31395  withval=$with_build_jdk;
31396fi
31397
31398
31399  CREATE_BUILDJDK=false
31400  EXTERNAL_BUILDJDK=false
31401  BUILD_JDK_FOUND="no"
31402  if test "x$with_build_jdk" != "x"; then
31403
31404  if test "x$BUILD_JDK_FOUND" = xno; then
31405    # Execute the test
31406
31407       if test "x$with_build_jdk" != x; then
31408         BUILD_JDK=$with_build_jdk
31409         BUILD_JDK_FOUND=maybe
31410         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31411$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31412       fi
31413
31414    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31415    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31416      # Do we have a bin/java?
31417      if test ! -x "$BUILD_JDK/bin/java"; then
31418        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31419$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31420        BUILD_JDK_FOUND=no
31421      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31422        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31423$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31424        BUILD_JDK_FOUND=no
31425      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31426        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31427$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31428        BUILD_JDK_FOUND=no
31429      elif test ! -x "$BUILD_JDK/bin/javac"; then
31430        # Do we have a bin/javac?
31431        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31432$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31433        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31434$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31435        BUILD_JDK_FOUND=no
31436      else
31437        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31438        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31439
31440        # Extra M4 quote needed to protect [] in grep expression.
31441        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31442        if test "x$FOUND_CORRECT_VERSION" = x; then
31443          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31444$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31445          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31446$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31447          BUILD_JDK_FOUND=no
31448        else
31449          # We're done!
31450          BUILD_JDK_FOUND=yes
31451
31452  # Only process if variable expands to non-empty
31453
31454  if test "x$BUILD_JDK" != x; then
31455    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31456
31457  # Input might be given as Windows format, start by converting to
31458  # unix format.
31459  path="$BUILD_JDK"
31460  new_path=`$CYGPATH -u "$path"`
31461
31462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31465  # "foo.exe" is OK but "foo" is an error.
31466  #
31467  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31468  # It is also a way to make sure we got the proper file name for the real test later on.
31469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31470  if test "x$test_shortpath" = x; then
31471    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31472$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31473    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31474  fi
31475
31476  # Call helper function which possibly converts this using DOS-style short mode.
31477  # If so, the updated path is stored in $new_path.
31478
31479  input_path="$new_path"
31480  # Check if we need to convert this using DOS-style short mode. If the path
31481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31482  # take no chances and rewrite it.
31483  # Note: m4 eats our [], so we need to use [ and ] instead.
31484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31485  if test "x$has_forbidden_chars" != x; then
31486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31490      # Going to short mode and back again did indeed matter. Since short mode is
31491      # case insensitive, let's make it lowercase to improve readability.
31492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31493      # Now convert it back to Unix-style (cygpath)
31494      input_path=`$CYGPATH -u "$shortmode_path"`
31495      new_path="$input_path"
31496    fi
31497  fi
31498
31499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31500  if test "x$test_cygdrive_prefix" = x; then
31501    # As a simple fix, exclude /usr/bin since it's not a real path.
31502    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31504      # a path prefixed by /cygdrive for fixpath to work.
31505      new_path="$CYGWIN_ROOT_PATH$input_path"
31506    fi
31507  fi
31508
31509
31510  if test "x$path" != "x$new_path"; then
31511    BUILD_JDK="$new_path"
31512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31513$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31514  fi
31515
31516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31517
31518  path="$BUILD_JDK"
31519  has_colon=`$ECHO $path | $GREP ^.:`
31520  new_path="$path"
31521  if test "x$has_colon" = x; then
31522    # Not in mixed or Windows style, start by that.
31523    new_path=`cmd //c echo $path`
31524  fi
31525
31526
31527  input_path="$new_path"
31528  # Check if we need to convert this using DOS-style short mode. If the path
31529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31530  # take no chances and rewrite it.
31531  # Note: m4 eats our [], so we need to use [ and ] instead.
31532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31533  if test "x$has_forbidden_chars" != x; then
31534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31536  fi
31537
31538
31539  windows_path="$new_path"
31540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31541    unix_path=`$CYGPATH -u "$windows_path"`
31542    new_path="$unix_path"
31543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31545    new_path="$unix_path"
31546  fi
31547
31548  if test "x$path" != "x$new_path"; then
31549    BUILD_JDK="$new_path"
31550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31551$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31552  fi
31553
31554  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31555  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31556
31557    else
31558      # We're on a unix platform. Hooray! :)
31559      path="$BUILD_JDK"
31560      has_space=`$ECHO "$path" | $GREP " "`
31561      if test "x$has_space" != x; then
31562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31563$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31564        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31565      fi
31566
31567      # Use eval to expand a potential ~
31568      eval path="$path"
31569      if test ! -f "$path" && test ! -d "$path"; then
31570        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31571      fi
31572
31573      if test -d "$path"; then
31574        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31575      else
31576        dir="`$DIRNAME "$path"`"
31577        base="`$BASENAME "$path"`"
31578        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31579      fi
31580    fi
31581  fi
31582
31583          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31584$as_echo_n "checking for Build JDK... " >&6; }
31585          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31586$as_echo "$BUILD_JDK" >&6; }
31587          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31588$as_echo_n "checking Build JDK version... " >&6; }
31589          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31590          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31591$as_echo "$BUILD_JDK_VERSION" >&6; }
31592        fi # end check jdk version
31593      fi # end check java
31594    fi # end check build jdk found
31595  fi
31596
31597    EXTERNAL_BUILDJDK=true
31598  else
31599    if test "x$COMPILE_TYPE" = "xcross"; then
31600      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31601      BUILD_JDK_FOUND=yes
31602      CREATE_BUILDJDK=true
31603      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31604$as_echo_n "checking for Build JDK... " >&6; }
31605      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31606$as_echo "yes, will build it for the host platform" >&6; }
31607    else
31608      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31609      BUILD_JDK_FOUND=yes
31610      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31611$as_echo_n "checking for Build JDK... " >&6; }
31612      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31613$as_echo "yes, will use output dir" >&6; }
31614    fi
31615  fi
31616
31617  JMOD="$BUILD_JDK/bin/jmod"
31618  JLINK="$BUILD_JDK/bin/jlink"
31619
31620
31621
31622  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31624$as_echo_n "checking for Build JDK... " >&6; }
31625    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31626$as_echo "no" >&6; }
31627    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31628  fi
31629
31630
31631
31632
31633
31634
31635###############################################################################
31636#
31637# Configure the sources to use. We can add or override individual directories.
31638#
31639###############################################################################
31640
31641
31642  # Where are the sources.
31643  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31644  CORBA_TOPDIR="$SRC_ROOT/corba"
31645  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31646  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31647  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31648  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31649  JDK_TOPDIR="$SRC_ROOT/jdk"
31650
31651
31652
31653
31654
31655
31656
31657
31658
31659  # This feature is no longer supported.
31660
31661
31662
31663# Check whether --with-add-source-root was given.
31664if test "${with_add_source_root+set}" = set; then :
31665  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
31666$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31667fi
31668
31669
31670
31671
31672# Check whether --with-override-source-root was given.
31673if test "${with_override_source_root+set}" = set; then :
31674  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
31675$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31676fi
31677
31678
31679
31680
31681# Check whether --with-adds-and-overrides was given.
31682if test "${with_adds_and_overrides+set}" = set; then :
31683  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
31684$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31685fi
31686
31687
31688
31689
31690# Check whether --with-override-langtools was given.
31691if test "${with_override_langtools+set}" = set; then :
31692  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31693$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31694fi
31695
31696
31697
31698
31699# Check whether --with-override-corba was given.
31700if test "${with_override_corba+set}" = set; then :
31701  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31702$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31703fi
31704
31705
31706
31707
31708# Check whether --with-override-jaxp was given.
31709if test "${with_override_jaxp+set}" = set; then :
31710  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31711$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31712fi
31713
31714
31715
31716
31717# Check whether --with-override-jaxws was given.
31718if test "${with_override_jaxws+set}" = set; then :
31719  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31720$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31721fi
31722
31723
31724
31725
31726# Check whether --with-override-hotspot was given.
31727if test "${with_override_hotspot+set}" = set; then :
31728  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31729$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31730fi
31731
31732
31733
31734
31735# Check whether --with-override-nashorn was given.
31736if test "${with_override_nashorn+set}" = set; then :
31737  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31738$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31739fi
31740
31741
31742
31743
31744# Check whether --with-override-jdk was given.
31745if test "${with_override_jdk+set}" = set; then :
31746  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31747$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31748fi
31749
31750
31751
31752
31753  BUILD_OUTPUT="$OUTPUT_ROOT"
31754
31755  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31756
31757
31758
31759# Check whether --with-import_hotspot was given.
31760if test "${with_import_hotspot+set}" = set; then :
31761  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31762$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31763fi
31764
31765
31766
31767
31768
31769
31770# Check whether --with-import-modules was given.
31771if test "${with_import_modules+set}" = set; then :
31772  withval=$with_import_modules;
31773fi
31774
31775
31776  if test "x$with_import_modules" != x \
31777      && test "x$with_import_modules" != "xno"; then
31778    if test -d "$with_import_modules"; then
31779      IMPORT_MODULES_TOPDIR="$with_import_modules"
31780
31781  # Only process if variable expands to non-empty
31782
31783  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31785
31786  # Input might be given as Windows format, start by converting to
31787  # unix format.
31788  path="$IMPORT_MODULES_TOPDIR"
31789  new_path=`$CYGPATH -u "$path"`
31790
31791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31794  # "foo.exe" is OK but "foo" is an error.
31795  #
31796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31797  # It is also a way to make sure we got the proper file name for the real test later on.
31798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31799  if test "x$test_shortpath" = x; then
31800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31801$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31802    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31803  fi
31804
31805  # Call helper function which possibly converts this using DOS-style short mode.
31806  # If so, the updated path is stored in $new_path.
31807
31808  input_path="$new_path"
31809  # Check if we need to convert this using DOS-style short mode. If the path
31810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31811  # take no chances and rewrite it.
31812  # Note: m4 eats our [], so we need to use [ and ] instead.
31813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31814  if test "x$has_forbidden_chars" != x; then
31815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31819      # Going to short mode and back again did indeed matter. Since short mode is
31820      # case insensitive, let's make it lowercase to improve readability.
31821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31822      # Now convert it back to Unix-style (cygpath)
31823      input_path=`$CYGPATH -u "$shortmode_path"`
31824      new_path="$input_path"
31825    fi
31826  fi
31827
31828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31829  if test "x$test_cygdrive_prefix" = x; then
31830    # As a simple fix, exclude /usr/bin since it's not a real path.
31831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31833      # a path prefixed by /cygdrive for fixpath to work.
31834      new_path="$CYGWIN_ROOT_PATH$input_path"
31835    fi
31836  fi
31837
31838
31839  if test "x$path" != "x$new_path"; then
31840    IMPORT_MODULES_TOPDIR="$new_path"
31841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31842$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31843  fi
31844
31845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31846
31847  path="$IMPORT_MODULES_TOPDIR"
31848  has_colon=`$ECHO $path | $GREP ^.:`
31849  new_path="$path"
31850  if test "x$has_colon" = x; then
31851    # Not in mixed or Windows style, start by that.
31852    new_path=`cmd //c echo $path`
31853  fi
31854
31855
31856  input_path="$new_path"
31857  # Check if we need to convert this using DOS-style short mode. If the path
31858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31859  # take no chances and rewrite it.
31860  # Note: m4 eats our [], so we need to use [ and ] instead.
31861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31862  if test "x$has_forbidden_chars" != x; then
31863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31865  fi
31866
31867
31868  windows_path="$new_path"
31869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31870    unix_path=`$CYGPATH -u "$windows_path"`
31871    new_path="$unix_path"
31872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31874    new_path="$unix_path"
31875  fi
31876
31877  if test "x$path" != "x$new_path"; then
31878    IMPORT_MODULES_TOPDIR="$new_path"
31879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31880$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31881  fi
31882
31883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31885
31886    else
31887      # We're on a unix platform. Hooray! :)
31888      path="$IMPORT_MODULES_TOPDIR"
31889      has_space=`$ECHO "$path" | $GREP " "`
31890      if test "x$has_space" != x; then
31891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31892$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31893        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31894      fi
31895
31896      # Use eval to expand a potential ~
31897      eval path="$path"
31898      if test ! -f "$path" && test ! -d "$path"; then
31899        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31900      fi
31901
31902      if test -d "$path"; then
31903        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31904      else
31905        dir="`$DIRNAME "$path"`"
31906        base="`$BASENAME "$path"`"
31907        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31908      fi
31909    fi
31910  fi
31911
31912    elif test -e "$with_import_modules"; then
31913      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31914      $RM -rf "$IMPORT_MODULES_TOPDIR"
31915      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31916      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31917        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31918      fi
31919    else
31920      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31921    fi
31922  fi
31923
31924  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31925    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31926  fi
31927  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31928    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31929  fi
31930  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31931    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31932  fi
31933  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31934    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31935  fi
31936  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31937    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31938  fi
31939  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31940    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31941  fi
31942  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31943    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31944  fi
31945  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31946    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31947  fi
31948
31949
31950
31951
31952
31953
31954
31955
31956
31957
31958
31959###############################################################################
31960#
31961# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31962# native code.
31963#
31964###############################################################################
31965
31966# See if we are doing a complete static build or not
31967
31968  # Check whether --enable-static-build was given.
31969if test "${enable_static_build+set}" = set; then :
31970  enableval=$enable_static_build;
31971fi
31972
31973  STATIC_BUILD=false
31974  if test "x$enable_static_build" = "xyes"; then
31975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31976$as_echo_n "checking if static build is enabled... " >&6; }
31977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31978$as_echo "yes" >&6; }
31979    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31980      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31981    fi
31982    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31983    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31984    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31985    STATIC_BUILD=true
31986  elif test "x$enable_static_build" = "xno"; then
31987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31988$as_echo_n "checking if static build is enabled... " >&6; }
31989    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31990$as_echo "no" >&6; }
31991  elif test "x$enable_static_build" != "x"; then
31992    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31993  fi
31994
31995
31996
31997
31998# First determine the toolchain type (compiler family)
31999
32000
32001# Check whether --with-toolchain-type was given.
32002if test "${with_toolchain_type+set}" = set; then :
32003  withval=$with_toolchain_type;
32004fi
32005
32006
32007  # Use indirect variable referencing
32008  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
32009  VALID_TOOLCHAINS=${!toolchain_var_name}
32010
32011  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32012    if test -n "$XCODEBUILD"; then
32013      # On Mac OS X, default toolchain to clang after Xcode 5
32014      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
32015      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
32016      if test $? -ne 0; then
32017        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
32018      fi
32019      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
32020          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
32021          $CUT -f 1 -d .`
32022      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
32023$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
32024      if test $XCODE_MAJOR_VERSION -ge 5; then
32025          DEFAULT_TOOLCHAIN="clang"
32026      else
32027          DEFAULT_TOOLCHAIN="gcc"
32028      fi
32029    else
32030      # If Xcode is not installed, but the command line tools are
32031      # then we can't run xcodebuild. On these systems we should
32032      # default to clang
32033      DEFAULT_TOOLCHAIN="clang"
32034    fi
32035  else
32036    # First toolchain type in the list is the default
32037    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
32038  fi
32039
32040  if test "x$with_toolchain_type" = xlist; then
32041    # List all toolchains
32042    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
32043$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
32044    for toolchain in $VALID_TOOLCHAINS; do
32045      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
32046      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32047      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
32048    done
32049
32050    exit 0
32051  elif test "x$with_toolchain_type" != x; then
32052    # User override; check that it is valid
32053    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
32054      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
32055$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
32056      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
32057$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
32058      as_fn_error $? "Cannot continue." "$LINENO" 5
32059    fi
32060    TOOLCHAIN_TYPE=$with_toolchain_type
32061  else
32062    # No flag given, use default
32063    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
32064  fi
32065
32066
32067  TOOLCHAIN_CC_BINARY_clang="clang"
32068  TOOLCHAIN_CC_BINARY_gcc="gcc"
32069  TOOLCHAIN_CC_BINARY_microsoft="cl"
32070  TOOLCHAIN_CC_BINARY_solstudio="cc"
32071  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
32072
32073  TOOLCHAIN_CXX_BINARY_clang="clang++"
32074  TOOLCHAIN_CXX_BINARY_gcc="g++"
32075  TOOLCHAIN_CXX_BINARY_microsoft="cl"
32076  TOOLCHAIN_CXX_BINARY_solstudio="CC"
32077  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
32078
32079  # Use indirect variable referencing
32080  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
32081  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32082  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
32083  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
32084  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
32085  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
32086  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
32087  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
32088
32089
32090  # Define filename patterns
32091  if test "x$OPENJDK_TARGET_OS" = xwindows; then
32092    LIBRARY_PREFIX=
32093    SHARED_LIBRARY_SUFFIX='.dll'
32094    STATIC_LIBRARY_SUFFIX='.lib'
32095    SHARED_LIBRARY='$1.dll'
32096    STATIC_LIBRARY='$1.lib'
32097    OBJ_SUFFIX='.obj'
32098    EXE_SUFFIX='.exe'
32099  else
32100    LIBRARY_PREFIX=lib
32101    SHARED_LIBRARY_SUFFIX='.so'
32102    STATIC_LIBRARY_SUFFIX='.a'
32103    SHARED_LIBRARY='lib$1.so'
32104    STATIC_LIBRARY='lib$1.a'
32105    OBJ_SUFFIX='.o'
32106    EXE_SUFFIX=''
32107    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32108      # For full static builds, we're overloading the SHARED_LIBRARY
32109      # variables in order to limit the amount of changes required.
32110      # It would be better to remove SHARED and just use LIBRARY and
32111      # LIBRARY_SUFFIX for libraries that can be built either
32112      # shared or static and use STATIC_* for libraries that are
32113      # always built statically.
32114      if test "x$STATIC_BUILD" = xtrue; then
32115        SHARED_LIBRARY='lib$1.a'
32116        SHARED_LIBRARY_SUFFIX='.a'
32117      else
32118        SHARED_LIBRARY='lib$1.dylib'
32119        SHARED_LIBRARY_SUFFIX='.dylib'
32120      fi
32121    fi
32122  fi
32123
32124
32125
32126
32127
32128
32129
32130
32131
32132
32133  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
32134    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
32135$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
32136  else
32137    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
32138$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
32139  fi
32140
32141
32142# User supplied flags should be used when configure detects compilers
32143
32144  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
32145    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
32146$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
32147  fi
32148
32149  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
32150    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
32151$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
32152  fi
32153
32154  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
32155    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
32156$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
32157  fi
32158
32159
32160# Check whether --with-extra-cflags was given.
32161if test "${with_extra_cflags+set}" = set; then :
32162  withval=$with_extra_cflags;
32163fi
32164
32165
32166
32167# Check whether --with-extra-cxxflags was given.
32168if test "${with_extra_cxxflags+set}" = set; then :
32169  withval=$with_extra_cxxflags;
32170fi
32171
32172
32173
32174# Check whether --with-extra-ldflags was given.
32175if test "${with_extra_ldflags+set}" = set; then :
32176  withval=$with_extra_ldflags;
32177fi
32178
32179
32180  EXTRA_CFLAGS="$with_extra_cflags"
32181  EXTRA_CXXFLAGS="$with_extra_cxxflags"
32182  EXTRA_LDFLAGS="$with_extra_ldflags"
32183
32184
32185
32186
32187
32188  # The global CFLAGS and LDLAGS variables are used by configure tests and
32189  # should include the extra parameters
32190  CFLAGS="$EXTRA_CFLAGS"
32191  CXXFLAGS="$EXTRA_CXXFLAGS"
32192  LDFLAGS="$EXTRA_LDFLAGS"
32193  CPPFLAGS=""
32194
32195# The sysroot cflags are needed for configure to be able to run the compilers
32196
32197  if test "x$SYSROOT" != "x"; then
32198    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32199      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32200        # Solaris Studio does not have a concept of sysroot. Instead we must
32201        # make sure the default include and lib dirs are appended to each
32202        # compile and link command line. Must also add -I-xbuiltin to enable
32203        # inlining of system functions and intrinsics.
32204        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32205        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32206            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32207      fi
32208    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32209      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32210      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32211    elif test "x$TOOLCHAIN_TYPE" = xclang; then
32212      SYSROOT_CFLAGS="-isysroot $SYSROOT"
32213      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32214    fi
32215    # The global CFLAGS and LDFLAGS variables need these for configure to function
32216    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32217    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32218    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32219    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32220  fi
32221
32222  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32223    # We also need -iframework<path>/System/Library/Frameworks
32224    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32225    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32226    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32227    # set this here so it doesn't have to be peppered throughout the forest
32228    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32229    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32230  fi
32231
32232
32233
32234
32235
32236# Then detect the actual binaries needed
32237
32238  # FIXME: Is this needed?
32239  ac_ext=cpp
32240ac_cpp='$CXXCPP $CPPFLAGS'
32241ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32242ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32243ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32244
32245
32246  # Store the CFLAGS etc passed to the configure script.
32247  ORG_CFLAGS="$CFLAGS"
32248  ORG_CXXFLAGS="$CXXFLAGS"
32249
32250  # autoconf magic only relies on PATH, so update it if tools dir is specified
32251  OLD_PATH="$PATH"
32252
32253  # On Windows, we need to detect the visual studio installation first.
32254  # This will change the PATH, but we need to keep that new PATH even
32255  # after toolchain detection is done, since the compiler (on x86) uses
32256  # it for DLL resolution in runtime.
32257  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32258      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32259
32260  # Store path to cygwin link.exe to help excluding it when searching for
32261  # VS linker. This must be done before changing the PATH when looking for VS.
32262  # Extract the first word of "link", so it can be a program name with args.
32263set dummy link; ac_word=$2
32264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32265$as_echo_n "checking for $ac_word... " >&6; }
32266if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32267  $as_echo_n "(cached) " >&6
32268else
32269  case $CYGWIN_LINK in
32270  [\\/]* | ?:[\\/]*)
32271  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32272  ;;
32273  *)
32274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32275for as_dir in $PATH
32276do
32277  IFS=$as_save_IFS
32278  test -z "$as_dir" && as_dir=.
32279    for ac_exec_ext in '' $ac_executable_extensions; do
32280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32281    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32283    break 2
32284  fi
32285done
32286  done
32287IFS=$as_save_IFS
32288
32289  ;;
32290esac
32291fi
32292CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32293if test -n "$CYGWIN_LINK"; then
32294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32295$as_echo "$CYGWIN_LINK" >&6; }
32296else
32297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32298$as_echo "no" >&6; }
32299fi
32300
32301
32302  if test "x$CYGWIN_LINK" != x; then
32303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32304$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32305    "$CYGWIN_LINK" --version > /dev/null
32306    if test $? -eq 0 ; then
32307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32308$as_echo "yes" >&6; }
32309    else
32310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32311$as_echo "no" >&6; }
32312      # This might be the VS linker. Don't exclude it later on.
32313      CYGWIN_LINK=""
32314    fi
32315  fi
32316
32317  # First-hand choice is to locate and run the vsvars bat file.
32318
32319
32320# Check whether --with-toolchain-version was given.
32321if test "${with_toolchain_version+set}" = set; then :
32322  withval=$with_toolchain_version;
32323fi
32324
32325
32326  if test "x$with_toolchain_version" = xlist; then
32327    # List all toolchains
32328    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32329$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32330    for version in $VALID_VS_VERSIONS; do
32331      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32332      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32333    done
32334
32335    exit 0
32336  elif test "x$DEVKIT_VS_VERSION" != x; then
32337    VS_VERSION=$DEVKIT_VS_VERSION
32338    TOOLCHAIN_VERSION=$VS_VERSION
32339    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32340    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32341    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32342    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32343    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32344    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32345
32346    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32347    # can still be exported as INCLUDE for compiler invocations without
32348    # SYSROOT_CFLAGS
32349    OLDIFS="$IFS"
32350    IFS=";"
32351    for i in $DEVKIT_VS_INCLUDE; do
32352      ipath=$i
32353
32354  unix_path="$ipath"
32355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32356    windows_path=`$CYGPATH -m "$unix_path"`
32357    ipath="$windows_path"
32358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32359    windows_path=`cmd //c echo $unix_path`
32360    ipath="$windows_path"
32361  fi
32362
32363      VS_INCLUDE="$VS_INCLUDE;$ipath"
32364    done
32365    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32366    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32367    for i in $DEVKIT_VS_LIB; do
32368      libpath=$i
32369
32370  unix_path="$libpath"
32371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32372    windows_path=`$CYGPATH -m "$unix_path"`
32373    libpath="$windows_path"
32374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32375    windows_path=`cmd //c echo $unix_path`
32376    libpath="$windows_path"
32377  fi
32378
32379      VS_LIB="$VS_LIB;$libpath"
32380    done
32381    IFS="$OLDIFS"
32382
32383    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32384$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32385
32386  elif test "x$with_toolchain_version" != x; then
32387    # User override; check that it is valid
32388    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32389      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32390$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32391      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32392$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32393      as_fn_error $? "Cannot continue." "$LINENO" 5
32394    fi
32395    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32396  else
32397    # No flag given, use default
32398    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32399  fi
32400
32401  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32402
32403  VS_VERSION="$VS_VERSION"
32404  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32405  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32406  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32407  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32408
32409  # When using --with-tools-dir, assume it points to the correct and default
32410  # version of Visual Studio or that --with-toolchain-version was also set.
32411  if test "x$with_tools_dir" != x; then
32412
32413  if test "x$VS_ENV_CMD" = x; then
32414    VS_VERSION="${VS_VERSION}"
32415    VS_BASE="$with_tools_dir/../.."
32416    METHOD="--with-tools-dir"
32417
32418    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32419      VCVARSFILE="vc/bin/vcvars32.bat"
32420    else
32421      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32422    fi
32423
32424
32425  windows_path="$VS_BASE"
32426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32427    unix_path=`$CYGPATH -u "$windows_path"`
32428    VS_BASE="$unix_path"
32429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32431    VS_BASE="$unix_path"
32432  fi
32433
32434    if test -d "$VS_BASE"; then
32435      if test -f "$VS_BASE/$VCVARSFILE"; then
32436        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32437$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32438        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32439        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32440        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32441        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32442      else
32443        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32444$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32445        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32446$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32447      fi
32448    fi
32449  fi
32450
32451
32452  if test "x$VS_ENV_CMD" = x; then
32453    VS_VERSION="${VS_VERSION}"
32454    VS_BASE="$with_tools_dir/../../.."
32455    METHOD="--with-tools-dir"
32456
32457    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32458      VCVARSFILE="vc/bin/vcvars32.bat"
32459    else
32460      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32461    fi
32462
32463
32464  windows_path="$VS_BASE"
32465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32466    unix_path=`$CYGPATH -u "$windows_path"`
32467    VS_BASE="$unix_path"
32468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32470    VS_BASE="$unix_path"
32471  fi
32472
32473    if test -d "$VS_BASE"; then
32474      if test -f "$VS_BASE/$VCVARSFILE"; then
32475        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32476$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32477        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32478        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32479        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32480        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32481      else
32482        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32483$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32484        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32485$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32486      fi
32487    fi
32488  fi
32489
32490    if test "x$VS_ENV_CMD" = x; then
32491      # Having specified an argument which is incorrect will produce an instant failure;
32492      # we should not go on looking
32493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32494$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32495      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32496$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32497      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32498$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32499      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32500    fi
32501  fi
32502
32503  VS_ENV_CMD=""
32504  VS_ENV_ARGS=""
32505
32506  if test "x$VS_COMNTOOLS" != x; then
32507
32508  if test "x$VS_ENV_CMD" = x; then
32509    VS_VERSION="${VS_VERSION}"
32510    VS_BASE="$VS_COMNTOOLS/../.."
32511    METHOD="$VS_COMNTOOLS_VAR variable"
32512
32513    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32514      VCVARSFILE="vc/bin/vcvars32.bat"
32515    else
32516      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32517    fi
32518
32519
32520  windows_path="$VS_BASE"
32521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32522    unix_path=`$CYGPATH -u "$windows_path"`
32523    VS_BASE="$unix_path"
32524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32526    VS_BASE="$unix_path"
32527  fi
32528
32529    if test -d "$VS_BASE"; then
32530      if test -f "$VS_BASE/$VCVARSFILE"; then
32531        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32532$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32533        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32534        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32535        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32536        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32537      else
32538        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32539$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32540        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32541$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32542      fi
32543    fi
32544  fi
32545
32546  fi
32547  if test "x$PROGRAMFILES" != x; then
32548
32549  if test "x$VS_ENV_CMD" = x; then
32550    VS_VERSION="${VS_VERSION}"
32551    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32552    METHOD="well-known name"
32553
32554    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32555      VCVARSFILE="vc/bin/vcvars32.bat"
32556    else
32557      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32558    fi
32559
32560
32561  windows_path="$VS_BASE"
32562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32563    unix_path=`$CYGPATH -u "$windows_path"`
32564    VS_BASE="$unix_path"
32565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32567    VS_BASE="$unix_path"
32568  fi
32569
32570    if test -d "$VS_BASE"; then
32571      if test -f "$VS_BASE/$VCVARSFILE"; then
32572        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32573$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32574        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32575        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32576        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32577        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32578      else
32579        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32580$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32581        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32582$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32583      fi
32584    fi
32585  fi
32586
32587  fi
32588  # Work around the insanely named ProgramFiles(x86) env variable
32589  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32590  if test "x$PROGRAMFILES_X86" != x; then
32591
32592  if test "x$VS_ENV_CMD" = x; then
32593    VS_VERSION="${VS_VERSION}"
32594    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32595    METHOD="well-known name"
32596
32597    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32598      VCVARSFILE="vc/bin/vcvars32.bat"
32599    else
32600      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32601    fi
32602
32603
32604  windows_path="$VS_BASE"
32605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32606    unix_path=`$CYGPATH -u "$windows_path"`
32607    VS_BASE="$unix_path"
32608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32610    VS_BASE="$unix_path"
32611  fi
32612
32613    if test -d "$VS_BASE"; then
32614      if test -f "$VS_BASE/$VCVARSFILE"; then
32615        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32616$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32617        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32618        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32619        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32620        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32621      else
32622        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32623$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32624        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32625$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32626      fi
32627    fi
32628  fi
32629
32630  fi
32631
32632  if test "x$VS_ENV_CMD" = x; then
32633    VS_VERSION="${VS_VERSION}"
32634    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32635    METHOD="well-known name"
32636
32637    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32638      VCVARSFILE="vc/bin/vcvars32.bat"
32639    else
32640      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32641    fi
32642
32643
32644  windows_path="$VS_BASE"
32645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32646    unix_path=`$CYGPATH -u "$windows_path"`
32647    VS_BASE="$unix_path"
32648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32650    VS_BASE="$unix_path"
32651  fi
32652
32653    if test -d "$VS_BASE"; then
32654      if test -f "$VS_BASE/$VCVARSFILE"; then
32655        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32656$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32657        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32658        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32659        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32660        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32661      else
32662        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32663$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32664        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32665$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32666      fi
32667    fi
32668  fi
32669
32670
32671  if test "x$VS_ENV_CMD" = x; then
32672    VS_VERSION="${VS_VERSION}"
32673    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32674    METHOD="well-known name"
32675
32676    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32677      VCVARSFILE="vc/bin/vcvars32.bat"
32678    else
32679      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32680    fi
32681
32682
32683  windows_path="$VS_BASE"
32684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32685    unix_path=`$CYGPATH -u "$windows_path"`
32686    VS_BASE="$unix_path"
32687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32689    VS_BASE="$unix_path"
32690  fi
32691
32692    if test -d "$VS_BASE"; then
32693      if test -f "$VS_BASE/$VCVARSFILE"; then
32694        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32695$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32696        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32697        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32698        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32699        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32700      else
32701        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32702$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32703        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32704$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32705      fi
32706    fi
32707  fi
32708
32709
32710  if test "x$SDK_INSTALL_DIR" != x; then
32711    if test "x$ProgramW6432" != x; then
32712
32713  if test "x$VS_ENV_CMD" = x; then
32714    VS_VERSION="${VS_VERSION}"
32715    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32716    METHOD="well-known name"
32717
32718  windows_path="$WIN_SDK_BASE"
32719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32720    unix_path=`$CYGPATH -u "$windows_path"`
32721    WIN_SDK_BASE="$unix_path"
32722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32724    WIN_SDK_BASE="$unix_path"
32725  fi
32726
32727    if test -d "$WIN_SDK_BASE"; then
32728      # There have been cases of partial or broken SDK installations. A missing
32729      # lib dir is not going to work.
32730      if test ! -d "$WIN_SDK_BASE/lib"; then
32731        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32732$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32733        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32734$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32735      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32736        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32737$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32738        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32739        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32740          VS_ENV_ARGS="/x86"
32741        else
32742          VS_ENV_ARGS="/x64"
32743        fi
32744        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32745        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32746        # TODO: improve detection for other versions of SDK
32747        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32748      else
32749        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32750$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32751        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32752$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32753      fi
32754    fi
32755  fi
32756
32757    fi
32758    if test "x$PROGRAMW6432" != x; then
32759
32760  if test "x$VS_ENV_CMD" = x; then
32761    VS_VERSION="${VS_VERSION}"
32762    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32763    METHOD="well-known name"
32764
32765  windows_path="$WIN_SDK_BASE"
32766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32767    unix_path=`$CYGPATH -u "$windows_path"`
32768    WIN_SDK_BASE="$unix_path"
32769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32771    WIN_SDK_BASE="$unix_path"
32772  fi
32773
32774    if test -d "$WIN_SDK_BASE"; then
32775      # There have been cases of partial or broken SDK installations. A missing
32776      # lib dir is not going to work.
32777      if test ! -d "$WIN_SDK_BASE/lib"; then
32778        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32779$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32780        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32781$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32782      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32783        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32784$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32785        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32786        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32787          VS_ENV_ARGS="/x86"
32788        else
32789          VS_ENV_ARGS="/x64"
32790        fi
32791        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32792        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32793        # TODO: improve detection for other versions of SDK
32794        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32795      else
32796        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32797$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32798        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32799$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32800      fi
32801    fi
32802  fi
32803
32804    fi
32805    if test "x$PROGRAMFILES" != x; then
32806
32807  if test "x$VS_ENV_CMD" = x; then
32808    VS_VERSION="${VS_VERSION}"
32809    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32810    METHOD="well-known name"
32811
32812  windows_path="$WIN_SDK_BASE"
32813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32814    unix_path=`$CYGPATH -u "$windows_path"`
32815    WIN_SDK_BASE="$unix_path"
32816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32818    WIN_SDK_BASE="$unix_path"
32819  fi
32820
32821    if test -d "$WIN_SDK_BASE"; then
32822      # There have been cases of partial or broken SDK installations. A missing
32823      # lib dir is not going to work.
32824      if test ! -d "$WIN_SDK_BASE/lib"; then
32825        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32826$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32827        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32828$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32829      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; 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        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32833        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32834          VS_ENV_ARGS="/x86"
32835        else
32836          VS_ENV_ARGS="/x64"
32837        fi
32838        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32839        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32840        # TODO: improve detection for other versions of SDK
32841        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32842      else
32843        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32844$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32845        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32846$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32847      fi
32848    fi
32849  fi
32850
32851    fi
32852
32853  if test "x$VS_ENV_CMD" = x; then
32854    VS_VERSION="${VS_VERSION}"
32855    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32856    METHOD="well-known name"
32857
32858  windows_path="$WIN_SDK_BASE"
32859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32860    unix_path=`$CYGPATH -u "$windows_path"`
32861    WIN_SDK_BASE="$unix_path"
32862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32864    WIN_SDK_BASE="$unix_path"
32865  fi
32866
32867    if test -d "$WIN_SDK_BASE"; then
32868      # There have been cases of partial or broken SDK installations. A missing
32869      # lib dir is not going to work.
32870      if test ! -d "$WIN_SDK_BASE/lib"; then
32871        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32872$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32873        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32874$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32875      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32876        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32877$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32878        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32879        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32880          VS_ENV_ARGS="/x86"
32881        else
32882          VS_ENV_ARGS="/x64"
32883        fi
32884        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32885        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32886        # TODO: improve detection for other versions of SDK
32887        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32888      else
32889        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32890$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32891        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32892$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32893      fi
32894    fi
32895  fi
32896
32897
32898  if test "x$VS_ENV_CMD" = x; then
32899    VS_VERSION="${VS_VERSION}"
32900    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32901    METHOD="well-known name"
32902
32903  windows_path="$WIN_SDK_BASE"
32904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32905    unix_path=`$CYGPATH -u "$windows_path"`
32906    WIN_SDK_BASE="$unix_path"
32907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32909    WIN_SDK_BASE="$unix_path"
32910  fi
32911
32912    if test -d "$WIN_SDK_BASE"; then
32913      # There have been cases of partial or broken SDK installations. A missing
32914      # lib dir is not going to work.
32915      if test ! -d "$WIN_SDK_BASE/lib"; then
32916        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32917$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32918        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32919$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32920      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32921        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32922$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32923        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32924        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32925          VS_ENV_ARGS="/x86"
32926        else
32927          VS_ENV_ARGS="/x64"
32928        fi
32929        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32930        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32931        # TODO: improve detection for other versions of SDK
32932        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32933      else
32934        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32935$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32936        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32937$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32938      fi
32939    fi
32940  fi
32941
32942  fi
32943
32944    if test "x$VS_ENV_CMD" != x; then
32945      TOOLCHAIN_VERSION=$VS_VERSION
32946      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32947      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32948      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32949      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32950      # The rest of the variables are already evaled while probing
32951      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32952$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32953      break
32954    fi
32955  done
32956
32957
32958  # If we have a devkit, skip all of the below.
32959  if test "x$DEVKIT_VS_VERSION" = x; then
32960    if test "x$VS_ENV_CMD" != x; then
32961      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32962
32963  # Only process if variable expands to non-empty
32964
32965  if test "x$VS_ENV_CMD" != x; then
32966    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32967
32968  # First separate the path from the arguments. This will split at the first
32969  # space.
32970  complete="$VS_ENV_CMD"
32971  path="${complete%% *}"
32972  tmp="$complete EOL"
32973  arguments="${tmp#* }"
32974
32975  # Input might be given as Windows format, start by converting to
32976  # unix format.
32977  new_path=`$CYGPATH -u "$path"`
32978
32979  # Now try to locate executable using which
32980  new_path=`$WHICH "$new_path" 2> /dev/null`
32981  # bat and cmd files are not always considered executable in cygwin causing which
32982  # to not find them
32983  if test "x$new_path" = x \
32984      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32985      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32986    new_path=`$CYGPATH -u "$path"`
32987  fi
32988  if test "x$new_path" = x; then
32989    # Oops. Which didn't find the executable.
32990    # The splitting of arguments from the executable at a space might have been incorrect,
32991    # since paths with space are more likely in Windows. Give it another try with the whole
32992    # argument.
32993    path="$complete"
32994    arguments="EOL"
32995    new_path=`$CYGPATH -u "$path"`
32996    new_path=`$WHICH "$new_path" 2> /dev/null`
32997    # bat and cmd files are not always considered executable in cygwin causing which
32998    # to not find them
32999    if test "x$new_path" = x \
33000        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33001        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33002      new_path=`$CYGPATH -u "$path"`
33003    fi
33004    if test "x$new_path" = x; then
33005      # It's still not found. Now this is an unrecoverable error.
33006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33007$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33008      has_space=`$ECHO "$complete" | $GREP " "`
33009      if test "x$has_space" != x; then
33010        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33011$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33012      fi
33013      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33014    fi
33015  fi
33016
33017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33020  # "foo.exe" is OK but "foo" is an error.
33021  #
33022  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33023  # It is also a way to make sure we got the proper file name for the real test later on.
33024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33025  if test "x$test_shortpath" = x; then
33026    # Short path failed, file does not exist as specified.
33027    # Try adding .exe or .cmd
33028    if test -f "${new_path}.exe"; then
33029      input_to_shortpath="${new_path}.exe"
33030    elif test -f "${new_path}.cmd"; then
33031      input_to_shortpath="${new_path}.cmd"
33032    else
33033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
33034$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
33035      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33036$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33037      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33038    fi
33039  else
33040    input_to_shortpath="$new_path"
33041  fi
33042
33043  # Call helper function which possibly converts this using DOS-style short mode.
33044  # If so, the updated path is stored in $new_path.
33045  new_path="$input_to_shortpath"
33046
33047  input_path="$input_to_shortpath"
33048  # Check if we need to convert this using DOS-style short mode. If the path
33049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33050  # take no chances and rewrite it.
33051  # Note: m4 eats our [], so we need to use [ and ] instead.
33052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33053  if test "x$has_forbidden_chars" != x; then
33054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33058      # Going to short mode and back again did indeed matter. Since short mode is
33059      # case insensitive, let's make it lowercase to improve readability.
33060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33061      # Now convert it back to Unix-style (cygpath)
33062      input_path=`$CYGPATH -u "$shortmode_path"`
33063      new_path="$input_path"
33064    fi
33065  fi
33066
33067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33068  if test "x$test_cygdrive_prefix" = x; then
33069    # As a simple fix, exclude /usr/bin since it's not a real path.
33070    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33072      # a path prefixed by /cygdrive for fixpath to work.
33073      new_path="$CYGWIN_ROOT_PATH$input_path"
33074    fi
33075  fi
33076
33077  # remove trailing .exe if any
33078  new_path="${new_path/%.exe/}"
33079
33080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33081
33082  # First separate the path from the arguments. This will split at the first
33083  # space.
33084  complete="$VS_ENV_CMD"
33085  path="${complete%% *}"
33086  tmp="$complete EOL"
33087  arguments="${tmp#* }"
33088
33089  # Input might be given as Windows format, start by converting to
33090  # unix format.
33091  new_path="$path"
33092
33093  windows_path="$new_path"
33094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33095    unix_path=`$CYGPATH -u "$windows_path"`
33096    new_path="$unix_path"
33097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33099    new_path="$unix_path"
33100  fi
33101
33102
33103  # Now try to locate executable using which
33104  new_path=`$WHICH "$new_path" 2> /dev/null`
33105
33106  if test "x$new_path" = x; then
33107    # Oops. Which didn't find the executable.
33108    # The splitting of arguments from the executable at a space might have been incorrect,
33109    # since paths with space are more likely in Windows. Give it another try with the whole
33110    # argument.
33111    path="$complete"
33112    arguments="EOL"
33113    new_path="$path"
33114
33115  windows_path="$new_path"
33116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33117    unix_path=`$CYGPATH -u "$windows_path"`
33118    new_path="$unix_path"
33119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33121    new_path="$unix_path"
33122  fi
33123
33124
33125    new_path=`$WHICH "$new_path" 2> /dev/null`
33126    # bat and cmd files are not always considered executable in MSYS causing which
33127    # to not find them
33128    if test "x$new_path" = x \
33129        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33130        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33131      new_path="$path"
33132
33133  windows_path="$new_path"
33134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33135    unix_path=`$CYGPATH -u "$windows_path"`
33136    new_path="$unix_path"
33137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33139    new_path="$unix_path"
33140  fi
33141
33142    fi
33143
33144    if test "x$new_path" = x; then
33145      # It's still not found. Now this is an unrecoverable error.
33146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33147$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33148      has_space=`$ECHO "$complete" | $GREP " "`
33149      if test "x$has_space" != x; then
33150        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33151$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33152      fi
33153      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33154    fi
33155  fi
33156
33157  # Now new_path has a complete unix path to the binary
33158  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33159    # Keep paths in /bin as-is, but remove trailing .exe if any
33160    new_path="${new_path/%.exe/}"
33161    # Do not save /bin paths to all_fixpath_prefixes!
33162  else
33163    # Not in mixed or Windows style, start by that.
33164    new_path=`cmd //c echo $new_path`
33165
33166  input_path="$new_path"
33167  # Check if we need to convert this using DOS-style short mode. If the path
33168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33169  # take no chances and rewrite it.
33170  # Note: m4 eats our [], so we need to use [ and ] instead.
33171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33172  if test "x$has_forbidden_chars" != x; then
33173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33175  fi
33176
33177    # Output is in $new_path
33178
33179  windows_path="$new_path"
33180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33181    unix_path=`$CYGPATH -u "$windows_path"`
33182    new_path="$unix_path"
33183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33185    new_path="$unix_path"
33186  fi
33187
33188    # remove trailing .exe if any
33189    new_path="${new_path/%.exe/}"
33190
33191    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33192    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33193  fi
33194
33195    else
33196      # We're on a unix platform. Hooray! :)
33197      # First separate the path from the arguments. This will split at the first
33198      # space.
33199      complete="$VS_ENV_CMD"
33200      path="${complete%% *}"
33201      tmp="$complete EOL"
33202      arguments="${tmp#* }"
33203
33204      # Cannot rely on the command "which" here since it doesn't always work.
33205      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33206      if test -z "$is_absolute_path"; then
33207        # Path to executable is not absolute. Find it.
33208        IFS_save="$IFS"
33209        IFS=:
33210        for p in $PATH; do
33211          if test -f "$p/$path" && test -x "$p/$path"; then
33212            new_path="$p/$path"
33213            break
33214          fi
33215        done
33216        IFS="$IFS_save"
33217      else
33218        # This is an absolute path, we can use it without further modifications.
33219        new_path="$path"
33220      fi
33221
33222      if test "x$new_path" = x; then
33223        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33224$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33225        has_space=`$ECHO "$complete" | $GREP " "`
33226        if test "x$has_space" != x; then
33227          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33228$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33229        fi
33230        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33231      fi
33232    fi
33233
33234    # Now join together the path and the arguments once again
33235    if test "x$arguments" != xEOL; then
33236      new_complete="$new_path ${arguments% *}"
33237    else
33238      new_complete="$new_path"
33239    fi
33240
33241    if test "x$complete" != "x$new_complete"; then
33242      VS_ENV_CMD="$new_complete"
33243      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33244$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33245    fi
33246  fi
33247
33248
33249      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33250      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33251$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33252
33253      # We need to create a couple of temporary files.
33254      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33255      $MKDIR -p $VS_ENV_TMP_DIR
33256
33257      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33258      # Instead create a shell script which will set the relevant variables when run.
33259      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33260
33261  unix_path="$WINPATH_VS_ENV_CMD"
33262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33263    windows_path=`$CYGPATH -m "$unix_path"`
33264    WINPATH_VS_ENV_CMD="$windows_path"
33265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33266    windows_path=`cmd //c echo $unix_path`
33267    WINPATH_VS_ENV_CMD="$windows_path"
33268  fi
33269
33270      WINPATH_BASH="$BASH"
33271
33272  unix_path="$WINPATH_BASH"
33273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33274    windows_path=`$CYGPATH -m "$unix_path"`
33275    WINPATH_BASH="$windows_path"
33276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33277    windows_path=`cmd //c echo $unix_path`
33278    WINPATH_BASH="$windows_path"
33279  fi
33280
33281
33282      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33283      # script (executable by bash) that will setup the important variables.
33284      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33285      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33286      # This will end up something like:
33287      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33288      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33289      # These will end up something like:
33290      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33291      # The trailing space for everyone except PATH is no typo, but is needed due
33292      # to trailing \ in the Windows paths. These will be stripped later.
33293      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33294          >> $EXTRACT_VC_ENV_BAT_FILE
33295      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33296          >> $EXTRACT_VC_ENV_BAT_FILE
33297      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33298          >> $EXTRACT_VC_ENV_BAT_FILE
33299      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33300          >> $EXTRACT_VC_ENV_BAT_FILE
33301      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33302          >> $EXTRACT_VC_ENV_BAT_FILE
33303      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33304          >> $EXTRACT_VC_ENV_BAT_FILE
33305
33306      # Now execute the newly created bat file.
33307      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33308      # Change directory so we don't need to mess with Windows paths in redirects.
33309      cd $VS_ENV_TMP_DIR
33310      cmd /c extract-vs-env.bat | $CAT
33311      cd $CURDIR
33312
33313      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33314        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33315$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33316        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33317$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33318        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33319$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33320        as_fn_error $? "Cannot continue" "$LINENO" 5
33321      fi
33322
33323      # Now set all paths and other env variables. This will allow the rest of
33324      # the configure script to find and run the compiler in the proper way.
33325      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33326$as_echo "$as_me: Setting extracted environment variables" >&6;}
33327      . $VS_ENV_TMP_DIR/set-vs-env.sh
33328      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33329      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33330    else
33331      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33332      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33333$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33334    fi
33335  fi
33336
33337  # At this point, we should have correct variables in the environment, or we can't continue.
33338  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33339$as_echo_n "checking for Visual Studio variables... " >&6; }
33340
33341  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33342      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33343    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33344      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33345$as_echo "present but broken" >&6; }
33346      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33347    else
33348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33349$as_echo "ok" >&6; }
33350      # Remove any trailing "\" ";" and " " from the variables.
33351      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33352      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33353      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33354      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33355      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33356      # Remove any paths containing # (typically F#) as that messes up make. This
33357      # is needed if visual studio was installed with F# support.
33358      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33359
33360
33361
33362
33363
33364      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33365      OLDIFS="$IFS"
33366      IFS=";"
33367      for i in $VS_INCLUDE; do
33368        ipath=$i
33369        # Only process non-empty elements
33370        if test "x$ipath" != x; then
33371          IFS="$OLDIFS"
33372          # Check that directory exists before calling fixup_path
33373          testpath=$ipath
33374
33375  windows_path="$testpath"
33376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33377    unix_path=`$CYGPATH -u "$windows_path"`
33378    testpath="$unix_path"
33379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33381    testpath="$unix_path"
33382  fi
33383
33384          if test -d "$testpath"; then
33385
33386  # Only process if variable expands to non-empty
33387
33388  if test "x$ipath" != x; then
33389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33390
33391  # Input might be given as Windows format, start by converting to
33392  # unix format.
33393  path="$ipath"
33394  new_path=`$CYGPATH -u "$path"`
33395
33396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33399  # "foo.exe" is OK but "foo" is an error.
33400  #
33401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33402  # It is also a way to make sure we got the proper file name for the real test later on.
33403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33404  if test "x$test_shortpath" = x; then
33405    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33406$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33407    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33408  fi
33409
33410  # Call helper function which possibly converts this using DOS-style short mode.
33411  # If so, the updated path is stored in $new_path.
33412
33413  input_path="$new_path"
33414  # Check if we need to convert this using DOS-style short mode. If the path
33415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33416  # take no chances and rewrite it.
33417  # Note: m4 eats our [], so we need to use [ and ] instead.
33418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33419  if test "x$has_forbidden_chars" != x; then
33420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33424      # Going to short mode and back again did indeed matter. Since short mode is
33425      # case insensitive, let's make it lowercase to improve readability.
33426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33427      # Now convert it back to Unix-style (cygpath)
33428      input_path=`$CYGPATH -u "$shortmode_path"`
33429      new_path="$input_path"
33430    fi
33431  fi
33432
33433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33434  if test "x$test_cygdrive_prefix" = x; then
33435    # As a simple fix, exclude /usr/bin since it's not a real path.
33436    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33438      # a path prefixed by /cygdrive for fixpath to work.
33439      new_path="$CYGWIN_ROOT_PATH$input_path"
33440    fi
33441  fi
33442
33443
33444  if test "x$path" != "x$new_path"; then
33445    ipath="$new_path"
33446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33447$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33448  fi
33449
33450    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33451
33452  path="$ipath"
33453  has_colon=`$ECHO $path | $GREP ^.:`
33454  new_path="$path"
33455  if test "x$has_colon" = x; then
33456    # Not in mixed or Windows style, start by that.
33457    new_path=`cmd //c echo $path`
33458  fi
33459
33460
33461  input_path="$new_path"
33462  # Check if we need to convert this using DOS-style short mode. If the path
33463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33464  # take no chances and rewrite it.
33465  # Note: m4 eats our [], so we need to use [ and ] instead.
33466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33467  if test "x$has_forbidden_chars" != x; then
33468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33470  fi
33471
33472
33473  windows_path="$new_path"
33474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33475    unix_path=`$CYGPATH -u "$windows_path"`
33476    new_path="$unix_path"
33477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33479    new_path="$unix_path"
33480  fi
33481
33482  if test "x$path" != "x$new_path"; then
33483    ipath="$new_path"
33484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33485$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33486  fi
33487
33488  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33489  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33490
33491    else
33492      # We're on a unix platform. Hooray! :)
33493      path="$ipath"
33494      has_space=`$ECHO "$path" | $GREP " "`
33495      if test "x$has_space" != x; then
33496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33497$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33498        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33499      fi
33500
33501      # Use eval to expand a potential ~
33502      eval path="$path"
33503      if test ! -f "$path" && test ! -d "$path"; then
33504        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33505      fi
33506
33507      if test -d "$path"; then
33508        ipath="`cd "$path"; $THEPWDCMD -L`"
33509      else
33510        dir="`$DIRNAME "$path"`"
33511        base="`$BASENAME "$path"`"
33512        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33513      fi
33514    fi
33515  fi
33516
33517            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33518          fi
33519          IFS=";"
33520        fi
33521      done
33522      # Convert VS_LIB into SYSROOT_LDFLAGS
33523      for i in $VS_LIB; do
33524        libpath=$i
33525        # Only process non-empty elements
33526        if test "x$libpath" != x; then
33527          IFS="$OLDIFS"
33528          # Check that directory exists before calling fixup_path
33529          testpath=$libpath
33530
33531  windows_path="$testpath"
33532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33533    unix_path=`$CYGPATH -u "$windows_path"`
33534    testpath="$unix_path"
33535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33537    testpath="$unix_path"
33538  fi
33539
33540          if test -d "$testpath"; then
33541
33542  # Only process if variable expands to non-empty
33543
33544  if test "x$libpath" != x; then
33545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33546
33547  # Input might be given as Windows format, start by converting to
33548  # unix format.
33549  path="$libpath"
33550  new_path=`$CYGPATH -u "$path"`
33551
33552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33555  # "foo.exe" is OK but "foo" is an error.
33556  #
33557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33558  # It is also a way to make sure we got the proper file name for the real test later on.
33559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33560  if test "x$test_shortpath" = x; then
33561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33562$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33563    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33564  fi
33565
33566  # Call helper function which possibly converts this using DOS-style short mode.
33567  # If so, the updated path is stored in $new_path.
33568
33569  input_path="$new_path"
33570  # Check if we need to convert this using DOS-style short mode. If the path
33571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33572  # take no chances and rewrite it.
33573  # Note: m4 eats our [], so we need to use [ and ] instead.
33574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33575  if test "x$has_forbidden_chars" != x; then
33576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33580      # Going to short mode and back again did indeed matter. Since short mode is
33581      # case insensitive, let's make it lowercase to improve readability.
33582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33583      # Now convert it back to Unix-style (cygpath)
33584      input_path=`$CYGPATH -u "$shortmode_path"`
33585      new_path="$input_path"
33586    fi
33587  fi
33588
33589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33590  if test "x$test_cygdrive_prefix" = x; then
33591    # As a simple fix, exclude /usr/bin since it's not a real path.
33592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33594      # a path prefixed by /cygdrive for fixpath to work.
33595      new_path="$CYGWIN_ROOT_PATH$input_path"
33596    fi
33597  fi
33598
33599
33600  if test "x$path" != "x$new_path"; then
33601    libpath="$new_path"
33602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33603$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33604  fi
33605
33606    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33607
33608  path="$libpath"
33609  has_colon=`$ECHO $path | $GREP ^.:`
33610  new_path="$path"
33611  if test "x$has_colon" = x; then
33612    # Not in mixed or Windows style, start by that.
33613    new_path=`cmd //c echo $path`
33614  fi
33615
33616
33617  input_path="$new_path"
33618  # Check if we need to convert this using DOS-style short mode. If the path
33619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33620  # take no chances and rewrite it.
33621  # Note: m4 eats our [], so we need to use [ and ] instead.
33622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33623  if test "x$has_forbidden_chars" != x; then
33624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33626  fi
33627
33628
33629  windows_path="$new_path"
33630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33631    unix_path=`$CYGPATH -u "$windows_path"`
33632    new_path="$unix_path"
33633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33635    new_path="$unix_path"
33636  fi
33637
33638  if test "x$path" != "x$new_path"; then
33639    libpath="$new_path"
33640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33641$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33642  fi
33643
33644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33646
33647    else
33648      # We're on a unix platform. Hooray! :)
33649      path="$libpath"
33650      has_space=`$ECHO "$path" | $GREP " "`
33651      if test "x$has_space" != x; then
33652        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33653$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33654        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33655      fi
33656
33657      # Use eval to expand a potential ~
33658      eval path="$path"
33659      if test ! -f "$path" && test ! -d "$path"; then
33660        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33661      fi
33662
33663      if test -d "$path"; then
33664        libpath="`cd "$path"; $THEPWDCMD -L`"
33665      else
33666        dir="`$DIRNAME "$path"`"
33667        base="`$BASENAME "$path"`"
33668        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33669      fi
33670    fi
33671  fi
33672
33673            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33674          fi
33675          IFS=";"
33676        fi
33677      done
33678      IFS="$OLDIFS"
33679    fi
33680  else
33681    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33682$as_echo "not found" >&6; }
33683
33684    if test "x$VS_ENV_CMD" = x; then
33685      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33686$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33687      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33688$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33689    else
33690      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33691$as_echo "$as_me: Running the extraction script failed." >&6;}
33692    fi
33693    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33694$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33695    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33696$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33697    as_fn_error $? "Cannot continue" "$LINENO" 5
33698  fi
33699
33700    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33701    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33702    PATH="$VS_PATH"
33703    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33704    export INCLUDE="$VS_INCLUDE"
33705    export LIB="$VS_LIB"
33706  else
33707    if test "x$XCODE_VERSION_OUTPUT" != x; then
33708      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33709      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33710      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33711    else
33712      # Currently we do not define this for other toolchains. This might change as the need arise.
33713      TOOLCHAIN_VERSION=
33714    fi
33715  fi
33716
33717
33718  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33719  # override all other locations.
33720  if test "x$TOOLCHAIN_PATH" != x; then
33721    PATH=$TOOLCHAIN_PATH:$PATH
33722  fi
33723
33724
33725  #
33726  # Setup the compilers (CC and CXX)
33727  #
33728
33729  COMPILER_NAME=C
33730  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33731
33732  if test "x$CC" != x; then
33733    # User has supplied compiler name already, always let that override.
33734    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33735$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33736    if test "x`basename $CC`" = "x$CC"; then
33737      # A command without a complete path is provided, search $PATH.
33738
33739      for ac_prog in $CC
33740do
33741  # Extract the first word of "$ac_prog", so it can be a program name with args.
33742set dummy $ac_prog; ac_word=$2
33743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33744$as_echo_n "checking for $ac_word... " >&6; }
33745if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33746  $as_echo_n "(cached) " >&6
33747else
33748  case $POTENTIAL_CC in
33749  [\\/]* | ?:[\\/]*)
33750  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33751  ;;
33752  *)
33753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33754for as_dir in $PATH
33755do
33756  IFS=$as_save_IFS
33757  test -z "$as_dir" && as_dir=.
33758    for ac_exec_ext in '' $ac_executable_extensions; do
33759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33760    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33762    break 2
33763  fi
33764done
33765  done
33766IFS=$as_save_IFS
33767
33768  ;;
33769esac
33770fi
33771POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33772if test -n "$POTENTIAL_CC"; then
33773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33774$as_echo "$POTENTIAL_CC" >&6; }
33775else
33776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33777$as_echo "no" >&6; }
33778fi
33779
33780
33781  test -n "$POTENTIAL_CC" && break
33782done
33783
33784      if test "x$POTENTIAL_CC" != x; then
33785        CC=$POTENTIAL_CC
33786      else
33787        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33788      fi
33789    else
33790      # Otherwise it might already be a complete path
33791      if test ! -x "$CC"; then
33792        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33793      fi
33794    fi
33795  else
33796    # No user supplied value. Locate compiler ourselves.
33797
33798    # If we are cross compiling, assume cross compilation tools follows the
33799    # cross compilation standard where they are prefixed with the autoconf
33800    # standard name for the target. For example the binary
33801    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33802    # If we are not cross compiling, then the default compiler name will be
33803    # used.
33804
33805    CC=
33806    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33807    # before checking the rest of the PATH.
33808    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33809    # step, this should not be necessary.
33810    if test -n "$TOOLCHAIN_PATH"; then
33811      PATH_save="$PATH"
33812      PATH="$TOOLCHAIN_PATH"
33813      if test -n "$ac_tool_prefix"; then
33814  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33815set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33817$as_echo_n "checking for $ac_word... " >&6; }
33818if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33819  $as_echo_n "(cached) " >&6
33820else
33821  case $TOOLCHAIN_PATH_CC in
33822  [\\/]* | ?:[\\/]*)
33823  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33824  ;;
33825  *)
33826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33827for as_dir in $PATH
33828do
33829  IFS=$as_save_IFS
33830  test -z "$as_dir" && as_dir=.
33831    for ac_exec_ext in '' $ac_executable_extensions; do
33832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33833    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33835    break 2
33836  fi
33837done
33838  done
33839IFS=$as_save_IFS
33840
33841  ;;
33842esac
33843fi
33844TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33845if test -n "$TOOLCHAIN_PATH_CC"; then
33846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33847$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33848else
33849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33850$as_echo "no" >&6; }
33851fi
33852
33853
33854fi
33855if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33856  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33857  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33858set dummy $SEARCH_LIST; ac_word=$2
33859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33860$as_echo_n "checking for $ac_word... " >&6; }
33861if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33862  $as_echo_n "(cached) " >&6
33863else
33864  case $ac_pt_TOOLCHAIN_PATH_CC in
33865  [\\/]* | ?:[\\/]*)
33866  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33867  ;;
33868  *)
33869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33870for as_dir in $PATH
33871do
33872  IFS=$as_save_IFS
33873  test -z "$as_dir" && as_dir=.
33874    for ac_exec_ext in '' $ac_executable_extensions; do
33875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33876    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33878    break 2
33879  fi
33880done
33881  done
33882IFS=$as_save_IFS
33883
33884  ;;
33885esac
33886fi
33887ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33888if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33890$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33891else
33892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33893$as_echo "no" >&6; }
33894fi
33895
33896  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33897    TOOLCHAIN_PATH_CC=""
33898  else
33899    case $cross_compiling:$ac_tool_warned in
33900yes:)
33901{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33902$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33903ac_tool_warned=yes ;;
33904esac
33905    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33906  fi
33907else
33908  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33909fi
33910
33911      CC=$TOOLCHAIN_PATH_CC
33912      PATH="$PATH_save"
33913    fi
33914
33915    # AC_PATH_TOOL can't be run multiple times with the same variable,
33916    # so create a new name for this run.
33917    if test "x$CC" = x; then
33918      if test -n "$ac_tool_prefix"; then
33919  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33920set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33922$as_echo_n "checking for $ac_word... " >&6; }
33923if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33924  $as_echo_n "(cached) " >&6
33925else
33926  case $POTENTIAL_CC in
33927  [\\/]* | ?:[\\/]*)
33928  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33929  ;;
33930  *)
33931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33932for as_dir in $PATH
33933do
33934  IFS=$as_save_IFS
33935  test -z "$as_dir" && as_dir=.
33936    for ac_exec_ext in '' $ac_executable_extensions; do
33937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33938    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33940    break 2
33941  fi
33942done
33943  done
33944IFS=$as_save_IFS
33945
33946  ;;
33947esac
33948fi
33949POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33950if test -n "$POTENTIAL_CC"; then
33951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33952$as_echo "$POTENTIAL_CC" >&6; }
33953else
33954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33955$as_echo "no" >&6; }
33956fi
33957
33958
33959fi
33960if test -z "$ac_cv_path_POTENTIAL_CC"; then
33961  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33962  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33963set dummy $SEARCH_LIST; ac_word=$2
33964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33965$as_echo_n "checking for $ac_word... " >&6; }
33966if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33967  $as_echo_n "(cached) " >&6
33968else
33969  case $ac_pt_POTENTIAL_CC in
33970  [\\/]* | ?:[\\/]*)
33971  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33972  ;;
33973  *)
33974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33975for as_dir in $PATH
33976do
33977  IFS=$as_save_IFS
33978  test -z "$as_dir" && as_dir=.
33979    for ac_exec_ext in '' $ac_executable_extensions; do
33980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33981    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33983    break 2
33984  fi
33985done
33986  done
33987IFS=$as_save_IFS
33988
33989  ;;
33990esac
33991fi
33992ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33993if test -n "$ac_pt_POTENTIAL_CC"; then
33994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33995$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33996else
33997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33998$as_echo "no" >&6; }
33999fi
34000
34001  if test "x$ac_pt_POTENTIAL_CC" = x; then
34002    POTENTIAL_CC=""
34003  else
34004    case $cross_compiling:$ac_tool_warned in
34005yes:)
34006{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34007$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34008ac_tool_warned=yes ;;
34009esac
34010    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
34011  fi
34012else
34013  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
34014fi
34015
34016      CC=$POTENTIAL_CC
34017    fi
34018
34019    if test "x$CC" = x; then
34020
34021  # Print a helpful message on how to acquire the necessary build dependency.
34022  # devkit is the help tag: freetype, cups, alsa etc
34023  MISSING_DEPENDENCY=devkit
34024
34025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34026    cygwin_help $MISSING_DEPENDENCY
34027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34028    msys_help $MISSING_DEPENDENCY
34029  else
34030    PKGHANDLER_COMMAND=
34031
34032    case $PKGHANDLER in
34033      apt-get)
34034        apt_help     $MISSING_DEPENDENCY ;;
34035      yum)
34036        yum_help     $MISSING_DEPENDENCY ;;
34037      brew)
34038        brew_help    $MISSING_DEPENDENCY ;;
34039      port)
34040        port_help    $MISSING_DEPENDENCY ;;
34041      pkgutil)
34042        pkgutil_help $MISSING_DEPENDENCY ;;
34043      pkgadd)
34044        pkgadd_help  $MISSING_DEPENDENCY ;;
34045    esac
34046
34047    if test "x$PKGHANDLER_COMMAND" != x; then
34048      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34049    fi
34050  fi
34051
34052      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34053    fi
34054  fi
34055
34056  # Now we have a compiler binary in CC. Make sure it's okay.
34057
34058  # Only process if variable expands to non-empty
34059
34060  if test "x$CC" != x; then
34061    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34062
34063  # First separate the path from the arguments. This will split at the first
34064  # space.
34065  complete="$CC"
34066  path="${complete%% *}"
34067  tmp="$complete EOL"
34068  arguments="${tmp#* }"
34069
34070  # Input might be given as Windows format, start by converting to
34071  # unix format.
34072  new_path=`$CYGPATH -u "$path"`
34073
34074  # Now try to locate executable using which
34075  new_path=`$WHICH "$new_path" 2> /dev/null`
34076  # bat and cmd files are not always considered executable in cygwin causing which
34077  # to not find them
34078  if test "x$new_path" = x \
34079      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34080      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34081    new_path=`$CYGPATH -u "$path"`
34082  fi
34083  if test "x$new_path" = x; then
34084    # Oops. Which didn't find the executable.
34085    # The splitting of arguments from the executable at a space might have been incorrect,
34086    # since paths with space are more likely in Windows. Give it another try with the whole
34087    # argument.
34088    path="$complete"
34089    arguments="EOL"
34090    new_path=`$CYGPATH -u "$path"`
34091    new_path=`$WHICH "$new_path" 2> /dev/null`
34092    # bat and cmd files are not always considered executable in cygwin causing which
34093    # to not find them
34094    if test "x$new_path" = x \
34095        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34096        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34097      new_path=`$CYGPATH -u "$path"`
34098    fi
34099    if test "x$new_path" = x; then
34100      # It's still not found. Now this is an unrecoverable error.
34101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34102$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34103      has_space=`$ECHO "$complete" | $GREP " "`
34104      if test "x$has_space" != x; then
34105        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34106$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34107      fi
34108      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34109    fi
34110  fi
34111
34112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34115  # "foo.exe" is OK but "foo" is an error.
34116  #
34117  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34118  # It is also a way to make sure we got the proper file name for the real test later on.
34119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34120  if test "x$test_shortpath" = x; then
34121    # Short path failed, file does not exist as specified.
34122    # Try adding .exe or .cmd
34123    if test -f "${new_path}.exe"; then
34124      input_to_shortpath="${new_path}.exe"
34125    elif test -f "${new_path}.cmd"; then
34126      input_to_shortpath="${new_path}.cmd"
34127    else
34128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
34129$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
34130      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34131$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34132      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34133    fi
34134  else
34135    input_to_shortpath="$new_path"
34136  fi
34137
34138  # Call helper function which possibly converts this using DOS-style short mode.
34139  # If so, the updated path is stored in $new_path.
34140  new_path="$input_to_shortpath"
34141
34142  input_path="$input_to_shortpath"
34143  # Check if we need to convert this using DOS-style short mode. If the path
34144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34145  # take no chances and rewrite it.
34146  # Note: m4 eats our [], so we need to use [ and ] instead.
34147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34148  if test "x$has_forbidden_chars" != x; then
34149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34153      # Going to short mode and back again did indeed matter. Since short mode is
34154      # case insensitive, let's make it lowercase to improve readability.
34155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34156      # Now convert it back to Unix-style (cygpath)
34157      input_path=`$CYGPATH -u "$shortmode_path"`
34158      new_path="$input_path"
34159    fi
34160  fi
34161
34162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34163  if test "x$test_cygdrive_prefix" = x; then
34164    # As a simple fix, exclude /usr/bin since it's not a real path.
34165    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34167      # a path prefixed by /cygdrive for fixpath to work.
34168      new_path="$CYGWIN_ROOT_PATH$input_path"
34169    fi
34170  fi
34171
34172  # remove trailing .exe if any
34173  new_path="${new_path/%.exe/}"
34174
34175    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34176
34177  # First separate the path from the arguments. This will split at the first
34178  # space.
34179  complete="$CC"
34180  path="${complete%% *}"
34181  tmp="$complete EOL"
34182  arguments="${tmp#* }"
34183
34184  # Input might be given as Windows format, start by converting to
34185  # unix format.
34186  new_path="$path"
34187
34188  windows_path="$new_path"
34189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34190    unix_path=`$CYGPATH -u "$windows_path"`
34191    new_path="$unix_path"
34192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34194    new_path="$unix_path"
34195  fi
34196
34197
34198  # Now try to locate executable using which
34199  new_path=`$WHICH "$new_path" 2> /dev/null`
34200
34201  if test "x$new_path" = x; then
34202    # Oops. Which didn't find the executable.
34203    # The splitting of arguments from the executable at a space might have been incorrect,
34204    # since paths with space are more likely in Windows. Give it another try with the whole
34205    # argument.
34206    path="$complete"
34207    arguments="EOL"
34208    new_path="$path"
34209
34210  windows_path="$new_path"
34211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34212    unix_path=`$CYGPATH -u "$windows_path"`
34213    new_path="$unix_path"
34214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34216    new_path="$unix_path"
34217  fi
34218
34219
34220    new_path=`$WHICH "$new_path" 2> /dev/null`
34221    # bat and cmd files are not always considered executable in MSYS causing which
34222    # to not find them
34223    if test "x$new_path" = x \
34224        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34225        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34226      new_path="$path"
34227
34228  windows_path="$new_path"
34229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34230    unix_path=`$CYGPATH -u "$windows_path"`
34231    new_path="$unix_path"
34232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34234    new_path="$unix_path"
34235  fi
34236
34237    fi
34238
34239    if test "x$new_path" = x; then
34240      # It's still not found. Now this is an unrecoverable error.
34241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34242$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34243      has_space=`$ECHO "$complete" | $GREP " "`
34244      if test "x$has_space" != x; then
34245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34247      fi
34248      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34249    fi
34250  fi
34251
34252  # Now new_path has a complete unix path to the binary
34253  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34254    # Keep paths in /bin as-is, but remove trailing .exe if any
34255    new_path="${new_path/%.exe/}"
34256    # Do not save /bin paths to all_fixpath_prefixes!
34257  else
34258    # Not in mixed or Windows style, start by that.
34259    new_path=`cmd //c echo $new_path`
34260
34261  input_path="$new_path"
34262  # Check if we need to convert this using DOS-style short mode. If the path
34263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34264  # take no chances and rewrite it.
34265  # Note: m4 eats our [], so we need to use [ and ] instead.
34266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34267  if test "x$has_forbidden_chars" != x; then
34268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34270  fi
34271
34272    # Output is in $new_path
34273
34274  windows_path="$new_path"
34275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34276    unix_path=`$CYGPATH -u "$windows_path"`
34277    new_path="$unix_path"
34278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34280    new_path="$unix_path"
34281  fi
34282
34283    # remove trailing .exe if any
34284    new_path="${new_path/%.exe/}"
34285
34286    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34287    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34288  fi
34289
34290    else
34291      # We're on a unix platform. Hooray! :)
34292      # First separate the path from the arguments. This will split at the first
34293      # space.
34294      complete="$CC"
34295      path="${complete%% *}"
34296      tmp="$complete EOL"
34297      arguments="${tmp#* }"
34298
34299      # Cannot rely on the command "which" here since it doesn't always work.
34300      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34301      if test -z "$is_absolute_path"; then
34302        # Path to executable is not absolute. Find it.
34303        IFS_save="$IFS"
34304        IFS=:
34305        for p in $PATH; do
34306          if test -f "$p/$path" && test -x "$p/$path"; then
34307            new_path="$p/$path"
34308            break
34309          fi
34310        done
34311        IFS="$IFS_save"
34312      else
34313        # This is an absolute path, we can use it without further modifications.
34314        new_path="$path"
34315      fi
34316
34317      if test "x$new_path" = x; then
34318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34319$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34320        has_space=`$ECHO "$complete" | $GREP " "`
34321        if test "x$has_space" != x; then
34322          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34323$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34324        fi
34325        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34326      fi
34327    fi
34328
34329    # Now join together the path and the arguments once again
34330    if test "x$arguments" != xEOL; then
34331      new_complete="$new_path ${arguments% *}"
34332    else
34333      new_complete="$new_path"
34334    fi
34335
34336    if test "x$complete" != "x$new_complete"; then
34337      CC="$new_complete"
34338      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34339$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34340    fi
34341  fi
34342
34343  TEST_COMPILER="$CC"
34344
34345  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34346$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34347  SYMLINK_ORIGINAL="$TEST_COMPILER"
34348
34349  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34350    # Follow a chain of symbolic links. Use readlink
34351    # where it exists, else fall back to horribly
34352    # complicated shell code.
34353    if test "x$READLINK_TESTED" != yes; then
34354      # On MacOSX there is a readlink tool with a different
34355      # purpose than the GNU readlink tool. Check the found readlink.
34356      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34357      if test "x$ISGNU" = x; then
34358        # A readlink that we do not know how to use.
34359        # Are there other non-GNU readlinks out there?
34360        READLINK_TESTED=yes
34361        READLINK=
34362      fi
34363    fi
34364
34365    if test "x$READLINK" != x; then
34366      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34367    else
34368      # Save the current directory for restoring afterwards
34369      STARTDIR=$PWD
34370      COUNTER=0
34371      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34372      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34373      cd $sym_link_dir
34374      # Use -P flag to resolve symlinks in directories.
34375      cd `$THEPWDCMD -P`
34376      sym_link_dir=`$THEPWDCMD -P`
34377      # Resolve file symlinks
34378      while test $COUNTER -lt 20; do
34379        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34380        if test "x$ISLINK" == x; then
34381          # This is not a symbolic link! We are done!
34382          break
34383        fi
34384        # Again resolve directory symlinks since the target of the just found
34385        # link could be in a different directory
34386        cd `$DIRNAME $ISLINK`
34387        sym_link_dir=`$THEPWDCMD -P`
34388        sym_link_file=`$BASENAME $ISLINK`
34389        let COUNTER=COUNTER+1
34390      done
34391      cd $STARTDIR
34392      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34393    fi
34394  fi
34395
34396  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34398$as_echo "no symlink" >&6; }
34399  else
34400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34401$as_echo "$SYMLINK_ORIGINAL" >&6; }
34402
34403    # We can't handle ccache by gcc wrappers, since we need to know if we're
34404    # using ccache. Instead ccache usage must be controlled by a configure option.
34405    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34406    if test "x$COMPILER_BASENAME" = "xccache"; then
34407      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34408$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34409      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34410    fi
34411  fi
34412
34413
34414  COMPILER=$CC
34415  COMPILER_NAME=$COMPILER_NAME
34416
34417  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34418    # cc -V output typically looks like
34419    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34420    # or
34421    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34422    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34423    # Check that this is likely to be the Solaris Studio cc.
34424    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34425    if test $? -ne 0; then
34426      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34427      { $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
34428$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34429      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34430$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34431      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34432$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34433      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34434    fi
34435    # Remove usage instructions (if present), and
34436    # collapse compiler output into a single line
34437    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34438        $SED -e 's/ *[Uu]sage:.*//'`
34439    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34440        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34441  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34442    # xlc -qversion output typically looks like
34443    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34444    #     Version: 11.01.0000.0015
34445    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34446    # Check that this is likely to be the IBM XL C compiler.
34447    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34448    if test $? -ne 0; then
34449      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34450      { $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
34451$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34452      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34453$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34454      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34455$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34456      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34457    fi
34458    # Collapse compiler output into a single line
34459    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34460    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34461        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34462  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34463    # There is no specific version flag, but all output starts with a version string.
34464    # First line typically looks something like:
34465    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34466    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34467    # Check that this is likely to be Microsoft CL.EXE.
34468    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34469    if test $? -ne 0; then
34470      { $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
34471$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34472      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34473$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34474      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34475    fi
34476    # Collapse compiler output into a single line
34477    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34478    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34479        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34480  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34481    # gcc --version output typically looks like
34482    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34483    #     Copyright (C) 2013 Free Software Foundation, Inc.
34484    #     This is free software; see the source for copying conditions.  There is NO
34485    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34486    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34487    # Check that this is likely to be GCC.
34488    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34489    if test $? -ne 0; then
34490      { $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
34491$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34492      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34493$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34494      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34495    fi
34496    # Remove Copyright and legalese from version string, and
34497    # collapse into a single line
34498    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34499        $SED -e 's/ *Copyright .*//'`
34500    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34501        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34502  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34503    # clang --version output typically looks like
34504    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34505    #    clang version 3.3 (tags/RELEASE_33/final)
34506    # or
34507    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34508    #    Target: x86_64-pc-linux-gnu
34509    #    Thread model: posix
34510    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34511    # Check that this is likely to be clang
34512    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34513    if test $? -ne 0; then
34514      { $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
34515$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34516      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34517$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34518      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34519    fi
34520    # Collapse compiler output into a single line
34521    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34522    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34523        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34524  else
34525      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34526  fi
34527  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34528  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34529  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34530  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34531
34532  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34533$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34534
34535
34536  # Now that we have resolved CC ourself, let autoconf have its go at it
34537  ac_ext=c
34538ac_cpp='$CPP $CPPFLAGS'
34539ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34540ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34541ac_compiler_gnu=$ac_cv_c_compiler_gnu
34542if test -n "$ac_tool_prefix"; then
34543  for ac_prog in $CC
34544  do
34545    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34546set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34548$as_echo_n "checking for $ac_word... " >&6; }
34549if ${ac_cv_prog_CC+:} false; then :
34550  $as_echo_n "(cached) " >&6
34551else
34552  if test -n "$CC"; then
34553  ac_cv_prog_CC="$CC" # Let the user override the test.
34554else
34555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34556for as_dir in $PATH
34557do
34558  IFS=$as_save_IFS
34559  test -z "$as_dir" && as_dir=.
34560    for ac_exec_ext in '' $ac_executable_extensions; do
34561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34562    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34564    break 2
34565  fi
34566done
34567  done
34568IFS=$as_save_IFS
34569
34570fi
34571fi
34572CC=$ac_cv_prog_CC
34573if test -n "$CC"; then
34574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34575$as_echo "$CC" >&6; }
34576else
34577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34578$as_echo "no" >&6; }
34579fi
34580
34581
34582    test -n "$CC" && break
34583  done
34584fi
34585if test -z "$CC"; then
34586  ac_ct_CC=$CC
34587  for ac_prog in $CC
34588do
34589  # Extract the first word of "$ac_prog", so it can be a program name with args.
34590set dummy $ac_prog; ac_word=$2
34591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34592$as_echo_n "checking for $ac_word... " >&6; }
34593if ${ac_cv_prog_ac_ct_CC+:} false; then :
34594  $as_echo_n "(cached) " >&6
34595else
34596  if test -n "$ac_ct_CC"; then
34597  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34598else
34599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34600for as_dir in $PATH
34601do
34602  IFS=$as_save_IFS
34603  test -z "$as_dir" && as_dir=.
34604    for ac_exec_ext in '' $ac_executable_extensions; do
34605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34606    ac_cv_prog_ac_ct_CC="$ac_prog"
34607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34608    break 2
34609  fi
34610done
34611  done
34612IFS=$as_save_IFS
34613
34614fi
34615fi
34616ac_ct_CC=$ac_cv_prog_ac_ct_CC
34617if test -n "$ac_ct_CC"; then
34618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34619$as_echo "$ac_ct_CC" >&6; }
34620else
34621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34622$as_echo "no" >&6; }
34623fi
34624
34625
34626  test -n "$ac_ct_CC" && break
34627done
34628
34629  if test "x$ac_ct_CC" = x; then
34630    CC=""
34631  else
34632    case $cross_compiling:$ac_tool_warned in
34633yes:)
34634{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34635$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34636ac_tool_warned=yes ;;
34637esac
34638    CC=$ac_ct_CC
34639  fi
34640fi
34641
34642
34643test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34644$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34645as_fn_error $? "no acceptable C compiler found in \$PATH
34646See \`config.log' for more details" "$LINENO" 5; }
34647
34648# Provide some information about the compiler.
34649$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34650set X $ac_compile
34651ac_compiler=$2
34652for ac_option in --version -v -V -qversion; do
34653  { { ac_try="$ac_compiler $ac_option >&5"
34654case "(($ac_try" in
34655  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34656  *) ac_try_echo=$ac_try;;
34657esac
34658eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34659$as_echo "$ac_try_echo"; } >&5
34660  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34661  ac_status=$?
34662  if test -s conftest.err; then
34663    sed '10a\
34664... rest of stderr output deleted ...
34665         10q' conftest.err >conftest.er1
34666    cat conftest.er1 >&5
34667  fi
34668  rm -f conftest.er1 conftest.err
34669  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34670  test $ac_status = 0; }
34671done
34672
34673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34674/* end confdefs.h.  */
34675
34676int
34677main ()
34678{
34679
34680  ;
34681  return 0;
34682}
34683_ACEOF
34684ac_clean_files_save=$ac_clean_files
34685ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34686# Try to create an executable without -o first, disregard a.out.
34687# It will help us diagnose broken compilers, and finding out an intuition
34688# of exeext.
34689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34690$as_echo_n "checking whether the C compiler works... " >&6; }
34691ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34692
34693# The possible output files:
34694ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34695
34696ac_rmfiles=
34697for ac_file in $ac_files
34698do
34699  case $ac_file in
34700    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34701    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34702  esac
34703done
34704rm -f $ac_rmfiles
34705
34706if { { ac_try="$ac_link_default"
34707case "(($ac_try" in
34708  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34709  *) ac_try_echo=$ac_try;;
34710esac
34711eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34712$as_echo "$ac_try_echo"; } >&5
34713  (eval "$ac_link_default") 2>&5
34714  ac_status=$?
34715  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34716  test $ac_status = 0; }; then :
34717  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34718# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34719# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34720# so that the user can short-circuit this test for compilers unknown to
34721# Autoconf.
34722for ac_file in $ac_files ''
34723do
34724  test -f "$ac_file" || continue
34725  case $ac_file in
34726    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34727	;;
34728    [ab].out )
34729	# We found the default executable, but exeext='' is most
34730	# certainly right.
34731	break;;
34732    *.* )
34733	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34734	then :; else
34735	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34736	fi
34737	# We set ac_cv_exeext here because the later test for it is not
34738	# safe: cross compilers may not add the suffix if given an `-o'
34739	# argument, so we may need to know it at that point already.
34740	# Even if this section looks crufty: it has the advantage of
34741	# actually working.
34742	break;;
34743    * )
34744	break;;
34745  esac
34746done
34747test "$ac_cv_exeext" = no && ac_cv_exeext=
34748
34749else
34750  ac_file=''
34751fi
34752if test -z "$ac_file"; then :
34753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34754$as_echo "no" >&6; }
34755$as_echo "$as_me: failed program was:" >&5
34756sed 's/^/| /' conftest.$ac_ext >&5
34757
34758{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34760as_fn_error 77 "C compiler cannot create executables
34761See \`config.log' for more details" "$LINENO" 5; }
34762else
34763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34764$as_echo "yes" >&6; }
34765fi
34766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34767$as_echo_n "checking for C compiler default output file name... " >&6; }
34768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34769$as_echo "$ac_file" >&6; }
34770ac_exeext=$ac_cv_exeext
34771
34772rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34773ac_clean_files=$ac_clean_files_save
34774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34775$as_echo_n "checking for suffix of executables... " >&6; }
34776if { { ac_try="$ac_link"
34777case "(($ac_try" in
34778  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34779  *) ac_try_echo=$ac_try;;
34780esac
34781eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34782$as_echo "$ac_try_echo"; } >&5
34783  (eval "$ac_link") 2>&5
34784  ac_status=$?
34785  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34786  test $ac_status = 0; }; then :
34787  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34788# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34789# work properly (i.e., refer to `conftest.exe'), while it won't with
34790# `rm'.
34791for ac_file in conftest.exe conftest conftest.*; do
34792  test -f "$ac_file" || continue
34793  case $ac_file in
34794    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34795    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34796	  break;;
34797    * ) break;;
34798  esac
34799done
34800else
34801  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34803as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34804See \`config.log' for more details" "$LINENO" 5; }
34805fi
34806rm -f conftest conftest$ac_cv_exeext
34807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34808$as_echo "$ac_cv_exeext" >&6; }
34809
34810rm -f conftest.$ac_ext
34811EXEEXT=$ac_cv_exeext
34812ac_exeext=$EXEEXT
34813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34814/* end confdefs.h.  */
34815#include <stdio.h>
34816int
34817main ()
34818{
34819FILE *f = fopen ("conftest.out", "w");
34820 return ferror (f) || fclose (f) != 0;
34821
34822  ;
34823  return 0;
34824}
34825_ACEOF
34826ac_clean_files="$ac_clean_files conftest.out"
34827# Check that the compiler produces executables we can run.  If not, either
34828# the compiler is broken, or we cross compile.
34829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34830$as_echo_n "checking whether we are cross compiling... " >&6; }
34831if test "$cross_compiling" != yes; then
34832  { { ac_try="$ac_link"
34833case "(($ac_try" in
34834  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34835  *) ac_try_echo=$ac_try;;
34836esac
34837eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34838$as_echo "$ac_try_echo"; } >&5
34839  (eval "$ac_link") 2>&5
34840  ac_status=$?
34841  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34842  test $ac_status = 0; }
34843  if { ac_try='./conftest$ac_cv_exeext'
34844  { { case "(($ac_try" in
34845  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34846  *) ac_try_echo=$ac_try;;
34847esac
34848eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34849$as_echo "$ac_try_echo"; } >&5
34850  (eval "$ac_try") 2>&5
34851  ac_status=$?
34852  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34853  test $ac_status = 0; }; }; then
34854    cross_compiling=no
34855  else
34856    if test "$cross_compiling" = maybe; then
34857	cross_compiling=yes
34858    else
34859	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34860$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34861as_fn_error $? "cannot run C compiled programs.
34862If you meant to cross compile, use \`--host'.
34863See \`config.log' for more details" "$LINENO" 5; }
34864    fi
34865  fi
34866fi
34867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34868$as_echo "$cross_compiling" >&6; }
34869
34870rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34871ac_clean_files=$ac_clean_files_save
34872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34873$as_echo_n "checking for suffix of object files... " >&6; }
34874if ${ac_cv_objext+:} false; then :
34875  $as_echo_n "(cached) " >&6
34876else
34877  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34878/* end confdefs.h.  */
34879
34880int
34881main ()
34882{
34883
34884  ;
34885  return 0;
34886}
34887_ACEOF
34888rm -f conftest.o conftest.obj
34889if { { ac_try="$ac_compile"
34890case "(($ac_try" in
34891  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34892  *) ac_try_echo=$ac_try;;
34893esac
34894eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34895$as_echo "$ac_try_echo"; } >&5
34896  (eval "$ac_compile") 2>&5
34897  ac_status=$?
34898  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34899  test $ac_status = 0; }; then :
34900  for ac_file in conftest.o conftest.obj conftest.*; do
34901  test -f "$ac_file" || continue;
34902  case $ac_file in
34903    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34904    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34905       break;;
34906  esac
34907done
34908else
34909  $as_echo "$as_me: failed program was:" >&5
34910sed 's/^/| /' conftest.$ac_ext >&5
34911
34912{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34913$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34914as_fn_error $? "cannot compute suffix of object files: cannot compile
34915See \`config.log' for more details" "$LINENO" 5; }
34916fi
34917rm -f conftest.$ac_cv_objext conftest.$ac_ext
34918fi
34919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34920$as_echo "$ac_cv_objext" >&6; }
34921OBJEXT=$ac_cv_objext
34922ac_objext=$OBJEXT
34923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34924$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34925if ${ac_cv_c_compiler_gnu+:} false; then :
34926  $as_echo_n "(cached) " >&6
34927else
34928  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34929/* end confdefs.h.  */
34930
34931int
34932main ()
34933{
34934#ifndef __GNUC__
34935       choke me
34936#endif
34937
34938  ;
34939  return 0;
34940}
34941_ACEOF
34942if ac_fn_c_try_compile "$LINENO"; then :
34943  ac_compiler_gnu=yes
34944else
34945  ac_compiler_gnu=no
34946fi
34947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34948ac_cv_c_compiler_gnu=$ac_compiler_gnu
34949
34950fi
34951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34952$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34953if test $ac_compiler_gnu = yes; then
34954  GCC=yes
34955else
34956  GCC=
34957fi
34958ac_test_CFLAGS=${CFLAGS+set}
34959ac_save_CFLAGS=$CFLAGS
34960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34961$as_echo_n "checking whether $CC accepts -g... " >&6; }
34962if ${ac_cv_prog_cc_g+:} false; then :
34963  $as_echo_n "(cached) " >&6
34964else
34965  ac_save_c_werror_flag=$ac_c_werror_flag
34966   ac_c_werror_flag=yes
34967   ac_cv_prog_cc_g=no
34968   CFLAGS="-g"
34969   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34970/* end confdefs.h.  */
34971
34972int
34973main ()
34974{
34975
34976  ;
34977  return 0;
34978}
34979_ACEOF
34980if ac_fn_c_try_compile "$LINENO"; then :
34981  ac_cv_prog_cc_g=yes
34982else
34983  CFLAGS=""
34984      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34985/* end confdefs.h.  */
34986
34987int
34988main ()
34989{
34990
34991  ;
34992  return 0;
34993}
34994_ACEOF
34995if ac_fn_c_try_compile "$LINENO"; then :
34996
34997else
34998  ac_c_werror_flag=$ac_save_c_werror_flag
34999	 CFLAGS="-g"
35000	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35001/* end confdefs.h.  */
35002
35003int
35004main ()
35005{
35006
35007  ;
35008  return 0;
35009}
35010_ACEOF
35011if ac_fn_c_try_compile "$LINENO"; then :
35012  ac_cv_prog_cc_g=yes
35013fi
35014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35015fi
35016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35017fi
35018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35019   ac_c_werror_flag=$ac_save_c_werror_flag
35020fi
35021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
35022$as_echo "$ac_cv_prog_cc_g" >&6; }
35023if test "$ac_test_CFLAGS" = set; then
35024  CFLAGS=$ac_save_CFLAGS
35025elif test $ac_cv_prog_cc_g = yes; then
35026  if test "$GCC" = yes; then
35027    CFLAGS="-g -O2"
35028  else
35029    CFLAGS="-g"
35030  fi
35031else
35032  if test "$GCC" = yes; then
35033    CFLAGS="-O2"
35034  else
35035    CFLAGS=
35036  fi
35037fi
35038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
35039$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
35040if ${ac_cv_prog_cc_c89+:} false; then :
35041  $as_echo_n "(cached) " >&6
35042else
35043  ac_cv_prog_cc_c89=no
35044ac_save_CC=$CC
35045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35046/* end confdefs.h.  */
35047#include <stdarg.h>
35048#include <stdio.h>
35049struct stat;
35050/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
35051struct buf { int x; };
35052FILE * (*rcsopen) (struct buf *, struct stat *, int);
35053static char *e (p, i)
35054     char **p;
35055     int i;
35056{
35057  return p[i];
35058}
35059static char *f (char * (*g) (char **, int), char **p, ...)
35060{
35061  char *s;
35062  va_list v;
35063  va_start (v,p);
35064  s = g (p, va_arg (v,int));
35065  va_end (v);
35066  return s;
35067}
35068
35069/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
35070   function prototypes and stuff, but not '\xHH' hex character constants.
35071   These don't provoke an error unfortunately, instead are silently treated
35072   as 'x'.  The following induces an error, until -std is added to get
35073   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
35074   array size at least.  It's necessary to write '\x00'==0 to get something
35075   that's true only with -std.  */
35076int osf4_cc_array ['\x00' == 0 ? 1 : -1];
35077
35078/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
35079   inside strings and character constants.  */
35080#define FOO(x) 'x'
35081int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
35082
35083int test (int i, double x);
35084struct s1 {int (*f) (int a);};
35085struct s2 {int (*f) (double a);};
35086int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
35087int argc;
35088char **argv;
35089int
35090main ()
35091{
35092return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
35093  ;
35094  return 0;
35095}
35096_ACEOF
35097for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
35098	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
35099do
35100  CC="$ac_save_CC $ac_arg"
35101  if ac_fn_c_try_compile "$LINENO"; then :
35102  ac_cv_prog_cc_c89=$ac_arg
35103fi
35104rm -f core conftest.err conftest.$ac_objext
35105  test "x$ac_cv_prog_cc_c89" != "xno" && break
35106done
35107rm -f conftest.$ac_ext
35108CC=$ac_save_CC
35109
35110fi
35111# AC_CACHE_VAL
35112case "x$ac_cv_prog_cc_c89" in
35113  x)
35114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
35115$as_echo "none needed" >&6; } ;;
35116  xno)
35117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
35118$as_echo "unsupported" >&6; } ;;
35119  *)
35120    CC="$CC $ac_cv_prog_cc_c89"
35121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
35122$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
35123esac
35124if test "x$ac_cv_prog_cc_c89" != xno; then :
35125
35126fi
35127
35128ac_ext=cpp
35129ac_cpp='$CXXCPP $CPPFLAGS'
35130ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35131ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35132ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35133
35134
35135
35136  COMPILER_NAME=C++
35137  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
35138
35139  if test "x$CXX" != x; then
35140    # User has supplied compiler name already, always let that override.
35141    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
35142$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
35143    if test "x`basename $CXX`" = "x$CXX"; then
35144      # A command without a complete path is provided, search $PATH.
35145
35146      for ac_prog in $CXX
35147do
35148  # Extract the first word of "$ac_prog", so it can be a program name with args.
35149set dummy $ac_prog; ac_word=$2
35150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35151$as_echo_n "checking for $ac_word... " >&6; }
35152if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35153  $as_echo_n "(cached) " >&6
35154else
35155  case $POTENTIAL_CXX in
35156  [\\/]* | ?:[\\/]*)
35157  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35158  ;;
35159  *)
35160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35161for as_dir in $PATH
35162do
35163  IFS=$as_save_IFS
35164  test -z "$as_dir" && as_dir=.
35165    for ac_exec_ext in '' $ac_executable_extensions; do
35166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35167    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35169    break 2
35170  fi
35171done
35172  done
35173IFS=$as_save_IFS
35174
35175  ;;
35176esac
35177fi
35178POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35179if test -n "$POTENTIAL_CXX"; then
35180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35181$as_echo "$POTENTIAL_CXX" >&6; }
35182else
35183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35184$as_echo "no" >&6; }
35185fi
35186
35187
35188  test -n "$POTENTIAL_CXX" && break
35189done
35190
35191      if test "x$POTENTIAL_CXX" != x; then
35192        CXX=$POTENTIAL_CXX
35193      else
35194        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35195      fi
35196    else
35197      # Otherwise it might already be a complete path
35198      if test ! -x "$CXX"; then
35199        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35200      fi
35201    fi
35202  else
35203    # No user supplied value. Locate compiler ourselves.
35204
35205    # If we are cross compiling, assume cross compilation tools follows the
35206    # cross compilation standard where they are prefixed with the autoconf
35207    # standard name for the target. For example the binary
35208    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35209    # If we are not cross compiling, then the default compiler name will be
35210    # used.
35211
35212    CXX=
35213    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35214    # before checking the rest of the PATH.
35215    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35216    # step, this should not be necessary.
35217    if test -n "$TOOLCHAIN_PATH"; then
35218      PATH_save="$PATH"
35219      PATH="$TOOLCHAIN_PATH"
35220      if test -n "$ac_tool_prefix"; then
35221  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35222set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35224$as_echo_n "checking for $ac_word... " >&6; }
35225if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35226  $as_echo_n "(cached) " >&6
35227else
35228  case $TOOLCHAIN_PATH_CXX in
35229  [\\/]* | ?:[\\/]*)
35230  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35231  ;;
35232  *)
35233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35234for as_dir in $PATH
35235do
35236  IFS=$as_save_IFS
35237  test -z "$as_dir" && as_dir=.
35238    for ac_exec_ext in '' $ac_executable_extensions; do
35239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35240    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35242    break 2
35243  fi
35244done
35245  done
35246IFS=$as_save_IFS
35247
35248  ;;
35249esac
35250fi
35251TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35252if test -n "$TOOLCHAIN_PATH_CXX"; then
35253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35254$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35255else
35256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35257$as_echo "no" >&6; }
35258fi
35259
35260
35261fi
35262if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35263  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35264  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35265set dummy $SEARCH_LIST; ac_word=$2
35266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35267$as_echo_n "checking for $ac_word... " >&6; }
35268if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35269  $as_echo_n "(cached) " >&6
35270else
35271  case $ac_pt_TOOLCHAIN_PATH_CXX in
35272  [\\/]* | ?:[\\/]*)
35273  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35274  ;;
35275  *)
35276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35277for as_dir in $PATH
35278do
35279  IFS=$as_save_IFS
35280  test -z "$as_dir" && as_dir=.
35281    for ac_exec_ext in '' $ac_executable_extensions; do
35282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35283    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35285    break 2
35286  fi
35287done
35288  done
35289IFS=$as_save_IFS
35290
35291  ;;
35292esac
35293fi
35294ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35295if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35297$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35298else
35299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35300$as_echo "no" >&6; }
35301fi
35302
35303  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35304    TOOLCHAIN_PATH_CXX=""
35305  else
35306    case $cross_compiling:$ac_tool_warned in
35307yes:)
35308{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35309$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35310ac_tool_warned=yes ;;
35311esac
35312    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35313  fi
35314else
35315  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35316fi
35317
35318      CXX=$TOOLCHAIN_PATH_CXX
35319      PATH="$PATH_save"
35320    fi
35321
35322    # AC_PATH_TOOL can't be run multiple times with the same variable,
35323    # so create a new name for this run.
35324    if test "x$CXX" = x; then
35325      if test -n "$ac_tool_prefix"; then
35326  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35327set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35329$as_echo_n "checking for $ac_word... " >&6; }
35330if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35331  $as_echo_n "(cached) " >&6
35332else
35333  case $POTENTIAL_CXX in
35334  [\\/]* | ?:[\\/]*)
35335  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35336  ;;
35337  *)
35338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35339for as_dir in $PATH
35340do
35341  IFS=$as_save_IFS
35342  test -z "$as_dir" && as_dir=.
35343    for ac_exec_ext in '' $ac_executable_extensions; do
35344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35345    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35347    break 2
35348  fi
35349done
35350  done
35351IFS=$as_save_IFS
35352
35353  ;;
35354esac
35355fi
35356POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35357if test -n "$POTENTIAL_CXX"; then
35358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35359$as_echo "$POTENTIAL_CXX" >&6; }
35360else
35361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35362$as_echo "no" >&6; }
35363fi
35364
35365
35366fi
35367if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35368  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35369  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35370set dummy $SEARCH_LIST; ac_word=$2
35371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35372$as_echo_n "checking for $ac_word... " >&6; }
35373if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35374  $as_echo_n "(cached) " >&6
35375else
35376  case $ac_pt_POTENTIAL_CXX in
35377  [\\/]* | ?:[\\/]*)
35378  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35379  ;;
35380  *)
35381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35382for as_dir in $PATH
35383do
35384  IFS=$as_save_IFS
35385  test -z "$as_dir" && as_dir=.
35386    for ac_exec_ext in '' $ac_executable_extensions; do
35387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35388    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35390    break 2
35391  fi
35392done
35393  done
35394IFS=$as_save_IFS
35395
35396  ;;
35397esac
35398fi
35399ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35400if test -n "$ac_pt_POTENTIAL_CXX"; then
35401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35402$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35403else
35404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35405$as_echo "no" >&6; }
35406fi
35407
35408  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35409    POTENTIAL_CXX=""
35410  else
35411    case $cross_compiling:$ac_tool_warned in
35412yes:)
35413{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35414$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35415ac_tool_warned=yes ;;
35416esac
35417    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35418  fi
35419else
35420  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35421fi
35422
35423      CXX=$POTENTIAL_CXX
35424    fi
35425
35426    if test "x$CXX" = x; then
35427
35428  # Print a helpful message on how to acquire the necessary build dependency.
35429  # devkit is the help tag: freetype, cups, alsa etc
35430  MISSING_DEPENDENCY=devkit
35431
35432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35433    cygwin_help $MISSING_DEPENDENCY
35434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35435    msys_help $MISSING_DEPENDENCY
35436  else
35437    PKGHANDLER_COMMAND=
35438
35439    case $PKGHANDLER in
35440      apt-get)
35441        apt_help     $MISSING_DEPENDENCY ;;
35442      yum)
35443        yum_help     $MISSING_DEPENDENCY ;;
35444      brew)
35445        brew_help    $MISSING_DEPENDENCY ;;
35446      port)
35447        port_help    $MISSING_DEPENDENCY ;;
35448      pkgutil)
35449        pkgutil_help $MISSING_DEPENDENCY ;;
35450      pkgadd)
35451        pkgadd_help  $MISSING_DEPENDENCY ;;
35452    esac
35453
35454    if test "x$PKGHANDLER_COMMAND" != x; then
35455      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35456    fi
35457  fi
35458
35459      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35460    fi
35461  fi
35462
35463  # Now we have a compiler binary in CXX. Make sure it's okay.
35464
35465  # Only process if variable expands to non-empty
35466
35467  if test "x$CXX" != x; then
35468    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35469
35470  # First separate the path from the arguments. This will split at the first
35471  # space.
35472  complete="$CXX"
35473  path="${complete%% *}"
35474  tmp="$complete EOL"
35475  arguments="${tmp#* }"
35476
35477  # Input might be given as Windows format, start by converting to
35478  # unix format.
35479  new_path=`$CYGPATH -u "$path"`
35480
35481  # Now try to locate executable using which
35482  new_path=`$WHICH "$new_path" 2> /dev/null`
35483  # bat and cmd files are not always considered executable in cygwin causing which
35484  # to not find them
35485  if test "x$new_path" = x \
35486      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35487      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35488    new_path=`$CYGPATH -u "$path"`
35489  fi
35490  if test "x$new_path" = x; then
35491    # Oops. Which didn't find the executable.
35492    # The splitting of arguments from the executable at a space might have been incorrect,
35493    # since paths with space are more likely in Windows. Give it another try with the whole
35494    # argument.
35495    path="$complete"
35496    arguments="EOL"
35497    new_path=`$CYGPATH -u "$path"`
35498    new_path=`$WHICH "$new_path" 2> /dev/null`
35499    # bat and cmd files are not always considered executable in cygwin causing which
35500    # to not find them
35501    if test "x$new_path" = x \
35502        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35503        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35504      new_path=`$CYGPATH -u "$path"`
35505    fi
35506    if test "x$new_path" = x; then
35507      # It's still not found. Now this is an unrecoverable error.
35508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35509$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35510      has_space=`$ECHO "$complete" | $GREP " "`
35511      if test "x$has_space" != x; then
35512        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35513$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35514      fi
35515      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35516    fi
35517  fi
35518
35519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35522  # "foo.exe" is OK but "foo" is an error.
35523  #
35524  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35525  # It is also a way to make sure we got the proper file name for the real test later on.
35526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35527  if test "x$test_shortpath" = x; then
35528    # Short path failed, file does not exist as specified.
35529    # Try adding .exe or .cmd
35530    if test -f "${new_path}.exe"; then
35531      input_to_shortpath="${new_path}.exe"
35532    elif test -f "${new_path}.cmd"; then
35533      input_to_shortpath="${new_path}.cmd"
35534    else
35535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35536$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35537      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35538$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35539      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35540    fi
35541  else
35542    input_to_shortpath="$new_path"
35543  fi
35544
35545  # Call helper function which possibly converts this using DOS-style short mode.
35546  # If so, the updated path is stored in $new_path.
35547  new_path="$input_to_shortpath"
35548
35549  input_path="$input_to_shortpath"
35550  # Check if we need to convert this using DOS-style short mode. If the path
35551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35552  # take no chances and rewrite it.
35553  # Note: m4 eats our [], so we need to use [ and ] instead.
35554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35555  if test "x$has_forbidden_chars" != x; then
35556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35560      # Going to short mode and back again did indeed matter. Since short mode is
35561      # case insensitive, let's make it lowercase to improve readability.
35562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35563      # Now convert it back to Unix-style (cygpath)
35564      input_path=`$CYGPATH -u "$shortmode_path"`
35565      new_path="$input_path"
35566    fi
35567  fi
35568
35569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35570  if test "x$test_cygdrive_prefix" = x; then
35571    # As a simple fix, exclude /usr/bin since it's not a real path.
35572    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35574      # a path prefixed by /cygdrive for fixpath to work.
35575      new_path="$CYGWIN_ROOT_PATH$input_path"
35576    fi
35577  fi
35578
35579  # remove trailing .exe if any
35580  new_path="${new_path/%.exe/}"
35581
35582    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35583
35584  # First separate the path from the arguments. This will split at the first
35585  # space.
35586  complete="$CXX"
35587  path="${complete%% *}"
35588  tmp="$complete EOL"
35589  arguments="${tmp#* }"
35590
35591  # Input might be given as Windows format, start by converting to
35592  # unix format.
35593  new_path="$path"
35594
35595  windows_path="$new_path"
35596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35597    unix_path=`$CYGPATH -u "$windows_path"`
35598    new_path="$unix_path"
35599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35601    new_path="$unix_path"
35602  fi
35603
35604
35605  # Now try to locate executable using which
35606  new_path=`$WHICH "$new_path" 2> /dev/null`
35607
35608  if test "x$new_path" = x; then
35609    # Oops. Which didn't find the executable.
35610    # The splitting of arguments from the executable at a space might have been incorrect,
35611    # since paths with space are more likely in Windows. Give it another try with the whole
35612    # argument.
35613    path="$complete"
35614    arguments="EOL"
35615    new_path="$path"
35616
35617  windows_path="$new_path"
35618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35619    unix_path=`$CYGPATH -u "$windows_path"`
35620    new_path="$unix_path"
35621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35623    new_path="$unix_path"
35624  fi
35625
35626
35627    new_path=`$WHICH "$new_path" 2> /dev/null`
35628    # bat and cmd files are not always considered executable in MSYS causing which
35629    # to not find them
35630    if test "x$new_path" = x \
35631        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35632        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35633      new_path="$path"
35634
35635  windows_path="$new_path"
35636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35637    unix_path=`$CYGPATH -u "$windows_path"`
35638    new_path="$unix_path"
35639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35641    new_path="$unix_path"
35642  fi
35643
35644    fi
35645
35646    if test "x$new_path" = x; then
35647      # It's still not found. Now this is an unrecoverable error.
35648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35649$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35650      has_space=`$ECHO "$complete" | $GREP " "`
35651      if test "x$has_space" != x; then
35652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35654      fi
35655      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35656    fi
35657  fi
35658
35659  # Now new_path has a complete unix path to the binary
35660  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35661    # Keep paths in /bin as-is, but remove trailing .exe if any
35662    new_path="${new_path/%.exe/}"
35663    # Do not save /bin paths to all_fixpath_prefixes!
35664  else
35665    # Not in mixed or Windows style, start by that.
35666    new_path=`cmd //c echo $new_path`
35667
35668  input_path="$new_path"
35669  # Check if we need to convert this using DOS-style short mode. If the path
35670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35671  # take no chances and rewrite it.
35672  # Note: m4 eats our [], so we need to use [ and ] instead.
35673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35674  if test "x$has_forbidden_chars" != x; then
35675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35677  fi
35678
35679    # Output is in $new_path
35680
35681  windows_path="$new_path"
35682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35683    unix_path=`$CYGPATH -u "$windows_path"`
35684    new_path="$unix_path"
35685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35687    new_path="$unix_path"
35688  fi
35689
35690    # remove trailing .exe if any
35691    new_path="${new_path/%.exe/}"
35692
35693    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35694    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35695  fi
35696
35697    else
35698      # We're on a unix platform. Hooray! :)
35699      # First separate the path from the arguments. This will split at the first
35700      # space.
35701      complete="$CXX"
35702      path="${complete%% *}"
35703      tmp="$complete EOL"
35704      arguments="${tmp#* }"
35705
35706      # Cannot rely on the command "which" here since it doesn't always work.
35707      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35708      if test -z "$is_absolute_path"; then
35709        # Path to executable is not absolute. Find it.
35710        IFS_save="$IFS"
35711        IFS=:
35712        for p in $PATH; do
35713          if test -f "$p/$path" && test -x "$p/$path"; then
35714            new_path="$p/$path"
35715            break
35716          fi
35717        done
35718        IFS="$IFS_save"
35719      else
35720        # This is an absolute path, we can use it without further modifications.
35721        new_path="$path"
35722      fi
35723
35724      if test "x$new_path" = x; then
35725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35726$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35727        has_space=`$ECHO "$complete" | $GREP " "`
35728        if test "x$has_space" != x; then
35729          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35730$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35731        fi
35732        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35733      fi
35734    fi
35735
35736    # Now join together the path and the arguments once again
35737    if test "x$arguments" != xEOL; then
35738      new_complete="$new_path ${arguments% *}"
35739    else
35740      new_complete="$new_path"
35741    fi
35742
35743    if test "x$complete" != "x$new_complete"; then
35744      CXX="$new_complete"
35745      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35746$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35747    fi
35748  fi
35749
35750  TEST_COMPILER="$CXX"
35751
35752  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35753$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35754  SYMLINK_ORIGINAL="$TEST_COMPILER"
35755
35756  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35757    # Follow a chain of symbolic links. Use readlink
35758    # where it exists, else fall back to horribly
35759    # complicated shell code.
35760    if test "x$READLINK_TESTED" != yes; then
35761      # On MacOSX there is a readlink tool with a different
35762      # purpose than the GNU readlink tool. Check the found readlink.
35763      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35764      if test "x$ISGNU" = x; then
35765        # A readlink that we do not know how to use.
35766        # Are there other non-GNU readlinks out there?
35767        READLINK_TESTED=yes
35768        READLINK=
35769      fi
35770    fi
35771
35772    if test "x$READLINK" != x; then
35773      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35774    else
35775      # Save the current directory for restoring afterwards
35776      STARTDIR=$PWD
35777      COUNTER=0
35778      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35779      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35780      cd $sym_link_dir
35781      # Use -P flag to resolve symlinks in directories.
35782      cd `$THEPWDCMD -P`
35783      sym_link_dir=`$THEPWDCMD -P`
35784      # Resolve file symlinks
35785      while test $COUNTER -lt 20; do
35786        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35787        if test "x$ISLINK" == x; then
35788          # This is not a symbolic link! We are done!
35789          break
35790        fi
35791        # Again resolve directory symlinks since the target of the just found
35792        # link could be in a different directory
35793        cd `$DIRNAME $ISLINK`
35794        sym_link_dir=`$THEPWDCMD -P`
35795        sym_link_file=`$BASENAME $ISLINK`
35796        let COUNTER=COUNTER+1
35797      done
35798      cd $STARTDIR
35799      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35800    fi
35801  fi
35802
35803  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35805$as_echo "no symlink" >&6; }
35806  else
35807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35808$as_echo "$SYMLINK_ORIGINAL" >&6; }
35809
35810    # We can't handle ccache by gcc wrappers, since we need to know if we're
35811    # using ccache. Instead ccache usage must be controlled by a configure option.
35812    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35813    if test "x$COMPILER_BASENAME" = "xccache"; then
35814      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35815$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35816      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35817    fi
35818  fi
35819
35820
35821  COMPILER=$CXX
35822  COMPILER_NAME=$COMPILER_NAME
35823
35824  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35825    # cc -V output typically looks like
35826    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35827    # or
35828    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35829    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35830    # Check that this is likely to be the Solaris Studio cc.
35831    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35832    if test $? -ne 0; then
35833      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35834      { $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
35835$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35836      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35837$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35838      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35839$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35840      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35841    fi
35842    # Remove usage instructions (if present), and
35843    # collapse compiler output into a single line
35844    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35845        $SED -e 's/ *[Uu]sage:.*//'`
35846    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35847        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35848  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35849    # xlc -qversion output typically looks like
35850    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35851    #     Version: 11.01.0000.0015
35852    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35853    # Check that this is likely to be the IBM XL C compiler.
35854    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35855    if test $? -ne 0; then
35856      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35857      { $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
35858$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35859      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35860$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35861      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35862$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35863      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35864    fi
35865    # Collapse compiler output into a single line
35866    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35867    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35868        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35869  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35870    # There is no specific version flag, but all output starts with a version string.
35871    # First line typically looks something like:
35872    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35873    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35874    # Check that this is likely to be Microsoft CL.EXE.
35875    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35876    if test $? -ne 0; then
35877      { $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
35878$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35879      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35880$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35881      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35882    fi
35883    # Collapse compiler output into a single line
35884    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35885    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35886        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35887  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35888    # gcc --version output typically looks like
35889    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35890    #     Copyright (C) 2013 Free Software Foundation, Inc.
35891    #     This is free software; see the source for copying conditions.  There is NO
35892    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35893    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35894    # Check that this is likely to be GCC.
35895    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35896    if test $? -ne 0; then
35897      { $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
35898$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35899      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35900$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35901      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35902    fi
35903    # Remove Copyright and legalese from version string, and
35904    # collapse into a single line
35905    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35906        $SED -e 's/ *Copyright .*//'`
35907    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35908        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35909  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35910    # clang --version output typically looks like
35911    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35912    #    clang version 3.3 (tags/RELEASE_33/final)
35913    # or
35914    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35915    #    Target: x86_64-pc-linux-gnu
35916    #    Thread model: posix
35917    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35918    # Check that this is likely to be clang
35919    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35920    if test $? -ne 0; then
35921      { $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
35922$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35923      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35924$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35925      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35926    fi
35927    # Collapse compiler output into a single line
35928    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35929    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35930        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35931  else
35932      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35933  fi
35934  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35935  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35936  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35937  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35938
35939  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35940$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35941
35942
35943  # Now that we have resolved CXX ourself, let autoconf have its go at it
35944  ac_ext=cpp
35945ac_cpp='$CXXCPP $CPPFLAGS'
35946ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35947ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35948ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35949if test -z "$CXX"; then
35950  if test -n "$CCC"; then
35951    CXX=$CCC
35952  else
35953    if test -n "$ac_tool_prefix"; then
35954  for ac_prog in $CXX
35955  do
35956    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35957set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35959$as_echo_n "checking for $ac_word... " >&6; }
35960if ${ac_cv_prog_CXX+:} false; then :
35961  $as_echo_n "(cached) " >&6
35962else
35963  if test -n "$CXX"; then
35964  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35965else
35966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35967for as_dir in $PATH
35968do
35969  IFS=$as_save_IFS
35970  test -z "$as_dir" && as_dir=.
35971    for ac_exec_ext in '' $ac_executable_extensions; do
35972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35973    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35975    break 2
35976  fi
35977done
35978  done
35979IFS=$as_save_IFS
35980
35981fi
35982fi
35983CXX=$ac_cv_prog_CXX
35984if test -n "$CXX"; then
35985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35986$as_echo "$CXX" >&6; }
35987else
35988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35989$as_echo "no" >&6; }
35990fi
35991
35992
35993    test -n "$CXX" && break
35994  done
35995fi
35996if test -z "$CXX"; then
35997  ac_ct_CXX=$CXX
35998  for ac_prog in $CXX
35999do
36000  # Extract the first word of "$ac_prog", so it can be a program name with args.
36001set dummy $ac_prog; ac_word=$2
36002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36003$as_echo_n "checking for $ac_word... " >&6; }
36004if ${ac_cv_prog_ac_ct_CXX+:} false; then :
36005  $as_echo_n "(cached) " >&6
36006else
36007  if test -n "$ac_ct_CXX"; then
36008  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
36009else
36010as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36011for as_dir in $PATH
36012do
36013  IFS=$as_save_IFS
36014  test -z "$as_dir" && as_dir=.
36015    for ac_exec_ext in '' $ac_executable_extensions; do
36016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36017    ac_cv_prog_ac_ct_CXX="$ac_prog"
36018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36019    break 2
36020  fi
36021done
36022  done
36023IFS=$as_save_IFS
36024
36025fi
36026fi
36027ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
36028if test -n "$ac_ct_CXX"; then
36029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
36030$as_echo "$ac_ct_CXX" >&6; }
36031else
36032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36033$as_echo "no" >&6; }
36034fi
36035
36036
36037  test -n "$ac_ct_CXX" && break
36038done
36039
36040  if test "x$ac_ct_CXX" = x; then
36041    CXX="g++"
36042  else
36043    case $cross_compiling:$ac_tool_warned in
36044yes:)
36045{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36046$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36047ac_tool_warned=yes ;;
36048esac
36049    CXX=$ac_ct_CXX
36050  fi
36051fi
36052
36053  fi
36054fi
36055# Provide some information about the compiler.
36056$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
36057set X $ac_compile
36058ac_compiler=$2
36059for ac_option in --version -v -V -qversion; do
36060  { { ac_try="$ac_compiler $ac_option >&5"
36061case "(($ac_try" in
36062  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36063  *) ac_try_echo=$ac_try;;
36064esac
36065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
36066$as_echo "$ac_try_echo"; } >&5
36067  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
36068  ac_status=$?
36069  if test -s conftest.err; then
36070    sed '10a\
36071... rest of stderr output deleted ...
36072         10q' conftest.err >conftest.er1
36073    cat conftest.er1 >&5
36074  fi
36075  rm -f conftest.er1 conftest.err
36076  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36077  test $ac_status = 0; }
36078done
36079
36080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
36081$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
36082if ${ac_cv_cxx_compiler_gnu+:} false; then :
36083  $as_echo_n "(cached) " >&6
36084else
36085  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36086/* end confdefs.h.  */
36087
36088int
36089main ()
36090{
36091#ifndef __GNUC__
36092       choke me
36093#endif
36094
36095  ;
36096  return 0;
36097}
36098_ACEOF
36099if ac_fn_cxx_try_compile "$LINENO"; then :
36100  ac_compiler_gnu=yes
36101else
36102  ac_compiler_gnu=no
36103fi
36104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36105ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
36106
36107fi
36108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
36109$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
36110if test $ac_compiler_gnu = yes; then
36111  GXX=yes
36112else
36113  GXX=
36114fi
36115ac_test_CXXFLAGS=${CXXFLAGS+set}
36116ac_save_CXXFLAGS=$CXXFLAGS
36117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
36118$as_echo_n "checking whether $CXX accepts -g... " >&6; }
36119if ${ac_cv_prog_cxx_g+:} false; then :
36120  $as_echo_n "(cached) " >&6
36121else
36122  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
36123   ac_cxx_werror_flag=yes
36124   ac_cv_prog_cxx_g=no
36125   CXXFLAGS="-g"
36126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36127/* end confdefs.h.  */
36128
36129int
36130main ()
36131{
36132
36133  ;
36134  return 0;
36135}
36136_ACEOF
36137if ac_fn_cxx_try_compile "$LINENO"; then :
36138  ac_cv_prog_cxx_g=yes
36139else
36140  CXXFLAGS=""
36141      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36142/* end confdefs.h.  */
36143
36144int
36145main ()
36146{
36147
36148  ;
36149  return 0;
36150}
36151_ACEOF
36152if ac_fn_cxx_try_compile "$LINENO"; then :
36153
36154else
36155  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36156	 CXXFLAGS="-g"
36157	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36158/* end confdefs.h.  */
36159
36160int
36161main ()
36162{
36163
36164  ;
36165  return 0;
36166}
36167_ACEOF
36168if ac_fn_cxx_try_compile "$LINENO"; then :
36169  ac_cv_prog_cxx_g=yes
36170fi
36171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36172fi
36173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36174fi
36175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36176   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36177fi
36178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36179$as_echo "$ac_cv_prog_cxx_g" >&6; }
36180if test "$ac_test_CXXFLAGS" = set; then
36181  CXXFLAGS=$ac_save_CXXFLAGS
36182elif test $ac_cv_prog_cxx_g = yes; then
36183  if test "$GXX" = yes; then
36184    CXXFLAGS="-g -O2"
36185  else
36186    CXXFLAGS="-g"
36187  fi
36188else
36189  if test "$GXX" = yes; then
36190    CXXFLAGS="-O2"
36191  else
36192    CXXFLAGS=
36193  fi
36194fi
36195ac_ext=cpp
36196ac_cpp='$CXXCPP $CPPFLAGS'
36197ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36198ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36199ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36200
36201
36202  # This is the compiler version number on the form X.Y[.Z]
36203
36204
36205
36206
36207  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36208    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36209$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36210    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36211$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36212  fi
36213
36214  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36215  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36216    { $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
36217$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;}
36218  fi
36219
36220  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36221    { $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
36222$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36223  fi
36224
36225  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36226
36227
36228  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36229
36230
36231
36232
36233
36234
36235
36236
36237
36238
36239
36240
36241
36242
36243
36244
36245
36246
36247
36248
36249
36250
36251
36252
36253
36254
36255
36256
36257
36258
36259
36260
36261
36262
36263
36264
36265
36266
36267
36268
36269
36270
36271
36272
36273
36274
36275
36276
36277
36278    # Execute function body
36279
36280  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36281  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36282
36283  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36284    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36285  fi
36286
36287  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36288    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36289  fi
36290
36291  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36292  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36293
36294  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36295    :
36296
36297  else
36298    :
36299
36300          { $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
36301$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36302
36303
36304  fi
36305
36306
36307
36308
36309
36310
36311
36312
36313
36314
36315
36316
36317
36318
36319  fi
36320
36321  #
36322  # Setup the preprocessor (CPP and CXXCPP)
36323  #
36324  ac_ext=c
36325ac_cpp='$CPP $CPPFLAGS'
36326ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36327ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36328ac_compiler_gnu=$ac_cv_c_compiler_gnu
36329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36330$as_echo_n "checking how to run the C preprocessor... " >&6; }
36331# On Suns, sometimes $CPP names a directory.
36332if test -n "$CPP" && test -d "$CPP"; then
36333  CPP=
36334fi
36335if test -z "$CPP"; then
36336  if ${ac_cv_prog_CPP+:} false; then :
36337  $as_echo_n "(cached) " >&6
36338else
36339      # Double quotes because CPP needs to be expanded
36340    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36341    do
36342      ac_preproc_ok=false
36343for ac_c_preproc_warn_flag in '' yes
36344do
36345  # Use a header file that comes with gcc, so configuring glibc
36346  # with a fresh cross-compiler works.
36347  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36348  # <limits.h> exists even on freestanding compilers.
36349  # On the NeXT, cc -E runs the code through the compiler's parser,
36350  # not just through cpp. "Syntax error" is here to catch this case.
36351  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36352/* end confdefs.h.  */
36353#ifdef __STDC__
36354# include <limits.h>
36355#else
36356# include <assert.h>
36357#endif
36358		     Syntax error
36359_ACEOF
36360if ac_fn_c_try_cpp "$LINENO"; then :
36361
36362else
36363  # Broken: fails on valid input.
36364continue
36365fi
36366rm -f conftest.err conftest.i conftest.$ac_ext
36367
36368  # OK, works on sane cases.  Now check whether nonexistent headers
36369  # can be detected and how.
36370  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36371/* end confdefs.h.  */
36372#include <ac_nonexistent.h>
36373_ACEOF
36374if ac_fn_c_try_cpp "$LINENO"; then :
36375  # Broken: success on invalid input.
36376continue
36377else
36378  # Passes both tests.
36379ac_preproc_ok=:
36380break
36381fi
36382rm -f conftest.err conftest.i conftest.$ac_ext
36383
36384done
36385# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36386rm -f conftest.i conftest.err conftest.$ac_ext
36387if $ac_preproc_ok; then :
36388  break
36389fi
36390
36391    done
36392    ac_cv_prog_CPP=$CPP
36393
36394fi
36395  CPP=$ac_cv_prog_CPP
36396else
36397  ac_cv_prog_CPP=$CPP
36398fi
36399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36400$as_echo "$CPP" >&6; }
36401ac_preproc_ok=false
36402for ac_c_preproc_warn_flag in '' yes
36403do
36404  # Use a header file that comes with gcc, so configuring glibc
36405  # with a fresh cross-compiler works.
36406  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36407  # <limits.h> exists even on freestanding compilers.
36408  # On the NeXT, cc -E runs the code through the compiler's parser,
36409  # not just through cpp. "Syntax error" is here to catch this case.
36410  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36411/* end confdefs.h.  */
36412#ifdef __STDC__
36413# include <limits.h>
36414#else
36415# include <assert.h>
36416#endif
36417		     Syntax error
36418_ACEOF
36419if ac_fn_c_try_cpp "$LINENO"; then :
36420
36421else
36422  # Broken: fails on valid input.
36423continue
36424fi
36425rm -f conftest.err conftest.i conftest.$ac_ext
36426
36427  # OK, works on sane cases.  Now check whether nonexistent headers
36428  # can be detected and how.
36429  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36430/* end confdefs.h.  */
36431#include <ac_nonexistent.h>
36432_ACEOF
36433if ac_fn_c_try_cpp "$LINENO"; then :
36434  # Broken: success on invalid input.
36435continue
36436else
36437  # Passes both tests.
36438ac_preproc_ok=:
36439break
36440fi
36441rm -f conftest.err conftest.i conftest.$ac_ext
36442
36443done
36444# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36445rm -f conftest.i conftest.err conftest.$ac_ext
36446if $ac_preproc_ok; then :
36447
36448else
36449  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36450$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36451as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36452See \`config.log' for more details" "$LINENO" 5; }
36453fi
36454
36455ac_ext=cpp
36456ac_cpp='$CXXCPP $CPPFLAGS'
36457ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36458ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36459ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36460
36461
36462  # Only process if variable expands to non-empty
36463
36464  if test "x$CPP" != x; then
36465    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36466
36467  # First separate the path from the arguments. This will split at the first
36468  # space.
36469  complete="$CPP"
36470  path="${complete%% *}"
36471  tmp="$complete EOL"
36472  arguments="${tmp#* }"
36473
36474  # Input might be given as Windows format, start by converting to
36475  # unix format.
36476  new_path=`$CYGPATH -u "$path"`
36477
36478  # Now try to locate executable using which
36479  new_path=`$WHICH "$new_path" 2> /dev/null`
36480  # bat and cmd files are not always considered executable in cygwin causing which
36481  # to not find them
36482  if test "x$new_path" = x \
36483      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36484      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36485    new_path=`$CYGPATH -u "$path"`
36486  fi
36487  if test "x$new_path" = x; then
36488    # Oops. Which didn't find the executable.
36489    # The splitting of arguments from the executable at a space might have been incorrect,
36490    # since paths with space are more likely in Windows. Give it another try with the whole
36491    # argument.
36492    path="$complete"
36493    arguments="EOL"
36494    new_path=`$CYGPATH -u "$path"`
36495    new_path=`$WHICH "$new_path" 2> /dev/null`
36496    # bat and cmd files are not always considered executable in cygwin causing which
36497    # to not find them
36498    if test "x$new_path" = x \
36499        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36500        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36501      new_path=`$CYGPATH -u "$path"`
36502    fi
36503    if test "x$new_path" = x; then
36504      # It's still not found. Now this is an unrecoverable error.
36505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36506$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36507      has_space=`$ECHO "$complete" | $GREP " "`
36508      if test "x$has_space" != x; then
36509        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36510$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36511      fi
36512      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36513    fi
36514  fi
36515
36516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36519  # "foo.exe" is OK but "foo" is an error.
36520  #
36521  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36522  # It is also a way to make sure we got the proper file name for the real test later on.
36523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36524  if test "x$test_shortpath" = x; then
36525    # Short path failed, file does not exist as specified.
36526    # Try adding .exe or .cmd
36527    if test -f "${new_path}.exe"; then
36528      input_to_shortpath="${new_path}.exe"
36529    elif test -f "${new_path}.cmd"; then
36530      input_to_shortpath="${new_path}.cmd"
36531    else
36532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36533$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36534      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36535$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36536      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36537    fi
36538  else
36539    input_to_shortpath="$new_path"
36540  fi
36541
36542  # Call helper function which possibly converts this using DOS-style short mode.
36543  # If so, the updated path is stored in $new_path.
36544  new_path="$input_to_shortpath"
36545
36546  input_path="$input_to_shortpath"
36547  # Check if we need to convert this using DOS-style short mode. If the path
36548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36549  # take no chances and rewrite it.
36550  # Note: m4 eats our [], so we need to use [ and ] instead.
36551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36552  if test "x$has_forbidden_chars" != x; then
36553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36554    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36555    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36556    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36557      # Going to short mode and back again did indeed matter. Since short mode is
36558      # case insensitive, let's make it lowercase to improve readability.
36559      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36560      # Now convert it back to Unix-style (cygpath)
36561      input_path=`$CYGPATH -u "$shortmode_path"`
36562      new_path="$input_path"
36563    fi
36564  fi
36565
36566  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36567  if test "x$test_cygdrive_prefix" = x; then
36568    # As a simple fix, exclude /usr/bin since it's not a real path.
36569    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36570      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36571      # a path prefixed by /cygdrive for fixpath to work.
36572      new_path="$CYGWIN_ROOT_PATH$input_path"
36573    fi
36574  fi
36575
36576  # remove trailing .exe if any
36577  new_path="${new_path/%.exe/}"
36578
36579    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36580
36581  # First separate the path from the arguments. This will split at the first
36582  # space.
36583  complete="$CPP"
36584  path="${complete%% *}"
36585  tmp="$complete EOL"
36586  arguments="${tmp#* }"
36587
36588  # Input might be given as Windows format, start by converting to
36589  # unix format.
36590  new_path="$path"
36591
36592  windows_path="$new_path"
36593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36594    unix_path=`$CYGPATH -u "$windows_path"`
36595    new_path="$unix_path"
36596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36598    new_path="$unix_path"
36599  fi
36600
36601
36602  # Now try to locate executable using which
36603  new_path=`$WHICH "$new_path" 2> /dev/null`
36604
36605  if test "x$new_path" = x; then
36606    # Oops. Which didn't find the executable.
36607    # The splitting of arguments from the executable at a space might have been incorrect,
36608    # since paths with space are more likely in Windows. Give it another try with the whole
36609    # argument.
36610    path="$complete"
36611    arguments="EOL"
36612    new_path="$path"
36613
36614  windows_path="$new_path"
36615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36616    unix_path=`$CYGPATH -u "$windows_path"`
36617    new_path="$unix_path"
36618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36620    new_path="$unix_path"
36621  fi
36622
36623
36624    new_path=`$WHICH "$new_path" 2> /dev/null`
36625    # bat and cmd files are not always considered executable in MSYS causing which
36626    # to not find them
36627    if test "x$new_path" = x \
36628        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36629        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36630      new_path="$path"
36631
36632  windows_path="$new_path"
36633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36634    unix_path=`$CYGPATH -u "$windows_path"`
36635    new_path="$unix_path"
36636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36638    new_path="$unix_path"
36639  fi
36640
36641    fi
36642
36643    if test "x$new_path" = x; then
36644      # It's still not found. Now this is an unrecoverable error.
36645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36646$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36647      has_space=`$ECHO "$complete" | $GREP " "`
36648      if test "x$has_space" != x; then
36649        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36650$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36651      fi
36652      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36653    fi
36654  fi
36655
36656  # Now new_path has a complete unix path to the binary
36657  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36658    # Keep paths in /bin as-is, but remove trailing .exe if any
36659    new_path="${new_path/%.exe/}"
36660    # Do not save /bin paths to all_fixpath_prefixes!
36661  else
36662    # Not in mixed or Windows style, start by that.
36663    new_path=`cmd //c echo $new_path`
36664
36665  input_path="$new_path"
36666  # Check if we need to convert this using DOS-style short mode. If the path
36667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36668  # take no chances and rewrite it.
36669  # Note: m4 eats our [], so we need to use [ and ] instead.
36670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36671  if test "x$has_forbidden_chars" != x; then
36672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36673    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36674  fi
36675
36676    # Output is in $new_path
36677
36678  windows_path="$new_path"
36679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36680    unix_path=`$CYGPATH -u "$windows_path"`
36681    new_path="$unix_path"
36682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36684    new_path="$unix_path"
36685  fi
36686
36687    # remove trailing .exe if any
36688    new_path="${new_path/%.exe/}"
36689
36690    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36691    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36692  fi
36693
36694    else
36695      # We're on a unix platform. Hooray! :)
36696      # First separate the path from the arguments. This will split at the first
36697      # space.
36698      complete="$CPP"
36699      path="${complete%% *}"
36700      tmp="$complete EOL"
36701      arguments="${tmp#* }"
36702
36703      # Cannot rely on the command "which" here since it doesn't always work.
36704      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36705      if test -z "$is_absolute_path"; then
36706        # Path to executable is not absolute. Find it.
36707        IFS_save="$IFS"
36708        IFS=:
36709        for p in $PATH; do
36710          if test -f "$p/$path" && test -x "$p/$path"; then
36711            new_path="$p/$path"
36712            break
36713          fi
36714        done
36715        IFS="$IFS_save"
36716      else
36717        # This is an absolute path, we can use it without further modifications.
36718        new_path="$path"
36719      fi
36720
36721      if test "x$new_path" = x; then
36722        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36723$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36724        has_space=`$ECHO "$complete" | $GREP " "`
36725        if test "x$has_space" != x; then
36726          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36727$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36728        fi
36729        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36730      fi
36731    fi
36732
36733    # Now join together the path and the arguments once again
36734    if test "x$arguments" != xEOL; then
36735      new_complete="$new_path ${arguments% *}"
36736    else
36737      new_complete="$new_path"
36738    fi
36739
36740    if test "x$complete" != "x$new_complete"; then
36741      CPP="$new_complete"
36742      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36743$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36744    fi
36745  fi
36746
36747  ac_ext=cpp
36748ac_cpp='$CXXCPP $CPPFLAGS'
36749ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36750ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36751ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36753$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36754if test -z "$CXXCPP"; then
36755  if ${ac_cv_prog_CXXCPP+:} false; then :
36756  $as_echo_n "(cached) " >&6
36757else
36758      # Double quotes because CXXCPP needs to be expanded
36759    for CXXCPP in "$CXX -E" "/lib/cpp"
36760    do
36761      ac_preproc_ok=false
36762for ac_cxx_preproc_warn_flag in '' yes
36763do
36764  # Use a header file that comes with gcc, so configuring glibc
36765  # with a fresh cross-compiler works.
36766  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36767  # <limits.h> exists even on freestanding compilers.
36768  # On the NeXT, cc -E runs the code through the compiler's parser,
36769  # not just through cpp. "Syntax error" is here to catch this case.
36770  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36771/* end confdefs.h.  */
36772#ifdef __STDC__
36773# include <limits.h>
36774#else
36775# include <assert.h>
36776#endif
36777		     Syntax error
36778_ACEOF
36779if ac_fn_cxx_try_cpp "$LINENO"; then :
36780
36781else
36782  # Broken: fails on valid input.
36783continue
36784fi
36785rm -f conftest.err conftest.i conftest.$ac_ext
36786
36787  # OK, works on sane cases.  Now check whether nonexistent headers
36788  # can be detected and how.
36789  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36790/* end confdefs.h.  */
36791#include <ac_nonexistent.h>
36792_ACEOF
36793if ac_fn_cxx_try_cpp "$LINENO"; then :
36794  # Broken: success on invalid input.
36795continue
36796else
36797  # Passes both tests.
36798ac_preproc_ok=:
36799break
36800fi
36801rm -f conftest.err conftest.i conftest.$ac_ext
36802
36803done
36804# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36805rm -f conftest.i conftest.err conftest.$ac_ext
36806if $ac_preproc_ok; then :
36807  break
36808fi
36809
36810    done
36811    ac_cv_prog_CXXCPP=$CXXCPP
36812
36813fi
36814  CXXCPP=$ac_cv_prog_CXXCPP
36815else
36816  ac_cv_prog_CXXCPP=$CXXCPP
36817fi
36818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36819$as_echo "$CXXCPP" >&6; }
36820ac_preproc_ok=false
36821for ac_cxx_preproc_warn_flag in '' yes
36822do
36823  # Use a header file that comes with gcc, so configuring glibc
36824  # with a fresh cross-compiler works.
36825  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36826  # <limits.h> exists even on freestanding compilers.
36827  # On the NeXT, cc -E runs the code through the compiler's parser,
36828  # not just through cpp. "Syntax error" is here to catch this case.
36829  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36830/* end confdefs.h.  */
36831#ifdef __STDC__
36832# include <limits.h>
36833#else
36834# include <assert.h>
36835#endif
36836		     Syntax error
36837_ACEOF
36838if ac_fn_cxx_try_cpp "$LINENO"; then :
36839
36840else
36841  # Broken: fails on valid input.
36842continue
36843fi
36844rm -f conftest.err conftest.i conftest.$ac_ext
36845
36846  # OK, works on sane cases.  Now check whether nonexistent headers
36847  # can be detected and how.
36848  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36849/* end confdefs.h.  */
36850#include <ac_nonexistent.h>
36851_ACEOF
36852if ac_fn_cxx_try_cpp "$LINENO"; then :
36853  # Broken: success on invalid input.
36854continue
36855else
36856  # Passes both tests.
36857ac_preproc_ok=:
36858break
36859fi
36860rm -f conftest.err conftest.i conftest.$ac_ext
36861
36862done
36863# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36864rm -f conftest.i conftest.err conftest.$ac_ext
36865if $ac_preproc_ok; then :
36866
36867else
36868  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36870as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36871See \`config.log' for more details" "$LINENO" 5; }
36872fi
36873
36874ac_ext=cpp
36875ac_cpp='$CXXCPP $CPPFLAGS'
36876ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36877ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36878ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36879
36880
36881  # Only process if variable expands to non-empty
36882
36883  if test "x$CXXCPP" != x; then
36884    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36885
36886  # First separate the path from the arguments. This will split at the first
36887  # space.
36888  complete="$CXXCPP"
36889  path="${complete%% *}"
36890  tmp="$complete EOL"
36891  arguments="${tmp#* }"
36892
36893  # Input might be given as Windows format, start by converting to
36894  # unix format.
36895  new_path=`$CYGPATH -u "$path"`
36896
36897  # Now try to locate executable using which
36898  new_path=`$WHICH "$new_path" 2> /dev/null`
36899  # bat and cmd files are not always considered executable in cygwin causing which
36900  # to not find them
36901  if test "x$new_path" = x \
36902      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36903      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36904    new_path=`$CYGPATH -u "$path"`
36905  fi
36906  if test "x$new_path" = x; then
36907    # Oops. Which didn't find the executable.
36908    # The splitting of arguments from the executable at a space might have been incorrect,
36909    # since paths with space are more likely in Windows. Give it another try with the whole
36910    # argument.
36911    path="$complete"
36912    arguments="EOL"
36913    new_path=`$CYGPATH -u "$path"`
36914    new_path=`$WHICH "$new_path" 2> /dev/null`
36915    # bat and cmd files are not always considered executable in cygwin causing which
36916    # to not find them
36917    if test "x$new_path" = x \
36918        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36919        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36920      new_path=`$CYGPATH -u "$path"`
36921    fi
36922    if test "x$new_path" = x; then
36923      # It's still not found. Now this is an unrecoverable error.
36924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36925$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36926      has_space=`$ECHO "$complete" | $GREP " "`
36927      if test "x$has_space" != x; then
36928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36930      fi
36931      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36932    fi
36933  fi
36934
36935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36938  # "foo.exe" is OK but "foo" is an error.
36939  #
36940  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36941  # It is also a way to make sure we got the proper file name for the real test later on.
36942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36943  if test "x$test_shortpath" = x; then
36944    # Short path failed, file does not exist as specified.
36945    # Try adding .exe or .cmd
36946    if test -f "${new_path}.exe"; then
36947      input_to_shortpath="${new_path}.exe"
36948    elif test -f "${new_path}.cmd"; then
36949      input_to_shortpath="${new_path}.cmd"
36950    else
36951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36952$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36953      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36954$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36955      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36956    fi
36957  else
36958    input_to_shortpath="$new_path"
36959  fi
36960
36961  # Call helper function which possibly converts this using DOS-style short mode.
36962  # If so, the updated path is stored in $new_path.
36963  new_path="$input_to_shortpath"
36964
36965  input_path="$input_to_shortpath"
36966  # Check if we need to convert this using DOS-style short mode. If the path
36967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36968  # take no chances and rewrite it.
36969  # Note: m4 eats our [], so we need to use [ and ] instead.
36970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36971  if test "x$has_forbidden_chars" != x; then
36972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36973    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36974    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36975    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36976      # Going to short mode and back again did indeed matter. Since short mode is
36977      # case insensitive, let's make it lowercase to improve readability.
36978      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36979      # Now convert it back to Unix-style (cygpath)
36980      input_path=`$CYGPATH -u "$shortmode_path"`
36981      new_path="$input_path"
36982    fi
36983  fi
36984
36985  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36986  if test "x$test_cygdrive_prefix" = x; then
36987    # As a simple fix, exclude /usr/bin since it's not a real path.
36988    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36989      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36990      # a path prefixed by /cygdrive for fixpath to work.
36991      new_path="$CYGWIN_ROOT_PATH$input_path"
36992    fi
36993  fi
36994
36995  # remove trailing .exe if any
36996  new_path="${new_path/%.exe/}"
36997
36998    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36999
37000  # First separate the path from the arguments. This will split at the first
37001  # space.
37002  complete="$CXXCPP"
37003  path="${complete%% *}"
37004  tmp="$complete EOL"
37005  arguments="${tmp#* }"
37006
37007  # Input might be given as Windows format, start by converting to
37008  # unix format.
37009  new_path="$path"
37010
37011  windows_path="$new_path"
37012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37013    unix_path=`$CYGPATH -u "$windows_path"`
37014    new_path="$unix_path"
37015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37017    new_path="$unix_path"
37018  fi
37019
37020
37021  # Now try to locate executable using which
37022  new_path=`$WHICH "$new_path" 2> /dev/null`
37023
37024  if test "x$new_path" = x; then
37025    # Oops. Which didn't find the executable.
37026    # The splitting of arguments from the executable at a space might have been incorrect,
37027    # since paths with space are more likely in Windows. Give it another try with the whole
37028    # argument.
37029    path="$complete"
37030    arguments="EOL"
37031    new_path="$path"
37032
37033  windows_path="$new_path"
37034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37035    unix_path=`$CYGPATH -u "$windows_path"`
37036    new_path="$unix_path"
37037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37039    new_path="$unix_path"
37040  fi
37041
37042
37043    new_path=`$WHICH "$new_path" 2> /dev/null`
37044    # bat and cmd files are not always considered executable in MSYS causing which
37045    # to not find them
37046    if test "x$new_path" = x \
37047        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37048        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37049      new_path="$path"
37050
37051  windows_path="$new_path"
37052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37053    unix_path=`$CYGPATH -u "$windows_path"`
37054    new_path="$unix_path"
37055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37057    new_path="$unix_path"
37058  fi
37059
37060    fi
37061
37062    if test "x$new_path" = x; then
37063      # It's still not found. Now this is an unrecoverable error.
37064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37065$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37066      has_space=`$ECHO "$complete" | $GREP " "`
37067      if test "x$has_space" != x; then
37068        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37069$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37070      fi
37071      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37072    fi
37073  fi
37074
37075  # Now new_path has a complete unix path to the binary
37076  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37077    # Keep paths in /bin as-is, but remove trailing .exe if any
37078    new_path="${new_path/%.exe/}"
37079    # Do not save /bin paths to all_fixpath_prefixes!
37080  else
37081    # Not in mixed or Windows style, start by that.
37082    new_path=`cmd //c echo $new_path`
37083
37084  input_path="$new_path"
37085  # Check if we need to convert this using DOS-style short mode. If the path
37086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37087  # take no chances and rewrite it.
37088  # Note: m4 eats our [], so we need to use [ and ] instead.
37089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37090  if test "x$has_forbidden_chars" != x; then
37091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37093  fi
37094
37095    # Output is in $new_path
37096
37097  windows_path="$new_path"
37098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37099    unix_path=`$CYGPATH -u "$windows_path"`
37100    new_path="$unix_path"
37101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37103    new_path="$unix_path"
37104  fi
37105
37106    # remove trailing .exe if any
37107    new_path="${new_path/%.exe/}"
37108
37109    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37110    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37111  fi
37112
37113    else
37114      # We're on a unix platform. Hooray! :)
37115      # First separate the path from the arguments. This will split at the first
37116      # space.
37117      complete="$CXXCPP"
37118      path="${complete%% *}"
37119      tmp="$complete EOL"
37120      arguments="${tmp#* }"
37121
37122      # Cannot rely on the command "which" here since it doesn't always work.
37123      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37124      if test -z "$is_absolute_path"; then
37125        # Path to executable is not absolute. Find it.
37126        IFS_save="$IFS"
37127        IFS=:
37128        for p in $PATH; do
37129          if test -f "$p/$path" && test -x "$p/$path"; then
37130            new_path="$p/$path"
37131            break
37132          fi
37133        done
37134        IFS="$IFS_save"
37135      else
37136        # This is an absolute path, we can use it without further modifications.
37137        new_path="$path"
37138      fi
37139
37140      if test "x$new_path" = x; then
37141        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37142$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37143        has_space=`$ECHO "$complete" | $GREP " "`
37144        if test "x$has_space" != x; then
37145          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37146$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37147        fi
37148        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37149      fi
37150    fi
37151
37152    # Now join together the path and the arguments once again
37153    if test "x$arguments" != xEOL; then
37154      new_complete="$new_path ${arguments% *}"
37155    else
37156      new_complete="$new_path"
37157    fi
37158
37159    if test "x$complete" != "x$new_complete"; then
37160      CXXCPP="$new_complete"
37161      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37162$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37163    fi
37164  fi
37165
37166
37167  #
37168  # Setup the linker (LD)
37169  #
37170  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37171    # In the Microsoft toolchain we have a separate LD command "link".
37172    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37173    # a cygwin program for something completely different.
37174    # Extract the first word of "link", so it can be a program name with args.
37175set dummy link; ac_word=$2
37176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37177$as_echo_n "checking for $ac_word... " >&6; }
37178if ${ac_cv_prog_LD+:} false; then :
37179  $as_echo_n "(cached) " >&6
37180else
37181  if test -n "$LD"; then
37182  ac_cv_prog_LD="$LD" # Let the user override the test.
37183else
37184  ac_prog_rejected=no
37185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37186for as_dir in $PATH
37187do
37188  IFS=$as_save_IFS
37189  test -z "$as_dir" && as_dir=.
37190    for ac_exec_ext in '' $ac_executable_extensions; do
37191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37192    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37193       ac_prog_rejected=yes
37194       continue
37195     fi
37196    ac_cv_prog_LD="link"
37197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37198    break 2
37199  fi
37200done
37201  done
37202IFS=$as_save_IFS
37203
37204if test $ac_prog_rejected = yes; then
37205  # We found a bogon in the path, so make sure we never use it.
37206  set dummy $ac_cv_prog_LD
37207  shift
37208  if test $# != 0; then
37209    # We chose a different compiler from the bogus one.
37210    # However, it has the same basename, so the bogon will be chosen
37211    # first if we set LD to just the basename; use the full file name.
37212    shift
37213    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37214  fi
37215fi
37216fi
37217fi
37218LD=$ac_cv_prog_LD
37219if test -n "$LD"; then
37220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37221$as_echo "$LD" >&6; }
37222else
37223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37224$as_echo "no" >&6; }
37225fi
37226
37227
37228
37229  # Only process if variable expands to non-empty
37230
37231  if test "x$LD" != x; then
37232    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37233
37234  # First separate the path from the arguments. This will split at the first
37235  # space.
37236  complete="$LD"
37237  path="${complete%% *}"
37238  tmp="$complete EOL"
37239  arguments="${tmp#* }"
37240
37241  # Input might be given as Windows format, start by converting to
37242  # unix format.
37243  new_path=`$CYGPATH -u "$path"`
37244
37245  # Now try to locate executable using which
37246  new_path=`$WHICH "$new_path" 2> /dev/null`
37247  # bat and cmd files are not always considered executable in cygwin causing which
37248  # to not find them
37249  if test "x$new_path" = x \
37250      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37251      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37252    new_path=`$CYGPATH -u "$path"`
37253  fi
37254  if test "x$new_path" = x; then
37255    # Oops. Which didn't find the executable.
37256    # The splitting of arguments from the executable at a space might have been incorrect,
37257    # since paths with space are more likely in Windows. Give it another try with the whole
37258    # argument.
37259    path="$complete"
37260    arguments="EOL"
37261    new_path=`$CYGPATH -u "$path"`
37262    new_path=`$WHICH "$new_path" 2> /dev/null`
37263    # bat and cmd files are not always considered executable in cygwin causing which
37264    # to not find them
37265    if test "x$new_path" = x \
37266        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37267        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37268      new_path=`$CYGPATH -u "$path"`
37269    fi
37270    if test "x$new_path" = x; then
37271      # It's still not found. Now this is an unrecoverable error.
37272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37273$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37274      has_space=`$ECHO "$complete" | $GREP " "`
37275      if test "x$has_space" != x; then
37276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37278      fi
37279      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37280    fi
37281  fi
37282
37283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37286  # "foo.exe" is OK but "foo" is an error.
37287  #
37288  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37289  # It is also a way to make sure we got the proper file name for the real test later on.
37290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37291  if test "x$test_shortpath" = x; then
37292    # Short path failed, file does not exist as specified.
37293    # Try adding .exe or .cmd
37294    if test -f "${new_path}.exe"; then
37295      input_to_shortpath="${new_path}.exe"
37296    elif test -f "${new_path}.cmd"; then
37297      input_to_shortpath="${new_path}.cmd"
37298    else
37299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37300$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37301      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37302$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37303      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37304    fi
37305  else
37306    input_to_shortpath="$new_path"
37307  fi
37308
37309  # Call helper function which possibly converts this using DOS-style short mode.
37310  # If so, the updated path is stored in $new_path.
37311  new_path="$input_to_shortpath"
37312
37313  input_path="$input_to_shortpath"
37314  # Check if we need to convert this using DOS-style short mode. If the path
37315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37316  # take no chances and rewrite it.
37317  # Note: m4 eats our [], so we need to use [ and ] instead.
37318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37319  if test "x$has_forbidden_chars" != x; then
37320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37324      # Going to short mode and back again did indeed matter. Since short mode is
37325      # case insensitive, let's make it lowercase to improve readability.
37326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37327      # Now convert it back to Unix-style (cygpath)
37328      input_path=`$CYGPATH -u "$shortmode_path"`
37329      new_path="$input_path"
37330    fi
37331  fi
37332
37333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37334  if test "x$test_cygdrive_prefix" = x; then
37335    # As a simple fix, exclude /usr/bin since it's not a real path.
37336    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37338      # a path prefixed by /cygdrive for fixpath to work.
37339      new_path="$CYGWIN_ROOT_PATH$input_path"
37340    fi
37341  fi
37342
37343  # remove trailing .exe if any
37344  new_path="${new_path/%.exe/}"
37345
37346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37347
37348  # First separate the path from the arguments. This will split at the first
37349  # space.
37350  complete="$LD"
37351  path="${complete%% *}"
37352  tmp="$complete EOL"
37353  arguments="${tmp#* }"
37354
37355  # Input might be given as Windows format, start by converting to
37356  # unix format.
37357  new_path="$path"
37358
37359  windows_path="$new_path"
37360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37361    unix_path=`$CYGPATH -u "$windows_path"`
37362    new_path="$unix_path"
37363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37365    new_path="$unix_path"
37366  fi
37367
37368
37369  # Now try to locate executable using which
37370  new_path=`$WHICH "$new_path" 2> /dev/null`
37371
37372  if test "x$new_path" = x; then
37373    # Oops. Which didn't find the executable.
37374    # The splitting of arguments from the executable at a space might have been incorrect,
37375    # since paths with space are more likely in Windows. Give it another try with the whole
37376    # argument.
37377    path="$complete"
37378    arguments="EOL"
37379    new_path="$path"
37380
37381  windows_path="$new_path"
37382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37383    unix_path=`$CYGPATH -u "$windows_path"`
37384    new_path="$unix_path"
37385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37387    new_path="$unix_path"
37388  fi
37389
37390
37391    new_path=`$WHICH "$new_path" 2> /dev/null`
37392    # bat and cmd files are not always considered executable in MSYS causing which
37393    # to not find them
37394    if test "x$new_path" = x \
37395        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37396        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37397      new_path="$path"
37398
37399  windows_path="$new_path"
37400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37401    unix_path=`$CYGPATH -u "$windows_path"`
37402    new_path="$unix_path"
37403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37405    new_path="$unix_path"
37406  fi
37407
37408    fi
37409
37410    if test "x$new_path" = x; then
37411      # It's still not found. Now this is an unrecoverable error.
37412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37413$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37414      has_space=`$ECHO "$complete" | $GREP " "`
37415      if test "x$has_space" != x; then
37416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37418      fi
37419      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37420    fi
37421  fi
37422
37423  # Now new_path has a complete unix path to the binary
37424  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37425    # Keep paths in /bin as-is, but remove trailing .exe if any
37426    new_path="${new_path/%.exe/}"
37427    # Do not save /bin paths to all_fixpath_prefixes!
37428  else
37429    # Not in mixed or Windows style, start by that.
37430    new_path=`cmd //c echo $new_path`
37431
37432  input_path="$new_path"
37433  # Check if we need to convert this using DOS-style short mode. If the path
37434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37435  # take no chances and rewrite it.
37436  # Note: m4 eats our [], so we need to use [ and ] instead.
37437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37438  if test "x$has_forbidden_chars" != x; then
37439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37441  fi
37442
37443    # Output is in $new_path
37444
37445  windows_path="$new_path"
37446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37447    unix_path=`$CYGPATH -u "$windows_path"`
37448    new_path="$unix_path"
37449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37451    new_path="$unix_path"
37452  fi
37453
37454    # remove trailing .exe if any
37455    new_path="${new_path/%.exe/}"
37456
37457    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37458    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37459  fi
37460
37461    else
37462      # We're on a unix platform. Hooray! :)
37463      # First separate the path from the arguments. This will split at the first
37464      # space.
37465      complete="$LD"
37466      path="${complete%% *}"
37467      tmp="$complete EOL"
37468      arguments="${tmp#* }"
37469
37470      # Cannot rely on the command "which" here since it doesn't always work.
37471      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37472      if test -z "$is_absolute_path"; then
37473        # Path to executable is not absolute. Find it.
37474        IFS_save="$IFS"
37475        IFS=:
37476        for p in $PATH; do
37477          if test -f "$p/$path" && test -x "$p/$path"; then
37478            new_path="$p/$path"
37479            break
37480          fi
37481        done
37482        IFS="$IFS_save"
37483      else
37484        # This is an absolute path, we can use it without further modifications.
37485        new_path="$path"
37486      fi
37487
37488      if test "x$new_path" = x; then
37489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37490$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37491        has_space=`$ECHO "$complete" | $GREP " "`
37492        if test "x$has_space" != x; then
37493          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37494$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37495        fi
37496        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37497      fi
37498    fi
37499
37500    # Now join together the path and the arguments once again
37501    if test "x$arguments" != xEOL; then
37502      new_complete="$new_path ${arguments% *}"
37503    else
37504      new_complete="$new_path"
37505    fi
37506
37507    if test "x$complete" != "x$new_complete"; then
37508      LD="$new_complete"
37509      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37510$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37511    fi
37512  fi
37513
37514    # Verify that we indeed succeeded with this trick.
37515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37516$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37517    "$LD" --version > /dev/null
37518    if test $? -eq 0 ; then
37519      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37520$as_echo "no" >&6; }
37521      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37522    else
37523      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37524$as_echo "yes" >&6; }
37525    fi
37526    LDCXX="$LD"
37527  else
37528    # All other toolchains use the compiler to link.
37529    LD="$CC"
37530    LDCXX="$CXX"
37531  fi
37532
37533  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37534
37535
37536  #
37537  # Setup the assembler (AS)
37538  #
37539  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37540
37541
37542  # Publish this variable in the help.
37543
37544
37545  if [ -z "${AS+x}" ]; then
37546    # The variable is not set by user, try to locate tool using the code snippet
37547    for ac_prog in as
37548do
37549  # Extract the first word of "$ac_prog", so it can be a program name with args.
37550set dummy $ac_prog; ac_word=$2
37551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37552$as_echo_n "checking for $ac_word... " >&6; }
37553if ${ac_cv_path_AS+:} false; then :
37554  $as_echo_n "(cached) " >&6
37555else
37556  case $AS in
37557  [\\/]* | ?:[\\/]*)
37558  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37559  ;;
37560  *)
37561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37562for as_dir in $PATH
37563do
37564  IFS=$as_save_IFS
37565  test -z "$as_dir" && as_dir=.
37566    for ac_exec_ext in '' $ac_executable_extensions; do
37567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37568    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37570    break 2
37571  fi
37572done
37573  done
37574IFS=$as_save_IFS
37575
37576  ;;
37577esac
37578fi
37579AS=$ac_cv_path_AS
37580if test -n "$AS"; then
37581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37582$as_echo "$AS" >&6; }
37583else
37584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37585$as_echo "no" >&6; }
37586fi
37587
37588
37589  test -n "$AS" && break
37590done
37591
37592  else
37593    # The variable is set, but is it from the command line or the environment?
37594
37595    # Try to remove the string !AS! from our list.
37596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37598      # If it failed, the variable was not from the command line. Ignore it,
37599      # but warn the user (except for BASH, which is always set by the calling BASH).
37600      if test "xAS" != xBASH; then
37601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37602$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37603      fi
37604      # Try to locate tool using the code snippet
37605      for ac_prog in as
37606do
37607  # Extract the first word of "$ac_prog", so it can be a program name with args.
37608set dummy $ac_prog; ac_word=$2
37609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37610$as_echo_n "checking for $ac_word... " >&6; }
37611if ${ac_cv_path_AS+:} false; then :
37612  $as_echo_n "(cached) " >&6
37613else
37614  case $AS in
37615  [\\/]* | ?:[\\/]*)
37616  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37617  ;;
37618  *)
37619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37620for as_dir in $PATH
37621do
37622  IFS=$as_save_IFS
37623  test -z "$as_dir" && as_dir=.
37624    for ac_exec_ext in '' $ac_executable_extensions; do
37625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37626    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37628    break 2
37629  fi
37630done
37631  done
37632IFS=$as_save_IFS
37633
37634  ;;
37635esac
37636fi
37637AS=$ac_cv_path_AS
37638if test -n "$AS"; then
37639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37640$as_echo "$AS" >&6; }
37641else
37642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37643$as_echo "no" >&6; }
37644fi
37645
37646
37647  test -n "$AS" && break
37648done
37649
37650    else
37651      # If it succeeded, then it was overridden by the user. We will use it
37652      # for the tool.
37653
37654      # First remove it from the list of overridden variables, so we can test
37655      # for unknown variables in the end.
37656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37657
37658      # Check if we try to supply an empty value
37659      if test "x$AS" = x; then
37660        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37661$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37662        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37663$as_echo_n "checking for AS... " >&6; }
37664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37665$as_echo "disabled" >&6; }
37666      else
37667        # Check if the provided tool contains a complete path.
37668        tool_specified="$AS"
37669        tool_basename="${tool_specified##*/}"
37670        if test "x$tool_basename" = "x$tool_specified"; then
37671          # A command without a complete path is provided, search $PATH.
37672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37673$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37674          # Extract the first word of "$tool_basename", so it can be a program name with args.
37675set dummy $tool_basename; ac_word=$2
37676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37677$as_echo_n "checking for $ac_word... " >&6; }
37678if ${ac_cv_path_AS+:} false; then :
37679  $as_echo_n "(cached) " >&6
37680else
37681  case $AS in
37682  [\\/]* | ?:[\\/]*)
37683  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37684  ;;
37685  *)
37686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37687for as_dir in $PATH
37688do
37689  IFS=$as_save_IFS
37690  test -z "$as_dir" && as_dir=.
37691    for ac_exec_ext in '' $ac_executable_extensions; do
37692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37693    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37695    break 2
37696  fi
37697done
37698  done
37699IFS=$as_save_IFS
37700
37701  ;;
37702esac
37703fi
37704AS=$ac_cv_path_AS
37705if test -n "$AS"; then
37706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37707$as_echo "$AS" >&6; }
37708else
37709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37710$as_echo "no" >&6; }
37711fi
37712
37713
37714          if test "x$AS" = x; then
37715            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37716          fi
37717        else
37718          # Otherwise we believe it is a complete path. Use it as it is.
37719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37720$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37721          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37722$as_echo_n "checking for AS... " >&6; }
37723          if test ! -x "$tool_specified"; then
37724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37725$as_echo "not found" >&6; }
37726            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37727          fi
37728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37729$as_echo "$tool_specified" >&6; }
37730        fi
37731      fi
37732    fi
37733
37734  fi
37735
37736
37737
37738  # Only process if variable expands to non-empty
37739
37740  if test "x$AS" != x; then
37741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37742
37743  # First separate the path from the arguments. This will split at the first
37744  # space.
37745  complete="$AS"
37746  path="${complete%% *}"
37747  tmp="$complete EOL"
37748  arguments="${tmp#* }"
37749
37750  # Input might be given as Windows format, start by converting to
37751  # unix format.
37752  new_path=`$CYGPATH -u "$path"`
37753
37754  # Now try to locate executable using which
37755  new_path=`$WHICH "$new_path" 2> /dev/null`
37756  # bat and cmd files are not always considered executable in cygwin causing which
37757  # to not find them
37758  if test "x$new_path" = x \
37759      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37760      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37761    new_path=`$CYGPATH -u "$path"`
37762  fi
37763  if test "x$new_path" = x; then
37764    # Oops. Which didn't find the executable.
37765    # The splitting of arguments from the executable at a space might have been incorrect,
37766    # since paths with space are more likely in Windows. Give it another try with the whole
37767    # argument.
37768    path="$complete"
37769    arguments="EOL"
37770    new_path=`$CYGPATH -u "$path"`
37771    new_path=`$WHICH "$new_path" 2> /dev/null`
37772    # bat and cmd files are not always considered executable in cygwin causing which
37773    # to not find them
37774    if test "x$new_path" = x \
37775        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37776        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37777      new_path=`$CYGPATH -u "$path"`
37778    fi
37779    if test "x$new_path" = x; then
37780      # It's still not found. Now this is an unrecoverable error.
37781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37782$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37783      has_space=`$ECHO "$complete" | $GREP " "`
37784      if test "x$has_space" != x; then
37785        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37786$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37787      fi
37788      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37789    fi
37790  fi
37791
37792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37795  # "foo.exe" is OK but "foo" is an error.
37796  #
37797  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37798  # It is also a way to make sure we got the proper file name for the real test later on.
37799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37800  if test "x$test_shortpath" = x; then
37801    # Short path failed, file does not exist as specified.
37802    # Try adding .exe or .cmd
37803    if test -f "${new_path}.exe"; then
37804      input_to_shortpath="${new_path}.exe"
37805    elif test -f "${new_path}.cmd"; then
37806      input_to_shortpath="${new_path}.cmd"
37807    else
37808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37809$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37810      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37811$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37812      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37813    fi
37814  else
37815    input_to_shortpath="$new_path"
37816  fi
37817
37818  # Call helper function which possibly converts this using DOS-style short mode.
37819  # If so, the updated path is stored in $new_path.
37820  new_path="$input_to_shortpath"
37821
37822  input_path="$input_to_shortpath"
37823  # Check if we need to convert this using DOS-style short mode. If the path
37824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37825  # take no chances and rewrite it.
37826  # Note: m4 eats our [], so we need to use [ and ] instead.
37827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37828  if test "x$has_forbidden_chars" != x; then
37829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37833      # Going to short mode and back again did indeed matter. Since short mode is
37834      # case insensitive, let's make it lowercase to improve readability.
37835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37836      # Now convert it back to Unix-style (cygpath)
37837      input_path=`$CYGPATH -u "$shortmode_path"`
37838      new_path="$input_path"
37839    fi
37840  fi
37841
37842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37843  if test "x$test_cygdrive_prefix" = x; then
37844    # As a simple fix, exclude /usr/bin since it's not a real path.
37845    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37847      # a path prefixed by /cygdrive for fixpath to work.
37848      new_path="$CYGWIN_ROOT_PATH$input_path"
37849    fi
37850  fi
37851
37852  # remove trailing .exe if any
37853  new_path="${new_path/%.exe/}"
37854
37855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37856
37857  # First separate the path from the arguments. This will split at the first
37858  # space.
37859  complete="$AS"
37860  path="${complete%% *}"
37861  tmp="$complete EOL"
37862  arguments="${tmp#* }"
37863
37864  # Input might be given as Windows format, start by converting to
37865  # unix format.
37866  new_path="$path"
37867
37868  windows_path="$new_path"
37869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37870    unix_path=`$CYGPATH -u "$windows_path"`
37871    new_path="$unix_path"
37872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37874    new_path="$unix_path"
37875  fi
37876
37877
37878  # Now try to locate executable using which
37879  new_path=`$WHICH "$new_path" 2> /dev/null`
37880
37881  if test "x$new_path" = x; then
37882    # Oops. Which didn't find the executable.
37883    # The splitting of arguments from the executable at a space might have been incorrect,
37884    # since paths with space are more likely in Windows. Give it another try with the whole
37885    # argument.
37886    path="$complete"
37887    arguments="EOL"
37888    new_path="$path"
37889
37890  windows_path="$new_path"
37891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37892    unix_path=`$CYGPATH -u "$windows_path"`
37893    new_path="$unix_path"
37894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37896    new_path="$unix_path"
37897  fi
37898
37899
37900    new_path=`$WHICH "$new_path" 2> /dev/null`
37901    # bat and cmd files are not always considered executable in MSYS causing which
37902    # to not find them
37903    if test "x$new_path" = x \
37904        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37905        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37906      new_path="$path"
37907
37908  windows_path="$new_path"
37909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37910    unix_path=`$CYGPATH -u "$windows_path"`
37911    new_path="$unix_path"
37912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37914    new_path="$unix_path"
37915  fi
37916
37917    fi
37918
37919    if test "x$new_path" = x; then
37920      # It's still not found. Now this is an unrecoverable error.
37921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37922$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37923      has_space=`$ECHO "$complete" | $GREP " "`
37924      if test "x$has_space" != x; then
37925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37927      fi
37928      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37929    fi
37930  fi
37931
37932  # Now new_path has a complete unix path to the binary
37933  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37934    # Keep paths in /bin as-is, but remove trailing .exe if any
37935    new_path="${new_path/%.exe/}"
37936    # Do not save /bin paths to all_fixpath_prefixes!
37937  else
37938    # Not in mixed or Windows style, start by that.
37939    new_path=`cmd //c echo $new_path`
37940
37941  input_path="$new_path"
37942  # Check if we need to convert this using DOS-style short mode. If the path
37943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37944  # take no chances and rewrite it.
37945  # Note: m4 eats our [], so we need to use [ and ] instead.
37946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37947  if test "x$has_forbidden_chars" != x; then
37948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37950  fi
37951
37952    # Output is in $new_path
37953
37954  windows_path="$new_path"
37955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37956    unix_path=`$CYGPATH -u "$windows_path"`
37957    new_path="$unix_path"
37958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37960    new_path="$unix_path"
37961  fi
37962
37963    # remove trailing .exe if any
37964    new_path="${new_path/%.exe/}"
37965
37966    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37967    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37968  fi
37969
37970    else
37971      # We're on a unix platform. Hooray! :)
37972      # First separate the path from the arguments. This will split at the first
37973      # space.
37974      complete="$AS"
37975      path="${complete%% *}"
37976      tmp="$complete EOL"
37977      arguments="${tmp#* }"
37978
37979      # Cannot rely on the command "which" here since it doesn't always work.
37980      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37981      if test -z "$is_absolute_path"; then
37982        # Path to executable is not absolute. Find it.
37983        IFS_save="$IFS"
37984        IFS=:
37985        for p in $PATH; do
37986          if test -f "$p/$path" && test -x "$p/$path"; then
37987            new_path="$p/$path"
37988            break
37989          fi
37990        done
37991        IFS="$IFS_save"
37992      else
37993        # This is an absolute path, we can use it without further modifications.
37994        new_path="$path"
37995      fi
37996
37997      if test "x$new_path" = x; then
37998        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37999$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38000        has_space=`$ECHO "$complete" | $GREP " "`
38001        if test "x$has_space" != x; then
38002          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38003$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38004        fi
38005        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38006      fi
38007    fi
38008
38009    # Now join together the path and the arguments once again
38010    if test "x$arguments" != xEOL; then
38011      new_complete="$new_path ${arguments% *}"
38012    else
38013      new_complete="$new_path"
38014    fi
38015
38016    if test "x$complete" != "x$new_complete"; then
38017      AS="$new_complete"
38018      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
38019$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
38020    fi
38021  fi
38022
38023    if test "x$AS" = x; then
38024      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
38025    fi
38026  else
38027    # FIXME: is this correct for microsoft?
38028    AS="$CC -c"
38029  fi
38030
38031
38032  #
38033  # Setup the archiver (AR)
38034  #
38035  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38036    # The corresponding ar tool is lib.exe (used to create static libraries)
38037    # Extract the first word of "lib", so it can be a program name with args.
38038set dummy lib; ac_word=$2
38039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38040$as_echo_n "checking for $ac_word... " >&6; }
38041if ${ac_cv_prog_AR+:} false; then :
38042  $as_echo_n "(cached) " >&6
38043else
38044  if test -n "$AR"; then
38045  ac_cv_prog_AR="$AR" # Let the user override the test.
38046else
38047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38048for as_dir in $PATH
38049do
38050  IFS=$as_save_IFS
38051  test -z "$as_dir" && as_dir=.
38052    for ac_exec_ext in '' $ac_executable_extensions; do
38053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38054    ac_cv_prog_AR="lib"
38055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38056    break 2
38057  fi
38058done
38059  done
38060IFS=$as_save_IFS
38061
38062fi
38063fi
38064AR=$ac_cv_prog_AR
38065if test -n "$AR"; then
38066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38067$as_echo "$AR" >&6; }
38068else
38069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38070$as_echo "no" >&6; }
38071fi
38072
38073
38074  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
38075
38076
38077  # Publish this variable in the help.
38078
38079
38080  if [ -z "${AR+x}" ]; then
38081    # The variable is not set by user, try to locate tool using the code snippet
38082    if test -n "$ac_tool_prefix"; then
38083  for ac_prog in ar gcc-ar
38084  do
38085    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38086set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38088$as_echo_n "checking for $ac_word... " >&6; }
38089if ${ac_cv_prog_AR+:} false; then :
38090  $as_echo_n "(cached) " >&6
38091else
38092  if test -n "$AR"; then
38093  ac_cv_prog_AR="$AR" # Let the user override the test.
38094else
38095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38096for as_dir in $PATH
38097do
38098  IFS=$as_save_IFS
38099  test -z "$as_dir" && as_dir=.
38100    for ac_exec_ext in '' $ac_executable_extensions; do
38101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38102    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38104    break 2
38105  fi
38106done
38107  done
38108IFS=$as_save_IFS
38109
38110fi
38111fi
38112AR=$ac_cv_prog_AR
38113if test -n "$AR"; then
38114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38115$as_echo "$AR" >&6; }
38116else
38117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38118$as_echo "no" >&6; }
38119fi
38120
38121
38122    test -n "$AR" && break
38123  done
38124fi
38125if test -z "$AR"; then
38126  ac_ct_AR=$AR
38127  for ac_prog in ar gcc-ar
38128do
38129  # Extract the first word of "$ac_prog", so it can be a program name with args.
38130set dummy $ac_prog; ac_word=$2
38131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38132$as_echo_n "checking for $ac_word... " >&6; }
38133if ${ac_cv_prog_ac_ct_AR+:} false; then :
38134  $as_echo_n "(cached) " >&6
38135else
38136  if test -n "$ac_ct_AR"; then
38137  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38138else
38139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38140for as_dir in $PATH
38141do
38142  IFS=$as_save_IFS
38143  test -z "$as_dir" && as_dir=.
38144    for ac_exec_ext in '' $ac_executable_extensions; do
38145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38146    ac_cv_prog_ac_ct_AR="$ac_prog"
38147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38148    break 2
38149  fi
38150done
38151  done
38152IFS=$as_save_IFS
38153
38154fi
38155fi
38156ac_ct_AR=$ac_cv_prog_ac_ct_AR
38157if test -n "$ac_ct_AR"; then
38158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38159$as_echo "$ac_ct_AR" >&6; }
38160else
38161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38162$as_echo "no" >&6; }
38163fi
38164
38165
38166  test -n "$ac_ct_AR" && break
38167done
38168
38169  if test "x$ac_ct_AR" = x; then
38170    AR=""
38171  else
38172    case $cross_compiling:$ac_tool_warned in
38173yes:)
38174{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38175$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38176ac_tool_warned=yes ;;
38177esac
38178    AR=$ac_ct_AR
38179  fi
38180fi
38181
38182  else
38183    # The variable is set, but is it from the command line or the environment?
38184
38185    # Try to remove the string !AR! from our list.
38186    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38187    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38188      # If it failed, the variable was not from the command line. Ignore it,
38189      # but warn the user (except for BASH, which is always set by the calling BASH).
38190      if test "xAR" != xBASH; then
38191        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38192$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38193      fi
38194      # Try to locate tool using the code snippet
38195      if test -n "$ac_tool_prefix"; then
38196  for ac_prog in ar gcc-ar
38197  do
38198    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38199set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38201$as_echo_n "checking for $ac_word... " >&6; }
38202if ${ac_cv_prog_AR+:} false; then :
38203  $as_echo_n "(cached) " >&6
38204else
38205  if test -n "$AR"; then
38206  ac_cv_prog_AR="$AR" # Let the user override the test.
38207else
38208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38209for as_dir in $PATH
38210do
38211  IFS=$as_save_IFS
38212  test -z "$as_dir" && as_dir=.
38213    for ac_exec_ext in '' $ac_executable_extensions; do
38214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38215    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38217    break 2
38218  fi
38219done
38220  done
38221IFS=$as_save_IFS
38222
38223fi
38224fi
38225AR=$ac_cv_prog_AR
38226if test -n "$AR"; then
38227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38228$as_echo "$AR" >&6; }
38229else
38230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38231$as_echo "no" >&6; }
38232fi
38233
38234
38235    test -n "$AR" && break
38236  done
38237fi
38238if test -z "$AR"; then
38239  ac_ct_AR=$AR
38240  for ac_prog in ar gcc-ar
38241do
38242  # Extract the first word of "$ac_prog", so it can be a program name with args.
38243set dummy $ac_prog; ac_word=$2
38244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38245$as_echo_n "checking for $ac_word... " >&6; }
38246if ${ac_cv_prog_ac_ct_AR+:} false; then :
38247  $as_echo_n "(cached) " >&6
38248else
38249  if test -n "$ac_ct_AR"; then
38250  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38251else
38252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38253for as_dir in $PATH
38254do
38255  IFS=$as_save_IFS
38256  test -z "$as_dir" && as_dir=.
38257    for ac_exec_ext in '' $ac_executable_extensions; do
38258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38259    ac_cv_prog_ac_ct_AR="$ac_prog"
38260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38261    break 2
38262  fi
38263done
38264  done
38265IFS=$as_save_IFS
38266
38267fi
38268fi
38269ac_ct_AR=$ac_cv_prog_ac_ct_AR
38270if test -n "$ac_ct_AR"; then
38271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38272$as_echo "$ac_ct_AR" >&6; }
38273else
38274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38275$as_echo "no" >&6; }
38276fi
38277
38278
38279  test -n "$ac_ct_AR" && break
38280done
38281
38282  if test "x$ac_ct_AR" = x; then
38283    AR=""
38284  else
38285    case $cross_compiling:$ac_tool_warned in
38286yes:)
38287{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38288$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38289ac_tool_warned=yes ;;
38290esac
38291    AR=$ac_ct_AR
38292  fi
38293fi
38294
38295    else
38296      # If it succeeded, then it was overridden by the user. We will use it
38297      # for the tool.
38298
38299      # First remove it from the list of overridden variables, so we can test
38300      # for unknown variables in the end.
38301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38302
38303      # Check if we try to supply an empty value
38304      if test "x$AR" = x; then
38305        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38306$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38308$as_echo_n "checking for AR... " >&6; }
38309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38310$as_echo "disabled" >&6; }
38311      else
38312        # Check if the provided tool contains a complete path.
38313        tool_specified="$AR"
38314        tool_basename="${tool_specified##*/}"
38315        if test "x$tool_basename" = "x$tool_specified"; then
38316          # A command without a complete path is provided, search $PATH.
38317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38318$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38319          # Extract the first word of "$tool_basename", so it can be a program name with args.
38320set dummy $tool_basename; ac_word=$2
38321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38322$as_echo_n "checking for $ac_word... " >&6; }
38323if ${ac_cv_path_AR+:} false; then :
38324  $as_echo_n "(cached) " >&6
38325else
38326  case $AR in
38327  [\\/]* | ?:[\\/]*)
38328  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38329  ;;
38330  *)
38331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38332for as_dir in $PATH
38333do
38334  IFS=$as_save_IFS
38335  test -z "$as_dir" && as_dir=.
38336    for ac_exec_ext in '' $ac_executable_extensions; do
38337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38338    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38340    break 2
38341  fi
38342done
38343  done
38344IFS=$as_save_IFS
38345
38346  ;;
38347esac
38348fi
38349AR=$ac_cv_path_AR
38350if test -n "$AR"; then
38351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38352$as_echo "$AR" >&6; }
38353else
38354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38355$as_echo "no" >&6; }
38356fi
38357
38358
38359          if test "x$AR" = x; then
38360            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38361          fi
38362        else
38363          # Otherwise we believe it is a complete path. Use it as it is.
38364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38365$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38366          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38367$as_echo_n "checking for AR... " >&6; }
38368          if test ! -x "$tool_specified"; then
38369            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38370$as_echo "not found" >&6; }
38371            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38372          fi
38373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38374$as_echo "$tool_specified" >&6; }
38375        fi
38376      fi
38377    fi
38378
38379  fi
38380
38381
38382  else
38383
38384
38385  # Publish this variable in the help.
38386
38387
38388  if [ -z "${AR+x}" ]; then
38389    # The variable is not set by user, try to locate tool using the code snippet
38390    if test -n "$ac_tool_prefix"; then
38391  for ac_prog in ar
38392  do
38393    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38394set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38396$as_echo_n "checking for $ac_word... " >&6; }
38397if ${ac_cv_prog_AR+:} false; then :
38398  $as_echo_n "(cached) " >&6
38399else
38400  if test -n "$AR"; then
38401  ac_cv_prog_AR="$AR" # Let the user override the test.
38402else
38403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38404for as_dir in $PATH
38405do
38406  IFS=$as_save_IFS
38407  test -z "$as_dir" && as_dir=.
38408    for ac_exec_ext in '' $ac_executable_extensions; do
38409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38410    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38412    break 2
38413  fi
38414done
38415  done
38416IFS=$as_save_IFS
38417
38418fi
38419fi
38420AR=$ac_cv_prog_AR
38421if test -n "$AR"; then
38422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38423$as_echo "$AR" >&6; }
38424else
38425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38426$as_echo "no" >&6; }
38427fi
38428
38429
38430    test -n "$AR" && break
38431  done
38432fi
38433if test -z "$AR"; then
38434  ac_ct_AR=$AR
38435  for ac_prog in ar
38436do
38437  # Extract the first word of "$ac_prog", so it can be a program name with args.
38438set dummy $ac_prog; ac_word=$2
38439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38440$as_echo_n "checking for $ac_word... " >&6; }
38441if ${ac_cv_prog_ac_ct_AR+:} false; then :
38442  $as_echo_n "(cached) " >&6
38443else
38444  if test -n "$ac_ct_AR"; then
38445  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38446else
38447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38448for as_dir in $PATH
38449do
38450  IFS=$as_save_IFS
38451  test -z "$as_dir" && as_dir=.
38452    for ac_exec_ext in '' $ac_executable_extensions; do
38453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38454    ac_cv_prog_ac_ct_AR="$ac_prog"
38455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38456    break 2
38457  fi
38458done
38459  done
38460IFS=$as_save_IFS
38461
38462fi
38463fi
38464ac_ct_AR=$ac_cv_prog_ac_ct_AR
38465if test -n "$ac_ct_AR"; then
38466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38467$as_echo "$ac_ct_AR" >&6; }
38468else
38469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38470$as_echo "no" >&6; }
38471fi
38472
38473
38474  test -n "$ac_ct_AR" && break
38475done
38476
38477  if test "x$ac_ct_AR" = x; then
38478    AR=""
38479  else
38480    case $cross_compiling:$ac_tool_warned in
38481yes:)
38482{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38483$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38484ac_tool_warned=yes ;;
38485esac
38486    AR=$ac_ct_AR
38487  fi
38488fi
38489
38490  else
38491    # The variable is set, but is it from the command line or the environment?
38492
38493    # Try to remove the string !AR! from our list.
38494    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38495    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38496      # If it failed, the variable was not from the command line. Ignore it,
38497      # but warn the user (except for BASH, which is always set by the calling BASH).
38498      if test "xAR" != xBASH; then
38499        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38500$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38501      fi
38502      # Try to locate tool using the code snippet
38503      if test -n "$ac_tool_prefix"; then
38504  for ac_prog in ar
38505  do
38506    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38507set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38509$as_echo_n "checking for $ac_word... " >&6; }
38510if ${ac_cv_prog_AR+:} false; then :
38511  $as_echo_n "(cached) " >&6
38512else
38513  if test -n "$AR"; then
38514  ac_cv_prog_AR="$AR" # Let the user override the test.
38515else
38516as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38517for as_dir in $PATH
38518do
38519  IFS=$as_save_IFS
38520  test -z "$as_dir" && as_dir=.
38521    for ac_exec_ext in '' $ac_executable_extensions; do
38522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38523    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38525    break 2
38526  fi
38527done
38528  done
38529IFS=$as_save_IFS
38530
38531fi
38532fi
38533AR=$ac_cv_prog_AR
38534if test -n "$AR"; then
38535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38536$as_echo "$AR" >&6; }
38537else
38538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38539$as_echo "no" >&6; }
38540fi
38541
38542
38543    test -n "$AR" && break
38544  done
38545fi
38546if test -z "$AR"; then
38547  ac_ct_AR=$AR
38548  for ac_prog in ar
38549do
38550  # Extract the first word of "$ac_prog", so it can be a program name with args.
38551set dummy $ac_prog; ac_word=$2
38552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38553$as_echo_n "checking for $ac_word... " >&6; }
38554if ${ac_cv_prog_ac_ct_AR+:} false; then :
38555  $as_echo_n "(cached) " >&6
38556else
38557  if test -n "$ac_ct_AR"; then
38558  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38559else
38560as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38561for as_dir in $PATH
38562do
38563  IFS=$as_save_IFS
38564  test -z "$as_dir" && as_dir=.
38565    for ac_exec_ext in '' $ac_executable_extensions; do
38566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38567    ac_cv_prog_ac_ct_AR="$ac_prog"
38568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38569    break 2
38570  fi
38571done
38572  done
38573IFS=$as_save_IFS
38574
38575fi
38576fi
38577ac_ct_AR=$ac_cv_prog_ac_ct_AR
38578if test -n "$ac_ct_AR"; then
38579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38580$as_echo "$ac_ct_AR" >&6; }
38581else
38582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38583$as_echo "no" >&6; }
38584fi
38585
38586
38587  test -n "$ac_ct_AR" && break
38588done
38589
38590  if test "x$ac_ct_AR" = x; then
38591    AR=""
38592  else
38593    case $cross_compiling:$ac_tool_warned in
38594yes:)
38595{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38596$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38597ac_tool_warned=yes ;;
38598esac
38599    AR=$ac_ct_AR
38600  fi
38601fi
38602
38603    else
38604      # If it succeeded, then it was overridden by the user. We will use it
38605      # for the tool.
38606
38607      # First remove it from the list of overridden variables, so we can test
38608      # for unknown variables in the end.
38609      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38610
38611      # Check if we try to supply an empty value
38612      if test "x$AR" = x; then
38613        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38614$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38615        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38616$as_echo_n "checking for AR... " >&6; }
38617        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38618$as_echo "disabled" >&6; }
38619      else
38620        # Check if the provided tool contains a complete path.
38621        tool_specified="$AR"
38622        tool_basename="${tool_specified##*/}"
38623        if test "x$tool_basename" = "x$tool_specified"; then
38624          # A command without a complete path is provided, search $PATH.
38625          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38626$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38627          # Extract the first word of "$tool_basename", so it can be a program name with args.
38628set dummy $tool_basename; ac_word=$2
38629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38630$as_echo_n "checking for $ac_word... " >&6; }
38631if ${ac_cv_path_AR+:} false; then :
38632  $as_echo_n "(cached) " >&6
38633else
38634  case $AR in
38635  [\\/]* | ?:[\\/]*)
38636  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38637  ;;
38638  *)
38639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38640for as_dir in $PATH
38641do
38642  IFS=$as_save_IFS
38643  test -z "$as_dir" && as_dir=.
38644    for ac_exec_ext in '' $ac_executable_extensions; do
38645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38646    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38648    break 2
38649  fi
38650done
38651  done
38652IFS=$as_save_IFS
38653
38654  ;;
38655esac
38656fi
38657AR=$ac_cv_path_AR
38658if test -n "$AR"; then
38659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38660$as_echo "$AR" >&6; }
38661else
38662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38663$as_echo "no" >&6; }
38664fi
38665
38666
38667          if test "x$AR" = x; then
38668            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38669          fi
38670        else
38671          # Otherwise we believe it is a complete path. Use it as it is.
38672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38673$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38674          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38675$as_echo_n "checking for AR... " >&6; }
38676          if test ! -x "$tool_specified"; then
38677            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38678$as_echo "not found" >&6; }
38679            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38680          fi
38681          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38682$as_echo "$tool_specified" >&6; }
38683        fi
38684      fi
38685    fi
38686
38687  fi
38688
38689
38690  fi
38691
38692  # Only process if variable expands to non-empty
38693
38694  if test "x$AR" != x; then
38695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38696
38697  # First separate the path from the arguments. This will split at the first
38698  # space.
38699  complete="$AR"
38700  path="${complete%% *}"
38701  tmp="$complete EOL"
38702  arguments="${tmp#* }"
38703
38704  # Input might be given as Windows format, start by converting to
38705  # unix format.
38706  new_path=`$CYGPATH -u "$path"`
38707
38708  # Now try to locate executable using which
38709  new_path=`$WHICH "$new_path" 2> /dev/null`
38710  # bat and cmd files are not always considered executable in cygwin causing which
38711  # to not find them
38712  if test "x$new_path" = x \
38713      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38714      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38715    new_path=`$CYGPATH -u "$path"`
38716  fi
38717  if test "x$new_path" = x; then
38718    # Oops. Which didn't find the executable.
38719    # The splitting of arguments from the executable at a space might have been incorrect,
38720    # since paths with space are more likely in Windows. Give it another try with the whole
38721    # argument.
38722    path="$complete"
38723    arguments="EOL"
38724    new_path=`$CYGPATH -u "$path"`
38725    new_path=`$WHICH "$new_path" 2> /dev/null`
38726    # bat and cmd files are not always considered executable in cygwin causing which
38727    # to not find them
38728    if test "x$new_path" = x \
38729        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38730        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38731      new_path=`$CYGPATH -u "$path"`
38732    fi
38733    if test "x$new_path" = x; then
38734      # It's still not found. Now this is an unrecoverable error.
38735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38736$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38737      has_space=`$ECHO "$complete" | $GREP " "`
38738      if test "x$has_space" != x; then
38739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38741      fi
38742      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38743    fi
38744  fi
38745
38746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38749  # "foo.exe" is OK but "foo" is an error.
38750  #
38751  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38752  # It is also a way to make sure we got the proper file name for the real test later on.
38753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38754  if test "x$test_shortpath" = x; then
38755    # Short path failed, file does not exist as specified.
38756    # Try adding .exe or .cmd
38757    if test -f "${new_path}.exe"; then
38758      input_to_shortpath="${new_path}.exe"
38759    elif test -f "${new_path}.cmd"; then
38760      input_to_shortpath="${new_path}.cmd"
38761    else
38762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38763$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38764      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38765$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38766      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38767    fi
38768  else
38769    input_to_shortpath="$new_path"
38770  fi
38771
38772  # Call helper function which possibly converts this using DOS-style short mode.
38773  # If so, the updated path is stored in $new_path.
38774  new_path="$input_to_shortpath"
38775
38776  input_path="$input_to_shortpath"
38777  # Check if we need to convert this using DOS-style short mode. If the path
38778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38779  # take no chances and rewrite it.
38780  # Note: m4 eats our [], so we need to use [ and ] instead.
38781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38782  if test "x$has_forbidden_chars" != x; then
38783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38787      # Going to short mode and back again did indeed matter. Since short mode is
38788      # case insensitive, let's make it lowercase to improve readability.
38789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38790      # Now convert it back to Unix-style (cygpath)
38791      input_path=`$CYGPATH -u "$shortmode_path"`
38792      new_path="$input_path"
38793    fi
38794  fi
38795
38796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38797  if test "x$test_cygdrive_prefix" = x; then
38798    # As a simple fix, exclude /usr/bin since it's not a real path.
38799    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38801      # a path prefixed by /cygdrive for fixpath to work.
38802      new_path="$CYGWIN_ROOT_PATH$input_path"
38803    fi
38804  fi
38805
38806  # remove trailing .exe if any
38807  new_path="${new_path/%.exe/}"
38808
38809    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38810
38811  # First separate the path from the arguments. This will split at the first
38812  # space.
38813  complete="$AR"
38814  path="${complete%% *}"
38815  tmp="$complete EOL"
38816  arguments="${tmp#* }"
38817
38818  # Input might be given as Windows format, start by converting to
38819  # unix format.
38820  new_path="$path"
38821
38822  windows_path="$new_path"
38823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38824    unix_path=`$CYGPATH -u "$windows_path"`
38825    new_path="$unix_path"
38826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38828    new_path="$unix_path"
38829  fi
38830
38831
38832  # Now try to locate executable using which
38833  new_path=`$WHICH "$new_path" 2> /dev/null`
38834
38835  if test "x$new_path" = x; then
38836    # Oops. Which didn't find the executable.
38837    # The splitting of arguments from the executable at a space might have been incorrect,
38838    # since paths with space are more likely in Windows. Give it another try with the whole
38839    # argument.
38840    path="$complete"
38841    arguments="EOL"
38842    new_path="$path"
38843
38844  windows_path="$new_path"
38845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38846    unix_path=`$CYGPATH -u "$windows_path"`
38847    new_path="$unix_path"
38848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38850    new_path="$unix_path"
38851  fi
38852
38853
38854    new_path=`$WHICH "$new_path" 2> /dev/null`
38855    # bat and cmd files are not always considered executable in MSYS causing which
38856    # to not find them
38857    if test "x$new_path" = x \
38858        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38859        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38860      new_path="$path"
38861
38862  windows_path="$new_path"
38863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38864    unix_path=`$CYGPATH -u "$windows_path"`
38865    new_path="$unix_path"
38866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38868    new_path="$unix_path"
38869  fi
38870
38871    fi
38872
38873    if test "x$new_path" = x; then
38874      # It's still not found. Now this is an unrecoverable error.
38875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38876$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38877      has_space=`$ECHO "$complete" | $GREP " "`
38878      if test "x$has_space" != x; then
38879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38881      fi
38882      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38883    fi
38884  fi
38885
38886  # Now new_path has a complete unix path to the binary
38887  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38888    # Keep paths in /bin as-is, but remove trailing .exe if any
38889    new_path="${new_path/%.exe/}"
38890    # Do not save /bin paths to all_fixpath_prefixes!
38891  else
38892    # Not in mixed or Windows style, start by that.
38893    new_path=`cmd //c echo $new_path`
38894
38895  input_path="$new_path"
38896  # Check if we need to convert this using DOS-style short mode. If the path
38897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38898  # take no chances and rewrite it.
38899  # Note: m4 eats our [], so we need to use [ and ] instead.
38900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38901  if test "x$has_forbidden_chars" != x; then
38902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38904  fi
38905
38906    # Output is in $new_path
38907
38908  windows_path="$new_path"
38909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38910    unix_path=`$CYGPATH -u "$windows_path"`
38911    new_path="$unix_path"
38912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38914    new_path="$unix_path"
38915  fi
38916
38917    # remove trailing .exe if any
38918    new_path="${new_path/%.exe/}"
38919
38920    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38921    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38922  fi
38923
38924    else
38925      # We're on a unix platform. Hooray! :)
38926      # First separate the path from the arguments. This will split at the first
38927      # space.
38928      complete="$AR"
38929      path="${complete%% *}"
38930      tmp="$complete EOL"
38931      arguments="${tmp#* }"
38932
38933      # Cannot rely on the command "which" here since it doesn't always work.
38934      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38935      if test -z "$is_absolute_path"; then
38936        # Path to executable is not absolute. Find it.
38937        IFS_save="$IFS"
38938        IFS=:
38939        for p in $PATH; do
38940          if test -f "$p/$path" && test -x "$p/$path"; then
38941            new_path="$p/$path"
38942            break
38943          fi
38944        done
38945        IFS="$IFS_save"
38946      else
38947        # This is an absolute path, we can use it without further modifications.
38948        new_path="$path"
38949      fi
38950
38951      if test "x$new_path" = x; then
38952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38953$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38954        has_space=`$ECHO "$complete" | $GREP " "`
38955        if test "x$has_space" != x; then
38956          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38957$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38958        fi
38959        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38960      fi
38961    fi
38962
38963    # Now join together the path and the arguments once again
38964    if test "x$arguments" != xEOL; then
38965      new_complete="$new_path ${arguments% *}"
38966    else
38967      new_complete="$new_path"
38968    fi
38969
38970    if test "x$complete" != "x$new_complete"; then
38971      AR="$new_complete"
38972      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38973$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38974    fi
38975  fi
38976
38977
38978
38979  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38980
38981
38982  # Publish this variable in the help.
38983
38984
38985  if [ -z "${LIPO+x}" ]; then
38986    # The variable is not set by user, try to locate tool using the code snippet
38987    for ac_prog in lipo
38988do
38989  # Extract the first word of "$ac_prog", so it can be a program name with args.
38990set dummy $ac_prog; ac_word=$2
38991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38992$as_echo_n "checking for $ac_word... " >&6; }
38993if ${ac_cv_path_LIPO+:} false; then :
38994  $as_echo_n "(cached) " >&6
38995else
38996  case $LIPO in
38997  [\\/]* | ?:[\\/]*)
38998  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38999  ;;
39000  *)
39001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39002for as_dir in $PATH
39003do
39004  IFS=$as_save_IFS
39005  test -z "$as_dir" && as_dir=.
39006    for ac_exec_ext in '' $ac_executable_extensions; do
39007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39008    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39010    break 2
39011  fi
39012done
39013  done
39014IFS=$as_save_IFS
39015
39016  ;;
39017esac
39018fi
39019LIPO=$ac_cv_path_LIPO
39020if test -n "$LIPO"; then
39021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39022$as_echo "$LIPO" >&6; }
39023else
39024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39025$as_echo "no" >&6; }
39026fi
39027
39028
39029  test -n "$LIPO" && break
39030done
39031
39032  else
39033    # The variable is set, but is it from the command line or the environment?
39034
39035    # Try to remove the string !LIPO! from our list.
39036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
39037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39038      # If it failed, the variable was not from the command line. Ignore it,
39039      # but warn the user (except for BASH, which is always set by the calling BASH).
39040      if test "xLIPO" != xBASH; then
39041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39042$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39043      fi
39044      # Try to locate tool using the code snippet
39045      for ac_prog in lipo
39046do
39047  # Extract the first word of "$ac_prog", so it can be a program name with args.
39048set dummy $ac_prog; ac_word=$2
39049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39050$as_echo_n "checking for $ac_word... " >&6; }
39051if ${ac_cv_path_LIPO+:} false; then :
39052  $as_echo_n "(cached) " >&6
39053else
39054  case $LIPO in
39055  [\\/]* | ?:[\\/]*)
39056  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39057  ;;
39058  *)
39059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39060for as_dir in $PATH
39061do
39062  IFS=$as_save_IFS
39063  test -z "$as_dir" && as_dir=.
39064    for ac_exec_ext in '' $ac_executable_extensions; do
39065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39066    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39068    break 2
39069  fi
39070done
39071  done
39072IFS=$as_save_IFS
39073
39074  ;;
39075esac
39076fi
39077LIPO=$ac_cv_path_LIPO
39078if test -n "$LIPO"; then
39079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39080$as_echo "$LIPO" >&6; }
39081else
39082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39083$as_echo "no" >&6; }
39084fi
39085
39086
39087  test -n "$LIPO" && break
39088done
39089
39090    else
39091      # If it succeeded, then it was overridden by the user. We will use it
39092      # for the tool.
39093
39094      # First remove it from the list of overridden variables, so we can test
39095      # for unknown variables in the end.
39096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39097
39098      # Check if we try to supply an empty value
39099      if test "x$LIPO" = x; then
39100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
39101$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
39102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39103$as_echo_n "checking for LIPO... " >&6; }
39104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39105$as_echo "disabled" >&6; }
39106      else
39107        # Check if the provided tool contains a complete path.
39108        tool_specified="$LIPO"
39109        tool_basename="${tool_specified##*/}"
39110        if test "x$tool_basename" = "x$tool_specified"; then
39111          # A command without a complete path is provided, search $PATH.
39112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39113$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39114          # Extract the first word of "$tool_basename", so it can be a program name with args.
39115set dummy $tool_basename; ac_word=$2
39116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39117$as_echo_n "checking for $ac_word... " >&6; }
39118if ${ac_cv_path_LIPO+:} false; then :
39119  $as_echo_n "(cached) " >&6
39120else
39121  case $LIPO in
39122  [\\/]* | ?:[\\/]*)
39123  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39124  ;;
39125  *)
39126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39127for as_dir in $PATH
39128do
39129  IFS=$as_save_IFS
39130  test -z "$as_dir" && as_dir=.
39131    for ac_exec_ext in '' $ac_executable_extensions; do
39132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39133    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39135    break 2
39136  fi
39137done
39138  done
39139IFS=$as_save_IFS
39140
39141  ;;
39142esac
39143fi
39144LIPO=$ac_cv_path_LIPO
39145if test -n "$LIPO"; then
39146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39147$as_echo "$LIPO" >&6; }
39148else
39149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39150$as_echo "no" >&6; }
39151fi
39152
39153
39154          if test "x$LIPO" = x; then
39155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39156          fi
39157        else
39158          # Otherwise we believe it is a complete path. Use it as it is.
39159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39160$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39162$as_echo_n "checking for LIPO... " >&6; }
39163          if test ! -x "$tool_specified"; then
39164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39165$as_echo "not found" >&6; }
39166            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39167          fi
39168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39169$as_echo "$tool_specified" >&6; }
39170        fi
39171      fi
39172    fi
39173
39174  fi
39175
39176
39177
39178  # Only process if variable expands to non-empty
39179
39180  if test "x$LIPO" != x; then
39181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39182
39183  # First separate the path from the arguments. This will split at the first
39184  # space.
39185  complete="$LIPO"
39186  path="${complete%% *}"
39187  tmp="$complete EOL"
39188  arguments="${tmp#* }"
39189
39190  # Input might be given as Windows format, start by converting to
39191  # unix format.
39192  new_path=`$CYGPATH -u "$path"`
39193
39194  # Now try to locate executable using which
39195  new_path=`$WHICH "$new_path" 2> /dev/null`
39196  # bat and cmd files are not always considered executable in cygwin causing which
39197  # to not find them
39198  if test "x$new_path" = x \
39199      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39200      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39201    new_path=`$CYGPATH -u "$path"`
39202  fi
39203  if test "x$new_path" = x; then
39204    # Oops. Which didn't find the executable.
39205    # The splitting of arguments from the executable at a space might have been incorrect,
39206    # since paths with space are more likely in Windows. Give it another try with the whole
39207    # argument.
39208    path="$complete"
39209    arguments="EOL"
39210    new_path=`$CYGPATH -u "$path"`
39211    new_path=`$WHICH "$new_path" 2> /dev/null`
39212    # bat and cmd files are not always considered executable in cygwin causing which
39213    # to not find them
39214    if test "x$new_path" = x \
39215        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39216        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39217      new_path=`$CYGPATH -u "$path"`
39218    fi
39219    if test "x$new_path" = x; then
39220      # It's still not found. Now this is an unrecoverable error.
39221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39222$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39223      has_space=`$ECHO "$complete" | $GREP " "`
39224      if test "x$has_space" != x; then
39225        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39226$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39227      fi
39228      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39229    fi
39230  fi
39231
39232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39235  # "foo.exe" is OK but "foo" is an error.
39236  #
39237  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39238  # It is also a way to make sure we got the proper file name for the real test later on.
39239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39240  if test "x$test_shortpath" = x; then
39241    # Short path failed, file does not exist as specified.
39242    # Try adding .exe or .cmd
39243    if test -f "${new_path}.exe"; then
39244      input_to_shortpath="${new_path}.exe"
39245    elif test -f "${new_path}.cmd"; then
39246      input_to_shortpath="${new_path}.cmd"
39247    else
39248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39249$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39250      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39251$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39252      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39253    fi
39254  else
39255    input_to_shortpath="$new_path"
39256  fi
39257
39258  # Call helper function which possibly converts this using DOS-style short mode.
39259  # If so, the updated path is stored in $new_path.
39260  new_path="$input_to_shortpath"
39261
39262  input_path="$input_to_shortpath"
39263  # Check if we need to convert this using DOS-style short mode. If the path
39264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39265  # take no chances and rewrite it.
39266  # Note: m4 eats our [], so we need to use [ and ] instead.
39267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39268  if test "x$has_forbidden_chars" != x; then
39269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39273      # Going to short mode and back again did indeed matter. Since short mode is
39274      # case insensitive, let's make it lowercase to improve readability.
39275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39276      # Now convert it back to Unix-style (cygpath)
39277      input_path=`$CYGPATH -u "$shortmode_path"`
39278      new_path="$input_path"
39279    fi
39280  fi
39281
39282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39283  if test "x$test_cygdrive_prefix" = x; then
39284    # As a simple fix, exclude /usr/bin since it's not a real path.
39285    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39287      # a path prefixed by /cygdrive for fixpath to work.
39288      new_path="$CYGWIN_ROOT_PATH$input_path"
39289    fi
39290  fi
39291
39292  # remove trailing .exe if any
39293  new_path="${new_path/%.exe/}"
39294
39295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39296
39297  # First separate the path from the arguments. This will split at the first
39298  # space.
39299  complete="$LIPO"
39300  path="${complete%% *}"
39301  tmp="$complete EOL"
39302  arguments="${tmp#* }"
39303
39304  # Input might be given as Windows format, start by converting to
39305  # unix format.
39306  new_path="$path"
39307
39308  windows_path="$new_path"
39309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39310    unix_path=`$CYGPATH -u "$windows_path"`
39311    new_path="$unix_path"
39312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39314    new_path="$unix_path"
39315  fi
39316
39317
39318  # Now try to locate executable using which
39319  new_path=`$WHICH "$new_path" 2> /dev/null`
39320
39321  if test "x$new_path" = x; then
39322    # Oops. Which didn't find the executable.
39323    # The splitting of arguments from the executable at a space might have been incorrect,
39324    # since paths with space are more likely in Windows. Give it another try with the whole
39325    # argument.
39326    path="$complete"
39327    arguments="EOL"
39328    new_path="$path"
39329
39330  windows_path="$new_path"
39331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39332    unix_path=`$CYGPATH -u "$windows_path"`
39333    new_path="$unix_path"
39334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39336    new_path="$unix_path"
39337  fi
39338
39339
39340    new_path=`$WHICH "$new_path" 2> /dev/null`
39341    # bat and cmd files are not always considered executable in MSYS causing which
39342    # to not find them
39343    if test "x$new_path" = x \
39344        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39345        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39346      new_path="$path"
39347
39348  windows_path="$new_path"
39349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39350    unix_path=`$CYGPATH -u "$windows_path"`
39351    new_path="$unix_path"
39352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39354    new_path="$unix_path"
39355  fi
39356
39357    fi
39358
39359    if test "x$new_path" = x; then
39360      # It's still not found. Now this is an unrecoverable error.
39361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39362$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39363      has_space=`$ECHO "$complete" | $GREP " "`
39364      if test "x$has_space" != x; then
39365        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39366$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39367      fi
39368      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39369    fi
39370  fi
39371
39372  # Now new_path has a complete unix path to the binary
39373  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39374    # Keep paths in /bin as-is, but remove trailing .exe if any
39375    new_path="${new_path/%.exe/}"
39376    # Do not save /bin paths to all_fixpath_prefixes!
39377  else
39378    # Not in mixed or Windows style, start by that.
39379    new_path=`cmd //c echo $new_path`
39380
39381  input_path="$new_path"
39382  # Check if we need to convert this using DOS-style short mode. If the path
39383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39384  # take no chances and rewrite it.
39385  # Note: m4 eats our [], so we need to use [ and ] instead.
39386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39387  if test "x$has_forbidden_chars" != x; then
39388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39390  fi
39391
39392    # Output is in $new_path
39393
39394  windows_path="$new_path"
39395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39396    unix_path=`$CYGPATH -u "$windows_path"`
39397    new_path="$unix_path"
39398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39400    new_path="$unix_path"
39401  fi
39402
39403    # remove trailing .exe if any
39404    new_path="${new_path/%.exe/}"
39405
39406    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39407    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39408  fi
39409
39410    else
39411      # We're on a unix platform. Hooray! :)
39412      # First separate the path from the arguments. This will split at the first
39413      # space.
39414      complete="$LIPO"
39415      path="${complete%% *}"
39416      tmp="$complete EOL"
39417      arguments="${tmp#* }"
39418
39419      # Cannot rely on the command "which" here since it doesn't always work.
39420      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39421      if test -z "$is_absolute_path"; then
39422        # Path to executable is not absolute. Find it.
39423        IFS_save="$IFS"
39424        IFS=:
39425        for p in $PATH; do
39426          if test -f "$p/$path" && test -x "$p/$path"; then
39427            new_path="$p/$path"
39428            break
39429          fi
39430        done
39431        IFS="$IFS_save"
39432      else
39433        # This is an absolute path, we can use it without further modifications.
39434        new_path="$path"
39435      fi
39436
39437      if test "x$new_path" = x; then
39438        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39439$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39440        has_space=`$ECHO "$complete" | $GREP " "`
39441        if test "x$has_space" != x; then
39442          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39443$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39444        fi
39445        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39446      fi
39447    fi
39448
39449    # Now join together the path and the arguments once again
39450    if test "x$arguments" != xEOL; then
39451      new_complete="$new_path ${arguments% *}"
39452    else
39453      new_complete="$new_path"
39454    fi
39455
39456    if test "x$complete" != "x$new_complete"; then
39457      LIPO="$new_complete"
39458      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39459$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39460    fi
39461  fi
39462
39463  fi
39464
39465  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39466    # Extract the first word of "mt", so it can be a program name with args.
39467set dummy mt; ac_word=$2
39468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39469$as_echo_n "checking for $ac_word... " >&6; }
39470if ${ac_cv_prog_MT+:} false; then :
39471  $as_echo_n "(cached) " >&6
39472else
39473  if test -n "$MT"; then
39474  ac_cv_prog_MT="$MT" # Let the user override the test.
39475else
39476  ac_prog_rejected=no
39477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39478for as_dir in $PATH
39479do
39480  IFS=$as_save_IFS
39481  test -z "$as_dir" && as_dir=.
39482    for ac_exec_ext in '' $ac_executable_extensions; do
39483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39484    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39485       ac_prog_rejected=yes
39486       continue
39487     fi
39488    ac_cv_prog_MT="mt"
39489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39490    break 2
39491  fi
39492done
39493  done
39494IFS=$as_save_IFS
39495
39496if test $ac_prog_rejected = yes; then
39497  # We found a bogon in the path, so make sure we never use it.
39498  set dummy $ac_cv_prog_MT
39499  shift
39500  if test $# != 0; then
39501    # We chose a different compiler from the bogus one.
39502    # However, it has the same basename, so the bogon will be chosen
39503    # first if we set MT to just the basename; use the full file name.
39504    shift
39505    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39506  fi
39507fi
39508fi
39509fi
39510MT=$ac_cv_prog_MT
39511if test -n "$MT"; then
39512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39513$as_echo "$MT" >&6; }
39514else
39515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39516$as_echo "no" >&6; }
39517fi
39518
39519
39520
39521  # Only process if variable expands to non-empty
39522
39523  if test "x$MT" != x; then
39524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39525
39526  # First separate the path from the arguments. This will split at the first
39527  # space.
39528  complete="$MT"
39529  path="${complete%% *}"
39530  tmp="$complete EOL"
39531  arguments="${tmp#* }"
39532
39533  # Input might be given as Windows format, start by converting to
39534  # unix format.
39535  new_path=`$CYGPATH -u "$path"`
39536
39537  # Now try to locate executable using which
39538  new_path=`$WHICH "$new_path" 2> /dev/null`
39539  # bat and cmd files are not always considered executable in cygwin causing which
39540  # to not find them
39541  if test "x$new_path" = x \
39542      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39543      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39544    new_path=`$CYGPATH -u "$path"`
39545  fi
39546  if test "x$new_path" = x; then
39547    # Oops. Which didn't find the executable.
39548    # The splitting of arguments from the executable at a space might have been incorrect,
39549    # since paths with space are more likely in Windows. Give it another try with the whole
39550    # argument.
39551    path="$complete"
39552    arguments="EOL"
39553    new_path=`$CYGPATH -u "$path"`
39554    new_path=`$WHICH "$new_path" 2> /dev/null`
39555    # bat and cmd files are not always considered executable in cygwin causing which
39556    # to not find them
39557    if test "x$new_path" = x \
39558        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39559        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39560      new_path=`$CYGPATH -u "$path"`
39561    fi
39562    if test "x$new_path" = x; then
39563      # It's still not found. Now this is an unrecoverable error.
39564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39565$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39566      has_space=`$ECHO "$complete" | $GREP " "`
39567      if test "x$has_space" != x; then
39568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39570      fi
39571      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39572    fi
39573  fi
39574
39575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39578  # "foo.exe" is OK but "foo" is an error.
39579  #
39580  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39581  # It is also a way to make sure we got the proper file name for the real test later on.
39582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39583  if test "x$test_shortpath" = x; then
39584    # Short path failed, file does not exist as specified.
39585    # Try adding .exe or .cmd
39586    if test -f "${new_path}.exe"; then
39587      input_to_shortpath="${new_path}.exe"
39588    elif test -f "${new_path}.cmd"; then
39589      input_to_shortpath="${new_path}.cmd"
39590    else
39591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39592$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39593      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39594$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39595      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39596    fi
39597  else
39598    input_to_shortpath="$new_path"
39599  fi
39600
39601  # Call helper function which possibly converts this using DOS-style short mode.
39602  # If so, the updated path is stored in $new_path.
39603  new_path="$input_to_shortpath"
39604
39605  input_path="$input_to_shortpath"
39606  # Check if we need to convert this using DOS-style short mode. If the path
39607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39608  # take no chances and rewrite it.
39609  # Note: m4 eats our [], so we need to use [ and ] instead.
39610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39611  if test "x$has_forbidden_chars" != x; then
39612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39616      # Going to short mode and back again did indeed matter. Since short mode is
39617      # case insensitive, let's make it lowercase to improve readability.
39618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39619      # Now convert it back to Unix-style (cygpath)
39620      input_path=`$CYGPATH -u "$shortmode_path"`
39621      new_path="$input_path"
39622    fi
39623  fi
39624
39625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39626  if test "x$test_cygdrive_prefix" = x; then
39627    # As a simple fix, exclude /usr/bin since it's not a real path.
39628    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39630      # a path prefixed by /cygdrive for fixpath to work.
39631      new_path="$CYGWIN_ROOT_PATH$input_path"
39632    fi
39633  fi
39634
39635  # remove trailing .exe if any
39636  new_path="${new_path/%.exe/}"
39637
39638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39639
39640  # First separate the path from the arguments. This will split at the first
39641  # space.
39642  complete="$MT"
39643  path="${complete%% *}"
39644  tmp="$complete EOL"
39645  arguments="${tmp#* }"
39646
39647  # Input might be given as Windows format, start by converting to
39648  # unix format.
39649  new_path="$path"
39650
39651  windows_path="$new_path"
39652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39653    unix_path=`$CYGPATH -u "$windows_path"`
39654    new_path="$unix_path"
39655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39657    new_path="$unix_path"
39658  fi
39659
39660
39661  # Now try to locate executable using which
39662  new_path=`$WHICH "$new_path" 2> /dev/null`
39663
39664  if test "x$new_path" = x; then
39665    # Oops. Which didn't find the executable.
39666    # The splitting of arguments from the executable at a space might have been incorrect,
39667    # since paths with space are more likely in Windows. Give it another try with the whole
39668    # argument.
39669    path="$complete"
39670    arguments="EOL"
39671    new_path="$path"
39672
39673  windows_path="$new_path"
39674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39675    unix_path=`$CYGPATH -u "$windows_path"`
39676    new_path="$unix_path"
39677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39679    new_path="$unix_path"
39680  fi
39681
39682
39683    new_path=`$WHICH "$new_path" 2> /dev/null`
39684    # bat and cmd files are not always considered executable in MSYS causing which
39685    # to not find them
39686    if test "x$new_path" = x \
39687        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39688        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39689      new_path="$path"
39690
39691  windows_path="$new_path"
39692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39693    unix_path=`$CYGPATH -u "$windows_path"`
39694    new_path="$unix_path"
39695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39697    new_path="$unix_path"
39698  fi
39699
39700    fi
39701
39702    if test "x$new_path" = x; then
39703      # It's still not found. Now this is an unrecoverable error.
39704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39705$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39706      has_space=`$ECHO "$complete" | $GREP " "`
39707      if test "x$has_space" != x; then
39708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39710      fi
39711      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39712    fi
39713  fi
39714
39715  # Now new_path has a complete unix path to the binary
39716  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39717    # Keep paths in /bin as-is, but remove trailing .exe if any
39718    new_path="${new_path/%.exe/}"
39719    # Do not save /bin paths to all_fixpath_prefixes!
39720  else
39721    # Not in mixed or Windows style, start by that.
39722    new_path=`cmd //c echo $new_path`
39723
39724  input_path="$new_path"
39725  # Check if we need to convert this using DOS-style short mode. If the path
39726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39727  # take no chances and rewrite it.
39728  # Note: m4 eats our [], so we need to use [ and ] instead.
39729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39730  if test "x$has_forbidden_chars" != x; then
39731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39733  fi
39734
39735    # Output is in $new_path
39736
39737  windows_path="$new_path"
39738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39739    unix_path=`$CYGPATH -u "$windows_path"`
39740    new_path="$unix_path"
39741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39743    new_path="$unix_path"
39744  fi
39745
39746    # remove trailing .exe if any
39747    new_path="${new_path/%.exe/}"
39748
39749    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39750    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39751  fi
39752
39753    else
39754      # We're on a unix platform. Hooray! :)
39755      # First separate the path from the arguments. This will split at the first
39756      # space.
39757      complete="$MT"
39758      path="${complete%% *}"
39759      tmp="$complete EOL"
39760      arguments="${tmp#* }"
39761
39762      # Cannot rely on the command "which" here since it doesn't always work.
39763      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39764      if test -z "$is_absolute_path"; then
39765        # Path to executable is not absolute. Find it.
39766        IFS_save="$IFS"
39767        IFS=:
39768        for p in $PATH; do
39769          if test -f "$p/$path" && test -x "$p/$path"; then
39770            new_path="$p/$path"
39771            break
39772          fi
39773        done
39774        IFS="$IFS_save"
39775      else
39776        # This is an absolute path, we can use it without further modifications.
39777        new_path="$path"
39778      fi
39779
39780      if test "x$new_path" = x; then
39781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39782$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39783        has_space=`$ECHO "$complete" | $GREP " "`
39784        if test "x$has_space" != x; then
39785          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39786$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39787        fi
39788        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39789      fi
39790    fi
39791
39792    # Now join together the path and the arguments once again
39793    if test "x$arguments" != xEOL; then
39794      new_complete="$new_path ${arguments% *}"
39795    else
39796      new_complete="$new_path"
39797    fi
39798
39799    if test "x$complete" != "x$new_complete"; then
39800      MT="$new_complete"
39801      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39802$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39803    fi
39804  fi
39805
39806    # Setup the resource compiler (RC)
39807    # Extract the first word of "rc", so it can be a program name with args.
39808set dummy rc; ac_word=$2
39809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39810$as_echo_n "checking for $ac_word... " >&6; }
39811if ${ac_cv_prog_RC+:} false; then :
39812  $as_echo_n "(cached) " >&6
39813else
39814  if test -n "$RC"; then
39815  ac_cv_prog_RC="$RC" # Let the user override the test.
39816else
39817  ac_prog_rejected=no
39818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39819for as_dir in $PATH
39820do
39821  IFS=$as_save_IFS
39822  test -z "$as_dir" && as_dir=.
39823    for ac_exec_ext in '' $ac_executable_extensions; do
39824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39825    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39826       ac_prog_rejected=yes
39827       continue
39828     fi
39829    ac_cv_prog_RC="rc"
39830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39831    break 2
39832  fi
39833done
39834  done
39835IFS=$as_save_IFS
39836
39837if test $ac_prog_rejected = yes; then
39838  # We found a bogon in the path, so make sure we never use it.
39839  set dummy $ac_cv_prog_RC
39840  shift
39841  if test $# != 0; then
39842    # We chose a different compiler from the bogus one.
39843    # However, it has the same basename, so the bogon will be chosen
39844    # first if we set RC to just the basename; use the full file name.
39845    shift
39846    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39847  fi
39848fi
39849fi
39850fi
39851RC=$ac_cv_prog_RC
39852if test -n "$RC"; then
39853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39854$as_echo "$RC" >&6; }
39855else
39856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39857$as_echo "no" >&6; }
39858fi
39859
39860
39861
39862  # Only process if variable expands to non-empty
39863
39864  if test "x$RC" != x; then
39865    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39866
39867  # First separate the path from the arguments. This will split at the first
39868  # space.
39869  complete="$RC"
39870  path="${complete%% *}"
39871  tmp="$complete EOL"
39872  arguments="${tmp#* }"
39873
39874  # Input might be given as Windows format, start by converting to
39875  # unix format.
39876  new_path=`$CYGPATH -u "$path"`
39877
39878  # Now try to locate executable using which
39879  new_path=`$WHICH "$new_path" 2> /dev/null`
39880  # bat and cmd files are not always considered executable in cygwin causing which
39881  # to not find them
39882  if test "x$new_path" = x \
39883      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39884      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39885    new_path=`$CYGPATH -u "$path"`
39886  fi
39887  if test "x$new_path" = x; then
39888    # Oops. Which didn't find the executable.
39889    # The splitting of arguments from the executable at a space might have been incorrect,
39890    # since paths with space are more likely in Windows. Give it another try with the whole
39891    # argument.
39892    path="$complete"
39893    arguments="EOL"
39894    new_path=`$CYGPATH -u "$path"`
39895    new_path=`$WHICH "$new_path" 2> /dev/null`
39896    # bat and cmd files are not always considered executable in cygwin causing which
39897    # to not find them
39898    if test "x$new_path" = x \
39899        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39900        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39901      new_path=`$CYGPATH -u "$path"`
39902    fi
39903    if test "x$new_path" = x; then
39904      # It's still not found. Now this is an unrecoverable error.
39905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39906$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39907      has_space=`$ECHO "$complete" | $GREP " "`
39908      if test "x$has_space" != x; then
39909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39911      fi
39912      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39913    fi
39914  fi
39915
39916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39919  # "foo.exe" is OK but "foo" is an error.
39920  #
39921  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39922  # It is also a way to make sure we got the proper file name for the real test later on.
39923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39924  if test "x$test_shortpath" = x; then
39925    # Short path failed, file does not exist as specified.
39926    # Try adding .exe or .cmd
39927    if test -f "${new_path}.exe"; then
39928      input_to_shortpath="${new_path}.exe"
39929    elif test -f "${new_path}.cmd"; then
39930      input_to_shortpath="${new_path}.cmd"
39931    else
39932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39933$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39934      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39935$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39936      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39937    fi
39938  else
39939    input_to_shortpath="$new_path"
39940  fi
39941
39942  # Call helper function which possibly converts this using DOS-style short mode.
39943  # If so, the updated path is stored in $new_path.
39944  new_path="$input_to_shortpath"
39945
39946  input_path="$input_to_shortpath"
39947  # Check if we need to convert this using DOS-style short mode. If the path
39948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39949  # take no chances and rewrite it.
39950  # Note: m4 eats our [], so we need to use [ and ] instead.
39951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39952  if test "x$has_forbidden_chars" != x; then
39953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39957      # Going to short mode and back again did indeed matter. Since short mode is
39958      # case insensitive, let's make it lowercase to improve readability.
39959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39960      # Now convert it back to Unix-style (cygpath)
39961      input_path=`$CYGPATH -u "$shortmode_path"`
39962      new_path="$input_path"
39963    fi
39964  fi
39965
39966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39967  if test "x$test_cygdrive_prefix" = x; then
39968    # As a simple fix, exclude /usr/bin since it's not a real path.
39969    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39971      # a path prefixed by /cygdrive for fixpath to work.
39972      new_path="$CYGWIN_ROOT_PATH$input_path"
39973    fi
39974  fi
39975
39976  # remove trailing .exe if any
39977  new_path="${new_path/%.exe/}"
39978
39979    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39980
39981  # First separate the path from the arguments. This will split at the first
39982  # space.
39983  complete="$RC"
39984  path="${complete%% *}"
39985  tmp="$complete EOL"
39986  arguments="${tmp#* }"
39987
39988  # Input might be given as Windows format, start by converting to
39989  # unix format.
39990  new_path="$path"
39991
39992  windows_path="$new_path"
39993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39994    unix_path=`$CYGPATH -u "$windows_path"`
39995    new_path="$unix_path"
39996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39998    new_path="$unix_path"
39999  fi
40000
40001
40002  # Now try to locate executable using which
40003  new_path=`$WHICH "$new_path" 2> /dev/null`
40004
40005  if test "x$new_path" = x; then
40006    # Oops. Which didn't find the executable.
40007    # The splitting of arguments from the executable at a space might have been incorrect,
40008    # since paths with space are more likely in Windows. Give it another try with the whole
40009    # argument.
40010    path="$complete"
40011    arguments="EOL"
40012    new_path="$path"
40013
40014  windows_path="$new_path"
40015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40016    unix_path=`$CYGPATH -u "$windows_path"`
40017    new_path="$unix_path"
40018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40020    new_path="$unix_path"
40021  fi
40022
40023
40024    new_path=`$WHICH "$new_path" 2> /dev/null`
40025    # bat and cmd files are not always considered executable in MSYS causing which
40026    # to not find them
40027    if test "x$new_path" = x \
40028        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40029        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40030      new_path="$path"
40031
40032  windows_path="$new_path"
40033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40034    unix_path=`$CYGPATH -u "$windows_path"`
40035    new_path="$unix_path"
40036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40038    new_path="$unix_path"
40039  fi
40040
40041    fi
40042
40043    if test "x$new_path" = x; then
40044      # It's still not found. Now this is an unrecoverable error.
40045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40046$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40047      has_space=`$ECHO "$complete" | $GREP " "`
40048      if test "x$has_space" != x; then
40049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40051      fi
40052      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40053    fi
40054  fi
40055
40056  # Now new_path has a complete unix path to the binary
40057  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40058    # Keep paths in /bin as-is, but remove trailing .exe if any
40059    new_path="${new_path/%.exe/}"
40060    # Do not save /bin paths to all_fixpath_prefixes!
40061  else
40062    # Not in mixed or Windows style, start by that.
40063    new_path=`cmd //c echo $new_path`
40064
40065  input_path="$new_path"
40066  # Check if we need to convert this using DOS-style short mode. If the path
40067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40068  # take no chances and rewrite it.
40069  # Note: m4 eats our [], so we need to use [ and ] instead.
40070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40071  if test "x$has_forbidden_chars" != x; then
40072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40074  fi
40075
40076    # Output is in $new_path
40077
40078  windows_path="$new_path"
40079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40080    unix_path=`$CYGPATH -u "$windows_path"`
40081    new_path="$unix_path"
40082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40084    new_path="$unix_path"
40085  fi
40086
40087    # remove trailing .exe if any
40088    new_path="${new_path/%.exe/}"
40089
40090    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40091    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40092  fi
40093
40094    else
40095      # We're on a unix platform. Hooray! :)
40096      # First separate the path from the arguments. This will split at the first
40097      # space.
40098      complete="$RC"
40099      path="${complete%% *}"
40100      tmp="$complete EOL"
40101      arguments="${tmp#* }"
40102
40103      # Cannot rely on the command "which" here since it doesn't always work.
40104      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40105      if test -z "$is_absolute_path"; then
40106        # Path to executable is not absolute. Find it.
40107        IFS_save="$IFS"
40108        IFS=:
40109        for p in $PATH; do
40110          if test -f "$p/$path" && test -x "$p/$path"; then
40111            new_path="$p/$path"
40112            break
40113          fi
40114        done
40115        IFS="$IFS_save"
40116      else
40117        # This is an absolute path, we can use it without further modifications.
40118        new_path="$path"
40119      fi
40120
40121      if test "x$new_path" = x; then
40122        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40123$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40124        has_space=`$ECHO "$complete" | $GREP " "`
40125        if test "x$has_space" != x; then
40126          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40127$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40128        fi
40129        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40130      fi
40131    fi
40132
40133    # Now join together the path and the arguments once again
40134    if test "x$arguments" != xEOL; then
40135      new_complete="$new_path ${arguments% *}"
40136    else
40137      new_complete="$new_path"
40138    fi
40139
40140    if test "x$complete" != "x$new_complete"; then
40141      RC="$new_complete"
40142      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
40143$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
40144    fi
40145  fi
40146
40147    # Extract the first word of "dumpbin", so it can be a program name with args.
40148set dummy dumpbin; ac_word=$2
40149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40150$as_echo_n "checking for $ac_word... " >&6; }
40151if ${ac_cv_prog_DUMPBIN+:} false; then :
40152  $as_echo_n "(cached) " >&6
40153else
40154  if test -n "$DUMPBIN"; then
40155  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
40156else
40157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40158for as_dir in $PATH
40159do
40160  IFS=$as_save_IFS
40161  test -z "$as_dir" && as_dir=.
40162    for ac_exec_ext in '' $ac_executable_extensions; do
40163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40164    ac_cv_prog_DUMPBIN="dumpbin"
40165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40166    break 2
40167  fi
40168done
40169  done
40170IFS=$as_save_IFS
40171
40172fi
40173fi
40174DUMPBIN=$ac_cv_prog_DUMPBIN
40175if test -n "$DUMPBIN"; then
40176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40177$as_echo "$DUMPBIN" >&6; }
40178else
40179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40180$as_echo "no" >&6; }
40181fi
40182
40183
40184
40185  # Only process if variable expands to non-empty
40186
40187  if test "x$DUMPBIN" != x; then
40188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40189
40190  # First separate the path from the arguments. This will split at the first
40191  # space.
40192  complete="$DUMPBIN"
40193  path="${complete%% *}"
40194  tmp="$complete EOL"
40195  arguments="${tmp#* }"
40196
40197  # Input might be given as Windows format, start by converting to
40198  # unix format.
40199  new_path=`$CYGPATH -u "$path"`
40200
40201  # Now try to locate executable using which
40202  new_path=`$WHICH "$new_path" 2> /dev/null`
40203  # bat and cmd files are not always considered executable in cygwin causing which
40204  # to not find them
40205  if test "x$new_path" = x \
40206      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40207      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40208    new_path=`$CYGPATH -u "$path"`
40209  fi
40210  if test "x$new_path" = x; then
40211    # Oops. Which didn't find the executable.
40212    # The splitting of arguments from the executable at a space might have been incorrect,
40213    # since paths with space are more likely in Windows. Give it another try with the whole
40214    # argument.
40215    path="$complete"
40216    arguments="EOL"
40217    new_path=`$CYGPATH -u "$path"`
40218    new_path=`$WHICH "$new_path" 2> /dev/null`
40219    # bat and cmd files are not always considered executable in cygwin causing which
40220    # to not find them
40221    if test "x$new_path" = x \
40222        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40223        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40224      new_path=`$CYGPATH -u "$path"`
40225    fi
40226    if test "x$new_path" = x; then
40227      # It's still not found. Now this is an unrecoverable error.
40228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40229$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40230      has_space=`$ECHO "$complete" | $GREP " "`
40231      if test "x$has_space" != x; then
40232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40234      fi
40235      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40236    fi
40237  fi
40238
40239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40242  # "foo.exe" is OK but "foo" is an error.
40243  #
40244  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40245  # It is also a way to make sure we got the proper file name for the real test later on.
40246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40247  if test "x$test_shortpath" = x; then
40248    # Short path failed, file does not exist as specified.
40249    # Try adding .exe or .cmd
40250    if test -f "${new_path}.exe"; then
40251      input_to_shortpath="${new_path}.exe"
40252    elif test -f "${new_path}.cmd"; then
40253      input_to_shortpath="${new_path}.cmd"
40254    else
40255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40256$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40257      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40258$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40259      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40260    fi
40261  else
40262    input_to_shortpath="$new_path"
40263  fi
40264
40265  # Call helper function which possibly converts this using DOS-style short mode.
40266  # If so, the updated path is stored in $new_path.
40267  new_path="$input_to_shortpath"
40268
40269  input_path="$input_to_shortpath"
40270  # Check if we need to convert this using DOS-style short mode. If the path
40271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40272  # take no chances and rewrite it.
40273  # Note: m4 eats our [], so we need to use [ and ] instead.
40274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40275  if test "x$has_forbidden_chars" != x; then
40276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40280      # Going to short mode and back again did indeed matter. Since short mode is
40281      # case insensitive, let's make it lowercase to improve readability.
40282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40283      # Now convert it back to Unix-style (cygpath)
40284      input_path=`$CYGPATH -u "$shortmode_path"`
40285      new_path="$input_path"
40286    fi
40287  fi
40288
40289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40290  if test "x$test_cygdrive_prefix" = x; then
40291    # As a simple fix, exclude /usr/bin since it's not a real path.
40292    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40294      # a path prefixed by /cygdrive for fixpath to work.
40295      new_path="$CYGWIN_ROOT_PATH$input_path"
40296    fi
40297  fi
40298
40299  # remove trailing .exe if any
40300  new_path="${new_path/%.exe/}"
40301
40302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40303
40304  # First separate the path from the arguments. This will split at the first
40305  # space.
40306  complete="$DUMPBIN"
40307  path="${complete%% *}"
40308  tmp="$complete EOL"
40309  arguments="${tmp#* }"
40310
40311  # Input might be given as Windows format, start by converting to
40312  # unix format.
40313  new_path="$path"
40314
40315  windows_path="$new_path"
40316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40317    unix_path=`$CYGPATH -u "$windows_path"`
40318    new_path="$unix_path"
40319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40321    new_path="$unix_path"
40322  fi
40323
40324
40325  # Now try to locate executable using which
40326  new_path=`$WHICH "$new_path" 2> /dev/null`
40327
40328  if test "x$new_path" = x; then
40329    # Oops. Which didn't find the executable.
40330    # The splitting of arguments from the executable at a space might have been incorrect,
40331    # since paths with space are more likely in Windows. Give it another try with the whole
40332    # argument.
40333    path="$complete"
40334    arguments="EOL"
40335    new_path="$path"
40336
40337  windows_path="$new_path"
40338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40339    unix_path=`$CYGPATH -u "$windows_path"`
40340    new_path="$unix_path"
40341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40343    new_path="$unix_path"
40344  fi
40345
40346
40347    new_path=`$WHICH "$new_path" 2> /dev/null`
40348    # bat and cmd files are not always considered executable in MSYS causing which
40349    # to not find them
40350    if test "x$new_path" = x \
40351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40353      new_path="$path"
40354
40355  windows_path="$new_path"
40356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40357    unix_path=`$CYGPATH -u "$windows_path"`
40358    new_path="$unix_path"
40359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40361    new_path="$unix_path"
40362  fi
40363
40364    fi
40365
40366    if test "x$new_path" = x; then
40367      # It's still not found. Now this is an unrecoverable error.
40368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40369$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40370      has_space=`$ECHO "$complete" | $GREP " "`
40371      if test "x$has_space" != x; then
40372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40374      fi
40375      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40376    fi
40377  fi
40378
40379  # Now new_path has a complete unix path to the binary
40380  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40381    # Keep paths in /bin as-is, but remove trailing .exe if any
40382    new_path="${new_path/%.exe/}"
40383    # Do not save /bin paths to all_fixpath_prefixes!
40384  else
40385    # Not in mixed or Windows style, start by that.
40386    new_path=`cmd //c echo $new_path`
40387
40388  input_path="$new_path"
40389  # Check if we need to convert this using DOS-style short mode. If the path
40390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40391  # take no chances and rewrite it.
40392  # Note: m4 eats our [], so we need to use [ and ] instead.
40393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40394  if test "x$has_forbidden_chars" != x; then
40395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40397  fi
40398
40399    # Output is in $new_path
40400
40401  windows_path="$new_path"
40402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40403    unix_path=`$CYGPATH -u "$windows_path"`
40404    new_path="$unix_path"
40405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40407    new_path="$unix_path"
40408  fi
40409
40410    # remove trailing .exe if any
40411    new_path="${new_path/%.exe/}"
40412
40413    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40414    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40415  fi
40416
40417    else
40418      # We're on a unix platform. Hooray! :)
40419      # First separate the path from the arguments. This will split at the first
40420      # space.
40421      complete="$DUMPBIN"
40422      path="${complete%% *}"
40423      tmp="$complete EOL"
40424      arguments="${tmp#* }"
40425
40426      # Cannot rely on the command "which" here since it doesn't always work.
40427      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40428      if test -z "$is_absolute_path"; then
40429        # Path to executable is not absolute. Find it.
40430        IFS_save="$IFS"
40431        IFS=:
40432        for p in $PATH; do
40433          if test -f "$p/$path" && test -x "$p/$path"; then
40434            new_path="$p/$path"
40435            break
40436          fi
40437        done
40438        IFS="$IFS_save"
40439      else
40440        # This is an absolute path, we can use it without further modifications.
40441        new_path="$path"
40442      fi
40443
40444      if test "x$new_path" = x; then
40445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40446$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40447        has_space=`$ECHO "$complete" | $GREP " "`
40448        if test "x$has_space" != x; then
40449          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40450$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40451        fi
40452        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40453      fi
40454    fi
40455
40456    # Now join together the path and the arguments once again
40457    if test "x$arguments" != xEOL; then
40458      new_complete="$new_path ${arguments% *}"
40459    else
40460      new_complete="$new_path"
40461    fi
40462
40463    if test "x$complete" != "x$new_complete"; then
40464      DUMPBIN="$new_complete"
40465      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40466$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40467    fi
40468  fi
40469
40470    # We need to check for 'msbuild.exe' because at the place where we expect to
40471    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40472    # won't find the 'msbuild.exe' executable in that case (and the
40473    # 'ac_executable_extensions' is unusable due to performance reasons).
40474    # Notice that we intentionally don't fix up the path to MSBUILD because we
40475    # will call it in a DOS shell during freetype detection on Windows (see
40476    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40477    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40478set dummy msbuild.exe; ac_word=$2
40479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40480$as_echo_n "checking for $ac_word... " >&6; }
40481if ${ac_cv_prog_MSBUILD+:} false; then :
40482  $as_echo_n "(cached) " >&6
40483else
40484  if test -n "$MSBUILD"; then
40485  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40486else
40487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40488for as_dir in $PATH
40489do
40490  IFS=$as_save_IFS
40491  test -z "$as_dir" && as_dir=.
40492    for ac_exec_ext in '' $ac_executable_extensions; do
40493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40494    ac_cv_prog_MSBUILD="msbuild.exe"
40495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40496    break 2
40497  fi
40498done
40499  done
40500IFS=$as_save_IFS
40501
40502fi
40503fi
40504MSBUILD=$ac_cv_prog_MSBUILD
40505if test -n "$MSBUILD"; then
40506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40507$as_echo "$MSBUILD" >&6; }
40508else
40509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40510$as_echo "no" >&6; }
40511fi
40512
40513
40514  fi
40515
40516  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40517
40518
40519  # Publish this variable in the help.
40520
40521
40522  if [ -z "${STRIP+x}" ]; then
40523    # The variable is not set by user, try to locate tool using the code snippet
40524    for ac_prog in strip
40525do
40526  # Extract the first word of "$ac_prog", so it can be a program name with args.
40527set dummy $ac_prog; ac_word=$2
40528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40529$as_echo_n "checking for $ac_word... " >&6; }
40530if ${ac_cv_path_STRIP+:} false; then :
40531  $as_echo_n "(cached) " >&6
40532else
40533  case $STRIP in
40534  [\\/]* | ?:[\\/]*)
40535  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40536  ;;
40537  *)
40538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40539for as_dir in $PATH
40540do
40541  IFS=$as_save_IFS
40542  test -z "$as_dir" && as_dir=.
40543    for ac_exec_ext in '' $ac_executable_extensions; do
40544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40545    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40547    break 2
40548  fi
40549done
40550  done
40551IFS=$as_save_IFS
40552
40553  ;;
40554esac
40555fi
40556STRIP=$ac_cv_path_STRIP
40557if test -n "$STRIP"; then
40558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40559$as_echo "$STRIP" >&6; }
40560else
40561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40562$as_echo "no" >&6; }
40563fi
40564
40565
40566  test -n "$STRIP" && break
40567done
40568
40569  else
40570    # The variable is set, but is it from the command line or the environment?
40571
40572    # Try to remove the string !STRIP! from our list.
40573    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40574    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40575      # If it failed, the variable was not from the command line. Ignore it,
40576      # but warn the user (except for BASH, which is always set by the calling BASH).
40577      if test "xSTRIP" != xBASH; then
40578        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40579$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40580      fi
40581      # Try to locate tool using the code snippet
40582      for ac_prog in strip
40583do
40584  # Extract the first word of "$ac_prog", so it can be a program name with args.
40585set dummy $ac_prog; ac_word=$2
40586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40587$as_echo_n "checking for $ac_word... " >&6; }
40588if ${ac_cv_path_STRIP+:} false; then :
40589  $as_echo_n "(cached) " >&6
40590else
40591  case $STRIP in
40592  [\\/]* | ?:[\\/]*)
40593  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40594  ;;
40595  *)
40596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40597for as_dir in $PATH
40598do
40599  IFS=$as_save_IFS
40600  test -z "$as_dir" && as_dir=.
40601    for ac_exec_ext in '' $ac_executable_extensions; do
40602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40603    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40605    break 2
40606  fi
40607done
40608  done
40609IFS=$as_save_IFS
40610
40611  ;;
40612esac
40613fi
40614STRIP=$ac_cv_path_STRIP
40615if test -n "$STRIP"; then
40616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40617$as_echo "$STRIP" >&6; }
40618else
40619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40620$as_echo "no" >&6; }
40621fi
40622
40623
40624  test -n "$STRIP" && break
40625done
40626
40627    else
40628      # If it succeeded, then it was overridden by the user. We will use it
40629      # for the tool.
40630
40631      # First remove it from the list of overridden variables, so we can test
40632      # for unknown variables in the end.
40633      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40634
40635      # Check if we try to supply an empty value
40636      if test "x$STRIP" = x; then
40637        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40638$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40640$as_echo_n "checking for STRIP... " >&6; }
40641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40642$as_echo "disabled" >&6; }
40643      else
40644        # Check if the provided tool contains a complete path.
40645        tool_specified="$STRIP"
40646        tool_basename="${tool_specified##*/}"
40647        if test "x$tool_basename" = "x$tool_specified"; then
40648          # A command without a complete path is provided, search $PATH.
40649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40650$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40651          # Extract the first word of "$tool_basename", so it can be a program name with args.
40652set dummy $tool_basename; ac_word=$2
40653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40654$as_echo_n "checking for $ac_word... " >&6; }
40655if ${ac_cv_path_STRIP+:} false; then :
40656  $as_echo_n "(cached) " >&6
40657else
40658  case $STRIP in
40659  [\\/]* | ?:[\\/]*)
40660  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40661  ;;
40662  *)
40663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40664for as_dir in $PATH
40665do
40666  IFS=$as_save_IFS
40667  test -z "$as_dir" && as_dir=.
40668    for ac_exec_ext in '' $ac_executable_extensions; do
40669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40670    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40672    break 2
40673  fi
40674done
40675  done
40676IFS=$as_save_IFS
40677
40678  ;;
40679esac
40680fi
40681STRIP=$ac_cv_path_STRIP
40682if test -n "$STRIP"; then
40683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40684$as_echo "$STRIP" >&6; }
40685else
40686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40687$as_echo "no" >&6; }
40688fi
40689
40690
40691          if test "x$STRIP" = x; then
40692            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40693          fi
40694        else
40695          # Otherwise we believe it is a complete path. Use it as it is.
40696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40697$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40698          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40699$as_echo_n "checking for STRIP... " >&6; }
40700          if test ! -x "$tool_specified"; then
40701            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40702$as_echo "not found" >&6; }
40703            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40704          fi
40705          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40706$as_echo "$tool_specified" >&6; }
40707        fi
40708      fi
40709    fi
40710
40711  fi
40712
40713
40714
40715  # Only process if variable expands to non-empty
40716
40717  if test "x$STRIP" != x; then
40718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40719
40720  # First separate the path from the arguments. This will split at the first
40721  # space.
40722  complete="$STRIP"
40723  path="${complete%% *}"
40724  tmp="$complete EOL"
40725  arguments="${tmp#* }"
40726
40727  # Input might be given as Windows format, start by converting to
40728  # unix format.
40729  new_path=`$CYGPATH -u "$path"`
40730
40731  # Now try to locate executable using which
40732  new_path=`$WHICH "$new_path" 2> /dev/null`
40733  # bat and cmd files are not always considered executable in cygwin causing which
40734  # to not find them
40735  if test "x$new_path" = x \
40736      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40737      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40738    new_path=`$CYGPATH -u "$path"`
40739  fi
40740  if test "x$new_path" = x; then
40741    # Oops. Which didn't find the executable.
40742    # The splitting of arguments from the executable at a space might have been incorrect,
40743    # since paths with space are more likely in Windows. Give it another try with the whole
40744    # argument.
40745    path="$complete"
40746    arguments="EOL"
40747    new_path=`$CYGPATH -u "$path"`
40748    new_path=`$WHICH "$new_path" 2> /dev/null`
40749    # bat and cmd files are not always considered executable in cygwin causing which
40750    # to not find them
40751    if test "x$new_path" = x \
40752        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40753        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40754      new_path=`$CYGPATH -u "$path"`
40755    fi
40756    if test "x$new_path" = x; then
40757      # It's still not found. Now this is an unrecoverable error.
40758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40759$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40760      has_space=`$ECHO "$complete" | $GREP " "`
40761      if test "x$has_space" != x; then
40762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40764      fi
40765      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40766    fi
40767  fi
40768
40769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40772  # "foo.exe" is OK but "foo" is an error.
40773  #
40774  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40775  # It is also a way to make sure we got the proper file name for the real test later on.
40776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40777  if test "x$test_shortpath" = x; then
40778    # Short path failed, file does not exist as specified.
40779    # Try adding .exe or .cmd
40780    if test -f "${new_path}.exe"; then
40781      input_to_shortpath="${new_path}.exe"
40782    elif test -f "${new_path}.cmd"; then
40783      input_to_shortpath="${new_path}.cmd"
40784    else
40785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40786$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40787      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40788$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40789      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40790    fi
40791  else
40792    input_to_shortpath="$new_path"
40793  fi
40794
40795  # Call helper function which possibly converts this using DOS-style short mode.
40796  # If so, the updated path is stored in $new_path.
40797  new_path="$input_to_shortpath"
40798
40799  input_path="$input_to_shortpath"
40800  # Check if we need to convert this using DOS-style short mode. If the path
40801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40802  # take no chances and rewrite it.
40803  # Note: m4 eats our [], so we need to use [ and ] instead.
40804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40805  if test "x$has_forbidden_chars" != x; then
40806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40810      # Going to short mode and back again did indeed matter. Since short mode is
40811      # case insensitive, let's make it lowercase to improve readability.
40812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40813      # Now convert it back to Unix-style (cygpath)
40814      input_path=`$CYGPATH -u "$shortmode_path"`
40815      new_path="$input_path"
40816    fi
40817  fi
40818
40819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40820  if test "x$test_cygdrive_prefix" = x; then
40821    # As a simple fix, exclude /usr/bin since it's not a real path.
40822    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40824      # a path prefixed by /cygdrive for fixpath to work.
40825      new_path="$CYGWIN_ROOT_PATH$input_path"
40826    fi
40827  fi
40828
40829  # remove trailing .exe if any
40830  new_path="${new_path/%.exe/}"
40831
40832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40833
40834  # First separate the path from the arguments. This will split at the first
40835  # space.
40836  complete="$STRIP"
40837  path="${complete%% *}"
40838  tmp="$complete EOL"
40839  arguments="${tmp#* }"
40840
40841  # Input might be given as Windows format, start by converting to
40842  # unix format.
40843  new_path="$path"
40844
40845  windows_path="$new_path"
40846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40847    unix_path=`$CYGPATH -u "$windows_path"`
40848    new_path="$unix_path"
40849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40851    new_path="$unix_path"
40852  fi
40853
40854
40855  # Now try to locate executable using which
40856  new_path=`$WHICH "$new_path" 2> /dev/null`
40857
40858  if test "x$new_path" = x; then
40859    # Oops. Which didn't find the executable.
40860    # The splitting of arguments from the executable at a space might have been incorrect,
40861    # since paths with space are more likely in Windows. Give it another try with the whole
40862    # argument.
40863    path="$complete"
40864    arguments="EOL"
40865    new_path="$path"
40866
40867  windows_path="$new_path"
40868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40869    unix_path=`$CYGPATH -u "$windows_path"`
40870    new_path="$unix_path"
40871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40873    new_path="$unix_path"
40874  fi
40875
40876
40877    new_path=`$WHICH "$new_path" 2> /dev/null`
40878    # bat and cmd files are not always considered executable in MSYS causing which
40879    # to not find them
40880    if test "x$new_path" = x \
40881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40883      new_path="$path"
40884
40885  windows_path="$new_path"
40886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40887    unix_path=`$CYGPATH -u "$windows_path"`
40888    new_path="$unix_path"
40889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40891    new_path="$unix_path"
40892  fi
40893
40894    fi
40895
40896    if test "x$new_path" = x; then
40897      # It's still not found. Now this is an unrecoverable error.
40898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40899$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40900      has_space=`$ECHO "$complete" | $GREP " "`
40901      if test "x$has_space" != x; then
40902        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40903$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40904      fi
40905      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40906    fi
40907  fi
40908
40909  # Now new_path has a complete unix path to the binary
40910  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40911    # Keep paths in /bin as-is, but remove trailing .exe if any
40912    new_path="${new_path/%.exe/}"
40913    # Do not save /bin paths to all_fixpath_prefixes!
40914  else
40915    # Not in mixed or Windows style, start by that.
40916    new_path=`cmd //c echo $new_path`
40917
40918  input_path="$new_path"
40919  # Check if we need to convert this using DOS-style short mode. If the path
40920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40921  # take no chances and rewrite it.
40922  # Note: m4 eats our [], so we need to use [ and ] instead.
40923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40924  if test "x$has_forbidden_chars" != x; then
40925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40927  fi
40928
40929    # Output is in $new_path
40930
40931  windows_path="$new_path"
40932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40933    unix_path=`$CYGPATH -u "$windows_path"`
40934    new_path="$unix_path"
40935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40937    new_path="$unix_path"
40938  fi
40939
40940    # remove trailing .exe if any
40941    new_path="${new_path/%.exe/}"
40942
40943    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40944    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40945  fi
40946
40947    else
40948      # We're on a unix platform. Hooray! :)
40949      # First separate the path from the arguments. This will split at the first
40950      # space.
40951      complete="$STRIP"
40952      path="${complete%% *}"
40953      tmp="$complete EOL"
40954      arguments="${tmp#* }"
40955
40956      # Cannot rely on the command "which" here since it doesn't always work.
40957      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40958      if test -z "$is_absolute_path"; then
40959        # Path to executable is not absolute. Find it.
40960        IFS_save="$IFS"
40961        IFS=:
40962        for p in $PATH; do
40963          if test -f "$p/$path" && test -x "$p/$path"; then
40964            new_path="$p/$path"
40965            break
40966          fi
40967        done
40968        IFS="$IFS_save"
40969      else
40970        # This is an absolute path, we can use it without further modifications.
40971        new_path="$path"
40972      fi
40973
40974      if test "x$new_path" = x; then
40975        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40976$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40977        has_space=`$ECHO "$complete" | $GREP " "`
40978        if test "x$has_space" != x; then
40979          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40980$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40981        fi
40982        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40983      fi
40984    fi
40985
40986    # Now join together the path and the arguments once again
40987    if test "x$arguments" != xEOL; then
40988      new_complete="$new_path ${arguments% *}"
40989    else
40990      new_complete="$new_path"
40991    fi
40992
40993    if test "x$complete" != "x$new_complete"; then
40994      STRIP="$new_complete"
40995      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40996$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40997    fi
40998  fi
40999
41000
41001
41002  # Publish this variable in the help.
41003
41004
41005  if [ -z "${NM+x}" ]; then
41006    # The variable is not set by user, try to locate tool using the code snippet
41007    for ac_prog in nm
41008do
41009  # Extract the first word of "$ac_prog", so it can be a program name with args.
41010set dummy $ac_prog; ac_word=$2
41011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41012$as_echo_n "checking for $ac_word... " >&6; }
41013if ${ac_cv_path_NM+:} false; then :
41014  $as_echo_n "(cached) " >&6
41015else
41016  case $NM in
41017  [\\/]* | ?:[\\/]*)
41018  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41019  ;;
41020  *)
41021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41022for as_dir in $PATH
41023do
41024  IFS=$as_save_IFS
41025  test -z "$as_dir" && as_dir=.
41026    for ac_exec_ext in '' $ac_executable_extensions; do
41027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41028    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41030    break 2
41031  fi
41032done
41033  done
41034IFS=$as_save_IFS
41035
41036  ;;
41037esac
41038fi
41039NM=$ac_cv_path_NM
41040if test -n "$NM"; then
41041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41042$as_echo "$NM" >&6; }
41043else
41044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41045$as_echo "no" >&6; }
41046fi
41047
41048
41049  test -n "$NM" && break
41050done
41051
41052  else
41053    # The variable is set, but is it from the command line or the environment?
41054
41055    # Try to remove the string !NM! from our list.
41056    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41057    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41058      # If it failed, the variable was not from the command line. Ignore it,
41059      # but warn the user (except for BASH, which is always set by the calling BASH).
41060      if test "xNM" != xBASH; then
41061        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41062$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41063      fi
41064      # Try to locate tool using the code snippet
41065      for ac_prog in nm
41066do
41067  # Extract the first word of "$ac_prog", so it can be a program name with args.
41068set dummy $ac_prog; ac_word=$2
41069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41070$as_echo_n "checking for $ac_word... " >&6; }
41071if ${ac_cv_path_NM+:} false; then :
41072  $as_echo_n "(cached) " >&6
41073else
41074  case $NM in
41075  [\\/]* | ?:[\\/]*)
41076  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41077  ;;
41078  *)
41079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41080for as_dir in $PATH
41081do
41082  IFS=$as_save_IFS
41083  test -z "$as_dir" && as_dir=.
41084    for ac_exec_ext in '' $ac_executable_extensions; do
41085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41086    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41088    break 2
41089  fi
41090done
41091  done
41092IFS=$as_save_IFS
41093
41094  ;;
41095esac
41096fi
41097NM=$ac_cv_path_NM
41098if test -n "$NM"; then
41099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41100$as_echo "$NM" >&6; }
41101else
41102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41103$as_echo "no" >&6; }
41104fi
41105
41106
41107  test -n "$NM" && break
41108done
41109
41110    else
41111      # If it succeeded, then it was overridden by the user. We will use it
41112      # for the tool.
41113
41114      # First remove it from the list of overridden variables, so we can test
41115      # for unknown variables in the end.
41116      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41117
41118      # Check if we try to supply an empty value
41119      if test "x$NM" = x; then
41120        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41121$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41122        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41123$as_echo_n "checking for NM... " >&6; }
41124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41125$as_echo "disabled" >&6; }
41126      else
41127        # Check if the provided tool contains a complete path.
41128        tool_specified="$NM"
41129        tool_basename="${tool_specified##*/}"
41130        if test "x$tool_basename" = "x$tool_specified"; then
41131          # A command without a complete path is provided, search $PATH.
41132          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41133$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41134          # Extract the first word of "$tool_basename", so it can be a program name with args.
41135set dummy $tool_basename; ac_word=$2
41136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41137$as_echo_n "checking for $ac_word... " >&6; }
41138if ${ac_cv_path_NM+:} false; then :
41139  $as_echo_n "(cached) " >&6
41140else
41141  case $NM in
41142  [\\/]* | ?:[\\/]*)
41143  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41144  ;;
41145  *)
41146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41147for as_dir in $PATH
41148do
41149  IFS=$as_save_IFS
41150  test -z "$as_dir" && as_dir=.
41151    for ac_exec_ext in '' $ac_executable_extensions; do
41152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41153    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41155    break 2
41156  fi
41157done
41158  done
41159IFS=$as_save_IFS
41160
41161  ;;
41162esac
41163fi
41164NM=$ac_cv_path_NM
41165if test -n "$NM"; then
41166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41167$as_echo "$NM" >&6; }
41168else
41169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41170$as_echo "no" >&6; }
41171fi
41172
41173
41174          if test "x$NM" = x; then
41175            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41176          fi
41177        else
41178          # Otherwise we believe it is a complete path. Use it as it is.
41179          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41180$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41181          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41182$as_echo_n "checking for NM... " >&6; }
41183          if test ! -x "$tool_specified"; then
41184            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41185$as_echo "not found" >&6; }
41186            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41187          fi
41188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41189$as_echo "$tool_specified" >&6; }
41190        fi
41191      fi
41192    fi
41193
41194  fi
41195
41196
41197
41198  # Only process if variable expands to non-empty
41199
41200  if test "x$NM" != x; then
41201    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41202
41203  # First separate the path from the arguments. This will split at the first
41204  # space.
41205  complete="$NM"
41206  path="${complete%% *}"
41207  tmp="$complete EOL"
41208  arguments="${tmp#* }"
41209
41210  # Input might be given as Windows format, start by converting to
41211  # unix format.
41212  new_path=`$CYGPATH -u "$path"`
41213
41214  # Now try to locate executable using which
41215  new_path=`$WHICH "$new_path" 2> /dev/null`
41216  # bat and cmd files are not always considered executable in cygwin causing which
41217  # to not find them
41218  if test "x$new_path" = x \
41219      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41220      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41221    new_path=`$CYGPATH -u "$path"`
41222  fi
41223  if test "x$new_path" = x; then
41224    # Oops. Which didn't find the executable.
41225    # The splitting of arguments from the executable at a space might have been incorrect,
41226    # since paths with space are more likely in Windows. Give it another try with the whole
41227    # argument.
41228    path="$complete"
41229    arguments="EOL"
41230    new_path=`$CYGPATH -u "$path"`
41231    new_path=`$WHICH "$new_path" 2> /dev/null`
41232    # bat and cmd files are not always considered executable in cygwin causing which
41233    # to not find them
41234    if test "x$new_path" = x \
41235        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41236        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41237      new_path=`$CYGPATH -u "$path"`
41238    fi
41239    if test "x$new_path" = x; then
41240      # It's still not found. Now this is an unrecoverable error.
41241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41242$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41243      has_space=`$ECHO "$complete" | $GREP " "`
41244      if test "x$has_space" != x; then
41245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41247      fi
41248      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41249    fi
41250  fi
41251
41252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41255  # "foo.exe" is OK but "foo" is an error.
41256  #
41257  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41258  # It is also a way to make sure we got the proper file name for the real test later on.
41259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41260  if test "x$test_shortpath" = x; then
41261    # Short path failed, file does not exist as specified.
41262    # Try adding .exe or .cmd
41263    if test -f "${new_path}.exe"; then
41264      input_to_shortpath="${new_path}.exe"
41265    elif test -f "${new_path}.cmd"; then
41266      input_to_shortpath="${new_path}.cmd"
41267    else
41268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41269$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41270      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41271$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41272      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41273    fi
41274  else
41275    input_to_shortpath="$new_path"
41276  fi
41277
41278  # Call helper function which possibly converts this using DOS-style short mode.
41279  # If so, the updated path is stored in $new_path.
41280  new_path="$input_to_shortpath"
41281
41282  input_path="$input_to_shortpath"
41283  # Check if we need to convert this using DOS-style short mode. If the path
41284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41285  # take no chances and rewrite it.
41286  # Note: m4 eats our [], so we need to use [ and ] instead.
41287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41288  if test "x$has_forbidden_chars" != x; then
41289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41293      # Going to short mode and back again did indeed matter. Since short mode is
41294      # case insensitive, let's make it lowercase to improve readability.
41295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41296      # Now convert it back to Unix-style (cygpath)
41297      input_path=`$CYGPATH -u "$shortmode_path"`
41298      new_path="$input_path"
41299    fi
41300  fi
41301
41302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41303  if test "x$test_cygdrive_prefix" = x; then
41304    # As a simple fix, exclude /usr/bin since it's not a real path.
41305    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41307      # a path prefixed by /cygdrive for fixpath to work.
41308      new_path="$CYGWIN_ROOT_PATH$input_path"
41309    fi
41310  fi
41311
41312  # remove trailing .exe if any
41313  new_path="${new_path/%.exe/}"
41314
41315    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41316
41317  # First separate the path from the arguments. This will split at the first
41318  # space.
41319  complete="$NM"
41320  path="${complete%% *}"
41321  tmp="$complete EOL"
41322  arguments="${tmp#* }"
41323
41324  # Input might be given as Windows format, start by converting to
41325  # unix format.
41326  new_path="$path"
41327
41328  windows_path="$new_path"
41329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41330    unix_path=`$CYGPATH -u "$windows_path"`
41331    new_path="$unix_path"
41332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41334    new_path="$unix_path"
41335  fi
41336
41337
41338  # Now try to locate executable using which
41339  new_path=`$WHICH "$new_path" 2> /dev/null`
41340
41341  if test "x$new_path" = x; then
41342    # Oops. Which didn't find the executable.
41343    # The splitting of arguments from the executable at a space might have been incorrect,
41344    # since paths with space are more likely in Windows. Give it another try with the whole
41345    # argument.
41346    path="$complete"
41347    arguments="EOL"
41348    new_path="$path"
41349
41350  windows_path="$new_path"
41351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41352    unix_path=`$CYGPATH -u "$windows_path"`
41353    new_path="$unix_path"
41354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41356    new_path="$unix_path"
41357  fi
41358
41359
41360    new_path=`$WHICH "$new_path" 2> /dev/null`
41361    # bat and cmd files are not always considered executable in MSYS causing which
41362    # to not find them
41363    if test "x$new_path" = x \
41364        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41365        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41366      new_path="$path"
41367
41368  windows_path="$new_path"
41369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41370    unix_path=`$CYGPATH -u "$windows_path"`
41371    new_path="$unix_path"
41372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41374    new_path="$unix_path"
41375  fi
41376
41377    fi
41378
41379    if test "x$new_path" = x; then
41380      # It's still not found. Now this is an unrecoverable error.
41381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41382$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41383      has_space=`$ECHO "$complete" | $GREP " "`
41384      if test "x$has_space" != x; then
41385        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41386$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41387      fi
41388      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41389    fi
41390  fi
41391
41392  # Now new_path has a complete unix path to the binary
41393  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41394    # Keep paths in /bin as-is, but remove trailing .exe if any
41395    new_path="${new_path/%.exe/}"
41396    # Do not save /bin paths to all_fixpath_prefixes!
41397  else
41398    # Not in mixed or Windows style, start by that.
41399    new_path=`cmd //c echo $new_path`
41400
41401  input_path="$new_path"
41402  # Check if we need to convert this using DOS-style short mode. If the path
41403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41404  # take no chances and rewrite it.
41405  # Note: m4 eats our [], so we need to use [ and ] instead.
41406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41407  if test "x$has_forbidden_chars" != x; then
41408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41410  fi
41411
41412    # Output is in $new_path
41413
41414  windows_path="$new_path"
41415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41416    unix_path=`$CYGPATH -u "$windows_path"`
41417    new_path="$unix_path"
41418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41420    new_path="$unix_path"
41421  fi
41422
41423    # remove trailing .exe if any
41424    new_path="${new_path/%.exe/}"
41425
41426    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41427    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41428  fi
41429
41430    else
41431      # We're on a unix platform. Hooray! :)
41432      # First separate the path from the arguments. This will split at the first
41433      # space.
41434      complete="$NM"
41435      path="${complete%% *}"
41436      tmp="$complete EOL"
41437      arguments="${tmp#* }"
41438
41439      # Cannot rely on the command "which" here since it doesn't always work.
41440      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41441      if test -z "$is_absolute_path"; then
41442        # Path to executable is not absolute. Find it.
41443        IFS_save="$IFS"
41444        IFS=:
41445        for p in $PATH; do
41446          if test -f "$p/$path" && test -x "$p/$path"; then
41447            new_path="$p/$path"
41448            break
41449          fi
41450        done
41451        IFS="$IFS_save"
41452      else
41453        # This is an absolute path, we can use it without further modifications.
41454        new_path="$path"
41455      fi
41456
41457      if test "x$new_path" = x; then
41458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41459$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41460        has_space=`$ECHO "$complete" | $GREP " "`
41461        if test "x$has_space" != x; then
41462          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41463$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41464        fi
41465        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41466      fi
41467    fi
41468
41469    # Now join together the path and the arguments once again
41470    if test "x$arguments" != xEOL; then
41471      new_complete="$new_path ${arguments% *}"
41472    else
41473      new_complete="$new_path"
41474    fi
41475
41476    if test "x$complete" != "x$new_complete"; then
41477      NM="$new_complete"
41478      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41479$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41480    fi
41481  fi
41482
41483
41484
41485  # Publish this variable in the help.
41486
41487
41488  if [ -z "${GNM+x}" ]; then
41489    # The variable is not set by user, try to locate tool using the code snippet
41490    for ac_prog in gnm
41491do
41492  # Extract the first word of "$ac_prog", so it can be a program name with args.
41493set dummy $ac_prog; ac_word=$2
41494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41495$as_echo_n "checking for $ac_word... " >&6; }
41496if ${ac_cv_path_GNM+:} false; then :
41497  $as_echo_n "(cached) " >&6
41498else
41499  case $GNM in
41500  [\\/]* | ?:[\\/]*)
41501  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41502  ;;
41503  *)
41504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41505for as_dir in $PATH
41506do
41507  IFS=$as_save_IFS
41508  test -z "$as_dir" && as_dir=.
41509    for ac_exec_ext in '' $ac_executable_extensions; do
41510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41511    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41513    break 2
41514  fi
41515done
41516  done
41517IFS=$as_save_IFS
41518
41519  ;;
41520esac
41521fi
41522GNM=$ac_cv_path_GNM
41523if test -n "$GNM"; then
41524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41525$as_echo "$GNM" >&6; }
41526else
41527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41528$as_echo "no" >&6; }
41529fi
41530
41531
41532  test -n "$GNM" && break
41533done
41534
41535  else
41536    # The variable is set, but is it from the command line or the environment?
41537
41538    # Try to remove the string !GNM! from our list.
41539    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41540    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41541      # If it failed, the variable was not from the command line. Ignore it,
41542      # but warn the user (except for BASH, which is always set by the calling BASH).
41543      if test "xGNM" != xBASH; then
41544        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41545$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41546      fi
41547      # Try to locate tool using the code snippet
41548      for ac_prog in gnm
41549do
41550  # Extract the first word of "$ac_prog", so it can be a program name with args.
41551set dummy $ac_prog; ac_word=$2
41552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41553$as_echo_n "checking for $ac_word... " >&6; }
41554if ${ac_cv_path_GNM+:} false; then :
41555  $as_echo_n "(cached) " >&6
41556else
41557  case $GNM in
41558  [\\/]* | ?:[\\/]*)
41559  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41560  ;;
41561  *)
41562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41563for as_dir in $PATH
41564do
41565  IFS=$as_save_IFS
41566  test -z "$as_dir" && as_dir=.
41567    for ac_exec_ext in '' $ac_executable_extensions; do
41568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41569    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41571    break 2
41572  fi
41573done
41574  done
41575IFS=$as_save_IFS
41576
41577  ;;
41578esac
41579fi
41580GNM=$ac_cv_path_GNM
41581if test -n "$GNM"; then
41582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41583$as_echo "$GNM" >&6; }
41584else
41585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41586$as_echo "no" >&6; }
41587fi
41588
41589
41590  test -n "$GNM" && break
41591done
41592
41593    else
41594      # If it succeeded, then it was overridden by the user. We will use it
41595      # for the tool.
41596
41597      # First remove it from the list of overridden variables, so we can test
41598      # for unknown variables in the end.
41599      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41600
41601      # Check if we try to supply an empty value
41602      if test "x$GNM" = x; then
41603        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41604$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41605        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41606$as_echo_n "checking for GNM... " >&6; }
41607        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41608$as_echo "disabled" >&6; }
41609      else
41610        # Check if the provided tool contains a complete path.
41611        tool_specified="$GNM"
41612        tool_basename="${tool_specified##*/}"
41613        if test "x$tool_basename" = "x$tool_specified"; then
41614          # A command without a complete path is provided, search $PATH.
41615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41616$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41617          # Extract the first word of "$tool_basename", so it can be a program name with args.
41618set dummy $tool_basename; ac_word=$2
41619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41620$as_echo_n "checking for $ac_word... " >&6; }
41621if ${ac_cv_path_GNM+:} false; then :
41622  $as_echo_n "(cached) " >&6
41623else
41624  case $GNM in
41625  [\\/]* | ?:[\\/]*)
41626  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41627  ;;
41628  *)
41629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41630for as_dir in $PATH
41631do
41632  IFS=$as_save_IFS
41633  test -z "$as_dir" && as_dir=.
41634    for ac_exec_ext in '' $ac_executable_extensions; do
41635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41636    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41638    break 2
41639  fi
41640done
41641  done
41642IFS=$as_save_IFS
41643
41644  ;;
41645esac
41646fi
41647GNM=$ac_cv_path_GNM
41648if test -n "$GNM"; then
41649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41650$as_echo "$GNM" >&6; }
41651else
41652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41653$as_echo "no" >&6; }
41654fi
41655
41656
41657          if test "x$GNM" = x; then
41658            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41659          fi
41660        else
41661          # Otherwise we believe it is a complete path. Use it as it is.
41662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41663$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41664          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41665$as_echo_n "checking for GNM... " >&6; }
41666          if test ! -x "$tool_specified"; then
41667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41668$as_echo "not found" >&6; }
41669            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41670          fi
41671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41672$as_echo "$tool_specified" >&6; }
41673        fi
41674      fi
41675    fi
41676
41677  fi
41678
41679
41680
41681  # Only process if variable expands to non-empty
41682
41683  if test "x$GNM" != x; then
41684    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41685
41686  # First separate the path from the arguments. This will split at the first
41687  # space.
41688  complete="$GNM"
41689  path="${complete%% *}"
41690  tmp="$complete EOL"
41691  arguments="${tmp#* }"
41692
41693  # Input might be given as Windows format, start by converting to
41694  # unix format.
41695  new_path=`$CYGPATH -u "$path"`
41696
41697  # Now try to locate executable using which
41698  new_path=`$WHICH "$new_path" 2> /dev/null`
41699  # bat and cmd files are not always considered executable in cygwin causing which
41700  # to not find them
41701  if test "x$new_path" = x \
41702      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41703      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41704    new_path=`$CYGPATH -u "$path"`
41705  fi
41706  if test "x$new_path" = x; then
41707    # Oops. Which didn't find the executable.
41708    # The splitting of arguments from the executable at a space might have been incorrect,
41709    # since paths with space are more likely in Windows. Give it another try with the whole
41710    # argument.
41711    path="$complete"
41712    arguments="EOL"
41713    new_path=`$CYGPATH -u "$path"`
41714    new_path=`$WHICH "$new_path" 2> /dev/null`
41715    # bat and cmd files are not always considered executable in cygwin causing which
41716    # to not find them
41717    if test "x$new_path" = x \
41718        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41719        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41720      new_path=`$CYGPATH -u "$path"`
41721    fi
41722    if test "x$new_path" = x; then
41723      # It's still not found. Now this is an unrecoverable error.
41724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41725$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41726      has_space=`$ECHO "$complete" | $GREP " "`
41727      if test "x$has_space" != x; then
41728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41730      fi
41731      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41732    fi
41733  fi
41734
41735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41738  # "foo.exe" is OK but "foo" is an error.
41739  #
41740  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41741  # It is also a way to make sure we got the proper file name for the real test later on.
41742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41743  if test "x$test_shortpath" = x; then
41744    # Short path failed, file does not exist as specified.
41745    # Try adding .exe or .cmd
41746    if test -f "${new_path}.exe"; then
41747      input_to_shortpath="${new_path}.exe"
41748    elif test -f "${new_path}.cmd"; then
41749      input_to_shortpath="${new_path}.cmd"
41750    else
41751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41752$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41753      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41754$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41755      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41756    fi
41757  else
41758    input_to_shortpath="$new_path"
41759  fi
41760
41761  # Call helper function which possibly converts this using DOS-style short mode.
41762  # If so, the updated path is stored in $new_path.
41763  new_path="$input_to_shortpath"
41764
41765  input_path="$input_to_shortpath"
41766  # Check if we need to convert this using DOS-style short mode. If the path
41767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41768  # take no chances and rewrite it.
41769  # Note: m4 eats our [], so we need to use [ and ] instead.
41770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41771  if test "x$has_forbidden_chars" != x; then
41772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41776      # Going to short mode and back again did indeed matter. Since short mode is
41777      # case insensitive, let's make it lowercase to improve readability.
41778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41779      # Now convert it back to Unix-style (cygpath)
41780      input_path=`$CYGPATH -u "$shortmode_path"`
41781      new_path="$input_path"
41782    fi
41783  fi
41784
41785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41786  if test "x$test_cygdrive_prefix" = x; then
41787    # As a simple fix, exclude /usr/bin since it's not a real path.
41788    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41790      # a path prefixed by /cygdrive for fixpath to work.
41791      new_path="$CYGWIN_ROOT_PATH$input_path"
41792    fi
41793  fi
41794
41795  # remove trailing .exe if any
41796  new_path="${new_path/%.exe/}"
41797
41798    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41799
41800  # First separate the path from the arguments. This will split at the first
41801  # space.
41802  complete="$GNM"
41803  path="${complete%% *}"
41804  tmp="$complete EOL"
41805  arguments="${tmp#* }"
41806
41807  # Input might be given as Windows format, start by converting to
41808  # unix format.
41809  new_path="$path"
41810
41811  windows_path="$new_path"
41812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41813    unix_path=`$CYGPATH -u "$windows_path"`
41814    new_path="$unix_path"
41815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41817    new_path="$unix_path"
41818  fi
41819
41820
41821  # Now try to locate executable using which
41822  new_path=`$WHICH "$new_path" 2> /dev/null`
41823
41824  if test "x$new_path" = x; then
41825    # Oops. Which didn't find the executable.
41826    # The splitting of arguments from the executable at a space might have been incorrect,
41827    # since paths with space are more likely in Windows. Give it another try with the whole
41828    # argument.
41829    path="$complete"
41830    arguments="EOL"
41831    new_path="$path"
41832
41833  windows_path="$new_path"
41834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41835    unix_path=`$CYGPATH -u "$windows_path"`
41836    new_path="$unix_path"
41837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41839    new_path="$unix_path"
41840  fi
41841
41842
41843    new_path=`$WHICH "$new_path" 2> /dev/null`
41844    # bat and cmd files are not always considered executable in MSYS causing which
41845    # to not find them
41846    if test "x$new_path" = x \
41847        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41848        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41849      new_path="$path"
41850
41851  windows_path="$new_path"
41852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41853    unix_path=`$CYGPATH -u "$windows_path"`
41854    new_path="$unix_path"
41855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41857    new_path="$unix_path"
41858  fi
41859
41860    fi
41861
41862    if test "x$new_path" = x; then
41863      # It's still not found. Now this is an unrecoverable error.
41864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41865$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41866      has_space=`$ECHO "$complete" | $GREP " "`
41867      if test "x$has_space" != x; then
41868        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41869$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41870      fi
41871      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41872    fi
41873  fi
41874
41875  # Now new_path has a complete unix path to the binary
41876  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41877    # Keep paths in /bin as-is, but remove trailing .exe if any
41878    new_path="${new_path/%.exe/}"
41879    # Do not save /bin paths to all_fixpath_prefixes!
41880  else
41881    # Not in mixed or Windows style, start by that.
41882    new_path=`cmd //c echo $new_path`
41883
41884  input_path="$new_path"
41885  # Check if we need to convert this using DOS-style short mode. If the path
41886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41887  # take no chances and rewrite it.
41888  # Note: m4 eats our [], so we need to use [ and ] instead.
41889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41890  if test "x$has_forbidden_chars" != x; then
41891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41893  fi
41894
41895    # Output is in $new_path
41896
41897  windows_path="$new_path"
41898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41899    unix_path=`$CYGPATH -u "$windows_path"`
41900    new_path="$unix_path"
41901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41903    new_path="$unix_path"
41904  fi
41905
41906    # remove trailing .exe if any
41907    new_path="${new_path/%.exe/}"
41908
41909    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41910    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41911  fi
41912
41913    else
41914      # We're on a unix platform. Hooray! :)
41915      # First separate the path from the arguments. This will split at the first
41916      # space.
41917      complete="$GNM"
41918      path="${complete%% *}"
41919      tmp="$complete EOL"
41920      arguments="${tmp#* }"
41921
41922      # Cannot rely on the command "which" here since it doesn't always work.
41923      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41924      if test -z "$is_absolute_path"; then
41925        # Path to executable is not absolute. Find it.
41926        IFS_save="$IFS"
41927        IFS=:
41928        for p in $PATH; do
41929          if test -f "$p/$path" && test -x "$p/$path"; then
41930            new_path="$p/$path"
41931            break
41932          fi
41933        done
41934        IFS="$IFS_save"
41935      else
41936        # This is an absolute path, we can use it without further modifications.
41937        new_path="$path"
41938      fi
41939
41940      if test "x$new_path" = x; then
41941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41942$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41943        has_space=`$ECHO "$complete" | $GREP " "`
41944        if test "x$has_space" != x; then
41945          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41946$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41947        fi
41948        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41949      fi
41950    fi
41951
41952    # Now join together the path and the arguments once again
41953    if test "x$arguments" != xEOL; then
41954      new_complete="$new_path ${arguments% *}"
41955    else
41956      new_complete="$new_path"
41957    fi
41958
41959    if test "x$complete" != "x$new_complete"; then
41960      GNM="$new_complete"
41961      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41962$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41963    fi
41964  fi
41965
41966  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41967    # FIXME: we should unify this with the solaris case above.
41968
41969
41970  # Publish this variable in the help.
41971
41972
41973  if [ -z "${STRIP+x}" ]; then
41974    # The variable is not set by user, try to locate tool using the code snippet
41975    if test -n "$ac_tool_prefix"; then
41976  for ac_prog in strip
41977  do
41978    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41979set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41981$as_echo_n "checking for $ac_word... " >&6; }
41982if ${ac_cv_prog_STRIP+:} false; then :
41983  $as_echo_n "(cached) " >&6
41984else
41985  if test -n "$STRIP"; then
41986  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41987else
41988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41989for as_dir in $PATH
41990do
41991  IFS=$as_save_IFS
41992  test -z "$as_dir" && as_dir=.
41993    for ac_exec_ext in '' $ac_executable_extensions; do
41994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41995    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41997    break 2
41998  fi
41999done
42000  done
42001IFS=$as_save_IFS
42002
42003fi
42004fi
42005STRIP=$ac_cv_prog_STRIP
42006if test -n "$STRIP"; then
42007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42008$as_echo "$STRIP" >&6; }
42009else
42010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42011$as_echo "no" >&6; }
42012fi
42013
42014
42015    test -n "$STRIP" && break
42016  done
42017fi
42018if test -z "$STRIP"; then
42019  ac_ct_STRIP=$STRIP
42020  for ac_prog in strip
42021do
42022  # Extract the first word of "$ac_prog", so it can be a program name with args.
42023set dummy $ac_prog; ac_word=$2
42024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42025$as_echo_n "checking for $ac_word... " >&6; }
42026if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42027  $as_echo_n "(cached) " >&6
42028else
42029  if test -n "$ac_ct_STRIP"; then
42030  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42031else
42032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42033for as_dir in $PATH
42034do
42035  IFS=$as_save_IFS
42036  test -z "$as_dir" && as_dir=.
42037    for ac_exec_ext in '' $ac_executable_extensions; do
42038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42039    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42041    break 2
42042  fi
42043done
42044  done
42045IFS=$as_save_IFS
42046
42047fi
42048fi
42049ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42050if test -n "$ac_ct_STRIP"; then
42051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42052$as_echo "$ac_ct_STRIP" >&6; }
42053else
42054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42055$as_echo "no" >&6; }
42056fi
42057
42058
42059  test -n "$ac_ct_STRIP" && break
42060done
42061
42062  if test "x$ac_ct_STRIP" = x; then
42063    STRIP=""
42064  else
42065    case $cross_compiling:$ac_tool_warned in
42066yes:)
42067{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42068$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42069ac_tool_warned=yes ;;
42070esac
42071    STRIP=$ac_ct_STRIP
42072  fi
42073fi
42074
42075  else
42076    # The variable is set, but is it from the command line or the environment?
42077
42078    # Try to remove the string !STRIP! from our list.
42079    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
42080    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42081      # If it failed, the variable was not from the command line. Ignore it,
42082      # but warn the user (except for BASH, which is always set by the calling BASH).
42083      if test "xSTRIP" != xBASH; then
42084        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
42085$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
42086      fi
42087      # Try to locate tool using the code snippet
42088      if test -n "$ac_tool_prefix"; then
42089  for ac_prog in strip
42090  do
42091    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42092set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42094$as_echo_n "checking for $ac_word... " >&6; }
42095if ${ac_cv_prog_STRIP+:} false; then :
42096  $as_echo_n "(cached) " >&6
42097else
42098  if test -n "$STRIP"; then
42099  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42100else
42101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42102for as_dir in $PATH
42103do
42104  IFS=$as_save_IFS
42105  test -z "$as_dir" && as_dir=.
42106    for ac_exec_ext in '' $ac_executable_extensions; do
42107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42108    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42110    break 2
42111  fi
42112done
42113  done
42114IFS=$as_save_IFS
42115
42116fi
42117fi
42118STRIP=$ac_cv_prog_STRIP
42119if test -n "$STRIP"; then
42120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42121$as_echo "$STRIP" >&6; }
42122else
42123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42124$as_echo "no" >&6; }
42125fi
42126
42127
42128    test -n "$STRIP" && break
42129  done
42130fi
42131if test -z "$STRIP"; then
42132  ac_ct_STRIP=$STRIP
42133  for ac_prog in strip
42134do
42135  # Extract the first word of "$ac_prog", so it can be a program name with args.
42136set dummy $ac_prog; ac_word=$2
42137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42138$as_echo_n "checking for $ac_word... " >&6; }
42139if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42140  $as_echo_n "(cached) " >&6
42141else
42142  if test -n "$ac_ct_STRIP"; then
42143  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42144else
42145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42146for as_dir in $PATH
42147do
42148  IFS=$as_save_IFS
42149  test -z "$as_dir" && as_dir=.
42150    for ac_exec_ext in '' $ac_executable_extensions; do
42151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42152    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42154    break 2
42155  fi
42156done
42157  done
42158IFS=$as_save_IFS
42159
42160fi
42161fi
42162ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42163if test -n "$ac_ct_STRIP"; then
42164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42165$as_echo "$ac_ct_STRIP" >&6; }
42166else
42167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42168$as_echo "no" >&6; }
42169fi
42170
42171
42172  test -n "$ac_ct_STRIP" && break
42173done
42174
42175  if test "x$ac_ct_STRIP" = x; then
42176    STRIP=""
42177  else
42178    case $cross_compiling:$ac_tool_warned in
42179yes:)
42180{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42181$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42182ac_tool_warned=yes ;;
42183esac
42184    STRIP=$ac_ct_STRIP
42185  fi
42186fi
42187
42188    else
42189      # If it succeeded, then it was overridden by the user. We will use it
42190      # for the tool.
42191
42192      # First remove it from the list of overridden variables, so we can test
42193      # for unknown variables in the end.
42194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42195
42196      # Check if we try to supply an empty value
42197      if test "x$STRIP" = x; then
42198        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42199$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42201$as_echo_n "checking for STRIP... " >&6; }
42202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42203$as_echo "disabled" >&6; }
42204      else
42205        # Check if the provided tool contains a complete path.
42206        tool_specified="$STRIP"
42207        tool_basename="${tool_specified##*/}"
42208        if test "x$tool_basename" = "x$tool_specified"; then
42209          # A command without a complete path is provided, search $PATH.
42210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42211$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42212          # Extract the first word of "$tool_basename", so it can be a program name with args.
42213set dummy $tool_basename; ac_word=$2
42214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42215$as_echo_n "checking for $ac_word... " >&6; }
42216if ${ac_cv_path_STRIP+:} false; then :
42217  $as_echo_n "(cached) " >&6
42218else
42219  case $STRIP in
42220  [\\/]* | ?:[\\/]*)
42221  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42222  ;;
42223  *)
42224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42225for as_dir in $PATH
42226do
42227  IFS=$as_save_IFS
42228  test -z "$as_dir" && as_dir=.
42229    for ac_exec_ext in '' $ac_executable_extensions; do
42230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42231    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42233    break 2
42234  fi
42235done
42236  done
42237IFS=$as_save_IFS
42238
42239  ;;
42240esac
42241fi
42242STRIP=$ac_cv_path_STRIP
42243if test -n "$STRIP"; then
42244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42245$as_echo "$STRIP" >&6; }
42246else
42247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42248$as_echo "no" >&6; }
42249fi
42250
42251
42252          if test "x$STRIP" = x; then
42253            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42254          fi
42255        else
42256          # Otherwise we believe it is a complete path. Use it as it is.
42257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42258$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42259          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42260$as_echo_n "checking for STRIP... " >&6; }
42261          if test ! -x "$tool_specified"; then
42262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42263$as_echo "not found" >&6; }
42264            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42265          fi
42266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42267$as_echo "$tool_specified" >&6; }
42268        fi
42269      fi
42270    fi
42271
42272  fi
42273
42274
42275
42276  # Only process if variable expands to non-empty
42277
42278  if test "x$STRIP" != x; then
42279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42280
42281  # First separate the path from the arguments. This will split at the first
42282  # space.
42283  complete="$STRIP"
42284  path="${complete%% *}"
42285  tmp="$complete EOL"
42286  arguments="${tmp#* }"
42287
42288  # Input might be given as Windows format, start by converting to
42289  # unix format.
42290  new_path=`$CYGPATH -u "$path"`
42291
42292  # Now try to locate executable using which
42293  new_path=`$WHICH "$new_path" 2> /dev/null`
42294  # bat and cmd files are not always considered executable in cygwin causing which
42295  # to not find them
42296  if test "x$new_path" = x \
42297      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42298      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42299    new_path=`$CYGPATH -u "$path"`
42300  fi
42301  if test "x$new_path" = x; then
42302    # Oops. Which didn't find the executable.
42303    # The splitting of arguments from the executable at a space might have been incorrect,
42304    # since paths with space are more likely in Windows. Give it another try with the whole
42305    # argument.
42306    path="$complete"
42307    arguments="EOL"
42308    new_path=`$CYGPATH -u "$path"`
42309    new_path=`$WHICH "$new_path" 2> /dev/null`
42310    # bat and cmd files are not always considered executable in cygwin causing which
42311    # to not find them
42312    if test "x$new_path" = x \
42313        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42314        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42315      new_path=`$CYGPATH -u "$path"`
42316    fi
42317    if test "x$new_path" = x; then
42318      # It's still not found. Now this is an unrecoverable error.
42319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42320$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42321      has_space=`$ECHO "$complete" | $GREP " "`
42322      if test "x$has_space" != x; then
42323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42325      fi
42326      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42327    fi
42328  fi
42329
42330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42333  # "foo.exe" is OK but "foo" is an error.
42334  #
42335  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42336  # It is also a way to make sure we got the proper file name for the real test later on.
42337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42338  if test "x$test_shortpath" = x; then
42339    # Short path failed, file does not exist as specified.
42340    # Try adding .exe or .cmd
42341    if test -f "${new_path}.exe"; then
42342      input_to_shortpath="${new_path}.exe"
42343    elif test -f "${new_path}.cmd"; then
42344      input_to_shortpath="${new_path}.cmd"
42345    else
42346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42347$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42348      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42349$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42350      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42351    fi
42352  else
42353    input_to_shortpath="$new_path"
42354  fi
42355
42356  # Call helper function which possibly converts this using DOS-style short mode.
42357  # If so, the updated path is stored in $new_path.
42358  new_path="$input_to_shortpath"
42359
42360  input_path="$input_to_shortpath"
42361  # Check if we need to convert this using DOS-style short mode. If the path
42362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42363  # take no chances and rewrite it.
42364  # Note: m4 eats our [], so we need to use [ and ] instead.
42365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42366  if test "x$has_forbidden_chars" != x; then
42367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42371      # Going to short mode and back again did indeed matter. Since short mode is
42372      # case insensitive, let's make it lowercase to improve readability.
42373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42374      # Now convert it back to Unix-style (cygpath)
42375      input_path=`$CYGPATH -u "$shortmode_path"`
42376      new_path="$input_path"
42377    fi
42378  fi
42379
42380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42381  if test "x$test_cygdrive_prefix" = x; then
42382    # As a simple fix, exclude /usr/bin since it's not a real path.
42383    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42385      # a path prefixed by /cygdrive for fixpath to work.
42386      new_path="$CYGWIN_ROOT_PATH$input_path"
42387    fi
42388  fi
42389
42390  # remove trailing .exe if any
42391  new_path="${new_path/%.exe/}"
42392
42393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42394
42395  # First separate the path from the arguments. This will split at the first
42396  # space.
42397  complete="$STRIP"
42398  path="${complete%% *}"
42399  tmp="$complete EOL"
42400  arguments="${tmp#* }"
42401
42402  # Input might be given as Windows format, start by converting to
42403  # unix format.
42404  new_path="$path"
42405
42406  windows_path="$new_path"
42407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42408    unix_path=`$CYGPATH -u "$windows_path"`
42409    new_path="$unix_path"
42410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42412    new_path="$unix_path"
42413  fi
42414
42415
42416  # Now try to locate executable using which
42417  new_path=`$WHICH "$new_path" 2> /dev/null`
42418
42419  if test "x$new_path" = x; then
42420    # Oops. Which didn't find the executable.
42421    # The splitting of arguments from the executable at a space might have been incorrect,
42422    # since paths with space are more likely in Windows. Give it another try with the whole
42423    # argument.
42424    path="$complete"
42425    arguments="EOL"
42426    new_path="$path"
42427
42428  windows_path="$new_path"
42429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42430    unix_path=`$CYGPATH -u "$windows_path"`
42431    new_path="$unix_path"
42432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42434    new_path="$unix_path"
42435  fi
42436
42437
42438    new_path=`$WHICH "$new_path" 2> /dev/null`
42439    # bat and cmd files are not always considered executable in MSYS causing which
42440    # to not find them
42441    if test "x$new_path" = x \
42442        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42443        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42444      new_path="$path"
42445
42446  windows_path="$new_path"
42447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42448    unix_path=`$CYGPATH -u "$windows_path"`
42449    new_path="$unix_path"
42450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42452    new_path="$unix_path"
42453  fi
42454
42455    fi
42456
42457    if test "x$new_path" = x; then
42458      # It's still not found. Now this is an unrecoverable error.
42459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42460$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42461      has_space=`$ECHO "$complete" | $GREP " "`
42462      if test "x$has_space" != x; then
42463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42465      fi
42466      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42467    fi
42468  fi
42469
42470  # Now new_path has a complete unix path to the binary
42471  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42472    # Keep paths in /bin as-is, but remove trailing .exe if any
42473    new_path="${new_path/%.exe/}"
42474    # Do not save /bin paths to all_fixpath_prefixes!
42475  else
42476    # Not in mixed or Windows style, start by that.
42477    new_path=`cmd //c echo $new_path`
42478
42479  input_path="$new_path"
42480  # Check if we need to convert this using DOS-style short mode. If the path
42481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42482  # take no chances and rewrite it.
42483  # Note: m4 eats our [], so we need to use [ and ] instead.
42484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42485  if test "x$has_forbidden_chars" != x; then
42486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42488  fi
42489
42490    # Output is in $new_path
42491
42492  windows_path="$new_path"
42493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42494    unix_path=`$CYGPATH -u "$windows_path"`
42495    new_path="$unix_path"
42496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42498    new_path="$unix_path"
42499  fi
42500
42501    # remove trailing .exe if any
42502    new_path="${new_path/%.exe/}"
42503
42504    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42505    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42506  fi
42507
42508    else
42509      # We're on a unix platform. Hooray! :)
42510      # First separate the path from the arguments. This will split at the first
42511      # space.
42512      complete="$STRIP"
42513      path="${complete%% *}"
42514      tmp="$complete EOL"
42515      arguments="${tmp#* }"
42516
42517      # Cannot rely on the command "which" here since it doesn't always work.
42518      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42519      if test -z "$is_absolute_path"; then
42520        # Path to executable is not absolute. Find it.
42521        IFS_save="$IFS"
42522        IFS=:
42523        for p in $PATH; do
42524          if test -f "$p/$path" && test -x "$p/$path"; then
42525            new_path="$p/$path"
42526            break
42527          fi
42528        done
42529        IFS="$IFS_save"
42530      else
42531        # This is an absolute path, we can use it without further modifications.
42532        new_path="$path"
42533      fi
42534
42535      if test "x$new_path" = x; then
42536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42537$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42538        has_space=`$ECHO "$complete" | $GREP " "`
42539        if test "x$has_space" != x; then
42540          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42541$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42542        fi
42543        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42544      fi
42545    fi
42546
42547    # Now join together the path and the arguments once again
42548    if test "x$arguments" != xEOL; then
42549      new_complete="$new_path ${arguments% *}"
42550    else
42551      new_complete="$new_path"
42552    fi
42553
42554    if test "x$complete" != "x$new_complete"; then
42555      STRIP="$new_complete"
42556      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42557$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42558    fi
42559  fi
42560
42561    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42562
42563
42564  # Publish this variable in the help.
42565
42566
42567  if [ -z "${NM+x}" ]; then
42568    # The variable is not set by user, try to locate tool using the code snippet
42569    if test -n "$ac_tool_prefix"; then
42570  for ac_prog in nm gcc-nm
42571  do
42572    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42573set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42575$as_echo_n "checking for $ac_word... " >&6; }
42576if ${ac_cv_prog_NM+:} false; then :
42577  $as_echo_n "(cached) " >&6
42578else
42579  if test -n "$NM"; then
42580  ac_cv_prog_NM="$NM" # Let the user override the test.
42581else
42582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42583for as_dir in $PATH
42584do
42585  IFS=$as_save_IFS
42586  test -z "$as_dir" && as_dir=.
42587    for ac_exec_ext in '' $ac_executable_extensions; do
42588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42589    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42591    break 2
42592  fi
42593done
42594  done
42595IFS=$as_save_IFS
42596
42597fi
42598fi
42599NM=$ac_cv_prog_NM
42600if test -n "$NM"; then
42601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42602$as_echo "$NM" >&6; }
42603else
42604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42605$as_echo "no" >&6; }
42606fi
42607
42608
42609    test -n "$NM" && break
42610  done
42611fi
42612if test -z "$NM"; then
42613  ac_ct_NM=$NM
42614  for ac_prog in nm gcc-nm
42615do
42616  # Extract the first word of "$ac_prog", so it can be a program name with args.
42617set dummy $ac_prog; ac_word=$2
42618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42619$as_echo_n "checking for $ac_word... " >&6; }
42620if ${ac_cv_prog_ac_ct_NM+:} false; then :
42621  $as_echo_n "(cached) " >&6
42622else
42623  if test -n "$ac_ct_NM"; then
42624  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42625else
42626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42627for as_dir in $PATH
42628do
42629  IFS=$as_save_IFS
42630  test -z "$as_dir" && as_dir=.
42631    for ac_exec_ext in '' $ac_executable_extensions; do
42632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42633    ac_cv_prog_ac_ct_NM="$ac_prog"
42634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42635    break 2
42636  fi
42637done
42638  done
42639IFS=$as_save_IFS
42640
42641fi
42642fi
42643ac_ct_NM=$ac_cv_prog_ac_ct_NM
42644if test -n "$ac_ct_NM"; then
42645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42646$as_echo "$ac_ct_NM" >&6; }
42647else
42648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42649$as_echo "no" >&6; }
42650fi
42651
42652
42653  test -n "$ac_ct_NM" && break
42654done
42655
42656  if test "x$ac_ct_NM" = x; then
42657    NM=""
42658  else
42659    case $cross_compiling:$ac_tool_warned in
42660yes:)
42661{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42662$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42663ac_tool_warned=yes ;;
42664esac
42665    NM=$ac_ct_NM
42666  fi
42667fi
42668
42669  else
42670    # The variable is set, but is it from the command line or the environment?
42671
42672    # Try to remove the string !NM! from our list.
42673    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42674    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42675      # If it failed, the variable was not from the command line. Ignore it,
42676      # but warn the user (except for BASH, which is always set by the calling BASH).
42677      if test "xNM" != xBASH; then
42678        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42679$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42680      fi
42681      # Try to locate tool using the code snippet
42682      if test -n "$ac_tool_prefix"; then
42683  for ac_prog in nm gcc-nm
42684  do
42685    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42686set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42688$as_echo_n "checking for $ac_word... " >&6; }
42689if ${ac_cv_prog_NM+:} false; then :
42690  $as_echo_n "(cached) " >&6
42691else
42692  if test -n "$NM"; then
42693  ac_cv_prog_NM="$NM" # Let the user override the test.
42694else
42695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42696for as_dir in $PATH
42697do
42698  IFS=$as_save_IFS
42699  test -z "$as_dir" && as_dir=.
42700    for ac_exec_ext in '' $ac_executable_extensions; do
42701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42702    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42704    break 2
42705  fi
42706done
42707  done
42708IFS=$as_save_IFS
42709
42710fi
42711fi
42712NM=$ac_cv_prog_NM
42713if test -n "$NM"; then
42714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42715$as_echo "$NM" >&6; }
42716else
42717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42718$as_echo "no" >&6; }
42719fi
42720
42721
42722    test -n "$NM" && break
42723  done
42724fi
42725if test -z "$NM"; then
42726  ac_ct_NM=$NM
42727  for ac_prog in nm gcc-nm
42728do
42729  # Extract the first word of "$ac_prog", so it can be a program name with args.
42730set dummy $ac_prog; ac_word=$2
42731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42732$as_echo_n "checking for $ac_word... " >&6; }
42733if ${ac_cv_prog_ac_ct_NM+:} false; then :
42734  $as_echo_n "(cached) " >&6
42735else
42736  if test -n "$ac_ct_NM"; then
42737  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42738else
42739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42740for as_dir in $PATH
42741do
42742  IFS=$as_save_IFS
42743  test -z "$as_dir" && as_dir=.
42744    for ac_exec_ext in '' $ac_executable_extensions; do
42745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42746    ac_cv_prog_ac_ct_NM="$ac_prog"
42747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42748    break 2
42749  fi
42750done
42751  done
42752IFS=$as_save_IFS
42753
42754fi
42755fi
42756ac_ct_NM=$ac_cv_prog_ac_ct_NM
42757if test -n "$ac_ct_NM"; then
42758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42759$as_echo "$ac_ct_NM" >&6; }
42760else
42761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42762$as_echo "no" >&6; }
42763fi
42764
42765
42766  test -n "$ac_ct_NM" && break
42767done
42768
42769  if test "x$ac_ct_NM" = x; then
42770    NM=""
42771  else
42772    case $cross_compiling:$ac_tool_warned in
42773yes:)
42774{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42775$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42776ac_tool_warned=yes ;;
42777esac
42778    NM=$ac_ct_NM
42779  fi
42780fi
42781
42782    else
42783      # If it succeeded, then it was overridden by the user. We will use it
42784      # for the tool.
42785
42786      # First remove it from the list of overridden variables, so we can test
42787      # for unknown variables in the end.
42788      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42789
42790      # Check if we try to supply an empty value
42791      if test "x$NM" = x; then
42792        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42793$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42794        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42795$as_echo_n "checking for NM... " >&6; }
42796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42797$as_echo "disabled" >&6; }
42798      else
42799        # Check if the provided tool contains a complete path.
42800        tool_specified="$NM"
42801        tool_basename="${tool_specified##*/}"
42802        if test "x$tool_basename" = "x$tool_specified"; then
42803          # A command without a complete path is provided, search $PATH.
42804          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42805$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42806          # Extract the first word of "$tool_basename", so it can be a program name with args.
42807set dummy $tool_basename; ac_word=$2
42808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42809$as_echo_n "checking for $ac_word... " >&6; }
42810if ${ac_cv_path_NM+:} false; then :
42811  $as_echo_n "(cached) " >&6
42812else
42813  case $NM in
42814  [\\/]* | ?:[\\/]*)
42815  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42816  ;;
42817  *)
42818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42819for as_dir in $PATH
42820do
42821  IFS=$as_save_IFS
42822  test -z "$as_dir" && as_dir=.
42823    for ac_exec_ext in '' $ac_executable_extensions; do
42824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42825    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42827    break 2
42828  fi
42829done
42830  done
42831IFS=$as_save_IFS
42832
42833  ;;
42834esac
42835fi
42836NM=$ac_cv_path_NM
42837if test -n "$NM"; then
42838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42839$as_echo "$NM" >&6; }
42840else
42841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42842$as_echo "no" >&6; }
42843fi
42844
42845
42846          if test "x$NM" = x; then
42847            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42848          fi
42849        else
42850          # Otherwise we believe it is a complete path. Use it as it is.
42851          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42852$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42853          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42854$as_echo_n "checking for NM... " >&6; }
42855          if test ! -x "$tool_specified"; then
42856            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42857$as_echo "not found" >&6; }
42858            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42859          fi
42860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42861$as_echo "$tool_specified" >&6; }
42862        fi
42863      fi
42864    fi
42865
42866  fi
42867
42868
42869    else
42870
42871
42872  # Publish this variable in the help.
42873
42874
42875  if [ -z "${NM+x}" ]; then
42876    # The variable is not set by user, try to locate tool using the code snippet
42877    if test -n "$ac_tool_prefix"; then
42878  for ac_prog in nm
42879  do
42880    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42881set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42883$as_echo_n "checking for $ac_word... " >&6; }
42884if ${ac_cv_prog_NM+:} false; then :
42885  $as_echo_n "(cached) " >&6
42886else
42887  if test -n "$NM"; then
42888  ac_cv_prog_NM="$NM" # Let the user override the test.
42889else
42890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42891for as_dir in $PATH
42892do
42893  IFS=$as_save_IFS
42894  test -z "$as_dir" && as_dir=.
42895    for ac_exec_ext in '' $ac_executable_extensions; do
42896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42897    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42899    break 2
42900  fi
42901done
42902  done
42903IFS=$as_save_IFS
42904
42905fi
42906fi
42907NM=$ac_cv_prog_NM
42908if test -n "$NM"; then
42909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42910$as_echo "$NM" >&6; }
42911else
42912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42913$as_echo "no" >&6; }
42914fi
42915
42916
42917    test -n "$NM" && break
42918  done
42919fi
42920if test -z "$NM"; then
42921  ac_ct_NM=$NM
42922  for ac_prog in nm
42923do
42924  # Extract the first word of "$ac_prog", so it can be a program name with args.
42925set dummy $ac_prog; ac_word=$2
42926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42927$as_echo_n "checking for $ac_word... " >&6; }
42928if ${ac_cv_prog_ac_ct_NM+:} false; then :
42929  $as_echo_n "(cached) " >&6
42930else
42931  if test -n "$ac_ct_NM"; then
42932  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42933else
42934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42935for as_dir in $PATH
42936do
42937  IFS=$as_save_IFS
42938  test -z "$as_dir" && as_dir=.
42939    for ac_exec_ext in '' $ac_executable_extensions; do
42940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42941    ac_cv_prog_ac_ct_NM="$ac_prog"
42942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42943    break 2
42944  fi
42945done
42946  done
42947IFS=$as_save_IFS
42948
42949fi
42950fi
42951ac_ct_NM=$ac_cv_prog_ac_ct_NM
42952if test -n "$ac_ct_NM"; then
42953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42954$as_echo "$ac_ct_NM" >&6; }
42955else
42956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42957$as_echo "no" >&6; }
42958fi
42959
42960
42961  test -n "$ac_ct_NM" && break
42962done
42963
42964  if test "x$ac_ct_NM" = x; then
42965    NM=""
42966  else
42967    case $cross_compiling:$ac_tool_warned in
42968yes:)
42969{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42970$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42971ac_tool_warned=yes ;;
42972esac
42973    NM=$ac_ct_NM
42974  fi
42975fi
42976
42977  else
42978    # The variable is set, but is it from the command line or the environment?
42979
42980    # Try to remove the string !NM! from our list.
42981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42983      # If it failed, the variable was not from the command line. Ignore it,
42984      # but warn the user (except for BASH, which is always set by the calling BASH).
42985      if test "xNM" != xBASH; then
42986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42987$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42988      fi
42989      # Try to locate tool using the code snippet
42990      if test -n "$ac_tool_prefix"; then
42991  for ac_prog in nm
42992  do
42993    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42994set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42996$as_echo_n "checking for $ac_word... " >&6; }
42997if ${ac_cv_prog_NM+:} false; then :
42998  $as_echo_n "(cached) " >&6
42999else
43000  if test -n "$NM"; then
43001  ac_cv_prog_NM="$NM" # Let the user override the test.
43002else
43003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43004for as_dir in $PATH
43005do
43006  IFS=$as_save_IFS
43007  test -z "$as_dir" && as_dir=.
43008    for ac_exec_ext in '' $ac_executable_extensions; do
43009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43010    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43012    break 2
43013  fi
43014done
43015  done
43016IFS=$as_save_IFS
43017
43018fi
43019fi
43020NM=$ac_cv_prog_NM
43021if test -n "$NM"; then
43022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43023$as_echo "$NM" >&6; }
43024else
43025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43026$as_echo "no" >&6; }
43027fi
43028
43029
43030    test -n "$NM" && break
43031  done
43032fi
43033if test -z "$NM"; then
43034  ac_ct_NM=$NM
43035  for ac_prog in nm
43036do
43037  # Extract the first word of "$ac_prog", so it can be a program name with args.
43038set dummy $ac_prog; ac_word=$2
43039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43040$as_echo_n "checking for $ac_word... " >&6; }
43041if ${ac_cv_prog_ac_ct_NM+:} false; then :
43042  $as_echo_n "(cached) " >&6
43043else
43044  if test -n "$ac_ct_NM"; then
43045  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43046else
43047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43048for as_dir in $PATH
43049do
43050  IFS=$as_save_IFS
43051  test -z "$as_dir" && as_dir=.
43052    for ac_exec_ext in '' $ac_executable_extensions; do
43053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43054    ac_cv_prog_ac_ct_NM="$ac_prog"
43055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43056    break 2
43057  fi
43058done
43059  done
43060IFS=$as_save_IFS
43061
43062fi
43063fi
43064ac_ct_NM=$ac_cv_prog_ac_ct_NM
43065if test -n "$ac_ct_NM"; then
43066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43067$as_echo "$ac_ct_NM" >&6; }
43068else
43069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43070$as_echo "no" >&6; }
43071fi
43072
43073
43074  test -n "$ac_ct_NM" && break
43075done
43076
43077  if test "x$ac_ct_NM" = x; then
43078    NM=""
43079  else
43080    case $cross_compiling:$ac_tool_warned in
43081yes:)
43082{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43083$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43084ac_tool_warned=yes ;;
43085esac
43086    NM=$ac_ct_NM
43087  fi
43088fi
43089
43090    else
43091      # If it succeeded, then it was overridden by the user. We will use it
43092      # for the tool.
43093
43094      # First remove it from the list of overridden variables, so we can test
43095      # for unknown variables in the end.
43096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43097
43098      # Check if we try to supply an empty value
43099      if test "x$NM" = x; then
43100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43101$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43103$as_echo_n "checking for NM... " >&6; }
43104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43105$as_echo "disabled" >&6; }
43106      else
43107        # Check if the provided tool contains a complete path.
43108        tool_specified="$NM"
43109        tool_basename="${tool_specified##*/}"
43110        if test "x$tool_basename" = "x$tool_specified"; then
43111          # A command without a complete path is provided, search $PATH.
43112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43113$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43114          # Extract the first word of "$tool_basename", so it can be a program name with args.
43115set dummy $tool_basename; ac_word=$2
43116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43117$as_echo_n "checking for $ac_word... " >&6; }
43118if ${ac_cv_path_NM+:} false; then :
43119  $as_echo_n "(cached) " >&6
43120else
43121  case $NM in
43122  [\\/]* | ?:[\\/]*)
43123  ac_cv_path_NM="$NM" # Let the user override the test with a path.
43124  ;;
43125  *)
43126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43127for as_dir in $PATH
43128do
43129  IFS=$as_save_IFS
43130  test -z "$as_dir" && as_dir=.
43131    for ac_exec_ext in '' $ac_executable_extensions; do
43132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43133    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
43134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43135    break 2
43136  fi
43137done
43138  done
43139IFS=$as_save_IFS
43140
43141  ;;
43142esac
43143fi
43144NM=$ac_cv_path_NM
43145if test -n "$NM"; then
43146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43147$as_echo "$NM" >&6; }
43148else
43149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43150$as_echo "no" >&6; }
43151fi
43152
43153
43154          if test "x$NM" = x; then
43155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43156          fi
43157        else
43158          # Otherwise we believe it is a complete path. Use it as it is.
43159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43160$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43162$as_echo_n "checking for NM... " >&6; }
43163          if test ! -x "$tool_specified"; then
43164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43165$as_echo "not found" >&6; }
43166            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43167          fi
43168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43169$as_echo "$tool_specified" >&6; }
43170        fi
43171      fi
43172    fi
43173
43174  fi
43175
43176
43177    fi
43178
43179  # Only process if variable expands to non-empty
43180
43181  if test "x$NM" != x; then
43182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43183
43184  # First separate the path from the arguments. This will split at the first
43185  # space.
43186  complete="$NM"
43187  path="${complete%% *}"
43188  tmp="$complete EOL"
43189  arguments="${tmp#* }"
43190
43191  # Input might be given as Windows format, start by converting to
43192  # unix format.
43193  new_path=`$CYGPATH -u "$path"`
43194
43195  # Now try to locate executable using which
43196  new_path=`$WHICH "$new_path" 2> /dev/null`
43197  # bat and cmd files are not always considered executable in cygwin causing which
43198  # to not find them
43199  if test "x$new_path" = x \
43200      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43201      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43202    new_path=`$CYGPATH -u "$path"`
43203  fi
43204  if test "x$new_path" = x; then
43205    # Oops. Which didn't find the executable.
43206    # The splitting of arguments from the executable at a space might have been incorrect,
43207    # since paths with space are more likely in Windows. Give it another try with the whole
43208    # argument.
43209    path="$complete"
43210    arguments="EOL"
43211    new_path=`$CYGPATH -u "$path"`
43212    new_path=`$WHICH "$new_path" 2> /dev/null`
43213    # bat and cmd files are not always considered executable in cygwin causing which
43214    # to not find them
43215    if test "x$new_path" = x \
43216        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43217        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43218      new_path=`$CYGPATH -u "$path"`
43219    fi
43220    if test "x$new_path" = x; then
43221      # It's still not found. Now this is an unrecoverable error.
43222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43223$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43224      has_space=`$ECHO "$complete" | $GREP " "`
43225      if test "x$has_space" != x; then
43226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43228      fi
43229      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43230    fi
43231  fi
43232
43233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43236  # "foo.exe" is OK but "foo" is an error.
43237  #
43238  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43239  # It is also a way to make sure we got the proper file name for the real test later on.
43240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43241  if test "x$test_shortpath" = x; then
43242    # Short path failed, file does not exist as specified.
43243    # Try adding .exe or .cmd
43244    if test -f "${new_path}.exe"; then
43245      input_to_shortpath="${new_path}.exe"
43246    elif test -f "${new_path}.cmd"; then
43247      input_to_shortpath="${new_path}.cmd"
43248    else
43249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43250$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43251      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43252$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43253      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43254    fi
43255  else
43256    input_to_shortpath="$new_path"
43257  fi
43258
43259  # Call helper function which possibly converts this using DOS-style short mode.
43260  # If so, the updated path is stored in $new_path.
43261  new_path="$input_to_shortpath"
43262
43263  input_path="$input_to_shortpath"
43264  # Check if we need to convert this using DOS-style short mode. If the path
43265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43266  # take no chances and rewrite it.
43267  # Note: m4 eats our [], so we need to use [ and ] instead.
43268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43269  if test "x$has_forbidden_chars" != x; then
43270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43274      # Going to short mode and back again did indeed matter. Since short mode is
43275      # case insensitive, let's make it lowercase to improve readability.
43276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43277      # Now convert it back to Unix-style (cygpath)
43278      input_path=`$CYGPATH -u "$shortmode_path"`
43279      new_path="$input_path"
43280    fi
43281  fi
43282
43283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43284  if test "x$test_cygdrive_prefix" = x; then
43285    # As a simple fix, exclude /usr/bin since it's not a real path.
43286    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43288      # a path prefixed by /cygdrive for fixpath to work.
43289      new_path="$CYGWIN_ROOT_PATH$input_path"
43290    fi
43291  fi
43292
43293  # remove trailing .exe if any
43294  new_path="${new_path/%.exe/}"
43295
43296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43297
43298  # First separate the path from the arguments. This will split at the first
43299  # space.
43300  complete="$NM"
43301  path="${complete%% *}"
43302  tmp="$complete EOL"
43303  arguments="${tmp#* }"
43304
43305  # Input might be given as Windows format, start by converting to
43306  # unix format.
43307  new_path="$path"
43308
43309  windows_path="$new_path"
43310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43311    unix_path=`$CYGPATH -u "$windows_path"`
43312    new_path="$unix_path"
43313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43315    new_path="$unix_path"
43316  fi
43317
43318
43319  # Now try to locate executable using which
43320  new_path=`$WHICH "$new_path" 2> /dev/null`
43321
43322  if test "x$new_path" = x; then
43323    # Oops. Which didn't find the executable.
43324    # The splitting of arguments from the executable at a space might have been incorrect,
43325    # since paths with space are more likely in Windows. Give it another try with the whole
43326    # argument.
43327    path="$complete"
43328    arguments="EOL"
43329    new_path="$path"
43330
43331  windows_path="$new_path"
43332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43333    unix_path=`$CYGPATH -u "$windows_path"`
43334    new_path="$unix_path"
43335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43337    new_path="$unix_path"
43338  fi
43339
43340
43341    new_path=`$WHICH "$new_path" 2> /dev/null`
43342    # bat and cmd files are not always considered executable in MSYS causing which
43343    # to not find them
43344    if test "x$new_path" = x \
43345        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43346        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43347      new_path="$path"
43348
43349  windows_path="$new_path"
43350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43351    unix_path=`$CYGPATH -u "$windows_path"`
43352    new_path="$unix_path"
43353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43355    new_path="$unix_path"
43356  fi
43357
43358    fi
43359
43360    if test "x$new_path" = x; then
43361      # It's still not found. Now this is an unrecoverable error.
43362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43363$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43364      has_space=`$ECHO "$complete" | $GREP " "`
43365      if test "x$has_space" != x; then
43366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43368      fi
43369      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43370    fi
43371  fi
43372
43373  # Now new_path has a complete unix path to the binary
43374  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43375    # Keep paths in /bin as-is, but remove trailing .exe if any
43376    new_path="${new_path/%.exe/}"
43377    # Do not save /bin paths to all_fixpath_prefixes!
43378  else
43379    # Not in mixed or Windows style, start by that.
43380    new_path=`cmd //c echo $new_path`
43381
43382  input_path="$new_path"
43383  # Check if we need to convert this using DOS-style short mode. If the path
43384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43385  # take no chances and rewrite it.
43386  # Note: m4 eats our [], so we need to use [ and ] instead.
43387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43388  if test "x$has_forbidden_chars" != x; then
43389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43391  fi
43392
43393    # Output is in $new_path
43394
43395  windows_path="$new_path"
43396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43397    unix_path=`$CYGPATH -u "$windows_path"`
43398    new_path="$unix_path"
43399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43401    new_path="$unix_path"
43402  fi
43403
43404    # remove trailing .exe if any
43405    new_path="${new_path/%.exe/}"
43406
43407    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43408    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43409  fi
43410
43411    else
43412      # We're on a unix platform. Hooray! :)
43413      # First separate the path from the arguments. This will split at the first
43414      # space.
43415      complete="$NM"
43416      path="${complete%% *}"
43417      tmp="$complete EOL"
43418      arguments="${tmp#* }"
43419
43420      # Cannot rely on the command "which" here since it doesn't always work.
43421      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43422      if test -z "$is_absolute_path"; then
43423        # Path to executable is not absolute. Find it.
43424        IFS_save="$IFS"
43425        IFS=:
43426        for p in $PATH; do
43427          if test -f "$p/$path" && test -x "$p/$path"; then
43428            new_path="$p/$path"
43429            break
43430          fi
43431        done
43432        IFS="$IFS_save"
43433      else
43434        # This is an absolute path, we can use it without further modifications.
43435        new_path="$path"
43436      fi
43437
43438      if test "x$new_path" = x; then
43439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43440$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43441        has_space=`$ECHO "$complete" | $GREP " "`
43442        if test "x$has_space" != x; then
43443          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43444$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43445        fi
43446        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43447      fi
43448    fi
43449
43450    # Now join together the path and the arguments once again
43451    if test "x$arguments" != xEOL; then
43452      new_complete="$new_path ${arguments% *}"
43453    else
43454      new_complete="$new_path"
43455    fi
43456
43457    if test "x$complete" != "x$new_complete"; then
43458      NM="$new_complete"
43459      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43460$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43461    fi
43462  fi
43463
43464    GNM="$NM"
43465
43466  fi
43467
43468  # objcopy is used for moving debug symbols to separate files when
43469  # full debug symbols are enabled.
43470  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43471
43472
43473  # Publish this variable in the help.
43474
43475
43476  if [ -z "${OBJCOPY+x}" ]; then
43477    # The variable is not set by user, try to locate tool using the code snippet
43478    if test -n "$ac_tool_prefix"; then
43479  for ac_prog in gobjcopy objcopy
43480  do
43481    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43482set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43484$as_echo_n "checking for $ac_word... " >&6; }
43485if ${ac_cv_prog_OBJCOPY+:} false; then :
43486  $as_echo_n "(cached) " >&6
43487else
43488  if test -n "$OBJCOPY"; then
43489  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43490else
43491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43492for as_dir in $PATH
43493do
43494  IFS=$as_save_IFS
43495  test -z "$as_dir" && as_dir=.
43496    for ac_exec_ext in '' $ac_executable_extensions; do
43497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43498    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43500    break 2
43501  fi
43502done
43503  done
43504IFS=$as_save_IFS
43505
43506fi
43507fi
43508OBJCOPY=$ac_cv_prog_OBJCOPY
43509if test -n "$OBJCOPY"; then
43510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43511$as_echo "$OBJCOPY" >&6; }
43512else
43513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43514$as_echo "no" >&6; }
43515fi
43516
43517
43518    test -n "$OBJCOPY" && break
43519  done
43520fi
43521if test -z "$OBJCOPY"; then
43522  ac_ct_OBJCOPY=$OBJCOPY
43523  for ac_prog in gobjcopy objcopy
43524do
43525  # Extract the first word of "$ac_prog", so it can be a program name with args.
43526set dummy $ac_prog; ac_word=$2
43527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43528$as_echo_n "checking for $ac_word... " >&6; }
43529if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43530  $as_echo_n "(cached) " >&6
43531else
43532  if test -n "$ac_ct_OBJCOPY"; then
43533  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43534else
43535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43536for as_dir in $PATH
43537do
43538  IFS=$as_save_IFS
43539  test -z "$as_dir" && as_dir=.
43540    for ac_exec_ext in '' $ac_executable_extensions; do
43541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43542    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43544    break 2
43545  fi
43546done
43547  done
43548IFS=$as_save_IFS
43549
43550fi
43551fi
43552ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43553if test -n "$ac_ct_OBJCOPY"; then
43554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43555$as_echo "$ac_ct_OBJCOPY" >&6; }
43556else
43557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43558$as_echo "no" >&6; }
43559fi
43560
43561
43562  test -n "$ac_ct_OBJCOPY" && break
43563done
43564
43565  if test "x$ac_ct_OBJCOPY" = x; then
43566    OBJCOPY=""
43567  else
43568    case $cross_compiling:$ac_tool_warned in
43569yes:)
43570{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43571$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43572ac_tool_warned=yes ;;
43573esac
43574    OBJCOPY=$ac_ct_OBJCOPY
43575  fi
43576fi
43577
43578  else
43579    # The variable is set, but is it from the command line or the environment?
43580
43581    # Try to remove the string !OBJCOPY! from our list.
43582    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43583    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43584      # If it failed, the variable was not from the command line. Ignore it,
43585      # but warn the user (except for BASH, which is always set by the calling BASH).
43586      if test "xOBJCOPY" != xBASH; then
43587        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43588$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43589      fi
43590      # Try to locate tool using the code snippet
43591      if test -n "$ac_tool_prefix"; then
43592  for ac_prog in gobjcopy objcopy
43593  do
43594    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43595set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43597$as_echo_n "checking for $ac_word... " >&6; }
43598if ${ac_cv_prog_OBJCOPY+:} false; then :
43599  $as_echo_n "(cached) " >&6
43600else
43601  if test -n "$OBJCOPY"; then
43602  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43603else
43604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43605for as_dir in $PATH
43606do
43607  IFS=$as_save_IFS
43608  test -z "$as_dir" && as_dir=.
43609    for ac_exec_ext in '' $ac_executable_extensions; do
43610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43611    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43613    break 2
43614  fi
43615done
43616  done
43617IFS=$as_save_IFS
43618
43619fi
43620fi
43621OBJCOPY=$ac_cv_prog_OBJCOPY
43622if test -n "$OBJCOPY"; then
43623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43624$as_echo "$OBJCOPY" >&6; }
43625else
43626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43627$as_echo "no" >&6; }
43628fi
43629
43630
43631    test -n "$OBJCOPY" && break
43632  done
43633fi
43634if test -z "$OBJCOPY"; then
43635  ac_ct_OBJCOPY=$OBJCOPY
43636  for ac_prog in gobjcopy objcopy
43637do
43638  # Extract the first word of "$ac_prog", so it can be a program name with args.
43639set dummy $ac_prog; ac_word=$2
43640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43641$as_echo_n "checking for $ac_word... " >&6; }
43642if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43643  $as_echo_n "(cached) " >&6
43644else
43645  if test -n "$ac_ct_OBJCOPY"; then
43646  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43647else
43648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43649for as_dir in $PATH
43650do
43651  IFS=$as_save_IFS
43652  test -z "$as_dir" && as_dir=.
43653    for ac_exec_ext in '' $ac_executable_extensions; do
43654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43655    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43657    break 2
43658  fi
43659done
43660  done
43661IFS=$as_save_IFS
43662
43663fi
43664fi
43665ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43666if test -n "$ac_ct_OBJCOPY"; then
43667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43668$as_echo "$ac_ct_OBJCOPY" >&6; }
43669else
43670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43671$as_echo "no" >&6; }
43672fi
43673
43674
43675  test -n "$ac_ct_OBJCOPY" && break
43676done
43677
43678  if test "x$ac_ct_OBJCOPY" = x; then
43679    OBJCOPY=""
43680  else
43681    case $cross_compiling:$ac_tool_warned in
43682yes:)
43683{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43684$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43685ac_tool_warned=yes ;;
43686esac
43687    OBJCOPY=$ac_ct_OBJCOPY
43688  fi
43689fi
43690
43691    else
43692      # If it succeeded, then it was overridden by the user. We will use it
43693      # for the tool.
43694
43695      # First remove it from the list of overridden variables, so we can test
43696      # for unknown variables in the end.
43697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43698
43699      # Check if we try to supply an empty value
43700      if test "x$OBJCOPY" = x; then
43701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43702$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43704$as_echo_n "checking for OBJCOPY... " >&6; }
43705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43706$as_echo "disabled" >&6; }
43707      else
43708        # Check if the provided tool contains a complete path.
43709        tool_specified="$OBJCOPY"
43710        tool_basename="${tool_specified##*/}"
43711        if test "x$tool_basename" = "x$tool_specified"; then
43712          # A command without a complete path is provided, search $PATH.
43713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43714$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43715          # Extract the first word of "$tool_basename", so it can be a program name with args.
43716set dummy $tool_basename; ac_word=$2
43717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43718$as_echo_n "checking for $ac_word... " >&6; }
43719if ${ac_cv_path_OBJCOPY+:} false; then :
43720  $as_echo_n "(cached) " >&6
43721else
43722  case $OBJCOPY in
43723  [\\/]* | ?:[\\/]*)
43724  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43725  ;;
43726  *)
43727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43728for as_dir in $PATH
43729do
43730  IFS=$as_save_IFS
43731  test -z "$as_dir" && as_dir=.
43732    for ac_exec_ext in '' $ac_executable_extensions; do
43733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43734    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43736    break 2
43737  fi
43738done
43739  done
43740IFS=$as_save_IFS
43741
43742  ;;
43743esac
43744fi
43745OBJCOPY=$ac_cv_path_OBJCOPY
43746if test -n "$OBJCOPY"; then
43747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43748$as_echo "$OBJCOPY" >&6; }
43749else
43750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43751$as_echo "no" >&6; }
43752fi
43753
43754
43755          if test "x$OBJCOPY" = x; then
43756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43757          fi
43758        else
43759          # Otherwise we believe it is a complete path. Use it as it is.
43760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43761$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43763$as_echo_n "checking for OBJCOPY... " >&6; }
43764          if test ! -x "$tool_specified"; then
43765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43766$as_echo "not found" >&6; }
43767            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43768          fi
43769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43770$as_echo "$tool_specified" >&6; }
43771        fi
43772      fi
43773    fi
43774
43775  fi
43776
43777
43778    # Only call fixup if objcopy was found.
43779    if test -n "$OBJCOPY"; then
43780
43781  # Only process if variable expands to non-empty
43782
43783  if test "x$OBJCOPY" != x; then
43784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43785
43786  # First separate the path from the arguments. This will split at the first
43787  # space.
43788  complete="$OBJCOPY"
43789  path="${complete%% *}"
43790  tmp="$complete EOL"
43791  arguments="${tmp#* }"
43792
43793  # Input might be given as Windows format, start by converting to
43794  # unix format.
43795  new_path=`$CYGPATH -u "$path"`
43796
43797  # Now try to locate executable using which
43798  new_path=`$WHICH "$new_path" 2> /dev/null`
43799  # bat and cmd files are not always considered executable in cygwin causing which
43800  # to not find them
43801  if test "x$new_path" = x \
43802      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43803      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43804    new_path=`$CYGPATH -u "$path"`
43805  fi
43806  if test "x$new_path" = x; then
43807    # Oops. Which didn't find the executable.
43808    # The splitting of arguments from the executable at a space might have been incorrect,
43809    # since paths with space are more likely in Windows. Give it another try with the whole
43810    # argument.
43811    path="$complete"
43812    arguments="EOL"
43813    new_path=`$CYGPATH -u "$path"`
43814    new_path=`$WHICH "$new_path" 2> /dev/null`
43815    # bat and cmd files are not always considered executable in cygwin causing which
43816    # to not find them
43817    if test "x$new_path" = x \
43818        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43819        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43820      new_path=`$CYGPATH -u "$path"`
43821    fi
43822    if test "x$new_path" = x; then
43823      # It's still not found. Now this is an unrecoverable error.
43824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43825$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43826      has_space=`$ECHO "$complete" | $GREP " "`
43827      if test "x$has_space" != x; then
43828        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43829$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43830      fi
43831      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43832    fi
43833  fi
43834
43835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43838  # "foo.exe" is OK but "foo" is an error.
43839  #
43840  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43841  # It is also a way to make sure we got the proper file name for the real test later on.
43842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43843  if test "x$test_shortpath" = x; then
43844    # Short path failed, file does not exist as specified.
43845    # Try adding .exe or .cmd
43846    if test -f "${new_path}.exe"; then
43847      input_to_shortpath="${new_path}.exe"
43848    elif test -f "${new_path}.cmd"; then
43849      input_to_shortpath="${new_path}.cmd"
43850    else
43851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43852$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43853      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43854$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43855      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43856    fi
43857  else
43858    input_to_shortpath="$new_path"
43859  fi
43860
43861  # Call helper function which possibly converts this using DOS-style short mode.
43862  # If so, the updated path is stored in $new_path.
43863  new_path="$input_to_shortpath"
43864
43865  input_path="$input_to_shortpath"
43866  # Check if we need to convert this using DOS-style short mode. If the path
43867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43868  # take no chances and rewrite it.
43869  # Note: m4 eats our [], so we need to use [ and ] instead.
43870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43871  if test "x$has_forbidden_chars" != x; then
43872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43876      # Going to short mode and back again did indeed matter. Since short mode is
43877      # case insensitive, let's make it lowercase to improve readability.
43878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43879      # Now convert it back to Unix-style (cygpath)
43880      input_path=`$CYGPATH -u "$shortmode_path"`
43881      new_path="$input_path"
43882    fi
43883  fi
43884
43885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43886  if test "x$test_cygdrive_prefix" = x; then
43887    # As a simple fix, exclude /usr/bin since it's not a real path.
43888    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43890      # a path prefixed by /cygdrive for fixpath to work.
43891      new_path="$CYGWIN_ROOT_PATH$input_path"
43892    fi
43893  fi
43894
43895  # remove trailing .exe if any
43896  new_path="${new_path/%.exe/}"
43897
43898    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43899
43900  # First separate the path from the arguments. This will split at the first
43901  # space.
43902  complete="$OBJCOPY"
43903  path="${complete%% *}"
43904  tmp="$complete EOL"
43905  arguments="${tmp#* }"
43906
43907  # Input might be given as Windows format, start by converting to
43908  # unix format.
43909  new_path="$path"
43910
43911  windows_path="$new_path"
43912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43913    unix_path=`$CYGPATH -u "$windows_path"`
43914    new_path="$unix_path"
43915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43917    new_path="$unix_path"
43918  fi
43919
43920
43921  # Now try to locate executable using which
43922  new_path=`$WHICH "$new_path" 2> /dev/null`
43923
43924  if test "x$new_path" = x; then
43925    # Oops. Which didn't find the executable.
43926    # The splitting of arguments from the executable at a space might have been incorrect,
43927    # since paths with space are more likely in Windows. Give it another try with the whole
43928    # argument.
43929    path="$complete"
43930    arguments="EOL"
43931    new_path="$path"
43932
43933  windows_path="$new_path"
43934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43935    unix_path=`$CYGPATH -u "$windows_path"`
43936    new_path="$unix_path"
43937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43939    new_path="$unix_path"
43940  fi
43941
43942
43943    new_path=`$WHICH "$new_path" 2> /dev/null`
43944    # bat and cmd files are not always considered executable in MSYS causing which
43945    # to not find them
43946    if test "x$new_path" = x \
43947        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43948        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43949      new_path="$path"
43950
43951  windows_path="$new_path"
43952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43953    unix_path=`$CYGPATH -u "$windows_path"`
43954    new_path="$unix_path"
43955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43957    new_path="$unix_path"
43958  fi
43959
43960    fi
43961
43962    if test "x$new_path" = x; then
43963      # It's still not found. Now this is an unrecoverable error.
43964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43965$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43966      has_space=`$ECHO "$complete" | $GREP " "`
43967      if test "x$has_space" != x; then
43968        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43969$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43970      fi
43971      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43972    fi
43973  fi
43974
43975  # Now new_path has a complete unix path to the binary
43976  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43977    # Keep paths in /bin as-is, but remove trailing .exe if any
43978    new_path="${new_path/%.exe/}"
43979    # Do not save /bin paths to all_fixpath_prefixes!
43980  else
43981    # Not in mixed or Windows style, start by that.
43982    new_path=`cmd //c echo $new_path`
43983
43984  input_path="$new_path"
43985  # Check if we need to convert this using DOS-style short mode. If the path
43986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43987  # take no chances and rewrite it.
43988  # Note: m4 eats our [], so we need to use [ and ] instead.
43989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43990  if test "x$has_forbidden_chars" != x; then
43991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43993  fi
43994
43995    # Output is in $new_path
43996
43997  windows_path="$new_path"
43998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43999    unix_path=`$CYGPATH -u "$windows_path"`
44000    new_path="$unix_path"
44001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44003    new_path="$unix_path"
44004  fi
44005
44006    # remove trailing .exe if any
44007    new_path="${new_path/%.exe/}"
44008
44009    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44010    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44011  fi
44012
44013    else
44014      # We're on a unix platform. Hooray! :)
44015      # First separate the path from the arguments. This will split at the first
44016      # space.
44017      complete="$OBJCOPY"
44018      path="${complete%% *}"
44019      tmp="$complete EOL"
44020      arguments="${tmp#* }"
44021
44022      # Cannot rely on the command "which" here since it doesn't always work.
44023      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44024      if test -z "$is_absolute_path"; then
44025        # Path to executable is not absolute. Find it.
44026        IFS_save="$IFS"
44027        IFS=:
44028        for p in $PATH; do
44029          if test -f "$p/$path" && test -x "$p/$path"; then
44030            new_path="$p/$path"
44031            break
44032          fi
44033        done
44034        IFS="$IFS_save"
44035      else
44036        # This is an absolute path, we can use it without further modifications.
44037        new_path="$path"
44038      fi
44039
44040      if test "x$new_path" = x; then
44041        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44042$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44043        has_space=`$ECHO "$complete" | $GREP " "`
44044        if test "x$has_space" != x; then
44045          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44046$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44047        fi
44048        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44049      fi
44050    fi
44051
44052    # Now join together the path and the arguments once again
44053    if test "x$arguments" != xEOL; then
44054      new_complete="$new_path ${arguments% *}"
44055    else
44056      new_complete="$new_path"
44057    fi
44058
44059    if test "x$complete" != "x$new_complete"; then
44060      OBJCOPY="$new_complete"
44061      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
44062$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
44063    fi
44064  fi
44065
44066      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
44067        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
44068        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
44069        # - version number is last blank separate word on first line
44070        # - version number formats that have been seen:
44071        #   - <major>.<minor>
44072        #   - <major>.<minor>.<micro>
44073        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
44074        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
44075         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
44076              -e 's/.* //' \
44077              -e '/^[01]\./b bad' \
44078              -e '/^2\./{' \
44079              -e '  s/^2\.//' \
44080              -e '  /^[0-9]$/b bad' \
44081              -e '  /^[0-9]\./b bad' \
44082              -e '  /^1[0-9]$/b bad' \
44083              -e '  /^1[0-9]\./b bad' \
44084              -e '  /^20\./b bad' \
44085              -e '  /^21\.0$/b bad' \
44086              -e '  /^21\.0\./b bad' \
44087              -e '}' \
44088              -e ':good' \
44089              -e 's/.*/VALID_VERSION/p' \
44090              -e 'q' \
44091              -e ':bad' \
44092              -e 's/.*/BAD_VERSION/p' \
44093              -e 'q'`
44094        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
44095          OBJCOPY=
44096          { $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
44097$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
44098          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
44099$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
44100          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
44101$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
44102          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
44103$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
44104          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
44105$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
44106        fi
44107      fi
44108    fi
44109  fi
44110
44111
44112
44113  # Publish this variable in the help.
44114
44115
44116  if [ -z "${OBJDUMP+x}" ]; then
44117    # The variable is not set by user, try to locate tool using the code snippet
44118    if test -n "$ac_tool_prefix"; then
44119  for ac_prog in gobjdump objdump
44120  do
44121    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44122set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44124$as_echo_n "checking for $ac_word... " >&6; }
44125if ${ac_cv_prog_OBJDUMP+:} false; then :
44126  $as_echo_n "(cached) " >&6
44127else
44128  if test -n "$OBJDUMP"; then
44129  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44130else
44131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44132for as_dir in $PATH
44133do
44134  IFS=$as_save_IFS
44135  test -z "$as_dir" && as_dir=.
44136    for ac_exec_ext in '' $ac_executable_extensions; do
44137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44138    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44140    break 2
44141  fi
44142done
44143  done
44144IFS=$as_save_IFS
44145
44146fi
44147fi
44148OBJDUMP=$ac_cv_prog_OBJDUMP
44149if test -n "$OBJDUMP"; then
44150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44151$as_echo "$OBJDUMP" >&6; }
44152else
44153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44154$as_echo "no" >&6; }
44155fi
44156
44157
44158    test -n "$OBJDUMP" && break
44159  done
44160fi
44161if test -z "$OBJDUMP"; then
44162  ac_ct_OBJDUMP=$OBJDUMP
44163  for ac_prog in gobjdump objdump
44164do
44165  # Extract the first word of "$ac_prog", so it can be a program name with args.
44166set dummy $ac_prog; ac_word=$2
44167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44168$as_echo_n "checking for $ac_word... " >&6; }
44169if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44170  $as_echo_n "(cached) " >&6
44171else
44172  if test -n "$ac_ct_OBJDUMP"; then
44173  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44174else
44175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44176for as_dir in $PATH
44177do
44178  IFS=$as_save_IFS
44179  test -z "$as_dir" && as_dir=.
44180    for ac_exec_ext in '' $ac_executable_extensions; do
44181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44182    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44184    break 2
44185  fi
44186done
44187  done
44188IFS=$as_save_IFS
44189
44190fi
44191fi
44192ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44193if test -n "$ac_ct_OBJDUMP"; then
44194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44195$as_echo "$ac_ct_OBJDUMP" >&6; }
44196else
44197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44198$as_echo "no" >&6; }
44199fi
44200
44201
44202  test -n "$ac_ct_OBJDUMP" && break
44203done
44204
44205  if test "x$ac_ct_OBJDUMP" = x; then
44206    OBJDUMP=""
44207  else
44208    case $cross_compiling:$ac_tool_warned in
44209yes:)
44210{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44211$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44212ac_tool_warned=yes ;;
44213esac
44214    OBJDUMP=$ac_ct_OBJDUMP
44215  fi
44216fi
44217
44218  else
44219    # The variable is set, but is it from the command line or the environment?
44220
44221    # Try to remove the string !OBJDUMP! from our list.
44222    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44223    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44224      # If it failed, the variable was not from the command line. Ignore it,
44225      # but warn the user (except for BASH, which is always set by the calling BASH).
44226      if test "xOBJDUMP" != xBASH; then
44227        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44228$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44229      fi
44230      # Try to locate tool using the code snippet
44231      if test -n "$ac_tool_prefix"; then
44232  for ac_prog in gobjdump objdump
44233  do
44234    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44235set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44237$as_echo_n "checking for $ac_word... " >&6; }
44238if ${ac_cv_prog_OBJDUMP+:} false; then :
44239  $as_echo_n "(cached) " >&6
44240else
44241  if test -n "$OBJDUMP"; then
44242  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44243else
44244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44245for as_dir in $PATH
44246do
44247  IFS=$as_save_IFS
44248  test -z "$as_dir" && as_dir=.
44249    for ac_exec_ext in '' $ac_executable_extensions; do
44250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44251    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44253    break 2
44254  fi
44255done
44256  done
44257IFS=$as_save_IFS
44258
44259fi
44260fi
44261OBJDUMP=$ac_cv_prog_OBJDUMP
44262if test -n "$OBJDUMP"; then
44263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44264$as_echo "$OBJDUMP" >&6; }
44265else
44266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44267$as_echo "no" >&6; }
44268fi
44269
44270
44271    test -n "$OBJDUMP" && break
44272  done
44273fi
44274if test -z "$OBJDUMP"; then
44275  ac_ct_OBJDUMP=$OBJDUMP
44276  for ac_prog in gobjdump objdump
44277do
44278  # Extract the first word of "$ac_prog", so it can be a program name with args.
44279set dummy $ac_prog; ac_word=$2
44280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44281$as_echo_n "checking for $ac_word... " >&6; }
44282if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44283  $as_echo_n "(cached) " >&6
44284else
44285  if test -n "$ac_ct_OBJDUMP"; then
44286  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44287else
44288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44289for as_dir in $PATH
44290do
44291  IFS=$as_save_IFS
44292  test -z "$as_dir" && as_dir=.
44293    for ac_exec_ext in '' $ac_executable_extensions; do
44294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44295    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44297    break 2
44298  fi
44299done
44300  done
44301IFS=$as_save_IFS
44302
44303fi
44304fi
44305ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44306if test -n "$ac_ct_OBJDUMP"; then
44307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44308$as_echo "$ac_ct_OBJDUMP" >&6; }
44309else
44310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44311$as_echo "no" >&6; }
44312fi
44313
44314
44315  test -n "$ac_ct_OBJDUMP" && break
44316done
44317
44318  if test "x$ac_ct_OBJDUMP" = x; then
44319    OBJDUMP=""
44320  else
44321    case $cross_compiling:$ac_tool_warned in
44322yes:)
44323{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44324$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44325ac_tool_warned=yes ;;
44326esac
44327    OBJDUMP=$ac_ct_OBJDUMP
44328  fi
44329fi
44330
44331    else
44332      # If it succeeded, then it was overridden by the user. We will use it
44333      # for the tool.
44334
44335      # First remove it from the list of overridden variables, so we can test
44336      # for unknown variables in the end.
44337      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44338
44339      # Check if we try to supply an empty value
44340      if test "x$OBJDUMP" = x; then
44341        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44342$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44343        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44344$as_echo_n "checking for OBJDUMP... " >&6; }
44345        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44346$as_echo "disabled" >&6; }
44347      else
44348        # Check if the provided tool contains a complete path.
44349        tool_specified="$OBJDUMP"
44350        tool_basename="${tool_specified##*/}"
44351        if test "x$tool_basename" = "x$tool_specified"; then
44352          # A command without a complete path is provided, search $PATH.
44353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44354$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44355          # Extract the first word of "$tool_basename", so it can be a program name with args.
44356set dummy $tool_basename; ac_word=$2
44357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44358$as_echo_n "checking for $ac_word... " >&6; }
44359if ${ac_cv_path_OBJDUMP+:} false; then :
44360  $as_echo_n "(cached) " >&6
44361else
44362  case $OBJDUMP in
44363  [\\/]* | ?:[\\/]*)
44364  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44365  ;;
44366  *)
44367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44368for as_dir in $PATH
44369do
44370  IFS=$as_save_IFS
44371  test -z "$as_dir" && as_dir=.
44372    for ac_exec_ext in '' $ac_executable_extensions; do
44373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44374    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44376    break 2
44377  fi
44378done
44379  done
44380IFS=$as_save_IFS
44381
44382  ;;
44383esac
44384fi
44385OBJDUMP=$ac_cv_path_OBJDUMP
44386if test -n "$OBJDUMP"; then
44387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44388$as_echo "$OBJDUMP" >&6; }
44389else
44390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44391$as_echo "no" >&6; }
44392fi
44393
44394
44395          if test "x$OBJDUMP" = x; then
44396            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44397          fi
44398        else
44399          # Otherwise we believe it is a complete path. Use it as it is.
44400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44401$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44402          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44403$as_echo_n "checking for OBJDUMP... " >&6; }
44404          if test ! -x "$tool_specified"; then
44405            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44406$as_echo "not found" >&6; }
44407            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44408          fi
44409          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44410$as_echo "$tool_specified" >&6; }
44411        fi
44412      fi
44413    fi
44414
44415  fi
44416
44417
44418  if test "x$OBJDUMP" != x; then
44419    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44420    # bails if argument is missing.
44421
44422  # Only process if variable expands to non-empty
44423
44424  if test "x$OBJDUMP" != x; then
44425    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44426
44427  # First separate the path from the arguments. This will split at the first
44428  # space.
44429  complete="$OBJDUMP"
44430  path="${complete%% *}"
44431  tmp="$complete EOL"
44432  arguments="${tmp#* }"
44433
44434  # Input might be given as Windows format, start by converting to
44435  # unix format.
44436  new_path=`$CYGPATH -u "$path"`
44437
44438  # Now try to locate executable using which
44439  new_path=`$WHICH "$new_path" 2> /dev/null`
44440  # bat and cmd files are not always considered executable in cygwin causing which
44441  # to not find them
44442  if test "x$new_path" = x \
44443      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44444      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44445    new_path=`$CYGPATH -u "$path"`
44446  fi
44447  if test "x$new_path" = x; then
44448    # Oops. Which didn't find the executable.
44449    # The splitting of arguments from the executable at a space might have been incorrect,
44450    # since paths with space are more likely in Windows. Give it another try with the whole
44451    # argument.
44452    path="$complete"
44453    arguments="EOL"
44454    new_path=`$CYGPATH -u "$path"`
44455    new_path=`$WHICH "$new_path" 2> /dev/null`
44456    # bat and cmd files are not always considered executable in cygwin causing which
44457    # to not find them
44458    if test "x$new_path" = x \
44459        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44460        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44461      new_path=`$CYGPATH -u "$path"`
44462    fi
44463    if test "x$new_path" = x; then
44464      # It's still not found. Now this is an unrecoverable error.
44465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44466$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44467      has_space=`$ECHO "$complete" | $GREP " "`
44468      if test "x$has_space" != x; then
44469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44471      fi
44472      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44473    fi
44474  fi
44475
44476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44479  # "foo.exe" is OK but "foo" is an error.
44480  #
44481  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44482  # It is also a way to make sure we got the proper file name for the real test later on.
44483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44484  if test "x$test_shortpath" = x; then
44485    # Short path failed, file does not exist as specified.
44486    # Try adding .exe or .cmd
44487    if test -f "${new_path}.exe"; then
44488      input_to_shortpath="${new_path}.exe"
44489    elif test -f "${new_path}.cmd"; then
44490      input_to_shortpath="${new_path}.cmd"
44491    else
44492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44493$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44494      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44495$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44496      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44497    fi
44498  else
44499    input_to_shortpath="$new_path"
44500  fi
44501
44502  # Call helper function which possibly converts this using DOS-style short mode.
44503  # If so, the updated path is stored in $new_path.
44504  new_path="$input_to_shortpath"
44505
44506  input_path="$input_to_shortpath"
44507  # Check if we need to convert this using DOS-style short mode. If the path
44508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44509  # take no chances and rewrite it.
44510  # Note: m4 eats our [], so we need to use [ and ] instead.
44511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44512  if test "x$has_forbidden_chars" != x; then
44513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44517      # Going to short mode and back again did indeed matter. Since short mode is
44518      # case insensitive, let's make it lowercase to improve readability.
44519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44520      # Now convert it back to Unix-style (cygpath)
44521      input_path=`$CYGPATH -u "$shortmode_path"`
44522      new_path="$input_path"
44523    fi
44524  fi
44525
44526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44527  if test "x$test_cygdrive_prefix" = x; then
44528    # As a simple fix, exclude /usr/bin since it's not a real path.
44529    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44531      # a path prefixed by /cygdrive for fixpath to work.
44532      new_path="$CYGWIN_ROOT_PATH$input_path"
44533    fi
44534  fi
44535
44536  # remove trailing .exe if any
44537  new_path="${new_path/%.exe/}"
44538
44539    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44540
44541  # First separate the path from the arguments. This will split at the first
44542  # space.
44543  complete="$OBJDUMP"
44544  path="${complete%% *}"
44545  tmp="$complete EOL"
44546  arguments="${tmp#* }"
44547
44548  # Input might be given as Windows format, start by converting to
44549  # unix format.
44550  new_path="$path"
44551
44552  windows_path="$new_path"
44553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44554    unix_path=`$CYGPATH -u "$windows_path"`
44555    new_path="$unix_path"
44556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44558    new_path="$unix_path"
44559  fi
44560
44561
44562  # Now try to locate executable using which
44563  new_path=`$WHICH "$new_path" 2> /dev/null`
44564
44565  if test "x$new_path" = x; then
44566    # Oops. Which didn't find the executable.
44567    # The splitting of arguments from the executable at a space might have been incorrect,
44568    # since paths with space are more likely in Windows. Give it another try with the whole
44569    # argument.
44570    path="$complete"
44571    arguments="EOL"
44572    new_path="$path"
44573
44574  windows_path="$new_path"
44575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44576    unix_path=`$CYGPATH -u "$windows_path"`
44577    new_path="$unix_path"
44578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44580    new_path="$unix_path"
44581  fi
44582
44583
44584    new_path=`$WHICH "$new_path" 2> /dev/null`
44585    # bat and cmd files are not always considered executable in MSYS causing which
44586    # to not find them
44587    if test "x$new_path" = x \
44588        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44589        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44590      new_path="$path"
44591
44592  windows_path="$new_path"
44593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44594    unix_path=`$CYGPATH -u "$windows_path"`
44595    new_path="$unix_path"
44596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44598    new_path="$unix_path"
44599  fi
44600
44601    fi
44602
44603    if test "x$new_path" = x; then
44604      # It's still not found. Now this is an unrecoverable error.
44605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44606$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44607      has_space=`$ECHO "$complete" | $GREP " "`
44608      if test "x$has_space" != x; then
44609        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44610$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44611      fi
44612      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44613    fi
44614  fi
44615
44616  # Now new_path has a complete unix path to the binary
44617  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44618    # Keep paths in /bin as-is, but remove trailing .exe if any
44619    new_path="${new_path/%.exe/}"
44620    # Do not save /bin paths to all_fixpath_prefixes!
44621  else
44622    # Not in mixed or Windows style, start by that.
44623    new_path=`cmd //c echo $new_path`
44624
44625  input_path="$new_path"
44626  # Check if we need to convert this using DOS-style short mode. If the path
44627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44628  # take no chances and rewrite it.
44629  # Note: m4 eats our [], so we need to use [ and ] instead.
44630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44631  if test "x$has_forbidden_chars" != x; then
44632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44634  fi
44635
44636    # Output is in $new_path
44637
44638  windows_path="$new_path"
44639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44640    unix_path=`$CYGPATH -u "$windows_path"`
44641    new_path="$unix_path"
44642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44644    new_path="$unix_path"
44645  fi
44646
44647    # remove trailing .exe if any
44648    new_path="${new_path/%.exe/}"
44649
44650    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44651    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44652  fi
44653
44654    else
44655      # We're on a unix platform. Hooray! :)
44656      # First separate the path from the arguments. This will split at the first
44657      # space.
44658      complete="$OBJDUMP"
44659      path="${complete%% *}"
44660      tmp="$complete EOL"
44661      arguments="${tmp#* }"
44662
44663      # Cannot rely on the command "which" here since it doesn't always work.
44664      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44665      if test -z "$is_absolute_path"; then
44666        # Path to executable is not absolute. Find it.
44667        IFS_save="$IFS"
44668        IFS=:
44669        for p in $PATH; do
44670          if test -f "$p/$path" && test -x "$p/$path"; then
44671            new_path="$p/$path"
44672            break
44673          fi
44674        done
44675        IFS="$IFS_save"
44676      else
44677        # This is an absolute path, we can use it without further modifications.
44678        new_path="$path"
44679      fi
44680
44681      if test "x$new_path" = x; then
44682        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44683$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44684        has_space=`$ECHO "$complete" | $GREP " "`
44685        if test "x$has_space" != x; then
44686          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44687$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44688        fi
44689        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44690      fi
44691    fi
44692
44693    # Now join together the path and the arguments once again
44694    if test "x$arguments" != xEOL; then
44695      new_complete="$new_path ${arguments% *}"
44696    else
44697      new_complete="$new_path"
44698    fi
44699
44700    if test "x$complete" != "x$new_complete"; then
44701      OBJDUMP="$new_complete"
44702      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44703$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44704    fi
44705  fi
44706
44707  fi
44708
44709
44710  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44711  # to remain in place. Otherwise the compiler will not work in some siutations
44712  # in later configure checks.
44713  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44714    PATH="$OLD_PATH"
44715  fi
44716
44717  # Restore the flags to the user specified values.
44718  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44719  CFLAGS="$ORG_CFLAGS"
44720  CXXFLAGS="$ORG_CXXFLAGS"
44721
44722
44723# Finally do some processing after the detection phase
44724
44725  if test "x$COMPILE_TYPE" = "xcross"; then
44726    # Now we need to find a C/C++ compiler that can build executables for the
44727    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44728    # used once. Also, we need to do this without adding a tools dir to the
44729    # path, otherwise we might pick up cross-compilers which don't use standard
44730    # naming.
44731
44732    OLDPATH="$PATH"
44733
44734
44735# Check whether --with-build-devkit was given.
44736if test "${with_build_devkit+set}" = set; then :
44737  withval=$with_build_devkit;
44738fi
44739
44740    if test "x$with_build_devkit" = "xyes"; then
44741      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44742    elif test -n "$with_build_devkit"; then
44743      if test ! -d "$with_build_devkit"; then
44744        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44745      else
44746
44747  # Only process if variable expands to non-empty
44748
44749  if test "x$with_build_devkit" != x; then
44750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44751
44752  # Input might be given as Windows format, start by converting to
44753  # unix format.
44754  path="$with_build_devkit"
44755  new_path=`$CYGPATH -u "$path"`
44756
44757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44760  # "foo.exe" is OK but "foo" is an error.
44761  #
44762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44763  # It is also a way to make sure we got the proper file name for the real test later on.
44764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44765  if test "x$test_shortpath" = x; then
44766    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44767$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44768    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44769  fi
44770
44771  # Call helper function which possibly converts this using DOS-style short mode.
44772  # If so, the updated path is stored in $new_path.
44773
44774  input_path="$new_path"
44775  # Check if we need to convert this using DOS-style short mode. If the path
44776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44777  # take no chances and rewrite it.
44778  # Note: m4 eats our [], so we need to use [ and ] instead.
44779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44780  if test "x$has_forbidden_chars" != x; then
44781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44785      # Going to short mode and back again did indeed matter. Since short mode is
44786      # case insensitive, let's make it lowercase to improve readability.
44787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44788      # Now convert it back to Unix-style (cygpath)
44789      input_path=`$CYGPATH -u "$shortmode_path"`
44790      new_path="$input_path"
44791    fi
44792  fi
44793
44794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44795  if test "x$test_cygdrive_prefix" = x; then
44796    # As a simple fix, exclude /usr/bin since it's not a real path.
44797    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44799      # a path prefixed by /cygdrive for fixpath to work.
44800      new_path="$CYGWIN_ROOT_PATH$input_path"
44801    fi
44802  fi
44803
44804
44805  if test "x$path" != "x$new_path"; then
44806    with_build_devkit="$new_path"
44807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44808$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44809  fi
44810
44811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44812
44813  path="$with_build_devkit"
44814  has_colon=`$ECHO $path | $GREP ^.:`
44815  new_path="$path"
44816  if test "x$has_colon" = x; then
44817    # Not in mixed or Windows style, start by that.
44818    new_path=`cmd //c echo $path`
44819  fi
44820
44821
44822  input_path="$new_path"
44823  # Check if we need to convert this using DOS-style short mode. If the path
44824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44825  # take no chances and rewrite it.
44826  # Note: m4 eats our [], so we need to use [ and ] instead.
44827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44828  if test "x$has_forbidden_chars" != x; then
44829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44831  fi
44832
44833
44834  windows_path="$new_path"
44835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44836    unix_path=`$CYGPATH -u "$windows_path"`
44837    new_path="$unix_path"
44838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44840    new_path="$unix_path"
44841  fi
44842
44843  if test "x$path" != "x$new_path"; then
44844    with_build_devkit="$new_path"
44845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44846$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44847  fi
44848
44849  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44850  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44851
44852    else
44853      # We're on a unix platform. Hooray! :)
44854      path="$with_build_devkit"
44855      has_space=`$ECHO "$path" | $GREP " "`
44856      if test "x$has_space" != x; then
44857        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44858$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44859        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44860      fi
44861
44862      # Use eval to expand a potential ~
44863      eval path="$path"
44864      if test ! -f "$path" && test ! -d "$path"; then
44865        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44866      fi
44867
44868      if test -d "$path"; then
44869        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44870      else
44871        dir="`$DIRNAME "$path"`"
44872        base="`$BASENAME "$path"`"
44873        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44874      fi
44875    fi
44876  fi
44877
44878        BUILD_DEVKIT_ROOT="$with_build_devkit"
44879        # Check for a meta data info file in the root of the devkit
44880        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44881          # Process devkit.info so that existing devkit variables are not
44882          # modified by this
44883          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44884              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44885              -e "s/\$host/\$build/g" \
44886              $BUILD_DEVKIT_ROOT/devkit.info \
44887              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44888          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44889          # This potentially sets the following:
44890          # A descriptive name of the devkit
44891
44892  if test "x$BUILD_DEVKIT_NAME" = x; then
44893    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44894  fi
44895
44896          # Corresponds to --with-extra-path
44897
44898  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44899    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44900  fi
44901
44902          # Corresponds to --with-toolchain-path
44903
44904  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44905    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44906  fi
44907
44908          # Corresponds to --with-sysroot
44909
44910  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44911    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44912  fi
44913
44914          # Skip the Window specific parts
44915        fi
44916
44917        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44918$as_echo_n "checking for build platform devkit... " >&6; }
44919        if test "x$BUILD_DEVKIT_NAME" != x; then
44920          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44921$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44922        else
44923          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44924$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44925        fi
44926
44927        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44928
44929  if test "x$BUILD_SYSROOT" != "x"; then
44930    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44931      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44932        # Solaris Studio does not have a concept of sysroot. Instead we must
44933        # make sure the default include and lib dirs are appended to each
44934        # compile and link command line. Must also add -I-xbuiltin to enable
44935        # inlining of system functions and intrinsics.
44936        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44937        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44938            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44939      fi
44940    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44941      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44942      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44943    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44944      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44945      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44946    fi
44947    # The global CFLAGS and LDFLAGS variables need these for configure to function
44948    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44949    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44950    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44951    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44952  fi
44953
44954  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44955    # We also need -iframework<path>/System/Library/Frameworks
44956    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44957    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44958    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44959    # set this here so it doesn't have to be peppered throughout the forest
44960    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44961    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44962  fi
44963
44964
44965
44966
44967
44968         # Fallback default of just /bin if DEVKIT_PATH is not defined
44969        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44970          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44971        fi
44972        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44973      fi
44974    fi
44975
44976    # FIXME: we should list the discovered compilers as an exclude pattern!
44977    # If we do that, we can do this detection before POST_DETECTION, and still
44978    # find the build compilers in the tools dir, if needed.
44979
44980
44981
44982  # Publish this variable in the help.
44983
44984
44985  if [ -z "${BUILD_CC+x}" ]; then
44986    # The variable is not set by user, try to locate tool using the code snippet
44987    for ac_prog in cl cc gcc
44988do
44989  # Extract the first word of "$ac_prog", so it can be a program name with args.
44990set dummy $ac_prog; ac_word=$2
44991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44992$as_echo_n "checking for $ac_word... " >&6; }
44993if ${ac_cv_path_BUILD_CC+:} false; then :
44994  $as_echo_n "(cached) " >&6
44995else
44996  case $BUILD_CC in
44997  [\\/]* | ?:[\\/]*)
44998  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44999  ;;
45000  *)
45001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45002for as_dir in $PATH
45003do
45004  IFS=$as_save_IFS
45005  test -z "$as_dir" && as_dir=.
45006    for ac_exec_ext in '' $ac_executable_extensions; do
45007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45008    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45010    break 2
45011  fi
45012done
45013  done
45014IFS=$as_save_IFS
45015
45016  ;;
45017esac
45018fi
45019BUILD_CC=$ac_cv_path_BUILD_CC
45020if test -n "$BUILD_CC"; then
45021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45022$as_echo "$BUILD_CC" >&6; }
45023else
45024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45025$as_echo "no" >&6; }
45026fi
45027
45028
45029  test -n "$BUILD_CC" && break
45030done
45031
45032  else
45033    # The variable is set, but is it from the command line or the environment?
45034
45035    # Try to remove the string !BUILD_CC! from our list.
45036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
45037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45038      # If it failed, the variable was not from the command line. Ignore it,
45039      # but warn the user (except for BASH, which is always set by the calling BASH).
45040      if test "xBUILD_CC" != xBASH; then
45041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
45042$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
45043      fi
45044      # Try to locate tool using the code snippet
45045      for ac_prog in cl cc gcc
45046do
45047  # Extract the first word of "$ac_prog", so it can be a program name with args.
45048set dummy $ac_prog; ac_word=$2
45049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45050$as_echo_n "checking for $ac_word... " >&6; }
45051if ${ac_cv_path_BUILD_CC+:} false; then :
45052  $as_echo_n "(cached) " >&6
45053else
45054  case $BUILD_CC in
45055  [\\/]* | ?:[\\/]*)
45056  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45057  ;;
45058  *)
45059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45060for as_dir in $PATH
45061do
45062  IFS=$as_save_IFS
45063  test -z "$as_dir" && as_dir=.
45064    for ac_exec_ext in '' $ac_executable_extensions; do
45065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45066    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45068    break 2
45069  fi
45070done
45071  done
45072IFS=$as_save_IFS
45073
45074  ;;
45075esac
45076fi
45077BUILD_CC=$ac_cv_path_BUILD_CC
45078if test -n "$BUILD_CC"; then
45079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45080$as_echo "$BUILD_CC" >&6; }
45081else
45082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45083$as_echo "no" >&6; }
45084fi
45085
45086
45087  test -n "$BUILD_CC" && break
45088done
45089
45090    else
45091      # If it succeeded, then it was overridden by the user. We will use it
45092      # for the tool.
45093
45094      # First remove it from the list of overridden variables, so we can test
45095      # for unknown variables in the end.
45096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45097
45098      # Check if we try to supply an empty value
45099      if test "x$BUILD_CC" = x; then
45100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
45101$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
45102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45103$as_echo_n "checking for BUILD_CC... " >&6; }
45104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45105$as_echo "disabled" >&6; }
45106      else
45107        # Check if the provided tool contains a complete path.
45108        tool_specified="$BUILD_CC"
45109        tool_basename="${tool_specified##*/}"
45110        if test "x$tool_basename" = "x$tool_specified"; then
45111          # A command without a complete path is provided, search $PATH.
45112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
45113$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
45114          # Extract the first word of "$tool_basename", so it can be a program name with args.
45115set dummy $tool_basename; ac_word=$2
45116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45117$as_echo_n "checking for $ac_word... " >&6; }
45118if ${ac_cv_path_BUILD_CC+:} false; then :
45119  $as_echo_n "(cached) " >&6
45120else
45121  case $BUILD_CC in
45122  [\\/]* | ?:[\\/]*)
45123  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45124  ;;
45125  *)
45126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45127for as_dir in $PATH
45128do
45129  IFS=$as_save_IFS
45130  test -z "$as_dir" && as_dir=.
45131    for ac_exec_ext in '' $ac_executable_extensions; do
45132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45133    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45135    break 2
45136  fi
45137done
45138  done
45139IFS=$as_save_IFS
45140
45141  ;;
45142esac
45143fi
45144BUILD_CC=$ac_cv_path_BUILD_CC
45145if test -n "$BUILD_CC"; then
45146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45147$as_echo "$BUILD_CC" >&6; }
45148else
45149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45150$as_echo "no" >&6; }
45151fi
45152
45153
45154          if test "x$BUILD_CC" = x; then
45155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45156          fi
45157        else
45158          # Otherwise we believe it is a complete path. Use it as it is.
45159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
45160$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
45161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45162$as_echo_n "checking for BUILD_CC... " >&6; }
45163          if test ! -x "$tool_specified"; then
45164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45165$as_echo "not found" >&6; }
45166            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45167          fi
45168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45169$as_echo "$tool_specified" >&6; }
45170        fi
45171      fi
45172    fi
45173
45174  fi
45175
45176
45177
45178  if test "x$BUILD_CC" = x; then
45179    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45180  fi
45181
45182
45183
45184  # Only process if variable expands to non-empty
45185
45186  if test "x$BUILD_CC" != x; then
45187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45188
45189  # First separate the path from the arguments. This will split at the first
45190  # space.
45191  complete="$BUILD_CC"
45192  path="${complete%% *}"
45193  tmp="$complete EOL"
45194  arguments="${tmp#* }"
45195
45196  # Input might be given as Windows format, start by converting to
45197  # unix format.
45198  new_path=`$CYGPATH -u "$path"`
45199
45200  # Now try to locate executable using which
45201  new_path=`$WHICH "$new_path" 2> /dev/null`
45202  # bat and cmd files are not always considered executable in cygwin causing which
45203  # to not find them
45204  if test "x$new_path" = x \
45205      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45206      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45207    new_path=`$CYGPATH -u "$path"`
45208  fi
45209  if test "x$new_path" = x; then
45210    # Oops. Which didn't find the executable.
45211    # The splitting of arguments from the executable at a space might have been incorrect,
45212    # since paths with space are more likely in Windows. Give it another try with the whole
45213    # argument.
45214    path="$complete"
45215    arguments="EOL"
45216    new_path=`$CYGPATH -u "$path"`
45217    new_path=`$WHICH "$new_path" 2> /dev/null`
45218    # bat and cmd files are not always considered executable in cygwin causing which
45219    # to not find them
45220    if test "x$new_path" = x \
45221        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45222        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45223      new_path=`$CYGPATH -u "$path"`
45224    fi
45225    if test "x$new_path" = x; then
45226      # It's still not found. Now this is an unrecoverable error.
45227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45228$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45229      has_space=`$ECHO "$complete" | $GREP " "`
45230      if test "x$has_space" != x; then
45231        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45232$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45233      fi
45234      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45235    fi
45236  fi
45237
45238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45241  # "foo.exe" is OK but "foo" is an error.
45242  #
45243  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45244  # It is also a way to make sure we got the proper file name for the real test later on.
45245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45246  if test "x$test_shortpath" = x; then
45247    # Short path failed, file does not exist as specified.
45248    # Try adding .exe or .cmd
45249    if test -f "${new_path}.exe"; then
45250      input_to_shortpath="${new_path}.exe"
45251    elif test -f "${new_path}.cmd"; then
45252      input_to_shortpath="${new_path}.cmd"
45253    else
45254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45255$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45256      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45257$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45258      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45259    fi
45260  else
45261    input_to_shortpath="$new_path"
45262  fi
45263
45264  # Call helper function which possibly converts this using DOS-style short mode.
45265  # If so, the updated path is stored in $new_path.
45266  new_path="$input_to_shortpath"
45267
45268  input_path="$input_to_shortpath"
45269  # Check if we need to convert this using DOS-style short mode. If the path
45270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45271  # take no chances and rewrite it.
45272  # Note: m4 eats our [], so we need to use [ and ] instead.
45273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45274  if test "x$has_forbidden_chars" != x; then
45275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45279      # Going to short mode and back again did indeed matter. Since short mode is
45280      # case insensitive, let's make it lowercase to improve readability.
45281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45282      # Now convert it back to Unix-style (cygpath)
45283      input_path=`$CYGPATH -u "$shortmode_path"`
45284      new_path="$input_path"
45285    fi
45286  fi
45287
45288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45289  if test "x$test_cygdrive_prefix" = x; then
45290    # As a simple fix, exclude /usr/bin since it's not a real path.
45291    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45293      # a path prefixed by /cygdrive for fixpath to work.
45294      new_path="$CYGWIN_ROOT_PATH$input_path"
45295    fi
45296  fi
45297
45298  # remove trailing .exe if any
45299  new_path="${new_path/%.exe/}"
45300
45301    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45302
45303  # First separate the path from the arguments. This will split at the first
45304  # space.
45305  complete="$BUILD_CC"
45306  path="${complete%% *}"
45307  tmp="$complete EOL"
45308  arguments="${tmp#* }"
45309
45310  # Input might be given as Windows format, start by converting to
45311  # unix format.
45312  new_path="$path"
45313
45314  windows_path="$new_path"
45315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45316    unix_path=`$CYGPATH -u "$windows_path"`
45317    new_path="$unix_path"
45318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45320    new_path="$unix_path"
45321  fi
45322
45323
45324  # Now try to locate executable using which
45325  new_path=`$WHICH "$new_path" 2> /dev/null`
45326
45327  if test "x$new_path" = x; then
45328    # Oops. Which didn't find the executable.
45329    # The splitting of arguments from the executable at a space might have been incorrect,
45330    # since paths with space are more likely in Windows. Give it another try with the whole
45331    # argument.
45332    path="$complete"
45333    arguments="EOL"
45334    new_path="$path"
45335
45336  windows_path="$new_path"
45337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45338    unix_path=`$CYGPATH -u "$windows_path"`
45339    new_path="$unix_path"
45340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45342    new_path="$unix_path"
45343  fi
45344
45345
45346    new_path=`$WHICH "$new_path" 2> /dev/null`
45347    # bat and cmd files are not always considered executable in MSYS causing which
45348    # to not find them
45349    if test "x$new_path" = x \
45350        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45351        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45352      new_path="$path"
45353
45354  windows_path="$new_path"
45355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45356    unix_path=`$CYGPATH -u "$windows_path"`
45357    new_path="$unix_path"
45358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45360    new_path="$unix_path"
45361  fi
45362
45363    fi
45364
45365    if test "x$new_path" = x; then
45366      # It's still not found. Now this is an unrecoverable error.
45367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45368$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45369      has_space=`$ECHO "$complete" | $GREP " "`
45370      if test "x$has_space" != x; then
45371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45373      fi
45374      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45375    fi
45376  fi
45377
45378  # Now new_path has a complete unix path to the binary
45379  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45380    # Keep paths in /bin as-is, but remove trailing .exe if any
45381    new_path="${new_path/%.exe/}"
45382    # Do not save /bin paths to all_fixpath_prefixes!
45383  else
45384    # Not in mixed or Windows style, start by that.
45385    new_path=`cmd //c echo $new_path`
45386
45387  input_path="$new_path"
45388  # Check if we need to convert this using DOS-style short mode. If the path
45389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45390  # take no chances and rewrite it.
45391  # Note: m4 eats our [], so we need to use [ and ] instead.
45392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45393  if test "x$has_forbidden_chars" != x; then
45394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45396  fi
45397
45398    # Output is in $new_path
45399
45400  windows_path="$new_path"
45401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45402    unix_path=`$CYGPATH -u "$windows_path"`
45403    new_path="$unix_path"
45404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45406    new_path="$unix_path"
45407  fi
45408
45409    # remove trailing .exe if any
45410    new_path="${new_path/%.exe/}"
45411
45412    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45413    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45414  fi
45415
45416    else
45417      # We're on a unix platform. Hooray! :)
45418      # First separate the path from the arguments. This will split at the first
45419      # space.
45420      complete="$BUILD_CC"
45421      path="${complete%% *}"
45422      tmp="$complete EOL"
45423      arguments="${tmp#* }"
45424
45425      # Cannot rely on the command "which" here since it doesn't always work.
45426      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45427      if test -z "$is_absolute_path"; then
45428        # Path to executable is not absolute. Find it.
45429        IFS_save="$IFS"
45430        IFS=:
45431        for p in $PATH; do
45432          if test -f "$p/$path" && test -x "$p/$path"; then
45433            new_path="$p/$path"
45434            break
45435          fi
45436        done
45437        IFS="$IFS_save"
45438      else
45439        # This is an absolute path, we can use it without further modifications.
45440        new_path="$path"
45441      fi
45442
45443      if test "x$new_path" = x; then
45444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45445$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45446        has_space=`$ECHO "$complete" | $GREP " "`
45447        if test "x$has_space" != x; then
45448          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45449$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45450        fi
45451        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45452      fi
45453    fi
45454
45455    # Now join together the path and the arguments once again
45456    if test "x$arguments" != xEOL; then
45457      new_complete="$new_path ${arguments% *}"
45458    else
45459      new_complete="$new_path"
45460    fi
45461
45462    if test "x$complete" != "x$new_complete"; then
45463      BUILD_CC="$new_complete"
45464      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45465$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45466    fi
45467  fi
45468
45469
45470
45471
45472  # Publish this variable in the help.
45473
45474
45475  if [ -z "${BUILD_CXX+x}" ]; then
45476    # The variable is not set by user, try to locate tool using the code snippet
45477    for ac_prog in cl CC g++
45478do
45479  # Extract the first word of "$ac_prog", so it can be a program name with args.
45480set dummy $ac_prog; ac_word=$2
45481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45482$as_echo_n "checking for $ac_word... " >&6; }
45483if ${ac_cv_path_BUILD_CXX+:} false; then :
45484  $as_echo_n "(cached) " >&6
45485else
45486  case $BUILD_CXX in
45487  [\\/]* | ?:[\\/]*)
45488  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45489  ;;
45490  *)
45491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45492for as_dir in $PATH
45493do
45494  IFS=$as_save_IFS
45495  test -z "$as_dir" && as_dir=.
45496    for ac_exec_ext in '' $ac_executable_extensions; do
45497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45498    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45500    break 2
45501  fi
45502done
45503  done
45504IFS=$as_save_IFS
45505
45506  ;;
45507esac
45508fi
45509BUILD_CXX=$ac_cv_path_BUILD_CXX
45510if test -n "$BUILD_CXX"; then
45511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45512$as_echo "$BUILD_CXX" >&6; }
45513else
45514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45515$as_echo "no" >&6; }
45516fi
45517
45518
45519  test -n "$BUILD_CXX" && break
45520done
45521
45522  else
45523    # The variable is set, but is it from the command line or the environment?
45524
45525    # Try to remove the string !BUILD_CXX! from our list.
45526    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45527    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45528      # If it failed, the variable was not from the command line. Ignore it,
45529      # but warn the user (except for BASH, which is always set by the calling BASH).
45530      if test "xBUILD_CXX" != xBASH; then
45531        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45532$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45533      fi
45534      # Try to locate tool using the code snippet
45535      for ac_prog in cl CC g++
45536do
45537  # Extract the first word of "$ac_prog", so it can be a program name with args.
45538set dummy $ac_prog; ac_word=$2
45539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45540$as_echo_n "checking for $ac_word... " >&6; }
45541if ${ac_cv_path_BUILD_CXX+:} false; then :
45542  $as_echo_n "(cached) " >&6
45543else
45544  case $BUILD_CXX in
45545  [\\/]* | ?:[\\/]*)
45546  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45547  ;;
45548  *)
45549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45550for as_dir in $PATH
45551do
45552  IFS=$as_save_IFS
45553  test -z "$as_dir" && as_dir=.
45554    for ac_exec_ext in '' $ac_executable_extensions; do
45555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45556    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45558    break 2
45559  fi
45560done
45561  done
45562IFS=$as_save_IFS
45563
45564  ;;
45565esac
45566fi
45567BUILD_CXX=$ac_cv_path_BUILD_CXX
45568if test -n "$BUILD_CXX"; then
45569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45570$as_echo "$BUILD_CXX" >&6; }
45571else
45572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45573$as_echo "no" >&6; }
45574fi
45575
45576
45577  test -n "$BUILD_CXX" && break
45578done
45579
45580    else
45581      # If it succeeded, then it was overridden by the user. We will use it
45582      # for the tool.
45583
45584      # First remove it from the list of overridden variables, so we can test
45585      # for unknown variables in the end.
45586      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45587
45588      # Check if we try to supply an empty value
45589      if test "x$BUILD_CXX" = x; then
45590        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45591$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45592        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45593$as_echo_n "checking for BUILD_CXX... " >&6; }
45594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45595$as_echo "disabled" >&6; }
45596      else
45597        # Check if the provided tool contains a complete path.
45598        tool_specified="$BUILD_CXX"
45599        tool_basename="${tool_specified##*/}"
45600        if test "x$tool_basename" = "x$tool_specified"; then
45601          # A command without a complete path is provided, search $PATH.
45602          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45603$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45604          # Extract the first word of "$tool_basename", so it can be a program name with args.
45605set dummy $tool_basename; ac_word=$2
45606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45607$as_echo_n "checking for $ac_word... " >&6; }
45608if ${ac_cv_path_BUILD_CXX+:} false; then :
45609  $as_echo_n "(cached) " >&6
45610else
45611  case $BUILD_CXX in
45612  [\\/]* | ?:[\\/]*)
45613  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45614  ;;
45615  *)
45616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45617for as_dir in $PATH
45618do
45619  IFS=$as_save_IFS
45620  test -z "$as_dir" && as_dir=.
45621    for ac_exec_ext in '' $ac_executable_extensions; do
45622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45623    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45625    break 2
45626  fi
45627done
45628  done
45629IFS=$as_save_IFS
45630
45631  ;;
45632esac
45633fi
45634BUILD_CXX=$ac_cv_path_BUILD_CXX
45635if test -n "$BUILD_CXX"; then
45636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45637$as_echo "$BUILD_CXX" >&6; }
45638else
45639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45640$as_echo "no" >&6; }
45641fi
45642
45643
45644          if test "x$BUILD_CXX" = x; then
45645            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45646          fi
45647        else
45648          # Otherwise we believe it is a complete path. Use it as it is.
45649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45650$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45651          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45652$as_echo_n "checking for BUILD_CXX... " >&6; }
45653          if test ! -x "$tool_specified"; then
45654            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45655$as_echo "not found" >&6; }
45656            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45657          fi
45658          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45659$as_echo "$tool_specified" >&6; }
45660        fi
45661      fi
45662    fi
45663
45664  fi
45665
45666
45667
45668  if test "x$BUILD_CXX" = x; then
45669    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45670  fi
45671
45672
45673
45674  # Only process if variable expands to non-empty
45675
45676  if test "x$BUILD_CXX" != x; then
45677    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45678
45679  # First separate the path from the arguments. This will split at the first
45680  # space.
45681  complete="$BUILD_CXX"
45682  path="${complete%% *}"
45683  tmp="$complete EOL"
45684  arguments="${tmp#* }"
45685
45686  # Input might be given as Windows format, start by converting to
45687  # unix format.
45688  new_path=`$CYGPATH -u "$path"`
45689
45690  # Now try to locate executable using which
45691  new_path=`$WHICH "$new_path" 2> /dev/null`
45692  # bat and cmd files are not always considered executable in cygwin causing which
45693  # to not find them
45694  if test "x$new_path" = x \
45695      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45696      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45697    new_path=`$CYGPATH -u "$path"`
45698  fi
45699  if test "x$new_path" = x; then
45700    # Oops. Which didn't find the executable.
45701    # The splitting of arguments from the executable at a space might have been incorrect,
45702    # since paths with space are more likely in Windows. Give it another try with the whole
45703    # argument.
45704    path="$complete"
45705    arguments="EOL"
45706    new_path=`$CYGPATH -u "$path"`
45707    new_path=`$WHICH "$new_path" 2> /dev/null`
45708    # bat and cmd files are not always considered executable in cygwin causing which
45709    # to not find them
45710    if test "x$new_path" = x \
45711        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45712        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45713      new_path=`$CYGPATH -u "$path"`
45714    fi
45715    if test "x$new_path" = x; then
45716      # It's still not found. Now this is an unrecoverable error.
45717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45718$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45719      has_space=`$ECHO "$complete" | $GREP " "`
45720      if test "x$has_space" != x; then
45721        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45722$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45723      fi
45724      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45725    fi
45726  fi
45727
45728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45731  # "foo.exe" is OK but "foo" is an error.
45732  #
45733  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45734  # It is also a way to make sure we got the proper file name for the real test later on.
45735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45736  if test "x$test_shortpath" = x; then
45737    # Short path failed, file does not exist as specified.
45738    # Try adding .exe or .cmd
45739    if test -f "${new_path}.exe"; then
45740      input_to_shortpath="${new_path}.exe"
45741    elif test -f "${new_path}.cmd"; then
45742      input_to_shortpath="${new_path}.cmd"
45743    else
45744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45745$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45746      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45747$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45748      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45749    fi
45750  else
45751    input_to_shortpath="$new_path"
45752  fi
45753
45754  # Call helper function which possibly converts this using DOS-style short mode.
45755  # If so, the updated path is stored in $new_path.
45756  new_path="$input_to_shortpath"
45757
45758  input_path="$input_to_shortpath"
45759  # Check if we need to convert this using DOS-style short mode. If the path
45760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45761  # take no chances and rewrite it.
45762  # Note: m4 eats our [], so we need to use [ and ] instead.
45763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45764  if test "x$has_forbidden_chars" != x; then
45765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45769      # Going to short mode and back again did indeed matter. Since short mode is
45770      # case insensitive, let's make it lowercase to improve readability.
45771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45772      # Now convert it back to Unix-style (cygpath)
45773      input_path=`$CYGPATH -u "$shortmode_path"`
45774      new_path="$input_path"
45775    fi
45776  fi
45777
45778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45779  if test "x$test_cygdrive_prefix" = x; then
45780    # As a simple fix, exclude /usr/bin since it's not a real path.
45781    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45783      # a path prefixed by /cygdrive for fixpath to work.
45784      new_path="$CYGWIN_ROOT_PATH$input_path"
45785    fi
45786  fi
45787
45788  # remove trailing .exe if any
45789  new_path="${new_path/%.exe/}"
45790
45791    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45792
45793  # First separate the path from the arguments. This will split at the first
45794  # space.
45795  complete="$BUILD_CXX"
45796  path="${complete%% *}"
45797  tmp="$complete EOL"
45798  arguments="${tmp#* }"
45799
45800  # Input might be given as Windows format, start by converting to
45801  # unix format.
45802  new_path="$path"
45803
45804  windows_path="$new_path"
45805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45806    unix_path=`$CYGPATH -u "$windows_path"`
45807    new_path="$unix_path"
45808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45810    new_path="$unix_path"
45811  fi
45812
45813
45814  # Now try to locate executable using which
45815  new_path=`$WHICH "$new_path" 2> /dev/null`
45816
45817  if test "x$new_path" = x; then
45818    # Oops. Which didn't find the executable.
45819    # The splitting of arguments from the executable at a space might have been incorrect,
45820    # since paths with space are more likely in Windows. Give it another try with the whole
45821    # argument.
45822    path="$complete"
45823    arguments="EOL"
45824    new_path="$path"
45825
45826  windows_path="$new_path"
45827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45828    unix_path=`$CYGPATH -u "$windows_path"`
45829    new_path="$unix_path"
45830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45832    new_path="$unix_path"
45833  fi
45834
45835
45836    new_path=`$WHICH "$new_path" 2> /dev/null`
45837    # bat and cmd files are not always considered executable in MSYS causing which
45838    # to not find them
45839    if test "x$new_path" = x \
45840        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45841        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45842      new_path="$path"
45843
45844  windows_path="$new_path"
45845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45846    unix_path=`$CYGPATH -u "$windows_path"`
45847    new_path="$unix_path"
45848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45850    new_path="$unix_path"
45851  fi
45852
45853    fi
45854
45855    if test "x$new_path" = x; then
45856      # It's still not found. Now this is an unrecoverable error.
45857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45858$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45859      has_space=`$ECHO "$complete" | $GREP " "`
45860      if test "x$has_space" != x; then
45861        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45862$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45863      fi
45864      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45865    fi
45866  fi
45867
45868  # Now new_path has a complete unix path to the binary
45869  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45870    # Keep paths in /bin as-is, but remove trailing .exe if any
45871    new_path="${new_path/%.exe/}"
45872    # Do not save /bin paths to all_fixpath_prefixes!
45873  else
45874    # Not in mixed or Windows style, start by that.
45875    new_path=`cmd //c echo $new_path`
45876
45877  input_path="$new_path"
45878  # Check if we need to convert this using DOS-style short mode. If the path
45879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45880  # take no chances and rewrite it.
45881  # Note: m4 eats our [], so we need to use [ and ] instead.
45882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45883  if test "x$has_forbidden_chars" != x; then
45884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45886  fi
45887
45888    # Output is in $new_path
45889
45890  windows_path="$new_path"
45891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45892    unix_path=`$CYGPATH -u "$windows_path"`
45893    new_path="$unix_path"
45894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45896    new_path="$unix_path"
45897  fi
45898
45899    # remove trailing .exe if any
45900    new_path="${new_path/%.exe/}"
45901
45902    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45903    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45904  fi
45905
45906    else
45907      # We're on a unix platform. Hooray! :)
45908      # First separate the path from the arguments. This will split at the first
45909      # space.
45910      complete="$BUILD_CXX"
45911      path="${complete%% *}"
45912      tmp="$complete EOL"
45913      arguments="${tmp#* }"
45914
45915      # Cannot rely on the command "which" here since it doesn't always work.
45916      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45917      if test -z "$is_absolute_path"; then
45918        # Path to executable is not absolute. Find it.
45919        IFS_save="$IFS"
45920        IFS=:
45921        for p in $PATH; do
45922          if test -f "$p/$path" && test -x "$p/$path"; then
45923            new_path="$p/$path"
45924            break
45925          fi
45926        done
45927        IFS="$IFS_save"
45928      else
45929        # This is an absolute path, we can use it without further modifications.
45930        new_path="$path"
45931      fi
45932
45933      if test "x$new_path" = x; then
45934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45935$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45936        has_space=`$ECHO "$complete" | $GREP " "`
45937        if test "x$has_space" != x; then
45938          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45939$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45940        fi
45941        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45942      fi
45943    fi
45944
45945    # Now join together the path and the arguments once again
45946    if test "x$arguments" != xEOL; then
45947      new_complete="$new_path ${arguments% *}"
45948    else
45949      new_complete="$new_path"
45950    fi
45951
45952    if test "x$complete" != "x$new_complete"; then
45953      BUILD_CXX="$new_complete"
45954      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45955$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45956    fi
45957  fi
45958
45959
45960
45961  # Publish this variable in the help.
45962
45963
45964  if [ -z "${BUILD_NM+x}" ]; then
45965    # The variable is not set by user, try to locate tool using the code snippet
45966    for ac_prog in nm gcc-nm
45967do
45968  # Extract the first word of "$ac_prog", so it can be a program name with args.
45969set dummy $ac_prog; ac_word=$2
45970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45971$as_echo_n "checking for $ac_word... " >&6; }
45972if ${ac_cv_path_BUILD_NM+:} false; then :
45973  $as_echo_n "(cached) " >&6
45974else
45975  case $BUILD_NM in
45976  [\\/]* | ?:[\\/]*)
45977  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45978  ;;
45979  *)
45980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45981for as_dir in $PATH
45982do
45983  IFS=$as_save_IFS
45984  test -z "$as_dir" && as_dir=.
45985    for ac_exec_ext in '' $ac_executable_extensions; do
45986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45987    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45989    break 2
45990  fi
45991done
45992  done
45993IFS=$as_save_IFS
45994
45995  ;;
45996esac
45997fi
45998BUILD_NM=$ac_cv_path_BUILD_NM
45999if test -n "$BUILD_NM"; then
46000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46001$as_echo "$BUILD_NM" >&6; }
46002else
46003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46004$as_echo "no" >&6; }
46005fi
46006
46007
46008  test -n "$BUILD_NM" && break
46009done
46010
46011  else
46012    # The variable is set, but is it from the command line or the environment?
46013
46014    # Try to remove the string !BUILD_NM! from our list.
46015    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
46016    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46017      # If it failed, the variable was not from the command line. Ignore it,
46018      # but warn the user (except for BASH, which is always set by the calling BASH).
46019      if test "xBUILD_NM" != xBASH; then
46020        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
46021$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
46022      fi
46023      # Try to locate tool using the code snippet
46024      for ac_prog in nm gcc-nm
46025do
46026  # Extract the first word of "$ac_prog", so it can be a program name with args.
46027set dummy $ac_prog; ac_word=$2
46028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46029$as_echo_n "checking for $ac_word... " >&6; }
46030if ${ac_cv_path_BUILD_NM+:} false; then :
46031  $as_echo_n "(cached) " >&6
46032else
46033  case $BUILD_NM in
46034  [\\/]* | ?:[\\/]*)
46035  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46036  ;;
46037  *)
46038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46039for as_dir in $PATH
46040do
46041  IFS=$as_save_IFS
46042  test -z "$as_dir" && as_dir=.
46043    for ac_exec_ext in '' $ac_executable_extensions; do
46044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46045    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46047    break 2
46048  fi
46049done
46050  done
46051IFS=$as_save_IFS
46052
46053  ;;
46054esac
46055fi
46056BUILD_NM=$ac_cv_path_BUILD_NM
46057if test -n "$BUILD_NM"; then
46058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46059$as_echo "$BUILD_NM" >&6; }
46060else
46061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46062$as_echo "no" >&6; }
46063fi
46064
46065
46066  test -n "$BUILD_NM" && break
46067done
46068
46069    else
46070      # If it succeeded, then it was overridden by the user. We will use it
46071      # for the tool.
46072
46073      # First remove it from the list of overridden variables, so we can test
46074      # for unknown variables in the end.
46075      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46076
46077      # Check if we try to supply an empty value
46078      if test "x$BUILD_NM" = x; then
46079        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
46080$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
46081        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46082$as_echo_n "checking for BUILD_NM... " >&6; }
46083        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46084$as_echo "disabled" >&6; }
46085      else
46086        # Check if the provided tool contains a complete path.
46087        tool_specified="$BUILD_NM"
46088        tool_basename="${tool_specified##*/}"
46089        if test "x$tool_basename" = "x$tool_specified"; then
46090          # A command without a complete path is provided, search $PATH.
46091          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
46092$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
46093          # Extract the first word of "$tool_basename", so it can be a program name with args.
46094set dummy $tool_basename; ac_word=$2
46095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46096$as_echo_n "checking for $ac_word... " >&6; }
46097if ${ac_cv_path_BUILD_NM+:} false; then :
46098  $as_echo_n "(cached) " >&6
46099else
46100  case $BUILD_NM in
46101  [\\/]* | ?:[\\/]*)
46102  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46103  ;;
46104  *)
46105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46106for as_dir in $PATH
46107do
46108  IFS=$as_save_IFS
46109  test -z "$as_dir" && as_dir=.
46110    for ac_exec_ext in '' $ac_executable_extensions; do
46111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46112    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46114    break 2
46115  fi
46116done
46117  done
46118IFS=$as_save_IFS
46119
46120  ;;
46121esac
46122fi
46123BUILD_NM=$ac_cv_path_BUILD_NM
46124if test -n "$BUILD_NM"; then
46125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46126$as_echo "$BUILD_NM" >&6; }
46127else
46128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46129$as_echo "no" >&6; }
46130fi
46131
46132
46133          if test "x$BUILD_NM" = x; then
46134            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46135          fi
46136        else
46137          # Otherwise we believe it is a complete path. Use it as it is.
46138          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
46139$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
46140          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46141$as_echo_n "checking for BUILD_NM... " >&6; }
46142          if test ! -x "$tool_specified"; then
46143            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46144$as_echo "not found" >&6; }
46145            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
46146          fi
46147          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46148$as_echo "$tool_specified" >&6; }
46149        fi
46150      fi
46151    fi
46152
46153  fi
46154
46155
46156
46157  # Only process if variable expands to non-empty
46158
46159  if test "x$BUILD_NM" != x; then
46160    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46161
46162  # First separate the path from the arguments. This will split at the first
46163  # space.
46164  complete="$BUILD_NM"
46165  path="${complete%% *}"
46166  tmp="$complete EOL"
46167  arguments="${tmp#* }"
46168
46169  # Input might be given as Windows format, start by converting to
46170  # unix format.
46171  new_path=`$CYGPATH -u "$path"`
46172
46173  # Now try to locate executable using which
46174  new_path=`$WHICH "$new_path" 2> /dev/null`
46175  # bat and cmd files are not always considered executable in cygwin causing which
46176  # to not find them
46177  if test "x$new_path" = x \
46178      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46179      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46180    new_path=`$CYGPATH -u "$path"`
46181  fi
46182  if test "x$new_path" = x; then
46183    # Oops. Which didn't find the executable.
46184    # The splitting of arguments from the executable at a space might have been incorrect,
46185    # since paths with space are more likely in Windows. Give it another try with the whole
46186    # argument.
46187    path="$complete"
46188    arguments="EOL"
46189    new_path=`$CYGPATH -u "$path"`
46190    new_path=`$WHICH "$new_path" 2> /dev/null`
46191    # bat and cmd files are not always considered executable in cygwin causing which
46192    # to not find them
46193    if test "x$new_path" = x \
46194        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46195        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46196      new_path=`$CYGPATH -u "$path"`
46197    fi
46198    if test "x$new_path" = x; then
46199      # It's still not found. Now this is an unrecoverable error.
46200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46201$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46202      has_space=`$ECHO "$complete" | $GREP " "`
46203      if test "x$has_space" != x; then
46204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46206      fi
46207      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46208    fi
46209  fi
46210
46211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46214  # "foo.exe" is OK but "foo" is an error.
46215  #
46216  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46217  # It is also a way to make sure we got the proper file name for the real test later on.
46218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46219  if test "x$test_shortpath" = x; then
46220    # Short path failed, file does not exist as specified.
46221    # Try adding .exe or .cmd
46222    if test -f "${new_path}.exe"; then
46223      input_to_shortpath="${new_path}.exe"
46224    elif test -f "${new_path}.cmd"; then
46225      input_to_shortpath="${new_path}.cmd"
46226    else
46227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46228$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46229      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46230$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46231      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46232    fi
46233  else
46234    input_to_shortpath="$new_path"
46235  fi
46236
46237  # Call helper function which possibly converts this using DOS-style short mode.
46238  # If so, the updated path is stored in $new_path.
46239  new_path="$input_to_shortpath"
46240
46241  input_path="$input_to_shortpath"
46242  # Check if we need to convert this using DOS-style short mode. If the path
46243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46244  # take no chances and rewrite it.
46245  # Note: m4 eats our [], so we need to use [ and ] instead.
46246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46247  if test "x$has_forbidden_chars" != x; then
46248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46252      # Going to short mode and back again did indeed matter. Since short mode is
46253      # case insensitive, let's make it lowercase to improve readability.
46254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46255      # Now convert it back to Unix-style (cygpath)
46256      input_path=`$CYGPATH -u "$shortmode_path"`
46257      new_path="$input_path"
46258    fi
46259  fi
46260
46261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46262  if test "x$test_cygdrive_prefix" = x; then
46263    # As a simple fix, exclude /usr/bin since it's not a real path.
46264    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46266      # a path prefixed by /cygdrive for fixpath to work.
46267      new_path="$CYGWIN_ROOT_PATH$input_path"
46268    fi
46269  fi
46270
46271  # remove trailing .exe if any
46272  new_path="${new_path/%.exe/}"
46273
46274    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46275
46276  # First separate the path from the arguments. This will split at the first
46277  # space.
46278  complete="$BUILD_NM"
46279  path="${complete%% *}"
46280  tmp="$complete EOL"
46281  arguments="${tmp#* }"
46282
46283  # Input might be given as Windows format, start by converting to
46284  # unix format.
46285  new_path="$path"
46286
46287  windows_path="$new_path"
46288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46289    unix_path=`$CYGPATH -u "$windows_path"`
46290    new_path="$unix_path"
46291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46293    new_path="$unix_path"
46294  fi
46295
46296
46297  # Now try to locate executable using which
46298  new_path=`$WHICH "$new_path" 2> /dev/null`
46299
46300  if test "x$new_path" = x; then
46301    # Oops. Which didn't find the executable.
46302    # The splitting of arguments from the executable at a space might have been incorrect,
46303    # since paths with space are more likely in Windows. Give it another try with the whole
46304    # argument.
46305    path="$complete"
46306    arguments="EOL"
46307    new_path="$path"
46308
46309  windows_path="$new_path"
46310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46311    unix_path=`$CYGPATH -u "$windows_path"`
46312    new_path="$unix_path"
46313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46315    new_path="$unix_path"
46316  fi
46317
46318
46319    new_path=`$WHICH "$new_path" 2> /dev/null`
46320    # bat and cmd files are not always considered executable in MSYS causing which
46321    # to not find them
46322    if test "x$new_path" = x \
46323        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46324        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46325      new_path="$path"
46326
46327  windows_path="$new_path"
46328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46329    unix_path=`$CYGPATH -u "$windows_path"`
46330    new_path="$unix_path"
46331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46333    new_path="$unix_path"
46334  fi
46335
46336    fi
46337
46338    if test "x$new_path" = x; then
46339      # It's still not found. Now this is an unrecoverable error.
46340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46341$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46342      has_space=`$ECHO "$complete" | $GREP " "`
46343      if test "x$has_space" != x; then
46344        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46345$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46346      fi
46347      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46348    fi
46349  fi
46350
46351  # Now new_path has a complete unix path to the binary
46352  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46353    # Keep paths in /bin as-is, but remove trailing .exe if any
46354    new_path="${new_path/%.exe/}"
46355    # Do not save /bin paths to all_fixpath_prefixes!
46356  else
46357    # Not in mixed or Windows style, start by that.
46358    new_path=`cmd //c echo $new_path`
46359
46360  input_path="$new_path"
46361  # Check if we need to convert this using DOS-style short mode. If the path
46362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46363  # take no chances and rewrite it.
46364  # Note: m4 eats our [], so we need to use [ and ] instead.
46365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46366  if test "x$has_forbidden_chars" != x; then
46367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46369  fi
46370
46371    # Output is in $new_path
46372
46373  windows_path="$new_path"
46374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46375    unix_path=`$CYGPATH -u "$windows_path"`
46376    new_path="$unix_path"
46377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46379    new_path="$unix_path"
46380  fi
46381
46382    # remove trailing .exe if any
46383    new_path="${new_path/%.exe/}"
46384
46385    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46386    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46387  fi
46388
46389    else
46390      # We're on a unix platform. Hooray! :)
46391      # First separate the path from the arguments. This will split at the first
46392      # space.
46393      complete="$BUILD_NM"
46394      path="${complete%% *}"
46395      tmp="$complete EOL"
46396      arguments="${tmp#* }"
46397
46398      # Cannot rely on the command "which" here since it doesn't always work.
46399      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46400      if test -z "$is_absolute_path"; then
46401        # Path to executable is not absolute. Find it.
46402        IFS_save="$IFS"
46403        IFS=:
46404        for p in $PATH; do
46405          if test -f "$p/$path" && test -x "$p/$path"; then
46406            new_path="$p/$path"
46407            break
46408          fi
46409        done
46410        IFS="$IFS_save"
46411      else
46412        # This is an absolute path, we can use it without further modifications.
46413        new_path="$path"
46414      fi
46415
46416      if test "x$new_path" = x; then
46417        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46418$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46419        has_space=`$ECHO "$complete" | $GREP " "`
46420        if test "x$has_space" != x; then
46421          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46422$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46423        fi
46424        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46425      fi
46426    fi
46427
46428    # Now join together the path and the arguments once again
46429    if test "x$arguments" != xEOL; then
46430      new_complete="$new_path ${arguments% *}"
46431    else
46432      new_complete="$new_path"
46433    fi
46434
46435    if test "x$complete" != "x$new_complete"; then
46436      BUILD_NM="$new_complete"
46437      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46438$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46439    fi
46440  fi
46441
46442
46443
46444  # Publish this variable in the help.
46445
46446
46447  if [ -z "${BUILD_AR+x}" ]; then
46448    # The variable is not set by user, try to locate tool using the code snippet
46449    for ac_prog in ar gcc-ar
46450do
46451  # Extract the first word of "$ac_prog", so it can be a program name with args.
46452set dummy $ac_prog; ac_word=$2
46453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46454$as_echo_n "checking for $ac_word... " >&6; }
46455if ${ac_cv_path_BUILD_AR+:} false; then :
46456  $as_echo_n "(cached) " >&6
46457else
46458  case $BUILD_AR in
46459  [\\/]* | ?:[\\/]*)
46460  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46461  ;;
46462  *)
46463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46464for as_dir in $PATH
46465do
46466  IFS=$as_save_IFS
46467  test -z "$as_dir" && as_dir=.
46468    for ac_exec_ext in '' $ac_executable_extensions; do
46469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46470    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46472    break 2
46473  fi
46474done
46475  done
46476IFS=$as_save_IFS
46477
46478  ;;
46479esac
46480fi
46481BUILD_AR=$ac_cv_path_BUILD_AR
46482if test -n "$BUILD_AR"; then
46483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46484$as_echo "$BUILD_AR" >&6; }
46485else
46486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46487$as_echo "no" >&6; }
46488fi
46489
46490
46491  test -n "$BUILD_AR" && break
46492done
46493
46494  else
46495    # The variable is set, but is it from the command line or the environment?
46496
46497    # Try to remove the string !BUILD_AR! from our list.
46498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46500      # If it failed, the variable was not from the command line. Ignore it,
46501      # but warn the user (except for BASH, which is always set by the calling BASH).
46502      if test "xBUILD_AR" != xBASH; then
46503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46504$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46505      fi
46506      # Try to locate tool using the code snippet
46507      for ac_prog in ar gcc-ar
46508do
46509  # Extract the first word of "$ac_prog", so it can be a program name with args.
46510set dummy $ac_prog; ac_word=$2
46511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46512$as_echo_n "checking for $ac_word... " >&6; }
46513if ${ac_cv_path_BUILD_AR+:} false; then :
46514  $as_echo_n "(cached) " >&6
46515else
46516  case $BUILD_AR in
46517  [\\/]* | ?:[\\/]*)
46518  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46519  ;;
46520  *)
46521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46522for as_dir in $PATH
46523do
46524  IFS=$as_save_IFS
46525  test -z "$as_dir" && as_dir=.
46526    for ac_exec_ext in '' $ac_executable_extensions; do
46527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46528    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46530    break 2
46531  fi
46532done
46533  done
46534IFS=$as_save_IFS
46535
46536  ;;
46537esac
46538fi
46539BUILD_AR=$ac_cv_path_BUILD_AR
46540if test -n "$BUILD_AR"; then
46541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46542$as_echo "$BUILD_AR" >&6; }
46543else
46544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46545$as_echo "no" >&6; }
46546fi
46547
46548
46549  test -n "$BUILD_AR" && break
46550done
46551
46552    else
46553      # If it succeeded, then it was overridden by the user. We will use it
46554      # for the tool.
46555
46556      # First remove it from the list of overridden variables, so we can test
46557      # for unknown variables in the end.
46558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46559
46560      # Check if we try to supply an empty value
46561      if test "x$BUILD_AR" = x; then
46562        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46563$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46564        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46565$as_echo_n "checking for BUILD_AR... " >&6; }
46566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46567$as_echo "disabled" >&6; }
46568      else
46569        # Check if the provided tool contains a complete path.
46570        tool_specified="$BUILD_AR"
46571        tool_basename="${tool_specified##*/}"
46572        if test "x$tool_basename" = "x$tool_specified"; then
46573          # A command without a complete path is provided, search $PATH.
46574          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46575$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46576          # Extract the first word of "$tool_basename", so it can be a program name with args.
46577set dummy $tool_basename; ac_word=$2
46578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46579$as_echo_n "checking for $ac_word... " >&6; }
46580if ${ac_cv_path_BUILD_AR+:} false; then :
46581  $as_echo_n "(cached) " >&6
46582else
46583  case $BUILD_AR in
46584  [\\/]* | ?:[\\/]*)
46585  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46586  ;;
46587  *)
46588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46589for as_dir in $PATH
46590do
46591  IFS=$as_save_IFS
46592  test -z "$as_dir" && as_dir=.
46593    for ac_exec_ext in '' $ac_executable_extensions; do
46594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46595    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46597    break 2
46598  fi
46599done
46600  done
46601IFS=$as_save_IFS
46602
46603  ;;
46604esac
46605fi
46606BUILD_AR=$ac_cv_path_BUILD_AR
46607if test -n "$BUILD_AR"; then
46608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46609$as_echo "$BUILD_AR" >&6; }
46610else
46611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46612$as_echo "no" >&6; }
46613fi
46614
46615
46616          if test "x$BUILD_AR" = x; then
46617            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46618          fi
46619        else
46620          # Otherwise we believe it is a complete path. Use it as it is.
46621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46622$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46623          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46624$as_echo_n "checking for BUILD_AR... " >&6; }
46625          if test ! -x "$tool_specified"; then
46626            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46627$as_echo "not found" >&6; }
46628            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46629          fi
46630          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46631$as_echo "$tool_specified" >&6; }
46632        fi
46633      fi
46634    fi
46635
46636  fi
46637
46638
46639
46640  # Only process if variable expands to non-empty
46641
46642  if test "x$BUILD_AR" != x; then
46643    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46644
46645  # First separate the path from the arguments. This will split at the first
46646  # space.
46647  complete="$BUILD_AR"
46648  path="${complete%% *}"
46649  tmp="$complete EOL"
46650  arguments="${tmp#* }"
46651
46652  # Input might be given as Windows format, start by converting to
46653  # unix format.
46654  new_path=`$CYGPATH -u "$path"`
46655
46656  # Now try to locate executable using which
46657  new_path=`$WHICH "$new_path" 2> /dev/null`
46658  # bat and cmd files are not always considered executable in cygwin causing which
46659  # to not find them
46660  if test "x$new_path" = x \
46661      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46662      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46663    new_path=`$CYGPATH -u "$path"`
46664  fi
46665  if test "x$new_path" = x; then
46666    # Oops. Which didn't find the executable.
46667    # The splitting of arguments from the executable at a space might have been incorrect,
46668    # since paths with space are more likely in Windows. Give it another try with the whole
46669    # argument.
46670    path="$complete"
46671    arguments="EOL"
46672    new_path=`$CYGPATH -u "$path"`
46673    new_path=`$WHICH "$new_path" 2> /dev/null`
46674    # bat and cmd files are not always considered executable in cygwin causing which
46675    # to not find them
46676    if test "x$new_path" = x \
46677        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46678        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46679      new_path=`$CYGPATH -u "$path"`
46680    fi
46681    if test "x$new_path" = x; then
46682      # It's still not found. Now this is an unrecoverable error.
46683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46684$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46685      has_space=`$ECHO "$complete" | $GREP " "`
46686      if test "x$has_space" != x; then
46687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46689      fi
46690      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46691    fi
46692  fi
46693
46694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46697  # "foo.exe" is OK but "foo" is an error.
46698  #
46699  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46700  # It is also a way to make sure we got the proper file name for the real test later on.
46701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46702  if test "x$test_shortpath" = x; then
46703    # Short path failed, file does not exist as specified.
46704    # Try adding .exe or .cmd
46705    if test -f "${new_path}.exe"; then
46706      input_to_shortpath="${new_path}.exe"
46707    elif test -f "${new_path}.cmd"; then
46708      input_to_shortpath="${new_path}.cmd"
46709    else
46710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46711$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46712      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46713$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46714      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46715    fi
46716  else
46717    input_to_shortpath="$new_path"
46718  fi
46719
46720  # Call helper function which possibly converts this using DOS-style short mode.
46721  # If so, the updated path is stored in $new_path.
46722  new_path="$input_to_shortpath"
46723
46724  input_path="$input_to_shortpath"
46725  # Check if we need to convert this using DOS-style short mode. If the path
46726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46727  # take no chances and rewrite it.
46728  # Note: m4 eats our [], so we need to use [ and ] instead.
46729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46730  if test "x$has_forbidden_chars" != x; then
46731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46735      # Going to short mode and back again did indeed matter. Since short mode is
46736      # case insensitive, let's make it lowercase to improve readability.
46737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46738      # Now convert it back to Unix-style (cygpath)
46739      input_path=`$CYGPATH -u "$shortmode_path"`
46740      new_path="$input_path"
46741    fi
46742  fi
46743
46744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46745  if test "x$test_cygdrive_prefix" = x; then
46746    # As a simple fix, exclude /usr/bin since it's not a real path.
46747    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46749      # a path prefixed by /cygdrive for fixpath to work.
46750      new_path="$CYGWIN_ROOT_PATH$input_path"
46751    fi
46752  fi
46753
46754  # remove trailing .exe if any
46755  new_path="${new_path/%.exe/}"
46756
46757    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46758
46759  # First separate the path from the arguments. This will split at the first
46760  # space.
46761  complete="$BUILD_AR"
46762  path="${complete%% *}"
46763  tmp="$complete EOL"
46764  arguments="${tmp#* }"
46765
46766  # Input might be given as Windows format, start by converting to
46767  # unix format.
46768  new_path="$path"
46769
46770  windows_path="$new_path"
46771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46772    unix_path=`$CYGPATH -u "$windows_path"`
46773    new_path="$unix_path"
46774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46776    new_path="$unix_path"
46777  fi
46778
46779
46780  # Now try to locate executable using which
46781  new_path=`$WHICH "$new_path" 2> /dev/null`
46782
46783  if test "x$new_path" = x; then
46784    # Oops. Which didn't find the executable.
46785    # The splitting of arguments from the executable at a space might have been incorrect,
46786    # since paths with space are more likely in Windows. Give it another try with the whole
46787    # argument.
46788    path="$complete"
46789    arguments="EOL"
46790    new_path="$path"
46791
46792  windows_path="$new_path"
46793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46794    unix_path=`$CYGPATH -u "$windows_path"`
46795    new_path="$unix_path"
46796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46798    new_path="$unix_path"
46799  fi
46800
46801
46802    new_path=`$WHICH "$new_path" 2> /dev/null`
46803    # bat and cmd files are not always considered executable in MSYS causing which
46804    # to not find them
46805    if test "x$new_path" = x \
46806        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46807        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46808      new_path="$path"
46809
46810  windows_path="$new_path"
46811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46812    unix_path=`$CYGPATH -u "$windows_path"`
46813    new_path="$unix_path"
46814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46816    new_path="$unix_path"
46817  fi
46818
46819    fi
46820
46821    if test "x$new_path" = x; then
46822      # It's still not found. Now this is an unrecoverable error.
46823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46824$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46825      has_space=`$ECHO "$complete" | $GREP " "`
46826      if test "x$has_space" != x; then
46827        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46828$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46829      fi
46830      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46831    fi
46832  fi
46833
46834  # Now new_path has a complete unix path to the binary
46835  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46836    # Keep paths in /bin as-is, but remove trailing .exe if any
46837    new_path="${new_path/%.exe/}"
46838    # Do not save /bin paths to all_fixpath_prefixes!
46839  else
46840    # Not in mixed or Windows style, start by that.
46841    new_path=`cmd //c echo $new_path`
46842
46843  input_path="$new_path"
46844  # Check if we need to convert this using DOS-style short mode. If the path
46845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46846  # take no chances and rewrite it.
46847  # Note: m4 eats our [], so we need to use [ and ] instead.
46848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46849  if test "x$has_forbidden_chars" != x; then
46850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46852  fi
46853
46854    # Output is in $new_path
46855
46856  windows_path="$new_path"
46857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46858    unix_path=`$CYGPATH -u "$windows_path"`
46859    new_path="$unix_path"
46860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46862    new_path="$unix_path"
46863  fi
46864
46865    # remove trailing .exe if any
46866    new_path="${new_path/%.exe/}"
46867
46868    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46869    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46870  fi
46871
46872    else
46873      # We're on a unix platform. Hooray! :)
46874      # First separate the path from the arguments. This will split at the first
46875      # space.
46876      complete="$BUILD_AR"
46877      path="${complete%% *}"
46878      tmp="$complete EOL"
46879      arguments="${tmp#* }"
46880
46881      # Cannot rely on the command "which" here since it doesn't always work.
46882      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46883      if test -z "$is_absolute_path"; then
46884        # Path to executable is not absolute. Find it.
46885        IFS_save="$IFS"
46886        IFS=:
46887        for p in $PATH; do
46888          if test -f "$p/$path" && test -x "$p/$path"; then
46889            new_path="$p/$path"
46890            break
46891          fi
46892        done
46893        IFS="$IFS_save"
46894      else
46895        # This is an absolute path, we can use it without further modifications.
46896        new_path="$path"
46897      fi
46898
46899      if test "x$new_path" = x; then
46900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46901$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46902        has_space=`$ECHO "$complete" | $GREP " "`
46903        if test "x$has_space" != x; then
46904          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46905$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46906        fi
46907        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46908      fi
46909    fi
46910
46911    # Now join together the path and the arguments once again
46912    if test "x$arguments" != xEOL; then
46913      new_complete="$new_path ${arguments% *}"
46914    else
46915      new_complete="$new_path"
46916    fi
46917
46918    if test "x$complete" != "x$new_complete"; then
46919      BUILD_AR="$new_complete"
46920      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46921$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46922    fi
46923  fi
46924
46925
46926
46927  # Publish this variable in the help.
46928
46929
46930  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46931    # The variable is not set by user, try to locate tool using the code snippet
46932    for ac_prog in objcopy
46933do
46934  # Extract the first word of "$ac_prog", so it can be a program name with args.
46935set dummy $ac_prog; ac_word=$2
46936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46937$as_echo_n "checking for $ac_word... " >&6; }
46938if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46939  $as_echo_n "(cached) " >&6
46940else
46941  case $BUILD_OBJCOPY in
46942  [\\/]* | ?:[\\/]*)
46943  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46944  ;;
46945  *)
46946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46947for as_dir in $PATH
46948do
46949  IFS=$as_save_IFS
46950  test -z "$as_dir" && as_dir=.
46951    for ac_exec_ext in '' $ac_executable_extensions; do
46952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46953    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46955    break 2
46956  fi
46957done
46958  done
46959IFS=$as_save_IFS
46960
46961  ;;
46962esac
46963fi
46964BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46965if test -n "$BUILD_OBJCOPY"; then
46966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46967$as_echo "$BUILD_OBJCOPY" >&6; }
46968else
46969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46970$as_echo "no" >&6; }
46971fi
46972
46973
46974  test -n "$BUILD_OBJCOPY" && break
46975done
46976
46977  else
46978    # The variable is set, but is it from the command line or the environment?
46979
46980    # Try to remove the string !BUILD_OBJCOPY! from our list.
46981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46983      # If it failed, the variable was not from the command line. Ignore it,
46984      # but warn the user (except for BASH, which is always set by the calling BASH).
46985      if test "xBUILD_OBJCOPY" != xBASH; then
46986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46987$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46988      fi
46989      # Try to locate tool using the code snippet
46990      for ac_prog in objcopy
46991do
46992  # Extract the first word of "$ac_prog", so it can be a program name with args.
46993set dummy $ac_prog; ac_word=$2
46994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46995$as_echo_n "checking for $ac_word... " >&6; }
46996if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46997  $as_echo_n "(cached) " >&6
46998else
46999  case $BUILD_OBJCOPY in
47000  [\\/]* | ?:[\\/]*)
47001  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47002  ;;
47003  *)
47004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47005for as_dir in $PATH
47006do
47007  IFS=$as_save_IFS
47008  test -z "$as_dir" && as_dir=.
47009    for ac_exec_ext in '' $ac_executable_extensions; do
47010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47011    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47013    break 2
47014  fi
47015done
47016  done
47017IFS=$as_save_IFS
47018
47019  ;;
47020esac
47021fi
47022BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47023if test -n "$BUILD_OBJCOPY"; then
47024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47025$as_echo "$BUILD_OBJCOPY" >&6; }
47026else
47027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47028$as_echo "no" >&6; }
47029fi
47030
47031
47032  test -n "$BUILD_OBJCOPY" && break
47033done
47034
47035    else
47036      # If it succeeded, then it was overridden by the user. We will use it
47037      # for the tool.
47038
47039      # First remove it from the list of overridden variables, so we can test
47040      # for unknown variables in the end.
47041      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47042
47043      # Check if we try to supply an empty value
47044      if test "x$BUILD_OBJCOPY" = x; then
47045        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
47046$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
47047        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47048$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47050$as_echo "disabled" >&6; }
47051      else
47052        # Check if the provided tool contains a complete path.
47053        tool_specified="$BUILD_OBJCOPY"
47054        tool_basename="${tool_specified##*/}"
47055        if test "x$tool_basename" = "x$tool_specified"; then
47056          # A command without a complete path is provided, search $PATH.
47057          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
47058$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
47059          # Extract the first word of "$tool_basename", so it can be a program name with args.
47060set dummy $tool_basename; ac_word=$2
47061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47062$as_echo_n "checking for $ac_word... " >&6; }
47063if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47064  $as_echo_n "(cached) " >&6
47065else
47066  case $BUILD_OBJCOPY in
47067  [\\/]* | ?:[\\/]*)
47068  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47069  ;;
47070  *)
47071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47072for as_dir in $PATH
47073do
47074  IFS=$as_save_IFS
47075  test -z "$as_dir" && as_dir=.
47076    for ac_exec_ext in '' $ac_executable_extensions; do
47077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47078    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47080    break 2
47081  fi
47082done
47083  done
47084IFS=$as_save_IFS
47085
47086  ;;
47087esac
47088fi
47089BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47090if test -n "$BUILD_OBJCOPY"; then
47091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47092$as_echo "$BUILD_OBJCOPY" >&6; }
47093else
47094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47095$as_echo "no" >&6; }
47096fi
47097
47098
47099          if test "x$BUILD_OBJCOPY" = x; then
47100            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47101          fi
47102        else
47103          # Otherwise we believe it is a complete path. Use it as it is.
47104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
47105$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
47106          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47107$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47108          if test ! -x "$tool_specified"; then
47109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47110$as_echo "not found" >&6; }
47111            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
47112          fi
47113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47114$as_echo "$tool_specified" >&6; }
47115        fi
47116      fi
47117    fi
47118
47119  fi
47120
47121
47122
47123  # Only process if variable expands to non-empty
47124
47125  if test "x$BUILD_OBJCOPY" != x; then
47126    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47127
47128  # First separate the path from the arguments. This will split at the first
47129  # space.
47130  complete="$BUILD_OBJCOPY"
47131  path="${complete%% *}"
47132  tmp="$complete EOL"
47133  arguments="${tmp#* }"
47134
47135  # Input might be given as Windows format, start by converting to
47136  # unix format.
47137  new_path=`$CYGPATH -u "$path"`
47138
47139  # Now try to locate executable using which
47140  new_path=`$WHICH "$new_path" 2> /dev/null`
47141  # bat and cmd files are not always considered executable in cygwin causing which
47142  # to not find them
47143  if test "x$new_path" = x \
47144      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47145      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47146    new_path=`$CYGPATH -u "$path"`
47147  fi
47148  if test "x$new_path" = x; then
47149    # Oops. Which didn't find the executable.
47150    # The splitting of arguments from the executable at a space might have been incorrect,
47151    # since paths with space are more likely in Windows. Give it another try with the whole
47152    # argument.
47153    path="$complete"
47154    arguments="EOL"
47155    new_path=`$CYGPATH -u "$path"`
47156    new_path=`$WHICH "$new_path" 2> /dev/null`
47157    # bat and cmd files are not always considered executable in cygwin causing which
47158    # to not find them
47159    if test "x$new_path" = x \
47160        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47161        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47162      new_path=`$CYGPATH -u "$path"`
47163    fi
47164    if test "x$new_path" = x; then
47165      # It's still not found. Now this is an unrecoverable error.
47166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47167$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47168      has_space=`$ECHO "$complete" | $GREP " "`
47169      if test "x$has_space" != x; then
47170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47172      fi
47173      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47174    fi
47175  fi
47176
47177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47180  # "foo.exe" is OK but "foo" is an error.
47181  #
47182  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47183  # It is also a way to make sure we got the proper file name for the real test later on.
47184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47185  if test "x$test_shortpath" = x; then
47186    # Short path failed, file does not exist as specified.
47187    # Try adding .exe or .cmd
47188    if test -f "${new_path}.exe"; then
47189      input_to_shortpath="${new_path}.exe"
47190    elif test -f "${new_path}.cmd"; then
47191      input_to_shortpath="${new_path}.cmd"
47192    else
47193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47194$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47195      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47196$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47197      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47198    fi
47199  else
47200    input_to_shortpath="$new_path"
47201  fi
47202
47203  # Call helper function which possibly converts this using DOS-style short mode.
47204  # If so, the updated path is stored in $new_path.
47205  new_path="$input_to_shortpath"
47206
47207  input_path="$input_to_shortpath"
47208  # Check if we need to convert this using DOS-style short mode. If the path
47209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47210  # take no chances and rewrite it.
47211  # Note: m4 eats our [], so we need to use [ and ] instead.
47212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47213  if test "x$has_forbidden_chars" != x; then
47214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47215    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47216    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47217    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47218      # Going to short mode and back again did indeed matter. Since short mode is
47219      # case insensitive, let's make it lowercase to improve readability.
47220      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47221      # Now convert it back to Unix-style (cygpath)
47222      input_path=`$CYGPATH -u "$shortmode_path"`
47223      new_path="$input_path"
47224    fi
47225  fi
47226
47227  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47228  if test "x$test_cygdrive_prefix" = x; then
47229    # As a simple fix, exclude /usr/bin since it's not a real path.
47230    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47231      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47232      # a path prefixed by /cygdrive for fixpath to work.
47233      new_path="$CYGWIN_ROOT_PATH$input_path"
47234    fi
47235  fi
47236
47237  # remove trailing .exe if any
47238  new_path="${new_path/%.exe/}"
47239
47240    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47241
47242  # First separate the path from the arguments. This will split at the first
47243  # space.
47244  complete="$BUILD_OBJCOPY"
47245  path="${complete%% *}"
47246  tmp="$complete EOL"
47247  arguments="${tmp#* }"
47248
47249  # Input might be given as Windows format, start by converting to
47250  # unix format.
47251  new_path="$path"
47252
47253  windows_path="$new_path"
47254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47255    unix_path=`$CYGPATH -u "$windows_path"`
47256    new_path="$unix_path"
47257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47259    new_path="$unix_path"
47260  fi
47261
47262
47263  # Now try to locate executable using which
47264  new_path=`$WHICH "$new_path" 2> /dev/null`
47265
47266  if test "x$new_path" = x; then
47267    # Oops. Which didn't find the executable.
47268    # The splitting of arguments from the executable at a space might have been incorrect,
47269    # since paths with space are more likely in Windows. Give it another try with the whole
47270    # argument.
47271    path="$complete"
47272    arguments="EOL"
47273    new_path="$path"
47274
47275  windows_path="$new_path"
47276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47277    unix_path=`$CYGPATH -u "$windows_path"`
47278    new_path="$unix_path"
47279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47281    new_path="$unix_path"
47282  fi
47283
47284
47285    new_path=`$WHICH "$new_path" 2> /dev/null`
47286    # bat and cmd files are not always considered executable in MSYS causing which
47287    # to not find them
47288    if test "x$new_path" = x \
47289        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47290        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47291      new_path="$path"
47292
47293  windows_path="$new_path"
47294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47295    unix_path=`$CYGPATH -u "$windows_path"`
47296    new_path="$unix_path"
47297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47299    new_path="$unix_path"
47300  fi
47301
47302    fi
47303
47304    if test "x$new_path" = x; then
47305      # It's still not found. Now this is an unrecoverable error.
47306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47307$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47308      has_space=`$ECHO "$complete" | $GREP " "`
47309      if test "x$has_space" != x; then
47310        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47311$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47312      fi
47313      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47314    fi
47315  fi
47316
47317  # Now new_path has a complete unix path to the binary
47318  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47319    # Keep paths in /bin as-is, but remove trailing .exe if any
47320    new_path="${new_path/%.exe/}"
47321    # Do not save /bin paths to all_fixpath_prefixes!
47322  else
47323    # Not in mixed or Windows style, start by that.
47324    new_path=`cmd //c echo $new_path`
47325
47326  input_path="$new_path"
47327  # Check if we need to convert this using DOS-style short mode. If the path
47328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47329  # take no chances and rewrite it.
47330  # Note: m4 eats our [], so we need to use [ and ] instead.
47331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47332  if test "x$has_forbidden_chars" != x; then
47333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47335  fi
47336
47337    # Output is in $new_path
47338
47339  windows_path="$new_path"
47340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47341    unix_path=`$CYGPATH -u "$windows_path"`
47342    new_path="$unix_path"
47343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47345    new_path="$unix_path"
47346  fi
47347
47348    # remove trailing .exe if any
47349    new_path="${new_path/%.exe/}"
47350
47351    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47352    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47353  fi
47354
47355    else
47356      # We're on a unix platform. Hooray! :)
47357      # First separate the path from the arguments. This will split at the first
47358      # space.
47359      complete="$BUILD_OBJCOPY"
47360      path="${complete%% *}"
47361      tmp="$complete EOL"
47362      arguments="${tmp#* }"
47363
47364      # Cannot rely on the command "which" here since it doesn't always work.
47365      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47366      if test -z "$is_absolute_path"; then
47367        # Path to executable is not absolute. Find it.
47368        IFS_save="$IFS"
47369        IFS=:
47370        for p in $PATH; do
47371          if test -f "$p/$path" && test -x "$p/$path"; then
47372            new_path="$p/$path"
47373            break
47374          fi
47375        done
47376        IFS="$IFS_save"
47377      else
47378        # This is an absolute path, we can use it without further modifications.
47379        new_path="$path"
47380      fi
47381
47382      if test "x$new_path" = x; then
47383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47384$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47385        has_space=`$ECHO "$complete" | $GREP " "`
47386        if test "x$has_space" != x; then
47387          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47388$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47389        fi
47390        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47391      fi
47392    fi
47393
47394    # Now join together the path and the arguments once again
47395    if test "x$arguments" != xEOL; then
47396      new_complete="$new_path ${arguments% *}"
47397    else
47398      new_complete="$new_path"
47399    fi
47400
47401    if test "x$complete" != "x$new_complete"; then
47402      BUILD_OBJCOPY="$new_complete"
47403      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47404$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47405    fi
47406  fi
47407
47408
47409
47410  # Publish this variable in the help.
47411
47412
47413  if [ -z "${BUILD_STRIP+x}" ]; then
47414    # The variable is not set by user, try to locate tool using the code snippet
47415    for ac_prog in strip
47416do
47417  # Extract the first word of "$ac_prog", so it can be a program name with args.
47418set dummy $ac_prog; ac_word=$2
47419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47420$as_echo_n "checking for $ac_word... " >&6; }
47421if ${ac_cv_path_BUILD_STRIP+:} false; then :
47422  $as_echo_n "(cached) " >&6
47423else
47424  case $BUILD_STRIP in
47425  [\\/]* | ?:[\\/]*)
47426  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47427  ;;
47428  *)
47429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47430for as_dir in $PATH
47431do
47432  IFS=$as_save_IFS
47433  test -z "$as_dir" && as_dir=.
47434    for ac_exec_ext in '' $ac_executable_extensions; do
47435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47436    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47438    break 2
47439  fi
47440done
47441  done
47442IFS=$as_save_IFS
47443
47444  ;;
47445esac
47446fi
47447BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47448if test -n "$BUILD_STRIP"; then
47449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47450$as_echo "$BUILD_STRIP" >&6; }
47451else
47452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47453$as_echo "no" >&6; }
47454fi
47455
47456
47457  test -n "$BUILD_STRIP" && break
47458done
47459
47460  else
47461    # The variable is set, but is it from the command line or the environment?
47462
47463    # Try to remove the string !BUILD_STRIP! from our list.
47464    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47465    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47466      # If it failed, the variable was not from the command line. Ignore it,
47467      # but warn the user (except for BASH, which is always set by the calling BASH).
47468      if test "xBUILD_STRIP" != xBASH; then
47469        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47470$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47471      fi
47472      # Try to locate tool using the code snippet
47473      for ac_prog in strip
47474do
47475  # Extract the first word of "$ac_prog", so it can be a program name with args.
47476set dummy $ac_prog; ac_word=$2
47477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47478$as_echo_n "checking for $ac_word... " >&6; }
47479if ${ac_cv_path_BUILD_STRIP+:} false; then :
47480  $as_echo_n "(cached) " >&6
47481else
47482  case $BUILD_STRIP in
47483  [\\/]* | ?:[\\/]*)
47484  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47485  ;;
47486  *)
47487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47488for as_dir in $PATH
47489do
47490  IFS=$as_save_IFS
47491  test -z "$as_dir" && as_dir=.
47492    for ac_exec_ext in '' $ac_executable_extensions; do
47493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47494    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47496    break 2
47497  fi
47498done
47499  done
47500IFS=$as_save_IFS
47501
47502  ;;
47503esac
47504fi
47505BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47506if test -n "$BUILD_STRIP"; then
47507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47508$as_echo "$BUILD_STRIP" >&6; }
47509else
47510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47511$as_echo "no" >&6; }
47512fi
47513
47514
47515  test -n "$BUILD_STRIP" && break
47516done
47517
47518    else
47519      # If it succeeded, then it was overridden by the user. We will use it
47520      # for the tool.
47521
47522      # First remove it from the list of overridden variables, so we can test
47523      # for unknown variables in the end.
47524      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47525
47526      # Check if we try to supply an empty value
47527      if test "x$BUILD_STRIP" = x; then
47528        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47529$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47530        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47531$as_echo_n "checking for BUILD_STRIP... " >&6; }
47532        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47533$as_echo "disabled" >&6; }
47534      else
47535        # Check if the provided tool contains a complete path.
47536        tool_specified="$BUILD_STRIP"
47537        tool_basename="${tool_specified##*/}"
47538        if test "x$tool_basename" = "x$tool_specified"; then
47539          # A command without a complete path is provided, search $PATH.
47540          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47541$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47542          # Extract the first word of "$tool_basename", so it can be a program name with args.
47543set dummy $tool_basename; ac_word=$2
47544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47545$as_echo_n "checking for $ac_word... " >&6; }
47546if ${ac_cv_path_BUILD_STRIP+:} false; then :
47547  $as_echo_n "(cached) " >&6
47548else
47549  case $BUILD_STRIP in
47550  [\\/]* | ?:[\\/]*)
47551  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47552  ;;
47553  *)
47554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47555for as_dir in $PATH
47556do
47557  IFS=$as_save_IFS
47558  test -z "$as_dir" && as_dir=.
47559    for ac_exec_ext in '' $ac_executable_extensions; do
47560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47561    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47563    break 2
47564  fi
47565done
47566  done
47567IFS=$as_save_IFS
47568
47569  ;;
47570esac
47571fi
47572BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47573if test -n "$BUILD_STRIP"; then
47574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47575$as_echo "$BUILD_STRIP" >&6; }
47576else
47577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47578$as_echo "no" >&6; }
47579fi
47580
47581
47582          if test "x$BUILD_STRIP" = x; then
47583            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47584          fi
47585        else
47586          # Otherwise we believe it is a complete path. Use it as it is.
47587          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47588$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47589          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47590$as_echo_n "checking for BUILD_STRIP... " >&6; }
47591          if test ! -x "$tool_specified"; then
47592            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47593$as_echo "not found" >&6; }
47594            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47595          fi
47596          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47597$as_echo "$tool_specified" >&6; }
47598        fi
47599      fi
47600    fi
47601
47602  fi
47603
47604
47605
47606  # Only process if variable expands to non-empty
47607
47608  if test "x$BUILD_STRIP" != x; then
47609    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47610
47611  # First separate the path from the arguments. This will split at the first
47612  # space.
47613  complete="$BUILD_STRIP"
47614  path="${complete%% *}"
47615  tmp="$complete EOL"
47616  arguments="${tmp#* }"
47617
47618  # Input might be given as Windows format, start by converting to
47619  # unix format.
47620  new_path=`$CYGPATH -u "$path"`
47621
47622  # Now try to locate executable using which
47623  new_path=`$WHICH "$new_path" 2> /dev/null`
47624  # bat and cmd files are not always considered executable in cygwin causing which
47625  # to not find them
47626  if test "x$new_path" = x \
47627      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47628      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47629    new_path=`$CYGPATH -u "$path"`
47630  fi
47631  if test "x$new_path" = x; then
47632    # Oops. Which didn't find the executable.
47633    # The splitting of arguments from the executable at a space might have been incorrect,
47634    # since paths with space are more likely in Windows. Give it another try with the whole
47635    # argument.
47636    path="$complete"
47637    arguments="EOL"
47638    new_path=`$CYGPATH -u "$path"`
47639    new_path=`$WHICH "$new_path" 2> /dev/null`
47640    # bat and cmd files are not always considered executable in cygwin causing which
47641    # to not find them
47642    if test "x$new_path" = x \
47643        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47644        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47645      new_path=`$CYGPATH -u "$path"`
47646    fi
47647    if test "x$new_path" = x; then
47648      # It's still not found. Now this is an unrecoverable error.
47649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47650$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47651      has_space=`$ECHO "$complete" | $GREP " "`
47652      if test "x$has_space" != x; then
47653        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47654$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47655      fi
47656      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47657    fi
47658  fi
47659
47660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47663  # "foo.exe" is OK but "foo" is an error.
47664  #
47665  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47666  # It is also a way to make sure we got the proper file name for the real test later on.
47667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47668  if test "x$test_shortpath" = x; then
47669    # Short path failed, file does not exist as specified.
47670    # Try adding .exe or .cmd
47671    if test -f "${new_path}.exe"; then
47672      input_to_shortpath="${new_path}.exe"
47673    elif test -f "${new_path}.cmd"; then
47674      input_to_shortpath="${new_path}.cmd"
47675    else
47676      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47677$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47678      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47679$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47680      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47681    fi
47682  else
47683    input_to_shortpath="$new_path"
47684  fi
47685
47686  # Call helper function which possibly converts this using DOS-style short mode.
47687  # If so, the updated path is stored in $new_path.
47688  new_path="$input_to_shortpath"
47689
47690  input_path="$input_to_shortpath"
47691  # Check if we need to convert this using DOS-style short mode. If the path
47692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47693  # take no chances and rewrite it.
47694  # Note: m4 eats our [], so we need to use [ and ] instead.
47695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47696  if test "x$has_forbidden_chars" != x; then
47697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47698    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47699    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47700    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47701      # Going to short mode and back again did indeed matter. Since short mode is
47702      # case insensitive, let's make it lowercase to improve readability.
47703      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47704      # Now convert it back to Unix-style (cygpath)
47705      input_path=`$CYGPATH -u "$shortmode_path"`
47706      new_path="$input_path"
47707    fi
47708  fi
47709
47710  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47711  if test "x$test_cygdrive_prefix" = x; then
47712    # As a simple fix, exclude /usr/bin since it's not a real path.
47713    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47714      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47715      # a path prefixed by /cygdrive for fixpath to work.
47716      new_path="$CYGWIN_ROOT_PATH$input_path"
47717    fi
47718  fi
47719
47720  # remove trailing .exe if any
47721  new_path="${new_path/%.exe/}"
47722
47723    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47724
47725  # First separate the path from the arguments. This will split at the first
47726  # space.
47727  complete="$BUILD_STRIP"
47728  path="${complete%% *}"
47729  tmp="$complete EOL"
47730  arguments="${tmp#* }"
47731
47732  # Input might be given as Windows format, start by converting to
47733  # unix format.
47734  new_path="$path"
47735
47736  windows_path="$new_path"
47737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47738    unix_path=`$CYGPATH -u "$windows_path"`
47739    new_path="$unix_path"
47740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47742    new_path="$unix_path"
47743  fi
47744
47745
47746  # Now try to locate executable using which
47747  new_path=`$WHICH "$new_path" 2> /dev/null`
47748
47749  if test "x$new_path" = x; then
47750    # Oops. Which didn't find the executable.
47751    # The splitting of arguments from the executable at a space might have been incorrect,
47752    # since paths with space are more likely in Windows. Give it another try with the whole
47753    # argument.
47754    path="$complete"
47755    arguments="EOL"
47756    new_path="$path"
47757
47758  windows_path="$new_path"
47759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47760    unix_path=`$CYGPATH -u "$windows_path"`
47761    new_path="$unix_path"
47762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47764    new_path="$unix_path"
47765  fi
47766
47767
47768    new_path=`$WHICH "$new_path" 2> /dev/null`
47769    # bat and cmd files are not always considered executable in MSYS causing which
47770    # to not find them
47771    if test "x$new_path" = x \
47772        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47773        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47774      new_path="$path"
47775
47776  windows_path="$new_path"
47777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47778    unix_path=`$CYGPATH -u "$windows_path"`
47779    new_path="$unix_path"
47780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47782    new_path="$unix_path"
47783  fi
47784
47785    fi
47786
47787    if test "x$new_path" = x; then
47788      # It's still not found. Now this is an unrecoverable error.
47789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47790$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47791      has_space=`$ECHO "$complete" | $GREP " "`
47792      if test "x$has_space" != x; then
47793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47795      fi
47796      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47797    fi
47798  fi
47799
47800  # Now new_path has a complete unix path to the binary
47801  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47802    # Keep paths in /bin as-is, but remove trailing .exe if any
47803    new_path="${new_path/%.exe/}"
47804    # Do not save /bin paths to all_fixpath_prefixes!
47805  else
47806    # Not in mixed or Windows style, start by that.
47807    new_path=`cmd //c echo $new_path`
47808
47809  input_path="$new_path"
47810  # Check if we need to convert this using DOS-style short mode. If the path
47811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47812  # take no chances and rewrite it.
47813  # Note: m4 eats our [], so we need to use [ and ] instead.
47814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47815  if test "x$has_forbidden_chars" != x; then
47816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47817    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47818  fi
47819
47820    # Output is in $new_path
47821
47822  windows_path="$new_path"
47823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47824    unix_path=`$CYGPATH -u "$windows_path"`
47825    new_path="$unix_path"
47826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47828    new_path="$unix_path"
47829  fi
47830
47831    # remove trailing .exe if any
47832    new_path="${new_path/%.exe/}"
47833
47834    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47835    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47836  fi
47837
47838    else
47839      # We're on a unix platform. Hooray! :)
47840      # First separate the path from the arguments. This will split at the first
47841      # space.
47842      complete="$BUILD_STRIP"
47843      path="${complete%% *}"
47844      tmp="$complete EOL"
47845      arguments="${tmp#* }"
47846
47847      # Cannot rely on the command "which" here since it doesn't always work.
47848      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47849      if test -z "$is_absolute_path"; then
47850        # Path to executable is not absolute. Find it.
47851        IFS_save="$IFS"
47852        IFS=:
47853        for p in $PATH; do
47854          if test -f "$p/$path" && test -x "$p/$path"; then
47855            new_path="$p/$path"
47856            break
47857          fi
47858        done
47859        IFS="$IFS_save"
47860      else
47861        # This is an absolute path, we can use it without further modifications.
47862        new_path="$path"
47863      fi
47864
47865      if test "x$new_path" = x; then
47866        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47867$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47868        has_space=`$ECHO "$complete" | $GREP " "`
47869        if test "x$has_space" != x; then
47870          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47871$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47872        fi
47873        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47874      fi
47875    fi
47876
47877    # Now join together the path and the arguments once again
47878    if test "x$arguments" != xEOL; then
47879      new_complete="$new_path ${arguments% *}"
47880    else
47881      new_complete="$new_path"
47882    fi
47883
47884    if test "x$complete" != "x$new_complete"; then
47885      BUILD_STRIP="$new_complete"
47886      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47887$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47888    fi
47889  fi
47890
47891    # Assume the C compiler is the assembler
47892    BUILD_AS="$BUILD_CC -c"
47893    # Just like for the target compiler, use the compiler as linker
47894    BUILD_LD="$BUILD_CC"
47895    BUILD_LDCXX="$BUILD_CXX"
47896
47897    PATH="$OLDPATH"
47898
47899
47900  COMPILER=$BUILD_CC
47901  COMPILER_NAME=BuildC
47902
47903  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47904    # cc -V output typically looks like
47905    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47906    # or
47907    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47908    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47909    # Check that this is likely to be the Solaris Studio cc.
47910    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47911    if test $? -ne 0; then
47912      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47913      { $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
47914$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47915      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47916$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47917      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47918$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47919      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47920    fi
47921    # Remove usage instructions (if present), and
47922    # collapse compiler output into a single line
47923    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47924        $SED -e 's/ *[Uu]sage:.*//'`
47925    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47926        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47927  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47928    # xlc -qversion output typically looks like
47929    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47930    #     Version: 11.01.0000.0015
47931    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47932    # Check that this is likely to be the IBM XL C compiler.
47933    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47934    if test $? -ne 0; then
47935      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47936      { $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
47937$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47938      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47939$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47940      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47941$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47942      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47943    fi
47944    # Collapse compiler output into a single line
47945    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47946    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47947        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47948  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47949    # There is no specific version flag, but all output starts with a version string.
47950    # First line typically looks something like:
47951    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47952    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47953    # Check that this is likely to be Microsoft CL.EXE.
47954    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47955    if test $? -ne 0; then
47956      { $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
47957$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47958      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47959$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47960      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47961    fi
47962    # Collapse compiler output into a single line
47963    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47964    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47965        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47966  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47967    # gcc --version output typically looks like
47968    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47969    #     Copyright (C) 2013 Free Software Foundation, Inc.
47970    #     This is free software; see the source for copying conditions.  There is NO
47971    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47972    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47973    # Check that this is likely to be GCC.
47974    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47975    if test $? -ne 0; then
47976      { $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
47977$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47978      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47979$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47980      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47981    fi
47982    # Remove Copyright and legalese from version string, and
47983    # collapse into a single line
47984    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47985        $SED -e 's/ *Copyright .*//'`
47986    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47987        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47988  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47989    # clang --version output typically looks like
47990    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47991    #    clang version 3.3 (tags/RELEASE_33/final)
47992    # or
47993    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47994    #    Target: x86_64-pc-linux-gnu
47995    #    Thread model: posix
47996    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47997    # Check that this is likely to be clang
47998    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47999    if test $? -ne 0; then
48000      { $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
48001$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48002      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48003$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48004      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48005    fi
48006    # Collapse compiler output into a single line
48007    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48008    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48009        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48010  else
48011      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48012  fi
48013  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48014  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48015  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48016  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
48017
48018  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48019$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48020
48021
48022  COMPILER=$BUILD_CXX
48023  COMPILER_NAME=BuildC++
48024
48025  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48026    # cc -V output typically looks like
48027    #     cc: Sun C 5.12 Linux_i386 2011/11/16
48028    # or
48029    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48030    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48031    # Check that this is likely to be the Solaris Studio cc.
48032    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /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 -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48038$as_echo "$as_me: The result from running with -V 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    # Remove usage instructions (if present), and
48044    # collapse compiler output into a single line
48045    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48046        $SED -e 's/ *[Uu]sage:.*//'`
48047    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48048        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48049  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48050    # xlc -qversion output typically looks like
48051    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48052    #     Version: 11.01.0000.0015
48053    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48054    # Check that this is likely to be the IBM XL C compiler.
48055    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48056    if test $? -ne 0; then
48057      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48058      { $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
48059$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48060      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48061$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48062      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48063$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48064      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48065    fi
48066    # Collapse compiler output into a single line
48067    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48068    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48069        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48070  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48071    # There is no specific version flag, but all output starts with a version string.
48072    # First line typically looks something like:
48073    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48074    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48075    # Check that this is likely to be Microsoft CL.EXE.
48076    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48077    if test $? -ne 0; then
48078      { $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
48079$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48080      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48081$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48082      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48083    fi
48084    # Collapse compiler output into a single line
48085    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48086    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48087        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48088  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48089    # gcc --version output typically looks like
48090    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48091    #     Copyright (C) 2013 Free Software Foundation, Inc.
48092    #     This is free software; see the source for copying conditions.  There is NO
48093    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48094    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48095    # Check that this is likely to be GCC.
48096    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48097    if test $? -ne 0; then
48098      { $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
48099$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48100      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48101$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48102      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48103    fi
48104    # Remove Copyright and legalese from version string, and
48105    # collapse into a single line
48106    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48107        $SED -e 's/ *Copyright .*//'`
48108    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48109        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48110  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48111    # clang --version output typically looks like
48112    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48113    #    clang version 3.3 (tags/RELEASE_33/final)
48114    # or
48115    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48116    #    Target: x86_64-pc-linux-gnu
48117    #    Thread model: posix
48118    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48119    # Check that this is likely to be clang
48120    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48121    if test $? -ne 0; then
48122      { $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
48123$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48124      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48125$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48126      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48127    fi
48128    # Collapse compiler output into a single line
48129    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48130    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48131        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48132  else
48133      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48134  fi
48135  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48136  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48137  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48138  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
48139
48140  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48141$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48142
48143
48144  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
48145    { $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
48146$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
48147    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48148$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48149  fi
48150
48151  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48152  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48153    { $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
48154$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;}
48155  fi
48156
48157  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48158    { $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
48159$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48160  fi
48161
48162  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48163
48164  else
48165    # If we are not cross compiling, use the normal target compilers for
48166    # building the build platform executables.
48167    BUILD_CC="$CC"
48168    BUILD_CXX="$CXX"
48169    BUILD_LD="$LD"
48170    BUILD_LDCXX="$LDCXX"
48171    BUILD_NM="$NM"
48172    BUILD_AS="$AS"
48173    BUILD_OBJCOPY="$OBJCOPY"
48174    BUILD_STRIP="$STRIP"
48175    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48176    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48177    BUILD_AR="$AR"
48178
48179
48180  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48181    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48182$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48183    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48184$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48185  fi
48186
48187  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48188  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48189    { $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
48190$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;}
48191  fi
48192
48193  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48194    { $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
48195$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48196  fi
48197
48198  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48199
48200  fi
48201
48202
48203
48204
48205
48206
48207
48208
48209
48210
48211
48212
48213
48214
48215  # The package path is used only on macosx?
48216  # FIXME: clean this up, and/or move it elsewhere.
48217  PACKAGE_PATH=/opt/local
48218
48219
48220  # Check for extra potential brokenness.
48221  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48222    # On Windows, double-check that we got the right compiler.
48223    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48224    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48225    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48226      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48227        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
48228      fi
48229    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48230      if test "x$COMPILER_CPU_TEST" != "xx64"; then
48231        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48232      fi
48233    fi
48234  fi
48235
48236  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48237    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48238    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48239    # This is later checked when setting flags.
48240
48241    # "-Og" suppported for GCC 4.8 and later
48242    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
48243
48244
48245
48246
48247
48248
48249
48250
48251
48252
48253
48254
48255
48256
48257
48258
48259
48260
48261
48262
48263
48264
48265
48266
48267
48268
48269
48270
48271
48272
48273
48274
48275
48276
48277
48278
48279
48280
48281
48282
48283
48284
48285
48286
48287
48288
48289
48290    # Execute function body
48291
48292
48293
48294
48295
48296
48297
48298
48299
48300
48301
48302
48303
48304
48305
48306
48307
48308
48309
48310
48311
48312
48313
48314
48315
48316
48317
48318
48319
48320
48321
48322
48323
48324
48325
48326
48327
48328
48329
48330
48331
48332
48333
48334
48335
48336
48337
48338
48339    # Execute function body
48340
48341  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48342$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48343  supports=yes
48344
48345  saved_cflags="$CFLAGS"
48346  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48347  ac_ext=c
48348ac_cpp='$CPP $CPPFLAGS'
48349ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48350ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48351ac_compiler_gnu=$ac_cv_c_compiler_gnu
48352
48353  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48354/* end confdefs.h.  */
48355int i;
48356_ACEOF
48357if ac_fn_c_try_compile "$LINENO"; then :
48358
48359else
48360  supports=no
48361fi
48362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48363  ac_ext=cpp
48364ac_cpp='$CXXCPP $CPPFLAGS'
48365ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48366ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48367ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48368
48369  CFLAGS="$saved_cflags"
48370
48371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48372$as_echo "$supports" >&6; }
48373  if test "x$supports" = "xyes" ; then
48374    :
48375    C_COMP_SUPPORTS="yes"
48376  else
48377    :
48378    C_COMP_SUPPORTS="no"
48379  fi
48380
48381
48382
48383
48384
48385
48386
48387
48388
48389
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
48439    # Execute function body
48440
48441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48442$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48443  supports=yes
48444
48445  saved_cxxflags="$CXXFLAGS"
48446  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48447  ac_ext=cpp
48448ac_cpp='$CXXCPP $CPPFLAGS'
48449ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48450ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48451ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48452
48453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48454/* end confdefs.h.  */
48455int i;
48456_ACEOF
48457if ac_fn_cxx_try_compile "$LINENO"; then :
48458
48459else
48460  supports=no
48461fi
48462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48463  ac_ext=cpp
48464ac_cpp='$CXXCPP $CPPFLAGS'
48465ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48466ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48467ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48468
48469  CXXFLAGS="$saved_cxxflags"
48470
48471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48472$as_echo "$supports" >&6; }
48473  if test "x$supports" = "xyes" ; then
48474    :
48475    CXX_COMP_SUPPORTS="yes"
48476  else
48477    :
48478    CXX_COMP_SUPPORTS="no"
48479  fi
48480
48481
48482
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48494$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48495  supports=no
48496  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48497
48498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48499$as_echo "$supports" >&6; }
48500  if test "x$supports" = "xyes" ; then
48501    :
48502    HAS_CFLAG_OPTIMIZE_DEBUG=true
48503  else
48504    :
48505    HAS_CFLAG_OPTIMIZE_DEBUG=false
48506  fi
48507
48508
48509
48510
48511
48512
48513
48514    # "-z relro" supported in GNU binutils 2.17 and later
48515    LINKER_RELRO_FLAG="-Wl,-z,relro"
48516
48517
48518
48519
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530
48531
48532
48533
48534
48535
48536
48537
48538
48539
48540
48541
48542
48543
48544
48545
48546
48547
48548
48549
48550
48551
48552
48553
48554
48555
48556
48557
48558
48559
48560
48561
48562
48563    # Execute function body
48564
48565  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48566$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48567  supports=yes
48568
48569  saved_ldflags="$LDFLAGS"
48570  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48571  ac_ext=c
48572ac_cpp='$CPP $CPPFLAGS'
48573ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48574ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48575ac_compiler_gnu=$ac_cv_c_compiler_gnu
48576
48577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48578/* end confdefs.h.  */
48579
48580int
48581main ()
48582{
48583
48584  ;
48585  return 0;
48586}
48587_ACEOF
48588if ac_fn_c_try_link "$LINENO"; then :
48589
48590else
48591  supports=no
48592fi
48593rm -f core conftest.err conftest.$ac_objext \
48594    conftest$ac_exeext conftest.$ac_ext
48595  ac_ext=cpp
48596ac_cpp='$CXXCPP $CPPFLAGS'
48597ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48598ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48599ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48600
48601  LDFLAGS="$saved_ldflags"
48602
48603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48604$as_echo "$supports" >&6; }
48605  if test "x$supports" = "xyes" ; then
48606    :
48607    HAS_LINKER_RELRO=true
48608  else
48609    :
48610    HAS_LINKER_RELRO=false
48611  fi
48612
48613
48614
48615
48616
48617
48618
48619
48620
48621
48622
48623
48624
48625    # "-z now" supported in GNU binutils 2.11 and later
48626    LINKER_NOW_FLAG="-Wl,-z,now"
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
48663
48664
48665
48666
48667
48668
48669
48670
48671
48672
48673
48674    # Execute function body
48675
48676  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48677$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48678  supports=yes
48679
48680  saved_ldflags="$LDFLAGS"
48681  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48682  ac_ext=c
48683ac_cpp='$CPP $CPPFLAGS'
48684ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48685ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48686ac_compiler_gnu=$ac_cv_c_compiler_gnu
48687
48688  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48689/* end confdefs.h.  */
48690
48691int
48692main ()
48693{
48694
48695  ;
48696  return 0;
48697}
48698_ACEOF
48699if ac_fn_c_try_link "$LINENO"; then :
48700
48701else
48702  supports=no
48703fi
48704rm -f core conftest.err conftest.$ac_objext \
48705    conftest$ac_exeext conftest.$ac_ext
48706  ac_ext=cpp
48707ac_cpp='$CXXCPP $CPPFLAGS'
48708ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48709ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48710ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48711
48712  LDFLAGS="$saved_ldflags"
48713
48714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48715$as_echo "$supports" >&6; }
48716  if test "x$supports" = "xyes" ; then
48717    :
48718    HAS_LINKER_NOW=true
48719  else
48720    :
48721    HAS_LINKER_NOW=false
48722  fi
48723
48724
48725
48726
48727
48728
48729
48730
48731
48732
48733
48734
48735  fi
48736
48737  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48738  # in executable.'
48739  USING_BROKEN_SUSE_LD=no
48740  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48741    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48742$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48743    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48744    $ECHO "int main() { }" > main.c
48745    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48746      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48747$as_echo "no" >&6; }
48748      USING_BROKEN_SUSE_LD=no
48749    else
48750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48751$as_echo "yes" >&6; }
48752      USING_BROKEN_SUSE_LD=yes
48753    fi
48754    $RM version-script.map main.c a.out
48755  fi
48756
48757
48758  # Setup hotspot lecagy names for toolchains
48759  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48760  if test "x$TOOLCHAIN_TYPE" = xclang; then
48761    HOTSPOT_TOOLCHAIN_TYPE=gcc
48762  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48763    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48764  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48765    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48766  fi
48767
48768
48769
48770# Setup the JTReg Regression Test Harness.
48771
48772
48773# Check whether --with-jtreg was given.
48774if test "${with_jtreg+set}" = set; then :
48775  withval=$with_jtreg;
48776fi
48777
48778
48779  if test "x$with_jtreg" = xno; then
48780    # jtreg disabled
48781    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48782$as_echo_n "checking for jtreg test harness... " >&6; }
48783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5
48784$as_echo "no, disabled" >&6; }
48785  elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
48786    # An explicit path is specified, use it.
48787    JT_HOME="$with_jtreg"
48788    if test ! -d "$JT_HOME"; then
48789      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5
48790    fi
48791
48792    if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48793      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5
48794    fi
48795
48796    JTREGEXE="$JT_HOME/bin/jtreg"
48797    if test ! -x "$JTREGEXE"; then
48798      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5
48799    fi
48800
48801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48802$as_echo_n "checking for jtreg test harness... " >&6; }
48803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48804$as_echo "$JT_HOME" >&6; }
48805  else
48806    # Try to locate jtreg
48807    if test "x$JT_HOME" != x; then
48808      # JT_HOME set in environment, use it
48809      if test ! -d "$JT_HOME"; then
48810        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5
48811$as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;}
48812        JT_HOME=
48813      else
48814        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48815          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5
48816$as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;}
48817          JT_HOME=
48818        elif test ! -x "$JT_HOME/bin/jtreg"; then
48819          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5
48820$as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;}
48821          JT_HOME=
48822        else
48823          JTREGEXE="$JT_HOME/bin/jtreg"
48824          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5
48825$as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;}
48826        fi
48827      fi
48828    fi
48829
48830    if test "x$JT_HOME" = x; then
48831      # JT_HOME is not set in environment, or was deemed invalid.
48832      # Try to find jtreg on path
48833
48834
48835  # Publish this variable in the help.
48836
48837
48838  if [ -z "${JTREGEXE+x}" ]; then
48839    # The variable is not set by user, try to locate tool using the code snippet
48840    for ac_prog in jtreg
48841do
48842  # Extract the first word of "$ac_prog", so it can be a program name with args.
48843set dummy $ac_prog; ac_word=$2
48844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48845$as_echo_n "checking for $ac_word... " >&6; }
48846if ${ac_cv_path_JTREGEXE+:} false; then :
48847  $as_echo_n "(cached) " >&6
48848else
48849  case $JTREGEXE in
48850  [\\/]* | ?:[\\/]*)
48851  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48852  ;;
48853  *)
48854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48855for as_dir in $PATH
48856do
48857  IFS=$as_save_IFS
48858  test -z "$as_dir" && as_dir=.
48859    for ac_exec_ext in '' $ac_executable_extensions; do
48860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48861    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48863    break 2
48864  fi
48865done
48866  done
48867IFS=$as_save_IFS
48868
48869  ;;
48870esac
48871fi
48872JTREGEXE=$ac_cv_path_JTREGEXE
48873if test -n "$JTREGEXE"; then
48874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48875$as_echo "$JTREGEXE" >&6; }
48876else
48877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48878$as_echo "no" >&6; }
48879fi
48880
48881
48882  test -n "$JTREGEXE" && break
48883done
48884
48885  else
48886    # The variable is set, but is it from the command line or the environment?
48887
48888    # Try to remove the string !JTREGEXE! from our list.
48889    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48890    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48891      # If it failed, the variable was not from the command line. Ignore it,
48892      # but warn the user (except for BASH, which is always set by the calling BASH).
48893      if test "xJTREGEXE" != xBASH; then
48894        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48895$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48896      fi
48897      # Try to locate tool using the code snippet
48898      for ac_prog in jtreg
48899do
48900  # Extract the first word of "$ac_prog", so it can be a program name with args.
48901set dummy $ac_prog; ac_word=$2
48902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48903$as_echo_n "checking for $ac_word... " >&6; }
48904if ${ac_cv_path_JTREGEXE+:} false; then :
48905  $as_echo_n "(cached) " >&6
48906else
48907  case $JTREGEXE in
48908  [\\/]* | ?:[\\/]*)
48909  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48910  ;;
48911  *)
48912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48913for as_dir in $PATH
48914do
48915  IFS=$as_save_IFS
48916  test -z "$as_dir" && as_dir=.
48917    for ac_exec_ext in '' $ac_executable_extensions; do
48918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48919    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48921    break 2
48922  fi
48923done
48924  done
48925IFS=$as_save_IFS
48926
48927  ;;
48928esac
48929fi
48930JTREGEXE=$ac_cv_path_JTREGEXE
48931if test -n "$JTREGEXE"; then
48932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48933$as_echo "$JTREGEXE" >&6; }
48934else
48935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48936$as_echo "no" >&6; }
48937fi
48938
48939
48940  test -n "$JTREGEXE" && break
48941done
48942
48943    else
48944      # If it succeeded, then it was overridden by the user. We will use it
48945      # for the tool.
48946
48947      # First remove it from the list of overridden variables, so we can test
48948      # for unknown variables in the end.
48949      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48950
48951      # Check if we try to supply an empty value
48952      if test "x$JTREGEXE" = x; then
48953        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48954$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48956$as_echo_n "checking for JTREGEXE... " >&6; }
48957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48958$as_echo "disabled" >&6; }
48959      else
48960        # Check if the provided tool contains a complete path.
48961        tool_specified="$JTREGEXE"
48962        tool_basename="${tool_specified##*/}"
48963        if test "x$tool_basename" = "x$tool_specified"; then
48964          # A command without a complete path is provided, search $PATH.
48965          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48966$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48967          # Extract the first word of "$tool_basename", so it can be a program name with args.
48968set dummy $tool_basename; ac_word=$2
48969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48970$as_echo_n "checking for $ac_word... " >&6; }
48971if ${ac_cv_path_JTREGEXE+:} false; then :
48972  $as_echo_n "(cached) " >&6
48973else
48974  case $JTREGEXE in
48975  [\\/]* | ?:[\\/]*)
48976  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48977  ;;
48978  *)
48979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48980for as_dir in $PATH
48981do
48982  IFS=$as_save_IFS
48983  test -z "$as_dir" && as_dir=.
48984    for ac_exec_ext in '' $ac_executable_extensions; do
48985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48986    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48988    break 2
48989  fi
48990done
48991  done
48992IFS=$as_save_IFS
48993
48994  ;;
48995esac
48996fi
48997JTREGEXE=$ac_cv_path_JTREGEXE
48998if test -n "$JTREGEXE"; then
48999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49000$as_echo "$JTREGEXE" >&6; }
49001else
49002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49003$as_echo "no" >&6; }
49004fi
49005
49006
49007          if test "x$JTREGEXE" = x; then
49008            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49009          fi
49010        else
49011          # Otherwise we believe it is a complete path. Use it as it is.
49012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
49013$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
49014          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49015$as_echo_n "checking for JTREGEXE... " >&6; }
49016          if test ! -x "$tool_specified"; then
49017            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49018$as_echo "not found" >&6; }
49019            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
49020          fi
49021          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49022$as_echo "$tool_specified" >&6; }
49023        fi
49024      fi
49025    fi
49026
49027  fi
49028
49029
49030      if test "x$JTREGEXE" != x; then
49031        # That's good, now try to derive JT_HOME
49032        JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
49033        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
49034          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5
49035$as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;}
49036          JT_HOME=
49037          JTREGEXE=
49038        else
49039          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5
49040$as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;}
49041        fi
49042      fi
49043    fi
49044
49045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
49046$as_echo_n "checking for jtreg test harness... " >&6; }
49047    if test "x$JT_HOME" != x; then
49048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
49049$as_echo "$JT_HOME" >&6; }
49050    else
49051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5
49052$as_echo "no, not found" >&6; }
49053
49054      if test "x$with_jtreg" = xyes; then
49055        as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5
49056      fi
49057    fi
49058  fi
49059
49060
49061  # Only process if variable expands to non-empty
49062
49063  if test "x$JTREGEXE" != x; then
49064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49065
49066  # First separate the path from the arguments. This will split at the first
49067  # space.
49068  complete="$JTREGEXE"
49069  path="${complete%% *}"
49070  tmp="$complete EOL"
49071  arguments="${tmp#* }"
49072
49073  # Input might be given as Windows format, start by converting to
49074  # unix format.
49075  new_path=`$CYGPATH -u "$path"`
49076
49077  # Now try to locate executable using which
49078  new_path=`$WHICH "$new_path" 2> /dev/null`
49079  # bat and cmd files are not always considered executable in cygwin causing which
49080  # to not find them
49081  if test "x$new_path" = x \
49082      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49083      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49084    new_path=`$CYGPATH -u "$path"`
49085  fi
49086  if test "x$new_path" = x; then
49087    # Oops. Which didn't find the executable.
49088    # The splitting of arguments from the executable at a space might have been incorrect,
49089    # since paths with space are more likely in Windows. Give it another try with the whole
49090    # argument.
49091    path="$complete"
49092    arguments="EOL"
49093    new_path=`$CYGPATH -u "$path"`
49094    new_path=`$WHICH "$new_path" 2> /dev/null`
49095    # bat and cmd files are not always considered executable in cygwin causing which
49096    # to not find them
49097    if test "x$new_path" = x \
49098        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49099        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49100      new_path=`$CYGPATH -u "$path"`
49101    fi
49102    if test "x$new_path" = x; then
49103      # It's still not found. Now this is an unrecoverable error.
49104      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49105$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49106      has_space=`$ECHO "$complete" | $GREP " "`
49107      if test "x$has_space" != x; then
49108        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49109$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49110      fi
49111      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49112    fi
49113  fi
49114
49115  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49116  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49117  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49118  # "foo.exe" is OK but "foo" is an error.
49119  #
49120  # This test is therefore slightly more accurate than "test -f" to check for file presence.
49121  # It is also a way to make sure we got the proper file name for the real test later on.
49122  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49123  if test "x$test_shortpath" = x; then
49124    # Short path failed, file does not exist as specified.
49125    # Try adding .exe or .cmd
49126    if test -f "${new_path}.exe"; then
49127      input_to_shortpath="${new_path}.exe"
49128    elif test -f "${new_path}.cmd"; then
49129      input_to_shortpath="${new_path}.cmd"
49130    else
49131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&5
49132$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&6;}
49133      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
49134$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
49135      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49136    fi
49137  else
49138    input_to_shortpath="$new_path"
49139  fi
49140
49141  # Call helper function which possibly converts this using DOS-style short mode.
49142  # If so, the updated path is stored in $new_path.
49143  new_path="$input_to_shortpath"
49144
49145  input_path="$input_to_shortpath"
49146  # Check if we need to convert this using DOS-style short mode. If the path
49147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49148  # take no chances and rewrite it.
49149  # Note: m4 eats our [], so we need to use [ and ] instead.
49150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49151  if test "x$has_forbidden_chars" != x; then
49152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49153    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49154    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49155    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49156      # Going to short mode and back again did indeed matter. Since short mode is
49157      # case insensitive, let's make it lowercase to improve readability.
49158      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49159      # Now convert it back to Unix-style (cygpath)
49160      input_path=`$CYGPATH -u "$shortmode_path"`
49161      new_path="$input_path"
49162    fi
49163  fi
49164
49165  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49166  if test "x$test_cygdrive_prefix" = x; then
49167    # As a simple fix, exclude /usr/bin since it's not a real path.
49168    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
49169      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49170      # a path prefixed by /cygdrive for fixpath to work.
49171      new_path="$CYGWIN_ROOT_PATH$input_path"
49172    fi
49173  fi
49174
49175  # remove trailing .exe if any
49176  new_path="${new_path/%.exe/}"
49177
49178    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49179
49180  # First separate the path from the arguments. This will split at the first
49181  # space.
49182  complete="$JTREGEXE"
49183  path="${complete%% *}"
49184  tmp="$complete EOL"
49185  arguments="${tmp#* }"
49186
49187  # Input might be given as Windows format, start by converting to
49188  # unix format.
49189  new_path="$path"
49190
49191  windows_path="$new_path"
49192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49193    unix_path=`$CYGPATH -u "$windows_path"`
49194    new_path="$unix_path"
49195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49197    new_path="$unix_path"
49198  fi
49199
49200
49201  # Now try to locate executable using which
49202  new_path=`$WHICH "$new_path" 2> /dev/null`
49203
49204  if test "x$new_path" = x; then
49205    # Oops. Which didn't find the executable.
49206    # The splitting of arguments from the executable at a space might have been incorrect,
49207    # since paths with space are more likely in Windows. Give it another try with the whole
49208    # argument.
49209    path="$complete"
49210    arguments="EOL"
49211    new_path="$path"
49212
49213  windows_path="$new_path"
49214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49215    unix_path=`$CYGPATH -u "$windows_path"`
49216    new_path="$unix_path"
49217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49219    new_path="$unix_path"
49220  fi
49221
49222
49223    new_path=`$WHICH "$new_path" 2> /dev/null`
49224    # bat and cmd files are not always considered executable in MSYS causing which
49225    # to not find them
49226    if test "x$new_path" = x \
49227        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49228        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49229      new_path="$path"
49230
49231  windows_path="$new_path"
49232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49233    unix_path=`$CYGPATH -u "$windows_path"`
49234    new_path="$unix_path"
49235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49237    new_path="$unix_path"
49238  fi
49239
49240    fi
49241
49242    if test "x$new_path" = x; then
49243      # It's still not found. Now this is an unrecoverable error.
49244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49245$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49246      has_space=`$ECHO "$complete" | $GREP " "`
49247      if test "x$has_space" != x; then
49248        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49249$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49250      fi
49251      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49252    fi
49253  fi
49254
49255  # Now new_path has a complete unix path to the binary
49256  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
49257    # Keep paths in /bin as-is, but remove trailing .exe if any
49258    new_path="${new_path/%.exe/}"
49259    # Do not save /bin paths to all_fixpath_prefixes!
49260  else
49261    # Not in mixed or Windows style, start by that.
49262    new_path=`cmd //c echo $new_path`
49263
49264  input_path="$new_path"
49265  # Check if we need to convert this using DOS-style short mode. If the path
49266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49267  # take no chances and rewrite it.
49268  # Note: m4 eats our [], so we need to use [ and ] instead.
49269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49270  if test "x$has_forbidden_chars" != x; then
49271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49272    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49273  fi
49274
49275    # Output is in $new_path
49276
49277  windows_path="$new_path"
49278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49279    unix_path=`$CYGPATH -u "$windows_path"`
49280    new_path="$unix_path"
49281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49283    new_path="$unix_path"
49284  fi
49285
49286    # remove trailing .exe if any
49287    new_path="${new_path/%.exe/}"
49288
49289    # Save the first 10 bytes of this path to the storage, so fixpath can work.
49290    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49291  fi
49292
49293    else
49294      # We're on a unix platform. Hooray! :)
49295      # First separate the path from the arguments. This will split at the first
49296      # space.
49297      complete="$JTREGEXE"
49298      path="${complete%% *}"
49299      tmp="$complete EOL"
49300      arguments="${tmp#* }"
49301
49302      # Cannot rely on the command "which" here since it doesn't always work.
49303      is_absolute_path=`$ECHO "$path" | $GREP ^/`
49304      if test -z "$is_absolute_path"; then
49305        # Path to executable is not absolute. Find it.
49306        IFS_save="$IFS"
49307        IFS=:
49308        for p in $PATH; do
49309          if test -f "$p/$path" && test -x "$p/$path"; then
49310            new_path="$p/$path"
49311            break
49312          fi
49313        done
49314        IFS="$IFS_save"
49315      else
49316        # This is an absolute path, we can use it without further modifications.
49317        new_path="$path"
49318      fi
49319
49320      if test "x$new_path" = x; then
49321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49322$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49323        has_space=`$ECHO "$complete" | $GREP " "`
49324        if test "x$has_space" != x; then
49325          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
49326$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
49327        fi
49328        as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49329      fi
49330    fi
49331
49332    # Now join together the path and the arguments once again
49333    if test "x$arguments" != xEOL; then
49334      new_complete="$new_path ${arguments% *}"
49335    else
49336      new_complete="$new_path"
49337    fi
49338
49339    if test "x$complete" != "x$new_complete"; then
49340      JTREGEXE="$new_complete"
49341      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JTREGEXE to \"$new_complete\"" >&5
49342$as_echo "$as_me: Rewriting JTREGEXE to \"$new_complete\"" >&6;}
49343    fi
49344  fi
49345
49346
49347  # Only process if variable expands to non-empty
49348
49349  if test "x$JT_HOME" != x; then
49350    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49351
49352  # Input might be given as Windows format, start by converting to
49353  # unix format.
49354  path="$JT_HOME"
49355  new_path=`$CYGPATH -u "$path"`
49356
49357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49360  # "foo.exe" is OK but "foo" is an error.
49361  #
49362  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49363  # It is also a way to make sure we got the proper file name for the real test later on.
49364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49365  if test "x$test_shortpath" = x; then
49366    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49367$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49368    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
49369  fi
49370
49371  # Call helper function which possibly converts this using DOS-style short mode.
49372  # If so, the updated path is stored in $new_path.
49373
49374  input_path="$new_path"
49375  # Check if we need to convert this using DOS-style short mode. If the path
49376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49377  # take no chances and rewrite it.
49378  # Note: m4 eats our [], so we need to use [ and ] instead.
49379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49380  if test "x$has_forbidden_chars" != x; then
49381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49385      # Going to short mode and back again did indeed matter. Since short mode is
49386      # case insensitive, let's make it lowercase to improve readability.
49387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49388      # Now convert it back to Unix-style (cygpath)
49389      input_path=`$CYGPATH -u "$shortmode_path"`
49390      new_path="$input_path"
49391    fi
49392  fi
49393
49394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49395  if test "x$test_cygdrive_prefix" = x; then
49396    # As a simple fix, exclude /usr/bin since it's not a real path.
49397    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49399      # a path prefixed by /cygdrive for fixpath to work.
49400      new_path="$CYGWIN_ROOT_PATH$input_path"
49401    fi
49402  fi
49403
49404
49405  if test "x$path" != "x$new_path"; then
49406    JT_HOME="$new_path"
49407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49408$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49409  fi
49410
49411    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49412
49413  path="$JT_HOME"
49414  has_colon=`$ECHO $path | $GREP ^.:`
49415  new_path="$path"
49416  if test "x$has_colon" = x; then
49417    # Not in mixed or Windows style, start by that.
49418    new_path=`cmd //c echo $path`
49419  fi
49420
49421
49422  input_path="$new_path"
49423  # Check if we need to convert this using DOS-style short mode. If the path
49424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49425  # take no chances and rewrite it.
49426  # Note: m4 eats our [], so we need to use [ and ] instead.
49427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49428  if test "x$has_forbidden_chars" != x; then
49429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49431  fi
49432
49433
49434  windows_path="$new_path"
49435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49436    unix_path=`$CYGPATH -u "$windows_path"`
49437    new_path="$unix_path"
49438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49440    new_path="$unix_path"
49441  fi
49442
49443  if test "x$path" != "x$new_path"; then
49444    JT_HOME="$new_path"
49445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49446$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49447  fi
49448
49449  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49450  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49451
49452    else
49453      # We're on a unix platform. Hooray! :)
49454      path="$JT_HOME"
49455      has_space=`$ECHO "$path" | $GREP " "`
49456      if test "x$has_space" != x; then
49457        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49458$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49459        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49460      fi
49461
49462      # Use eval to expand a potential ~
49463      eval path="$path"
49464      if test ! -f "$path" && test ! -d "$path"; then
49465        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
49466      fi
49467
49468      if test -d "$path"; then
49469        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
49470      else
49471        dir="`$DIRNAME "$path"`"
49472        base="`$BASENAME "$path"`"
49473        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
49474      fi
49475    fi
49476  fi
49477
49478
49479
49480
49481
49482# Setup Jib dependency tool
49483
49484
49485# Check whether --with-jib was given.
49486if test "${with_jib+set}" = set; then :
49487  withval=$with_jib;
49488fi
49489
49490
49491  if test "x$with_jib" = xno || test "x$with_jib" = x; then
49492    # jib disabled
49493    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49494$as_echo_n "checking for jib... " >&6; }
49495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49496$as_echo "no" >&6; }
49497  elif test "x$with_jib" = xyes; then
49498    as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
49499  else
49500    JIB_HOME="${with_jib}"
49501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49502$as_echo_n "checking for jib... " >&6; }
49503    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
49504$as_echo "${JIB_HOME}" >&6; }
49505    if test ! -d "${JIB_HOME}"; then
49506      as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
49507    fi
49508    JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
49509    if test ! -f "${JIB_JAR}"; then
49510      as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
49511    fi
49512  fi
49513
49514
49515
49516
49517
49518  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
49519  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
49520  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
49521  #                              commands produced by the link step (currently AIX only)
49522  if test "x$TOOLCHAIN_TYPE" = xxlc; then
49523    COMPILER_TARGET_BITS_FLAG="-q"
49524    COMPILER_COMMAND_FILE_FLAG="-f"
49525    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
49526  else
49527    COMPILER_TARGET_BITS_FLAG="-m"
49528    COMPILER_COMMAND_FILE_FLAG="@"
49529    COMPILER_BINDCMD_FILE_FLAG=""
49530
49531    # The solstudio linker does not support @-files.
49532    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49533      COMPILER_COMMAND_FILE_FLAG=
49534    fi
49535
49536    # Check if @file is supported by gcc
49537    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49538      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
49539$as_echo_n "checking if @file is supported by gcc... " >&6; }
49540      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
49541      $ECHO "" "--version" > command.file
49542      if $CXX @command.file 2>&5 >&5; then
49543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49544$as_echo "yes" >&6; }
49545        COMPILER_COMMAND_FILE_FLAG="@"
49546      else
49547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49548$as_echo "no" >&6; }
49549        COMPILER_COMMAND_FILE_FLAG=
49550      fi
49551      $RM command.file
49552    fi
49553  fi
49554
49555
49556
49557
49558  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49559  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49560    ARFLAGS="-r"
49561  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49562    ARFLAGS="-X64"
49563  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49564    # lib.exe is used as AR to create static libraries.
49565    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49566  else
49567    ARFLAGS=""
49568  fi
49569
49570
49571  ## Setup strip.
49572  # FIXME: should this really be per platform, or should it be per toolchain type?
49573  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49574  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49575  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49576    STRIPFLAGS="-g"
49577  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49578    STRIPFLAGS="-x"
49579  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49580    STRIPFLAGS="-S"
49581  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49582    STRIPFLAGS="-X32_64"
49583  fi
49584
49585
49586
49587  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49588    CC_OUT_OPTION=-Fo
49589    EXE_OUT_OPTION=-out:
49590    LD_OUT_OPTION=-out:
49591    AR_OUT_OPTION=-out:
49592  else
49593    # The option used to specify the target .o,.a or .so file.
49594    # When compiling, how to specify the to be created object file.
49595    CC_OUT_OPTION='-o$(SPACE)'
49596    # When linking, how to specify the to be created executable.
49597    EXE_OUT_OPTION='-o$(SPACE)'
49598    # When linking, how to specify the to be created dynamically linkable library.
49599    LD_OUT_OPTION='-o$(SPACE)'
49600    # When archiving, how to specify the to be create static archive for object files.
49601    AR_OUT_OPTION='rcs$(SPACE)'
49602  fi
49603
49604
49605
49606
49607
49608  # On Windows, we need to set RC flags.
49609  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49610    RC_FLAGS="-nologo -l0x409"
49611    JVM_RCFLAGS="-nologo"
49612    if test "x$DEBUG_LEVEL" = xrelease; then
49613      RC_FLAGS="$RC_FLAGS -DNDEBUG"
49614      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49615    fi
49616
49617    # The version variables used to create RC_FLAGS may be overridden
49618    # in a custom configure script, or possibly the command line.
49619    # Let those variables be expanded at make time in spec.gmk.
49620    # The \$ are escaped to the shell, and the $(...) variables
49621    # are evaluated by make.
49622    RC_FLAGS="$RC_FLAGS \
49623        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49624        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49625        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49626        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49627        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49628        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49629        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49630
49631    JVM_RCFLAGS="$JVM_RCFLAGS \
49632        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49633        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49634        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49635        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49636        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49637        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49638        -D\"HS_FNAME=jvm.dll\" \
49639        -D\"HS_INTERNAL_NAME=jvm\""
49640  fi
49641
49642
49643
49644  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49645    # silence copyright notice and other headers.
49646    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49647  fi
49648
49649
49650# Now we can test some aspects on the target using configure macros.
49651
49652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49653$as_echo_n "checking for ANSI C header files... " >&6; }
49654if ${ac_cv_header_stdc+:} false; then :
49655  $as_echo_n "(cached) " >&6
49656else
49657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49658/* end confdefs.h.  */
49659#include <stdlib.h>
49660#include <stdarg.h>
49661#include <string.h>
49662#include <float.h>
49663
49664int
49665main ()
49666{
49667
49668  ;
49669  return 0;
49670}
49671_ACEOF
49672if ac_fn_cxx_try_compile "$LINENO"; then :
49673  ac_cv_header_stdc=yes
49674else
49675  ac_cv_header_stdc=no
49676fi
49677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49678
49679if test $ac_cv_header_stdc = yes; then
49680  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49681  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49682/* end confdefs.h.  */
49683#include <string.h>
49684
49685_ACEOF
49686if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49687  $EGREP "memchr" >/dev/null 2>&1; then :
49688
49689else
49690  ac_cv_header_stdc=no
49691fi
49692rm -f conftest*
49693
49694fi
49695
49696if test $ac_cv_header_stdc = yes; then
49697  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49699/* end confdefs.h.  */
49700#include <stdlib.h>
49701
49702_ACEOF
49703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49704  $EGREP "free" >/dev/null 2>&1; then :
49705
49706else
49707  ac_cv_header_stdc=no
49708fi
49709rm -f conftest*
49710
49711fi
49712
49713if test $ac_cv_header_stdc = yes; then
49714  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49715  if test "$cross_compiling" = yes; then :
49716  :
49717else
49718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49719/* end confdefs.h.  */
49720#include <ctype.h>
49721#include <stdlib.h>
49722#if ((' ' & 0x0FF) == 0x020)
49723# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49724# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49725#else
49726# define ISLOWER(c) \
49727		   (('a' <= (c) && (c) <= 'i') \
49728		     || ('j' <= (c) && (c) <= 'r') \
49729		     || ('s' <= (c) && (c) <= 'z'))
49730# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49731#endif
49732
49733#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49734int
49735main ()
49736{
49737  int i;
49738  for (i = 0; i < 256; i++)
49739    if (XOR (islower (i), ISLOWER (i))
49740	|| toupper (i) != TOUPPER (i))
49741      return 2;
49742  return 0;
49743}
49744_ACEOF
49745if ac_fn_cxx_try_run "$LINENO"; then :
49746
49747else
49748  ac_cv_header_stdc=no
49749fi
49750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49751  conftest.$ac_objext conftest.beam conftest.$ac_ext
49752fi
49753
49754fi
49755fi
49756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49757$as_echo "$ac_cv_header_stdc" >&6; }
49758if test $ac_cv_header_stdc = yes; then
49759
49760$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49761
49762fi
49763
49764# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49765for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49766		  inttypes.h stdint.h unistd.h
49767do :
49768  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49769ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49770"
49771if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49772  cat >>confdefs.h <<_ACEOF
49773#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49774_ACEOF
49775
49776fi
49777
49778done
49779
49780
49781
49782  ###############################################################################
49783  #
49784  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49785  # (The JVM can use 32 or 64 bit Java pointers but that decision
49786  # is made at runtime.)
49787  #
49788
49789  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49790    # Always specify -m flag on Solaris
49791    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49792
49793  # When we add flags to the "official" CFLAGS etc, we need to
49794  # keep track of these additions in ADDED_CFLAGS etc. These
49795  # will later be checked to make sure only controlled additions
49796  # have been made to CFLAGS etc.
49797  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49798  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49799  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49800
49801  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49802  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49803  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49804
49805  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49806  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49807  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49808
49809  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49810  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49811  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49812
49813  elif test "x$COMPILE_TYPE" = xreduced; then
49814    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49815      # Specify -m if running reduced on unix platforms
49816
49817  # When we add flags to the "official" CFLAGS etc, we need to
49818  # keep track of these additions in ADDED_CFLAGS etc. These
49819  # will later be checked to make sure only controlled additions
49820  # have been made to CFLAGS etc.
49821  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49822  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49823  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49824
49825  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49826  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49827  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49828
49829  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49830  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49831  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49832
49833  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49834  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49835  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49836
49837    fi
49838  fi
49839  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49840    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49841    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49842    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49843  fi
49844
49845  # Make compilation sanity check
49846  for ac_header in stdio.h
49847do :
49848  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49849if test "x$ac_cv_header_stdio_h" = xyes; then :
49850  cat >>confdefs.h <<_ACEOF
49851#define HAVE_STDIO_H 1
49852_ACEOF
49853
49854else
49855
49856    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49857$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49858    if test "x$COMPILE_TYPE" = xreduced; then
49859
49860  # Print a helpful message on how to acquire the necessary build dependency.
49861  # reduced is the help tag: freetype, cups, alsa etc
49862  MISSING_DEPENDENCY=reduced
49863
49864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49865    cygwin_help $MISSING_DEPENDENCY
49866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49867    msys_help $MISSING_DEPENDENCY
49868  else
49869    PKGHANDLER_COMMAND=
49870
49871    case $PKGHANDLER in
49872      apt-get)
49873        apt_help     $MISSING_DEPENDENCY ;;
49874      yum)
49875        yum_help     $MISSING_DEPENDENCY ;;
49876      brew)
49877        brew_help    $MISSING_DEPENDENCY ;;
49878      port)
49879        port_help    $MISSING_DEPENDENCY ;;
49880      pkgutil)
49881        pkgutil_help $MISSING_DEPENDENCY ;;
49882      pkgadd)
49883        pkgadd_help  $MISSING_DEPENDENCY ;;
49884    esac
49885
49886    if test "x$PKGHANDLER_COMMAND" != x; then
49887      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49888    fi
49889  fi
49890
49891      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49892$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49893    elif test "x$COMPILE_TYPE" = xcross; then
49894      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49895$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49896    fi
49897    as_fn_error $? "Cannot continue." "$LINENO" 5
49898
49899fi
49900
49901done
49902
49903
49904  # The cast to long int works around a bug in the HP C Compiler
49905# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49906# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49907# This bug is HP SR number 8606223364.
49908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49909$as_echo_n "checking size of int *... " >&6; }
49910if ${ac_cv_sizeof_int_p+:} false; then :
49911  $as_echo_n "(cached) " >&6
49912else
49913  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49914
49915else
49916  if test "$ac_cv_type_int_p" = yes; then
49917     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49919as_fn_error 77 "cannot compute sizeof (int *)
49920See \`config.log' for more details" "$LINENO" 5; }
49921   else
49922     ac_cv_sizeof_int_p=0
49923   fi
49924fi
49925
49926fi
49927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49928$as_echo "$ac_cv_sizeof_int_p" >&6; }
49929
49930
49931
49932cat >>confdefs.h <<_ACEOF
49933#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49934_ACEOF
49935
49936
49937
49938  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49939  if test "x$ac_cv_sizeof_int_p" = x; then
49940    # The test failed, lets stick to the assumed value.
49941    { $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
49942$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49943  else
49944    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49945
49946    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49947      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49948      # Let's try to implicitely set the compilers target architecture and retry the test
49949      { $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
49950$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;}
49951      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49952$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49953
49954  # When we add flags to the "official" CFLAGS etc, we need to
49955  # keep track of these additions in ADDED_CFLAGS etc. These
49956  # will later be checked to make sure only controlled additions
49957  # have been made to CFLAGS etc.
49958  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49959  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49960  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49961
49962  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49963  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49964  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49965
49966  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49967  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49968  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49969
49970  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49971  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49972  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49973
49974
49975      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49976      unset ac_cv_sizeof_int_p
49977      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49978      cat >>confdefs.h <<_ACEOF
49979#undef SIZEOF_INT_P
49980_ACEOF
49981
49982      # The cast to long int works around a bug in the HP C Compiler
49983# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49984# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49985# This bug is HP SR number 8606223364.
49986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49987$as_echo_n "checking size of int *... " >&6; }
49988if ${ac_cv_sizeof_int_p+:} false; then :
49989  $as_echo_n "(cached) " >&6
49990else
49991  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49992
49993else
49994  if test "$ac_cv_type_int_p" = yes; then
49995     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49996$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49997as_fn_error 77 "cannot compute sizeof (int *)
49998See \`config.log' for more details" "$LINENO" 5; }
49999   else
50000     ac_cv_sizeof_int_p=0
50001   fi
50002fi
50003
50004fi
50005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50006$as_echo "$ac_cv_sizeof_int_p" >&6; }
50007
50008
50009
50010cat >>confdefs.h <<_ACEOF
50011#define SIZEOF_INT_P $ac_cv_sizeof_int_p
50012_ACEOF
50013
50014
50015
50016      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50017
50018      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50019        { $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
50020$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;}
50021        if test "x$COMPILE_TYPE" = xreduced; then
50022
50023  # Print a helpful message on how to acquire the necessary build dependency.
50024  # reduced is the help tag: freetype, cups, alsa etc
50025  MISSING_DEPENDENCY=reduced
50026
50027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50028    cygwin_help $MISSING_DEPENDENCY
50029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50030    msys_help $MISSING_DEPENDENCY
50031  else
50032    PKGHANDLER_COMMAND=
50033
50034    case $PKGHANDLER in
50035      apt-get)
50036        apt_help     $MISSING_DEPENDENCY ;;
50037      yum)
50038        yum_help     $MISSING_DEPENDENCY ;;
50039      brew)
50040        brew_help    $MISSING_DEPENDENCY ;;
50041      port)
50042        port_help    $MISSING_DEPENDENCY ;;
50043      pkgutil)
50044        pkgutil_help $MISSING_DEPENDENCY ;;
50045      pkgadd)
50046        pkgadd_help  $MISSING_DEPENDENCY ;;
50047    esac
50048
50049    if test "x$PKGHANDLER_COMMAND" != x; then
50050      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50051    fi
50052  fi
50053
50054          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
50055$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
50056        elif test "x$COMPILE_TYPE" = xcross; then
50057          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
50058$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
50059        fi
50060        as_fn_error $? "Cannot continue." "$LINENO" 5
50061      fi
50062    fi
50063  fi
50064
50065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
50066$as_echo_n "checking for target address size... " >&6; }
50067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
50068$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
50069
50070
50071  ###############################################################################
50072  #
50073  # Is the target little of big endian?
50074  #
50075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
50076$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
50077if ${ac_cv_c_bigendian+:} false; then :
50078  $as_echo_n "(cached) " >&6
50079else
50080  ac_cv_c_bigendian=unknown
50081    # See if we're dealing with a universal compiler.
50082    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50083/* end confdefs.h.  */
50084#ifndef __APPLE_CC__
50085	       not a universal capable compiler
50086	     #endif
50087	     typedef int dummy;
50088
50089_ACEOF
50090if ac_fn_cxx_try_compile "$LINENO"; then :
50091
50092	# Check for potential -arch flags.  It is not universal unless
50093	# there are at least two -arch flags with different values.
50094	ac_arch=
50095	ac_prev=
50096	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
50097	 if test -n "$ac_prev"; then
50098	   case $ac_word in
50099	     i?86 | x86_64 | ppc | ppc64)
50100	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
50101		 ac_arch=$ac_word
50102	       else
50103		 ac_cv_c_bigendian=universal
50104		 break
50105	       fi
50106	       ;;
50107	   esac
50108	   ac_prev=
50109	 elif test "x$ac_word" = "x-arch"; then
50110	   ac_prev=arch
50111	 fi
50112       done
50113fi
50114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50115    if test $ac_cv_c_bigendian = unknown; then
50116      # See if sys/param.h defines the BYTE_ORDER macro.
50117      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50118/* end confdefs.h.  */
50119#include <sys/types.h>
50120	     #include <sys/param.h>
50121
50122int
50123main ()
50124{
50125#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
50126		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
50127		     && LITTLE_ENDIAN)
50128	      bogus endian macros
50129	     #endif
50130
50131  ;
50132  return 0;
50133}
50134_ACEOF
50135if ac_fn_cxx_try_compile "$LINENO"; then :
50136  # It does; now see whether it defined to BIG_ENDIAN or not.
50137	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50138/* end confdefs.h.  */
50139#include <sys/types.h>
50140		#include <sys/param.h>
50141
50142int
50143main ()
50144{
50145#if BYTE_ORDER != BIG_ENDIAN
50146		 not big endian
50147		#endif
50148
50149  ;
50150  return 0;
50151}
50152_ACEOF
50153if ac_fn_cxx_try_compile "$LINENO"; then :
50154  ac_cv_c_bigendian=yes
50155else
50156  ac_cv_c_bigendian=no
50157fi
50158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50159fi
50160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50161    fi
50162    if test $ac_cv_c_bigendian = unknown; then
50163      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
50164      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50165/* end confdefs.h.  */
50166#include <limits.h>
50167
50168int
50169main ()
50170{
50171#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
50172	      bogus endian macros
50173	     #endif
50174
50175  ;
50176  return 0;
50177}
50178_ACEOF
50179if ac_fn_cxx_try_compile "$LINENO"; then :
50180  # It does; now see whether it defined to _BIG_ENDIAN or not.
50181	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50182/* end confdefs.h.  */
50183#include <limits.h>
50184
50185int
50186main ()
50187{
50188#ifndef _BIG_ENDIAN
50189		 not big endian
50190		#endif
50191
50192  ;
50193  return 0;
50194}
50195_ACEOF
50196if ac_fn_cxx_try_compile "$LINENO"; then :
50197  ac_cv_c_bigendian=yes
50198else
50199  ac_cv_c_bigendian=no
50200fi
50201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50202fi
50203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50204    fi
50205    if test $ac_cv_c_bigendian = unknown; then
50206      # Compile a test program.
50207      if test "$cross_compiling" = yes; then :
50208  # Try to guess by grepping values from an object file.
50209	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50210/* end confdefs.h.  */
50211short int ascii_mm[] =
50212		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
50213		short int ascii_ii[] =
50214		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
50215		int use_ascii (int i) {
50216		  return ascii_mm[i] + ascii_ii[i];
50217		}
50218		short int ebcdic_ii[] =
50219		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
50220		short int ebcdic_mm[] =
50221		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
50222		int use_ebcdic (int i) {
50223		  return ebcdic_mm[i] + ebcdic_ii[i];
50224		}
50225		extern int foo;
50226
50227int
50228main ()
50229{
50230return use_ascii (foo) == use_ebcdic (foo);
50231  ;
50232  return 0;
50233}
50234_ACEOF
50235if ac_fn_cxx_try_compile "$LINENO"; then :
50236  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
50237	      ac_cv_c_bigendian=yes
50238	    fi
50239	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
50240	      if test "$ac_cv_c_bigendian" = unknown; then
50241		ac_cv_c_bigendian=no
50242	      else
50243		# finding both strings is unlikely to happen, but who knows?
50244		ac_cv_c_bigendian=unknown
50245	      fi
50246	    fi
50247fi
50248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50249else
50250  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50251/* end confdefs.h.  */
50252$ac_includes_default
50253int
50254main ()
50255{
50256
50257	     /* Are we little or big endian?  From Harbison&Steele.  */
50258	     union
50259	     {
50260	       long int l;
50261	       char c[sizeof (long int)];
50262	     } u;
50263	     u.l = 1;
50264	     return u.c[sizeof (long int) - 1] == 1;
50265
50266  ;
50267  return 0;
50268}
50269_ACEOF
50270if ac_fn_cxx_try_run "$LINENO"; then :
50271  ac_cv_c_bigendian=no
50272else
50273  ac_cv_c_bigendian=yes
50274fi
50275rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50276  conftest.$ac_objext conftest.beam conftest.$ac_ext
50277fi
50278
50279    fi
50280fi
50281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
50282$as_echo "$ac_cv_c_bigendian" >&6; }
50283 case $ac_cv_c_bigendian in #(
50284   yes)
50285     ENDIAN="big";; #(
50286   no)
50287     ENDIAN="little" ;; #(
50288   universal)
50289     ENDIAN="universal_endianness"
50290     ;; #(
50291   *)
50292     ENDIAN="unknown" ;;
50293 esac
50294
50295
50296  if test "x$ENDIAN" = xuniversal_endianness; then
50297    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
50298  fi
50299  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
50300    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
50301  fi
50302
50303
50304# Configure flags for the tools
50305
50306  ###############################################################################
50307  #
50308  # How to compile shared libraries.
50309  #
50310
50311  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50312    PICFLAG="-fPIC"
50313    C_FLAG_REORDER=''
50314    CXX_FLAG_REORDER=''
50315
50316    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50317      # Linking is different on MacOSX
50318      if test "x$STATIC_BUILD" = xtrue; then
50319        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
50320      else
50321        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50322        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50323      fi
50324      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50325      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50326      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50327      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50328    else
50329      # Default works for linux, might work on other platforms as well.
50330      SHARED_LIBRARY_FLAGS='-shared'
50331      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50332      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50333      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50334      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50335    fi
50336  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50337    C_FLAG_REORDER=''
50338    CXX_FLAG_REORDER=''
50339
50340    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50341      # Linking is different on MacOSX
50342      PICFLAG=''
50343      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50344      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50345      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50346      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50347      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50348
50349      if test "x$STATIC_BUILD" = xfalse; then
50350        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
50351      fi
50352    else
50353      # Default works for linux, might work on other platforms as well.
50354      PICFLAG='-fPIC'
50355      SHARED_LIBRARY_FLAGS='-shared'
50356      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50357      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50358      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50359
50360      # arm specific settings
50361      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
50362        # '-Wl,-z,origin' isn't used on arm.
50363        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
50364      else
50365        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50366      fi
50367
50368    fi
50369  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50370    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50371      PICFLAG="-xcode=pic32"
50372    else
50373      PICFLAG="-KPIC"
50374    fi
50375    C_FLAG_REORDER='-xF'
50376    CXX_FLAG_REORDER='-xF'
50377    SHARED_LIBRARY_FLAGS="-G"
50378    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
50379    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50380    SET_SHARED_LIBRARY_NAME='-h $1'
50381    SET_SHARED_LIBRARY_MAPFILE='-M$1'
50382  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50383    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
50384    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
50385    # will have to patch this single instruction with a call to some out-of-order code which
50386    # does the load from the TOC. This is of course slow. But in that case we also would have
50387    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
50388    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
50389    # can be patched directly by the linker and does not require a jump to out-of-order code.
50390    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
50391    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
50392    # loads for accessing a global variable). But there are rumors that this may be seen as a
50393    # 'performance feature' because of improved code locality of the symbols used in a
50394    # compilation unit.
50395    PICFLAG="-qpic"
50396    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50397    C_FLAG_REORDER=''
50398    CXX_FLAG_REORDER=''
50399    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
50400    SET_EXECUTABLE_ORIGIN=""
50401    SET_SHARED_LIBRARY_ORIGIN=''
50402    SET_SHARED_LIBRARY_NAME=''
50403    SET_SHARED_LIBRARY_MAPFILE=''
50404  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50405    PICFLAG=""
50406    C_FLAG_REORDER=''
50407    CXX_FLAG_REORDER=''
50408    SHARED_LIBRARY_FLAGS="-dll"
50409    SET_EXECUTABLE_ORIGIN=''
50410    SET_SHARED_LIBRARY_ORIGIN=''
50411    SET_SHARED_LIBRARY_NAME=''
50412    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
50413  fi
50414
50415
50416
50417
50418
50419
50420
50421
50422
50423  # The (cross) compiler is now configured, we can now test capabilities
50424  # of the target platform.
50425
50426
50427
50428  ###############################################################################
50429  #
50430  # Setup the opt flags for different compilers
50431  # and different operating systems.
50432  #
50433
50434  # FIXME: this was indirectly the old default, but just inherited.
50435  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50436  #   C_FLAG_DEPS="-MMD -MF"
50437  # fi
50438
50439  # Generate make dependency files
50440  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50441    C_FLAG_DEPS="-MMD -MF"
50442  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50443    C_FLAG_DEPS="-MMD -MF"
50444  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50445    C_FLAG_DEPS="-xMMD -xMF"
50446  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50447    C_FLAG_DEPS="-qmakedep=gcc -MF"
50448  fi
50449  CXX_FLAG_DEPS="$C_FLAG_DEPS"
50450
50451
50452
50453  # Debug symbols
50454  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50455    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
50456      # reduce from default "-g2" option to save space
50457      CFLAGS_DEBUG_SYMBOLS="-g1"
50458      CXXFLAGS_DEBUG_SYMBOLS="-g1"
50459    else
50460      CFLAGS_DEBUG_SYMBOLS="-g"
50461      CXXFLAGS_DEBUG_SYMBOLS="-g"
50462    fi
50463  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50464    CFLAGS_DEBUG_SYMBOLS="-g"
50465    CXXFLAGS_DEBUG_SYMBOLS="-g"
50466  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50467    CFLAGS_DEBUG_SYMBOLS="-g -xs"
50468    # -g0 enables debug symbols without disabling inlining.
50469    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
50470  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50471    CFLAGS_DEBUG_SYMBOLS="-g"
50472    CXXFLAGS_DEBUG_SYMBOLS="-g"
50473  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50474    CFLAGS_DEBUG_SYMBOLS="-Zi"
50475    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
50476  fi
50477
50478
50479
50480  # Debug symbols for JVM_CFLAGS
50481  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50482    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
50483    if test "x$DEBUG_LEVEL" = xslowdebug; then
50484      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50485    else
50486      # -g0 does not disable inlining, which -g does.
50487      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
50488    fi
50489  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50490    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
50491  else
50492    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50493  fi
50494
50495
50496  # bounds, memory and behavior checking options
50497  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50498    case $DEBUG_LEVEL in
50499    release )
50500      # no adjustment
50501      ;;
50502    fastdebug )
50503      # no adjustment
50504      ;;
50505    slowdebug )
50506      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
50507      # get's added conditionally on whether we produce debug symbols or not.
50508      # This is most likely not really correct.
50509
50510      # Add runtime stack smashing and undefined behavior checks.
50511      # Not all versions of gcc support -fstack-protector
50512      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
50513
50514
50515
50516
50517
50518
50519
50520
50521
50522
50523
50524
50525
50526
50527
50528
50529
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552
50553
50554
50555    # Execute function body
50556
50557
50558
50559
50560
50561
50562
50563
50564
50565
50566
50567
50568
50569
50570
50571
50572
50573
50574
50575
50576
50577
50578
50579
50580
50581
50582
50583
50584
50585
50586
50587
50588
50589
50590
50591
50592
50593
50594
50595
50596
50597
50598
50599
50600
50601
50602
50603
50604    # Execute function body
50605
50606  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50607$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50608  supports=yes
50609
50610  saved_cflags="$CFLAGS"
50611  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50612  ac_ext=c
50613ac_cpp='$CPP $CPPFLAGS'
50614ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50615ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50616ac_compiler_gnu=$ac_cv_c_compiler_gnu
50617
50618  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50619/* end confdefs.h.  */
50620int i;
50621_ACEOF
50622if ac_fn_c_try_compile "$LINENO"; then :
50623
50624else
50625  supports=no
50626fi
50627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50628  ac_ext=cpp
50629ac_cpp='$CXXCPP $CPPFLAGS'
50630ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50631ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50632ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50633
50634  CFLAGS="$saved_cflags"
50635
50636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50637$as_echo "$supports" >&6; }
50638  if test "x$supports" = "xyes" ; then
50639    :
50640    C_COMP_SUPPORTS="yes"
50641  else
50642    :
50643    C_COMP_SUPPORTS="no"
50644  fi
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704    # Execute function body
50705
50706  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50707$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50708  supports=yes
50709
50710  saved_cxxflags="$CXXFLAGS"
50711  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50712  ac_ext=cpp
50713ac_cpp='$CXXCPP $CPPFLAGS'
50714ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50715ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50716ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50717
50718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50719/* end confdefs.h.  */
50720int i;
50721_ACEOF
50722if ac_fn_cxx_try_compile "$LINENO"; then :
50723
50724else
50725  supports=no
50726fi
50727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50728  ac_ext=cpp
50729ac_cpp='$CXXCPP $CPPFLAGS'
50730ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50731ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50732ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50733
50734  CXXFLAGS="$saved_cxxflags"
50735
50736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50737$as_echo "$supports" >&6; }
50738  if test "x$supports" = "xyes" ; then
50739    :
50740    CXX_COMP_SUPPORTS="yes"
50741  else
50742    :
50743    CXX_COMP_SUPPORTS="no"
50744  fi
50745
50746
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757
50758  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50759$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50760  supports=no
50761  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50762
50763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50764$as_echo "$supports" >&6; }
50765  if test "x$supports" = "xyes" ; then
50766    :
50767
50768  else
50769    :
50770    STACK_PROTECTOR_CFLAG=""
50771  fi
50772
50773
50774
50775
50776
50777
50778
50779      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50780      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50781      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50782        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50783      fi
50784      ;;
50785    esac
50786  fi
50787
50788  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50789    if test "x$DEBUG_LEVEL" != xrelease; then
50790      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50791        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50792      fi
50793    fi
50794  fi
50795
50796  # Optimization levels
50797  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50798    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50799
50800    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50801      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50802      C_O_FLAG_HIGHEST_JVM="-xO4"
50803      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50804      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50805      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50806      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50807      C_O_FLAG_DEBUG_JVM=""
50808      C_O_FLAG_NONE="-xregs=no%frameptr"
50809      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50810      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50811      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50812      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50813      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50814      CXX_O_FLAG_DEBUG_JVM=""
50815      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50816      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50817        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50818        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50819      fi
50820    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50821      C_O_FLAG_HIGHEST_JVM="-xO4"
50822      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50823      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50824      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50825      C_O_FLAG_DEBUG=""
50826      C_O_FLAG_DEBUG_JVM=""
50827      C_O_FLAG_NONE=""
50828      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50829      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50830      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50831      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50832      CXX_O_FLAG_DEBUG=""
50833      CXX_O_FLAG_DEBUG_JVM=""
50834      CXX_O_FLAG_NONE=""
50835    fi
50836  else
50837    # The remaining toolchains share opt flags between CC and CXX;
50838    # setup for C and duplicate afterwards.
50839    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50840      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50841        # On MacOSX we optimize for size, something
50842        # we should do for all platforms?
50843        C_O_FLAG_HIGHEST_JVM="-Os"
50844        C_O_FLAG_HIGHEST="-Os"
50845        C_O_FLAG_HI="-Os"
50846        C_O_FLAG_NORM="-Os"
50847        C_O_FLAG_SIZE="-Os"
50848      else
50849        C_O_FLAG_HIGHEST_JVM="-O3"
50850        C_O_FLAG_HIGHEST="-O3"
50851        C_O_FLAG_HI="-O3"
50852        C_O_FLAG_NORM="-O2"
50853        C_O_FLAG_SIZE="-Os"
50854      fi
50855      C_O_FLAG_DEBUG="-O0"
50856      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50857        C_O_FLAG_DEBUG_JVM=""
50858      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50859        C_O_FLAG_DEBUG_JVM="-O0"
50860      fi
50861      C_O_FLAG_NONE="-O0"
50862    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50863      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50864        # On MacOSX we optimize for size, something
50865        # we should do for all platforms?
50866        C_O_FLAG_HIGHEST_JVM="-Os"
50867        C_O_FLAG_HIGHEST="-Os"
50868        C_O_FLAG_HI="-Os"
50869        C_O_FLAG_NORM="-Os"
50870        C_O_FLAG_SIZE="-Os"
50871      else
50872        C_O_FLAG_HIGHEST_JVM="-O3"
50873        C_O_FLAG_HIGHEST="-O3"
50874        C_O_FLAG_HI="-O3"
50875        C_O_FLAG_NORM="-O2"
50876        C_O_FLAG_SIZE="-Os"
50877      fi
50878      C_O_FLAG_DEBUG="-O0"
50879      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50880        C_O_FLAG_DEBUG_JVM=""
50881      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50882        C_O_FLAG_DEBUG_JVM="-O0"
50883      fi
50884      C_O_FLAG_NONE="-O0"
50885    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50886      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50887      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50888      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50889      C_O_FLAG_NORM="-O2"
50890      C_O_FLAG_DEBUG="-qnoopt"
50891      # FIXME: Value below not verified.
50892      C_O_FLAG_DEBUG_JVM=""
50893      C_O_FLAG_NONE="-qnoopt"
50894    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50895      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50896      C_O_FLAG_HIGHEST="-O2"
50897      C_O_FLAG_HI="-O1"
50898      C_O_FLAG_NORM="-O1"
50899      C_O_FLAG_DEBUG="-Od"
50900      C_O_FLAG_DEBUG_JVM=""
50901      C_O_FLAG_NONE="-Od"
50902      C_O_FLAG_SIZE="-Os"
50903    fi
50904    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50905    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50906    CXX_O_FLAG_HI="$C_O_FLAG_HI"
50907    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50908    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50909    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50910    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50911    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50912  fi
50913
50914  # Adjust optimization flags according to debug level.
50915  case $DEBUG_LEVEL in
50916    release )
50917      # no adjustment
50918      ;;
50919    fastdebug )
50920      # Not quite so much optimization
50921      C_O_FLAG_HI="$C_O_FLAG_NORM"
50922      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50923      ;;
50924    slowdebug )
50925      # Disable optimization
50926      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50927      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50928      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50929      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50930      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50931      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50932      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50933      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50934      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50935      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50936      ;;
50937  esac
50938
50939
50940
50941
50942
50943
50944
50945
50946
50947
50948
50949
50950
50951
50952
50953
50954
50955
50956
50957
50958# Check whether --with-abi-profile was given.
50959if test "${with_abi_profile+set}" = set; then :
50960  withval=$with_abi_profile;
50961fi
50962
50963
50964  if test "x$with_abi_profile" != x; then
50965    if test "x$OPENJDK_TARGET_CPU" != xarm && \
50966        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50967      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50968    fi
50969
50970    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50971    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50972$as_echo_n "checking for ABI profle... " >&6; }
50973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50974$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50975
50976    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50977      ARM_FLOAT_TYPE=vfp-sflt
50978      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50979    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50980      ARM_FLOAT_TYPE=vfp-hflt
50981      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50982    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50983      ARM_FLOAT_TYPE=sflt
50984      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50985    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50986      ARM_FLOAT_TYPE=vfp-sflt
50987      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50988    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50989      ARM_FLOAT_TYPE=vfp-hflt
50990      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50991    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50992      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50993      ARM_FLOAT_TYPE=
50994      ARM_ARCH_TYPE_FLAGS=
50995    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
50996      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50997      ARM_FLOAT_TYPE=
50998      ARM_ARCH_TYPE_FLAGS=
50999    else
51000      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
51001    fi
51002
51003    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
51004      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
51005    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
51006      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
51007    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
51008      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
51009    fi
51010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
51011$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
51012    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
51013$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
51014
51015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
51016$as_echo_n "checking for arch type flags... " >&6; }
51017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
51018$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
51019
51020    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
51021    # autoconf target triplet.
51022     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
51023    # Sanity check that it is a known ABI.
51024    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
51025        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
51026        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
51027          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
51028$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
51029    fi
51030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
51031$as_echo_n "checking for ABI property name... " >&6; }
51032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
51033$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
51034
51035
51036    # Pass these on to the open part of configure as if they were set using
51037    # --with-extra-c[xx]flags.
51038    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51039    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51040    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
51041    # FIXME: This should not really be set using extra_cflags.
51042    if test "x$OPENJDK_TARGET_CPU" = xarm; then
51043        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
51044        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
51045    fi
51046    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
51047    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
51048    # And pass the architecture flags to the linker as well
51049    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51050  fi
51051
51052  # When building with an abi profile, the name of that profile is appended on the
51053  # bundle platform, which is used in bundle names.
51054  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
51055    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
51056  fi
51057
51058
51059  # Optional POSIX functionality needed by the JVM
51060  #
51061  # Check if clock_gettime is available and in which library. This indicates
51062  # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
51063  # don't let it update LIBS.
51064  save_LIBS="$LIBS"
51065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
51066$as_echo_n "checking for library containing clock_gettime... " >&6; }
51067if ${ac_cv_search_clock_gettime+:} false; then :
51068  $as_echo_n "(cached) " >&6
51069else
51070  ac_func_search_save_LIBS=$LIBS
51071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51072/* end confdefs.h.  */
51073
51074/* Override any GCC internal prototype to avoid an error.
51075   Use char because int might match the return type of a GCC
51076   builtin and then its argument prototype would still apply.  */
51077#ifdef __cplusplus
51078extern "C"
51079#endif
51080char clock_gettime ();
51081int
51082main ()
51083{
51084return clock_gettime ();
51085  ;
51086  return 0;
51087}
51088_ACEOF
51089for ac_lib in '' rt; do
51090  if test -z "$ac_lib"; then
51091    ac_res="none required"
51092  else
51093    ac_res=-l$ac_lib
51094    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
51095  fi
51096  if ac_fn_cxx_try_link "$LINENO"; then :
51097  ac_cv_search_clock_gettime=$ac_res
51098fi
51099rm -f core conftest.err conftest.$ac_objext \
51100    conftest$ac_exeext
51101  if ${ac_cv_search_clock_gettime+:} false; then :
51102  break
51103fi
51104done
51105if ${ac_cv_search_clock_gettime+:} false; then :
51106
51107else
51108  ac_cv_search_clock_gettime=no
51109fi
51110rm conftest.$ac_ext
51111LIBS=$ac_func_search_save_LIBS
51112fi
51113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
51114$as_echo "$ac_cv_search_clock_gettime" >&6; }
51115ac_res=$ac_cv_search_clock_gettime
51116if test "$ac_res" != no; then :
51117  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
51118  HAS_CLOCK_GETTIME=true
51119fi
51120
51121  if test "x$LIBS" = "x-lrt "; then
51122    CLOCK_GETTIME_IN_LIBRT=true
51123  fi
51124  LIBS="$save_LIBS"
51125
51126
51127  # Special extras...
51128  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51129    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51130      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51131      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51132    fi
51133    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51134    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51135  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51136    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51137    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51138  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51139    CXXSTD_CXXFLAG="-std=gnu++98"
51140
51141
51142
51143
51144
51145
51146
51147
51148
51149
51150
51151
51152
51153
51154
51155
51156
51157
51158
51159
51160
51161
51162
51163
51164
51165
51166
51167
51168
51169
51170
51171
51172
51173
51174
51175
51176
51177
51178
51179
51180
51181
51182    # Execute function body
51183
51184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
51185$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
51186  supports=yes
51187
51188  saved_cxxflags="$CXXFLAGS"
51189  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
51190  ac_ext=cpp
51191ac_cpp='$CXXCPP $CPPFLAGS'
51192ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51193ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51194ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51195
51196  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51197/* end confdefs.h.  */
51198int i;
51199_ACEOF
51200if ac_fn_cxx_try_compile "$LINENO"; then :
51201
51202else
51203  supports=no
51204fi
51205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51206  ac_ext=cpp
51207ac_cpp='$CXXCPP $CPPFLAGS'
51208ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51209ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51210ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51211
51212  CXXFLAGS="$saved_cxxflags"
51213
51214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51215$as_echo "$supports" >&6; }
51216  if test "x$supports" = "xyes" ; then
51217    :
51218
51219  else
51220    :
51221    CXXSTD_CXXFLAG=""
51222  fi
51223
51224
51225
51226
51227
51228
51229
51230
51231
51232
51233
51234
51235    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
51236    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
51237
51238  fi
51239  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51240    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
51241    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
51242  fi
51243
51244  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
51245  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
51246  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
51247
51248  ###############################################################################
51249  #
51250  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51251  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51252  #
51253
51254  # Setup compiler/platform specific flags into
51255  #    CFLAGS_JDK    - C Compiler flags
51256  #    CXXFLAGS_JDK  - C++ Compiler flags
51257  #    COMMON_CCXXFLAGS_JDK - common to C and C++
51258  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51259    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51260    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51261    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
51262    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51263      # Force compatibility with i586 on 32 bit intel platforms.
51264      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51265      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51266    fi
51267    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51268        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51269    case $OPENJDK_TARGET_CPU_ARCH in
51270      arm )
51271        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51272        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51273        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
51274        ;;
51275      ppc )
51276        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51277        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51278        ;;
51279      s390 )
51280        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51281        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51282        ;;
51283      * )
51284        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51285        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51286        ;;
51287    esac
51288
51289
51290
51291
51292
51293
51294
51295
51296
51297
51298
51299
51300
51301
51302
51303
51304
51305
51306
51307
51308
51309
51310
51311
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342    # Execute function body
51343
51344  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51345  REFERENCE_VERSION=6
51346
51347  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51348    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51349  fi
51350
51351  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51352    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51353  fi
51354
51355  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51356  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51357
51358  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51359    :
51360
51361  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51362  # runs afoul of the more aggressive versions of these optimisations.
51363  # Notably, value range propagation now assumes that the this pointer of C++
51364  # member functions is non-null.
51365  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51366        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51367        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51368$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51369  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51370  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51371
51372  else
51373    :
51374
51375  fi
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51391    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51392
51393    # Restrict the debug information created by Clang to avoid
51394    # too big object files and speed the build up a little bit
51395    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51396    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
51397    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51398      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51399        # Force compatibility with i586 on 32 bit intel platforms.
51400        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51401        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51402      fi
51403      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
51404      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51405          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51406      case $OPENJDK_TARGET_CPU_ARCH in
51407        ppc )
51408          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51409          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51410          ;;
51411        * )
51412          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51413          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51414          ;;
51415      esac
51416    fi
51417  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51418    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
51419    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51420    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
51421      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
51422    fi
51423
51424    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51425    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51426  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51427    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51428    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51429    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51430  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51431    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
51432        -MD -Zc:wchar_t- -W3 -wd4800 \
51433        -DWIN32_LEAN_AND_MEAN \
51434        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51435        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51436        -DWIN32 -DIAL"
51437    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51438      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51439    else
51440      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51441    fi
51442    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51443    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51444    # studio.
51445    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51446      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51447      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51448      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51449    fi
51450  fi
51451
51452  ###############################################################################
51453
51454  # Adjust flags according to debug level.
51455  case $DEBUG_LEVEL in
51456    fastdebug | slowdebug )
51457      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51458      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51459      ;;
51460    release )
51461      ;;
51462    * )
51463      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51464      ;;
51465  esac
51466
51467  # Set some common defines. These works for all compilers, but assume
51468  # -D is universally accepted.
51469
51470  # Setup endianness
51471  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51472    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51473    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51474    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51475    #   Note: -Dmacro         is the same as    #define macro 1
51476    #         -Dmacro=        is the same as    #define macro
51477    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51478      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51479    else
51480      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51481    fi
51482  else
51483    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51484    # are defined in the system?
51485    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51486      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51487    else
51488      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51489    fi
51490  fi
51491
51492  # Always enable optional macros for VM.
51493  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_FORMAT_MACROS"
51494  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_LIMIT_MACROS"
51495  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
51496
51497  # Setup target OS define. Use OS target name but in upper case.
51498  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51499  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
51500
51501  # Setup target CPU
51502  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51503      $OPENJDK_TARGET_ADD_LP64 \
51504      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
51505
51506  # Setup debug/release defines
51507  if test "x$DEBUG_LEVEL" = xrelease; then
51508    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
51509    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51510      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
51511    fi
51512  else
51513    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
51514  fi
51515
51516  # Optional POSIX functionality needed by the VM
51517
51518  if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
51519    JVM_CFLAGS="$JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
51520    if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
51521      JVM_CFLAGS="$JVM_CFLAGS -DNEEDS_LIBRT"
51522    fi
51523  fi
51524
51525
51526  # Set some additional per-OS defines.
51527  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51528    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
51529    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51530        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51531  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51532    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
51533    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
51534        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
51535  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51536    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51537    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
51538    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51539    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51540        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51541        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51542        -fno-omit-frame-pointer"
51543  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51544    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
51545    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51546    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
51547        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51548        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51549  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51550    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51551  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51552    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51553    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
51554  fi
51555
51556  # Set some additional per-CPU defines.
51557  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
51558    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
51559  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51560    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
51561  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
51562    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51563      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51564      # fixes `relocation truncated to fit' error for gcc 4.1.
51565      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
51566      # Use ppc64 instructions, but schedule for power5
51567      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51568    elif test "x$OPENJDK_TARGET_OS" = xaix; then
51569      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
51570    fi
51571  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
51572    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51573      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51574      # Little endian machine uses ELFv2 ABI.
51575      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
51576      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51577      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
51578    fi
51579  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
51580    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51581      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
51582    fi
51583  fi
51584
51585  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51586    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51587  fi
51588
51589  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51590    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
51591      # Solaris does not have _LP64=1 in the old build.
51592      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51593      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
51594    fi
51595  fi
51596
51597  # Set JVM_CFLAGS warning handling
51598  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51599    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51600        -Wunused-value -Woverloaded-virtual"
51601
51602    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51603
51604
51605
51606
51607
51608
51609
51610
51611
51612
51613
51614
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657    # Execute function body
51658
51659  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51660  REFERENCE_VERSION=4.8
51661
51662  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51663    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51664  fi
51665
51666  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51667    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51668  fi
51669
51670  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51671  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51672
51673  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51674    :
51675
51676            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51677            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51678
51679
51680  else
51681    :
51682
51683  fi
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698    fi
51699    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51700      # Non-zero builds have stricter warnings
51701      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51702    else
51703      if test "x$TOOLCHAIN_TYPE" = xclang; then
51704        # Some versions of llvm do not like -Wundef
51705        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51706      fi
51707    fi
51708  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51709    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51710        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51711  fi
51712
51713  # Additional macosx handling
51714  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51715    # Setting these parameters makes it an error to link to macosx APIs that are
51716    # newer than the given OS version and makes the linked binaries compatible
51717    # even if built on a newer version of the OS.
51718    # The expected format is X.Y.Z
51719    MACOSX_VERSION_MIN=10.7.0
51720
51721
51722    # The macro takes the version with no dots, ex: 1070
51723    # Let the flags variables get resolved in make for easier override on make
51724    # command line.
51725    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51726    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51727  fi
51728
51729  # Setup some hard coded includes
51730  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51731      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51732      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51733      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51734      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51735      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51736      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51737
51738  # The shared libraries are compiled using the picflag.
51739  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51740      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51741  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51742      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51743
51744  # Executable flags
51745  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51746  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51747
51748
51749
51750
51751
51752
51753  # Setup LDFLAGS et al.
51754  #
51755
51756  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51757    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51758    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51759    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51760    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51761      LDFLAGS_SAFESH="-safeseh"
51762      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51763      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51764      # NOTE: Old build added -machine. Probably not needed.
51765      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51766    else
51767      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51768    fi
51769  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51770      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51771      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51772        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51773        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51774    fi
51775  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51776    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51777    # We have previously set HAS_GNU_HASH if this is the case
51778    if test -n "$HAS_GNU_HASH"; then
51779      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51780      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51781      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51782    fi
51783      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51784        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51785    fi
51786    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51787      # And since we now know that the linker is gnu, then add -z defs, to forbid
51788      # undefined symbols in object files.
51789      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51790      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51791      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51792      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51793      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51794      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51795        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51796      fi
51797      case $DEBUG_LEVEL in
51798        release )
51799          # tell linker to optimize libraries.
51800          # Should this be supplied to the OSS linker as well?
51801          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51802          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51803          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51804          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51805            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51806          fi
51807          ;;
51808        slowdebug )
51809          # Hotspot always let the linker optimize
51810          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51811          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51812            # do relocations at load
51813            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51814            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51815            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51816          fi
51817          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51818            # mark relocations read only
51819            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51820            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51821            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51822          fi
51823          ;;
51824        fastdebug )
51825          # Hotspot always let the linker optimize
51826          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51827          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51828            # mark relocations read only
51829            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51830            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51831            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51832          fi
51833          ;;
51834        * )
51835          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51836          ;;
51837        esac
51838    fi
51839  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51840    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51841    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51842    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51843    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51844    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51845    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51846      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51847    fi
51848  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51849    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51850    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51851    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51852  fi
51853
51854  # Customize LDFLAGS for executables
51855
51856  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51857
51858  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51859    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51860      LDFLAGS_STACK_SIZE=1048576
51861    else
51862      LDFLAGS_STACK_SIZE=327680
51863    fi
51864    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51865  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51866    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51867  fi
51868
51869  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51870
51871  # Customize LDFLAGS for libs
51872  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51873
51874  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51875  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51876    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51877        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51878    JDKLIB_LIBS=""
51879  else
51880    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51881        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51882
51883    if test "xTARGET" = "xTARGET"; then
51884      # On some platforms (mac) the linker warns about non existing -L dirs.
51885      # For any of the variants server, client or minimal, the dir matches the
51886      # variant name. The "main" variant should be used for linking. For the
51887      # rest, the dir is just server.
51888      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51889          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51890        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51891            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51892      else
51893        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51894            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51895      fi
51896    elif test "xTARGET" = "xBUILD"; then
51897      # When building a buildjdk, it's always only the server variant
51898      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51899          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51900    fi
51901
51902    JDKLIB_LIBS="-ljava -ljvm"
51903    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51904      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51905    fi
51906
51907  fi
51908
51909LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51910
51911  # Set JVM_LIBS (per os)
51912  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51913    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51914  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51915    # FIXME: This hard-coded path is not really proper.
51916    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51917      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51918    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51919      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51920    fi
51921    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51922        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51923  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51924    JVM_LIBS="$JVM_LIBS -lm"
51925  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51926    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51927  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51928    JVM_LIBS="$JVM_LIBS -lm"
51929  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51930    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51931        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51932        wsock32.lib winmm.lib version.lib psapi.lib"
51933    fi
51934
51935  # Set JVM_ASFLAGS
51936  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51937    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51938      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51939    fi
51940  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51941    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51942  fi
51943
51944  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960  # Special extras...
51961  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51962    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51963      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51964      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51965    fi
51966    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51967    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51968  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51969    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51970    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51971  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51972    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015    # Execute function body
52016
52017  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
52018$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
52019  supports=yes
52020
52021  saved_cxxflags="$CXXFLAGS"
52022  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
52023  ac_ext=cpp
52024ac_cpp='$CXXCPP $CPPFLAGS'
52025ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52026ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52027ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52028
52029  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52030/* end confdefs.h.  */
52031int i;
52032_ACEOF
52033if ac_fn_cxx_try_compile "$LINENO"; then :
52034
52035else
52036  supports=no
52037fi
52038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52039  ac_ext=cpp
52040ac_cpp='$CXXCPP $CPPFLAGS'
52041ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52042ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52043ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52044
52045  CXXFLAGS="$saved_cxxflags"
52046
52047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52048$as_echo "$supports" >&6; }
52049  if test "x$supports" = "xyes" ; then
52050    :
52051
52052  else
52053    :
52054    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
52055  fi
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52069    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52070
52071  fi
52072  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52073    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
52074    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
52075  fi
52076
52077  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
52078  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
52079  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
52080
52081  ###############################################################################
52082  #
52083  # Now setup the CFLAGS and LDFLAGS for the JDK build.
52084  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
52085  #
52086
52087  # Setup compiler/platform specific flags into
52088  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
52089  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
52090  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
52091  if test "x$TOOLCHAIN_TYPE" = xgcc; then
52092    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52093    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52094    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
52095    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52096      # Force compatibility with i586 on 32 bit intel platforms.
52097      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52098      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52099    fi
52100    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52101        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52102    case $OPENJDK_BUILD_CPU_ARCH in
52103      arm )
52104        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52105        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52106        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
52107        ;;
52108      ppc )
52109        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52110        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52111        ;;
52112      s390 )
52113        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
52114        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52115        ;;
52116      * )
52117        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52118        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52119        ;;
52120    esac
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
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175    # Execute function body
52176
52177  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52178  REFERENCE_VERSION=6
52179
52180  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52181    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52182  fi
52183
52184  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52185    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
52186  fi
52187
52188  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52189  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52190
52191  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52192    :
52193
52194  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
52195  # runs afoul of the more aggressive versions of these optimisations.
52196  # Notably, value range propagation now assumes that the this pointer of C++
52197  # member functions is non-null.
52198  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
52199        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
52200        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
52201$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
52202  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52203  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52204
52205  else
52206    :
52207
52208  fi
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52224    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52225
52226    # Restrict the debug information created by Clang to avoid
52227    # too big object files and speed the build up a little bit
52228    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
52229    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
52230    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52231      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52232        # Force compatibility with i586 on 32 bit intel platforms.
52233        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52234        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52235      fi
52236      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
52237      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52238          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52239      case $OPENJDK_BUILD_CPU_ARCH in
52240        ppc )
52241          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52242          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52243          ;;
52244        * )
52245          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52246          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52247          ;;
52248      esac
52249    fi
52250  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52251    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
52252    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
52253    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
52254      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
52255    fi
52256
52257    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
52258    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
52259  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52260    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52261    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52262    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52263  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52264    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52265        -MD -Zc:wchar_t- -W3 -wd4800 \
52266        -DWIN32_LEAN_AND_MEAN \
52267        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
52268        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
52269        -DWIN32 -DIAL"
52270    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52271      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
52272    else
52273      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
52274    fi
52275    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
52276    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
52277    # studio.
52278    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
52279      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
52280      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
52281      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
52282    fi
52283  fi
52284
52285  ###############################################################################
52286
52287  # Adjust flags according to debug level.
52288  case $DEBUG_LEVEL in
52289    fastdebug | slowdebug )
52290      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
52291      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
52292      ;;
52293    release )
52294      ;;
52295    * )
52296      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52297      ;;
52298  esac
52299
52300  # Set some common defines. These works for all compilers, but assume
52301  # -D is universally accepted.
52302
52303  # Setup endianness
52304  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52305    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
52306    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
52307    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
52308    #   Note: -Dmacro         is the same as    #define macro 1
52309    #         -Dmacro=        is the same as    #define macro
52310    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52311      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
52312    else
52313      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
52314    fi
52315  else
52316    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
52317    # are defined in the system?
52318    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52319      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
52320    else
52321      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
52322    fi
52323  fi
52324
52325  # Always enable optional macros for VM.
52326  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_FORMAT_MACROS"
52327  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_LIMIT_MACROS"
52328  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
52329
52330  # Setup target OS define. Use OS target name but in upper case.
52331  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
52332  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
52333
52334  # Setup target CPU
52335  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52336      $OPENJDK_BUILD_ADD_LP64 \
52337      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
52338
52339  # Setup debug/release defines
52340  if test "x$DEBUG_LEVEL" = xrelease; then
52341    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
52342    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52343      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
52344    fi
52345  else
52346    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
52347  fi
52348
52349  # Optional POSIX functionality needed by the VM
52350
52351  if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
52352    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
52353    if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
52354      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DNEEDS_LIBRT"
52355    fi
52356  fi
52357
52358
52359  # Set some additional per-OS defines.
52360  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52361    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
52362    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
52363        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
52364  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52365    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
52366    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
52367        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
52368  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52369    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
52370    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
52371    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
52372    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
52373        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
52374        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
52375        -fno-omit-frame-pointer"
52376  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52377    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
52378    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52379    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
52380        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
52381        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
52382  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52383    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
52384  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52385    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
52386    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
52387  fi
52388
52389  # Set some additional per-CPU defines.
52390  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
52391    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
52392  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52393    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
52394  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
52395    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52396      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52397      # fixes `relocation truncated to fit' error for gcc 4.1.
52398      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
52399      # Use ppc64 instructions, but schedule for power5
52400      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
52401    elif test "x$OPENJDK_BUILD_OS" = xaix; then
52402      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
52403    fi
52404  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
52405    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52406      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52407      # Little endian machine uses ELFv2 ABI.
52408      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
52409      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
52410      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
52411    fi
52412  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
52413    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52414      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
52415    fi
52416  fi
52417
52418  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52419    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
52420  fi
52421
52422  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
52423    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
52424      # Solaris does not have _LP64=1 in the old build.
52425      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52426      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
52427    fi
52428  fi
52429
52430  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
52431  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52432    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52433        -Wunused-value -Woverloaded-virtual"
52434
52435    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52436
52437
52438
52439
52440
52441
52442
52443
52444
52445
52446
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460
52461
52462
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490    # Execute function body
52491
52492  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52493  REFERENCE_VERSION=4.8
52494
52495  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52496    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52497  fi
52498
52499  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52500    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52501  fi
52502
52503  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52504  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52505
52506  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52507    :
52508
52509            # These flags either do not work or give spurious warnings prior to gcc 4.8.
52510            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52511
52512
52513  else
52514    :
52515
52516  fi
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531    fi
52532    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52533      # Non-zero builds have stricter warnings
52534      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52535    else
52536      if test "x$TOOLCHAIN_TYPE" = xclang; then
52537        # Some versions of llvm do not like -Wundef
52538        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52539      fi
52540    fi
52541  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52542    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52543        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52544  fi
52545
52546  # Additional macosx handling
52547  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52548    # Setting these parameters makes it an error to link to macosx APIs that are
52549    # newer than the given OS version and makes the linked binaries compatible
52550    # even if built on a newer version of the OS.
52551    # The expected format is X.Y.Z
52552    MACOSX_VERSION_MIN=10.7.0
52553
52554
52555    # The macro takes the version with no dots, ex: 1070
52556    # Let the flags variables get resolved in make for easier override on make
52557    # command line.
52558    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52559    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52560  fi
52561
52562  # Setup some hard coded includes
52563  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52564      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52565      -I${JDK_TOPDIR}/src/java.base/share/native/include \
52566      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
52567      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
52568      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
52569      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
52570
52571  # The shared libraries are compiled using the picflag.
52572  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52573      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
52574  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52575      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
52576
52577  # Executable flags
52578  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
52579  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
52580
52581
52582
52583
52584
52585
52586  # Setup LDFLAGS et al.
52587  #
52588
52589  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52590    LDFLAGS_MICROSOFT="-nologo -opt:ref"
52591    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52592    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52593    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
52594      LDFLAGS_SAFESH="-safeseh"
52595      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
52596      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
52597      # NOTE: Old build added -machine. Probably not needed.
52598      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
52599    else
52600      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
52601    fi
52602  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52603      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52604      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52605        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52606        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52607    fi
52608  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52609    # If this is a --hash-style=gnu system, use --hash-style=both, why?
52610    # We have previously set HAS_GNU_HASH if this is the case
52611    if test -n "$HAS_GNU_HASH"; then
52612      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52613      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52614      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52615    fi
52616      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52617        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52618    fi
52619    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52620      # And since we now know that the linker is gnu, then add -z defs, to forbid
52621      # undefined symbols in object files.
52622      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52623      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52624      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52625      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52626      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52627      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52628        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
52629      fi
52630      case $DEBUG_LEVEL in
52631        release )
52632          # tell linker to optimize libraries.
52633          # Should this be supplied to the OSS linker as well?
52634          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52635          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52636          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52637          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52638            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52639          fi
52640          ;;
52641        slowdebug )
52642          # Hotspot always let the linker optimize
52643          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52644          if test "x$HAS_LINKER_NOW" = "xtrue"; then
52645            # do relocations at load
52646            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52647            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52648            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52649          fi
52650          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52651            # mark relocations read only
52652            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52653            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52654            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52655          fi
52656          ;;
52657        fastdebug )
52658          # Hotspot always let the linker optimize
52659          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52660          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52661            # mark relocations read only
52662            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52663            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52664            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52665          fi
52666          ;;
52667        * )
52668          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52669          ;;
52670        esac
52671    fi
52672  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52673    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52674    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52675    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52676    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52677    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52678    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52679      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52680    fi
52681  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52682    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52683    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52684    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52685  fi
52686
52687  # Customize LDFLAGS for executables
52688
52689  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52690
52691  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52692    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52693      LDFLAGS_STACK_SIZE=1048576
52694    else
52695      LDFLAGS_STACK_SIZE=327680
52696    fi
52697    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52698  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52699    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52700  fi
52701
52702  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52703
52704  # Customize LDFLAGS for libs
52705  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52706
52707  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52708  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52709    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52710        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52711    OPENJDK_BUILD_JDKLIB_LIBS=""
52712  else
52713    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52714        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52715
52716    if test "xBUILD" = "xTARGET"; then
52717      # On some platforms (mac) the linker warns about non existing -L dirs.
52718      # For any of the variants server, client or minimal, the dir matches the
52719      # variant name. The "main" variant should be used for linking. For the
52720      # rest, the dir is just server.
52721      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52722          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52723        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52724            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52725      else
52726        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52727            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52728      fi
52729    elif test "xBUILD" = "xBUILD"; then
52730      # When building a buildjdk, it's always only the server variant
52731      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52732          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52733    fi
52734
52735    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52736    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52737      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52738    fi
52739
52740  fi
52741
52742OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52743
52744  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52745  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52746    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52747  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52748    # FIXME: This hard-coded path is not really proper.
52749    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52750      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52751    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52752      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52753    fi
52754    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52755        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52756  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52757    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52758  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52759    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52760  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52761    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52762  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52763    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52764        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52765        wsock32.lib winmm.lib version.lib psapi.lib"
52766    fi
52767
52768  # Set OPENJDK_BUILD_JVM_ASFLAGS
52769  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52770    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52771      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52772    fi
52773  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52774    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52775  fi
52776
52777  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52778
52779
52780
52781
52782
52783
52784
52785
52786
52787
52788
52789
52790
52791
52792
52793  # Tests are only ever compiled for TARGET
52794  # Flags for compiling test libraries
52795  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52796  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52797
52798  # Flags for compiling test executables
52799  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52800  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52801
52802
52803
52804
52805
52806
52807  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52808  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52809
52810
52811
52812
52813
52814
52815  # Check that the compiler supports -mX (or -qX on AIX) flags
52816  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52817
52818
52819
52820
52821
52822
52823
52824
52825
52826
52827
52828
52829
52830
52831
52832
52833
52834
52835
52836
52837
52838
52839
52840
52841
52842
52843
52844
52845
52846
52847
52848
52849
52850
52851
52852
52853
52854
52855
52856
52857
52858
52859
52860
52861
52862
52863
52864    # Execute function body
52865
52866
52867
52868
52869
52870
52871
52872
52873
52874
52875
52876
52877
52878
52879
52880
52881
52882
52883
52884
52885
52886
52887
52888
52889
52890
52891
52892
52893
52894
52895
52896
52897
52898
52899
52900
52901
52902
52903
52904
52905
52906
52907
52908
52909
52910
52911
52912
52913    # Execute function body
52914
52915  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52916$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52917  supports=yes
52918
52919  saved_cflags="$CFLAGS"
52920  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52921  ac_ext=c
52922ac_cpp='$CPP $CPPFLAGS'
52923ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52924ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52925ac_compiler_gnu=$ac_cv_c_compiler_gnu
52926
52927  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52928/* end confdefs.h.  */
52929int i;
52930_ACEOF
52931if ac_fn_c_try_compile "$LINENO"; then :
52932
52933else
52934  supports=no
52935fi
52936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52937  ac_ext=cpp
52938ac_cpp='$CXXCPP $CPPFLAGS'
52939ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52940ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52941ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52942
52943  CFLAGS="$saved_cflags"
52944
52945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52946$as_echo "$supports" >&6; }
52947  if test "x$supports" = "xyes" ; then
52948    :
52949    C_COMP_SUPPORTS="yes"
52950  else
52951    :
52952    C_COMP_SUPPORTS="no"
52953  fi
52954
52955
52956
52957
52958
52959
52960
52961
52962
52963
52964
52965
52966
52967
52968
52969
52970
52971
52972
52973
52974
52975
52976
52977
52978
52979
52980
52981
52982
52983
52984
52985
52986
52987
52988
52989
52990
52991
52992
52993
52994
52995
52996
52997
52998
52999
53000
53001
53002
53003
53004
53005
53006
53007
53008
53009
53010
53011
53012
53013    # Execute function body
53014
53015  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53016$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53017  supports=yes
53018
53019  saved_cxxflags="$CXXFLAGS"
53020  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53021  ac_ext=cpp
53022ac_cpp='$CXXCPP $CPPFLAGS'
53023ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53024ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53025ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53026
53027  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53028/* end confdefs.h.  */
53029int i;
53030_ACEOF
53031if ac_fn_cxx_try_compile "$LINENO"; then :
53032
53033else
53034  supports=no
53035fi
53036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53037  ac_ext=cpp
53038ac_cpp='$CXXCPP $CPPFLAGS'
53039ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53040ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53041ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53042
53043  CXXFLAGS="$saved_cxxflags"
53044
53045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53046$as_echo "$supports" >&6; }
53047  if test "x$supports" = "xyes" ; then
53048    :
53049    CXX_COMP_SUPPORTS="yes"
53050  else
53051    :
53052    CXX_COMP_SUPPORTS="no"
53053  fi
53054
53055
53056
53057
53058
53059
53060
53061
53062
53063
53064
53065
53066
53067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53068$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53069  supports=no
53070  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53071
53072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53073$as_echo "$supports" >&6; }
53074  if test "x$supports" = "xyes" ; then
53075    :
53076    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
53077  else
53078    :
53079    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
53080  fi
53081
53082
53083
53084
53085
53086
53087
53088
53089  # Check whether --enable-warnings-as-errors was given.
53090if test "${enable_warnings_as_errors+set}" = set; then :
53091  enableval=$enable_warnings_as_errors;
53092fi
53093
53094
53095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
53096$as_echo_n "checking if native warnings are errors... " >&6; }
53097  if test "x$enable_warnings_as_errors" = "xyes"; then
53098    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
53099$as_echo "yes (explicitly set)" >&6; }
53100    WARNINGS_AS_ERRORS=true
53101  elif test "x$enable_warnings_as_errors" = "xno"; then
53102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53103$as_echo "no" >&6; }
53104    WARNINGS_AS_ERRORS=false
53105  elif test "x$enable_warnings_as_errors" = "x"; then
53106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
53107$as_echo "yes (default)" >&6; }
53108    WARNINGS_AS_ERRORS=true
53109  else
53110    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
53111  fi
53112
53113
53114
53115  case "${TOOLCHAIN_TYPE}" in
53116    microsoft)
53117      DISABLE_WARNING_PREFIX="-wd"
53118      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
53119      ;;
53120    solstudio)
53121      DISABLE_WARNING_PREFIX="-erroff="
53122      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
53123      ;;
53124    gcc)
53125      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
53126
53127
53128
53129
53130
53131
53132
53133
53134
53135
53136
53137
53138
53139
53140
53141
53142
53143
53144
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    # Execute function body
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
53205
53206
53207
53208
53209
53210
53211
53212
53213
53214
53215
53216
53217
53218
53219
53220
53221
53222    # Execute function body
53223
53224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53225$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53226  supports=yes
53227
53228  saved_cflags="$CFLAGS"
53229  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53230  ac_ext=c
53231ac_cpp='$CPP $CPPFLAGS'
53232ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53233ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53234ac_compiler_gnu=$ac_cv_c_compiler_gnu
53235
53236  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53237/* end confdefs.h.  */
53238int i;
53239_ACEOF
53240if ac_fn_c_try_compile "$LINENO"; then :
53241
53242else
53243  supports=no
53244fi
53245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53246  ac_ext=cpp
53247ac_cpp='$CXXCPP $CPPFLAGS'
53248ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53249ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53250ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53251
53252  CFLAGS="$saved_cflags"
53253
53254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53255$as_echo "$supports" >&6; }
53256  if test "x$supports" = "xyes" ; then
53257    :
53258    C_COMP_SUPPORTS="yes"
53259  else
53260    :
53261    C_COMP_SUPPORTS="no"
53262  fi
53263
53264
53265
53266
53267
53268
53269
53270
53271
53272
53273
53274
53275
53276
53277
53278
53279
53280
53281
53282
53283
53284
53285
53286
53287
53288
53289
53290
53291
53292
53293
53294
53295
53296
53297
53298
53299
53300
53301
53302
53303
53304
53305
53306
53307
53308
53309
53310
53311
53312
53313
53314
53315
53316
53317
53318
53319
53320
53321
53322    # Execute function body
53323
53324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53325$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53326  supports=yes
53327
53328  saved_cxxflags="$CXXFLAGS"
53329  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53330  ac_ext=cpp
53331ac_cpp='$CXXCPP $CPPFLAGS'
53332ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53333ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53334ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53335
53336  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53337/* end confdefs.h.  */
53338int i;
53339_ACEOF
53340if ac_fn_cxx_try_compile "$LINENO"; then :
53341
53342else
53343  supports=no
53344fi
53345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53346  ac_ext=cpp
53347ac_cpp='$CXXCPP $CPPFLAGS'
53348ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53349ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53350ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53351
53352  CXXFLAGS="$saved_cxxflags"
53353
53354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53355$as_echo "$supports" >&6; }
53356  if test "x$supports" = "xyes" ; then
53357    :
53358    CXX_COMP_SUPPORTS="yes"
53359  else
53360    :
53361    CXX_COMP_SUPPORTS="no"
53362  fi
53363
53364
53365
53366
53367
53368
53369
53370
53371
53372
53373
53374
53375
53376  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53377$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53378  supports=no
53379  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53380
53381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53382$as_echo "$supports" >&6; }
53383  if test "x$supports" = "xyes" ; then
53384    :
53385    GCC_CAN_DISABLE_WARNINGS=true
53386  else
53387    :
53388    GCC_CAN_DISABLE_WARNINGS=false
53389
53390  fi
53391
53392
53393
53394
53395
53396
53397      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53398        DISABLE_WARNING_PREFIX="-Wno-"
53399      else
53400        DISABLE_WARNING_PREFIX=
53401      fi
53402      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53403      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
53404      # CFLAGS since any target specific flags will likely not work with the
53405      # build compiler
53406      CC_OLD="$CC"
53407      CXX_OLD="$CXX"
53408      CC="$BUILD_CC"
53409      CXX="$BUILD_CXX"
53410      CFLAGS_OLD="$CFLAGS"
53411      CFLAGS=""
53412
53413
53414
53415
53416
53417
53418
53419
53420
53421
53422
53423
53424
53425
53426
53427
53428
53429
53430
53431
53432
53433
53434
53435
53436
53437
53438
53439
53440
53441
53442
53443
53444
53445
53446
53447
53448
53449
53450
53451
53452
53453
53454
53455
53456
53457
53458
53459    # Execute function body
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    # Execute function body
53509
53510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53511$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53512  supports=yes
53513
53514  saved_cflags="$CFLAGS"
53515  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53516  ac_ext=c
53517ac_cpp='$CPP $CPPFLAGS'
53518ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53519ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53520ac_compiler_gnu=$ac_cv_c_compiler_gnu
53521
53522  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53523/* end confdefs.h.  */
53524int i;
53525_ACEOF
53526if ac_fn_c_try_compile "$LINENO"; then :
53527
53528else
53529  supports=no
53530fi
53531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53532  ac_ext=cpp
53533ac_cpp='$CXXCPP $CPPFLAGS'
53534ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53535ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53536ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53537
53538  CFLAGS="$saved_cflags"
53539
53540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53541$as_echo "$supports" >&6; }
53542  if test "x$supports" = "xyes" ; then
53543    :
53544    C_COMP_SUPPORTS="yes"
53545  else
53546    :
53547    C_COMP_SUPPORTS="no"
53548  fi
53549
53550
53551
53552
53553
53554
53555
53556
53557
53558
53559
53560
53561
53562
53563
53564
53565
53566
53567
53568
53569
53570
53571
53572
53573
53574
53575
53576
53577
53578
53579
53580
53581
53582
53583
53584
53585
53586
53587
53588
53589
53590
53591
53592
53593
53594
53595
53596
53597
53598
53599
53600
53601
53602
53603
53604
53605
53606
53607
53608    # Execute function body
53609
53610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53611$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53612  supports=yes
53613
53614  saved_cxxflags="$CXXFLAGS"
53615  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53616  ac_ext=cpp
53617ac_cpp='$CXXCPP $CPPFLAGS'
53618ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53619ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53620ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53621
53622  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53623/* end confdefs.h.  */
53624int i;
53625_ACEOF
53626if ac_fn_cxx_try_compile "$LINENO"; then :
53627
53628else
53629  supports=no
53630fi
53631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53632  ac_ext=cpp
53633ac_cpp='$CXXCPP $CPPFLAGS'
53634ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53635ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53636ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53637
53638  CXXFLAGS="$saved_cxxflags"
53639
53640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53641$as_echo "$supports" >&6; }
53642  if test "x$supports" = "xyes" ; then
53643    :
53644    CXX_COMP_SUPPORTS="yes"
53645  else
53646    :
53647    CXX_COMP_SUPPORTS="no"
53648  fi
53649
53650
53651
53652
53653
53654
53655
53656
53657
53658
53659
53660
53661
53662  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53663$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53664  supports=no
53665  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53666
53667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53668$as_echo "$supports" >&6; }
53669  if test "x$supports" = "xyes" ; then
53670    :
53671    BUILD_CC_CAN_DISABLE_WARNINGS=true
53672  else
53673    :
53674    BUILD_CC_CAN_DISABLE_WARNINGS=false
53675
53676  fi
53677
53678
53679
53680
53681
53682
53683      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53684        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53685      else
53686        BUILD_CC_DISABLE_WARNING_PREFIX=
53687      fi
53688      CC="$CC_OLD"
53689      CXX="$CXX_OLD"
53690      CFLAGS="$CFLAGS_OLD"
53691      ;;
53692    clang)
53693      DISABLE_WARNING_PREFIX="-Wno-"
53694      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53695      ;;
53696    xlc)
53697      DISABLE_WARNING_PREFIX="-qsuppress="
53698      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53699      ;;
53700  esac
53701
53702
53703
53704
53705
53706# Setup debug symbols (need objcopy from the toolchain for that)
53707
53708  #
53709  # NATIVE_DEBUG_SYMBOLS
53710  # This must be done after the toolchain is setup, since we're looking at objcopy.
53711  #
53712  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53713$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53714
53715# Check whether --with-native-debug-symbols was given.
53716if test "${with_native_debug_symbols+set}" = set; then :
53717  withval=$with_native_debug_symbols;
53718        if test "x$OPENJDK_TARGET_OS" = xaix; then
53719          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53720            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53721          fi
53722        fi
53723
53724else
53725
53726        if test "x$OPENJDK_TARGET_OS" = xaix; then
53727          # AIX doesn't support 'zipped' so use 'internal' as default
53728          with_native_debug_symbols="internal"
53729        else
53730          if test "x$STATIC_BUILD" = xtrue; then
53731            with_native_debug_symbols="none"
53732          else
53733            with_native_debug_symbols="zipped"
53734          fi
53735        fi
53736
53737fi
53738
53739  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53741$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53742
53743  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53744
53745    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53746      if test "x$OBJCOPY" = x; then
53747        # enabling of enable-debug-symbols and can't find objcopy
53748        # this is an error
53749        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53750      fi
53751    fi
53752
53753    COMPILE_WITH_DEBUG_SYMBOLS=true
53754    COPY_DEBUG_SYMBOLS=true
53755    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53756  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53757    COMPILE_WITH_DEBUG_SYMBOLS=false
53758    COPY_DEBUG_SYMBOLS=false
53759    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53760  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53761    COMPILE_WITH_DEBUG_SYMBOLS=true
53762    COPY_DEBUG_SYMBOLS=false
53763    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53764  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53765
53766    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53767      if test "x$OBJCOPY" = x; then
53768        # enabling of enable-debug-symbols and can't find objcopy
53769        # this is an error
53770        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53771      fi
53772    fi
53773
53774    COMPILE_WITH_DEBUG_SYMBOLS=true
53775    COPY_DEBUG_SYMBOLS=true
53776    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53777  else
53778    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53779  fi
53780
53781  # --enable-debug-symbols is deprecated.
53782  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53783
53784  # Check whether --enable-debug-symbols was given.
53785if test "${enable_debug_symbols+set}" = set; then :
53786  enableval=$enable_debug_symbols;
53787fi
53788
53789  if test "x$enable_debug_symbols" != x; then
53790    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53791$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53792
53793    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53794      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53795$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53796    fi
53797
53798  fi
53799
53800
53801  # --enable-zip-debug-info is deprecated.
53802  # Please use --with-native-debug-symbols=zipped .
53803
53804  # Check whether --enable-zip-debug-info was given.
53805if test "${enable_zip_debug_info+set}" = set; then :
53806  enableval=$enable_zip_debug_info;
53807fi
53808
53809  if test "x$enable_zip_debug_info" != x; then
53810    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53811$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53812
53813    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53814      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53815$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53816    fi
53817
53818  fi
53819
53820
53821
53822
53823
53824
53825
53826  # Check whether --enable-native-coverage was given.
53827if test "${enable_native_coverage+set}" = set; then :
53828  enableval=$enable_native_coverage;
53829fi
53830
53831  GCOV_ENABLED="false"
53832  if test "x$enable_native_coverage" = "xyes"; then
53833    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53834      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53835$as_echo_n "checking if native coverage is enabled... " >&6; }
53836      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53837$as_echo "yes" >&6; }
53838      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53839      GCOV_LDFLAGS="-fprofile-arcs"
53840      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53841      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53842      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53843      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53844      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53845      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53846      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53847      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53848      GCOV_ENABLED="true"
53849    else
53850      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53851    fi
53852  elif test "x$enable_native_coverage" = "xno"; then
53853    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53854$as_echo_n "checking if native coverage is enabled... " >&6; }
53855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53856$as_echo "no" >&6; }
53857  elif test "x$enable_native_coverage" != "x"; then
53858    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53859  fi
53860
53861
53862
53863
53864# Need toolchain to setup dtrace
53865
53866  # Test for dtrace dependencies
53867  # Check whether --enable-dtrace was given.
53868if test "${enable_dtrace+set}" = set; then :
53869  enableval=$enable_dtrace;
53870fi
53871
53872
53873  DTRACE_DEP_MISSING=false
53874
53875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53876$as_echo_n "checking for dtrace tool... " >&6; }
53877  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53879$as_echo "$DTRACE" >&6; }
53880  else
53881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53882$as_echo "not found, cannot build dtrace" >&6; }
53883    DTRACE_DEP_MISSING=true
53884  fi
53885
53886  for ac_header in sys/sdt.h
53887do :
53888  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53889if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53890  cat >>confdefs.h <<_ACEOF
53891#define HAVE_SYS_SDT_H 1
53892_ACEOF
53893 DTRACE_HEADERS_OK=yes
53894else
53895  DTRACE_HEADERS_OK=no
53896fi
53897
53898done
53899
53900  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53901    DTRACE_DEP_MISSING=true
53902  fi
53903
53904  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53905$as_echo_n "checking if dtrace should be built... " >&6; }
53906  if test "x$enable_dtrace" = "xyes"; then
53907    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53909$as_echo "no, missing dependencies" >&6; }
53910
53911  # Print a helpful message on how to acquire the necessary build dependency.
53912  # dtrace is the help tag: freetype, cups, alsa etc
53913  MISSING_DEPENDENCY=dtrace
53914
53915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53916    cygwin_help $MISSING_DEPENDENCY
53917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53918    msys_help $MISSING_DEPENDENCY
53919  else
53920    PKGHANDLER_COMMAND=
53921
53922    case $PKGHANDLER in
53923      apt-get)
53924        apt_help     $MISSING_DEPENDENCY ;;
53925      yum)
53926        yum_help     $MISSING_DEPENDENCY ;;
53927      brew)
53928        brew_help    $MISSING_DEPENDENCY ;;
53929      port)
53930        port_help    $MISSING_DEPENDENCY ;;
53931      pkgutil)
53932        pkgutil_help $MISSING_DEPENDENCY ;;
53933      pkgadd)
53934        pkgadd_help  $MISSING_DEPENDENCY ;;
53935    esac
53936
53937    if test "x$PKGHANDLER_COMMAND" != x; then
53938      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53939    fi
53940  fi
53941
53942      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53943    else
53944      INCLUDE_DTRACE=true
53945      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53946$as_echo "yes, forced" >&6; }
53947    fi
53948  elif test "x$enable_dtrace" = "xno"; then
53949    INCLUDE_DTRACE=false
53950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53951$as_echo "no, forced" >&6; }
53952  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53953    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53954      INCLUDE_DTRACE=false
53955      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53956$as_echo "no, missing dependencies" >&6; }
53957    else
53958      INCLUDE_DTRACE=true
53959      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53960$as_echo "yes, dependencies present" >&6; }
53961    fi
53962  else
53963    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53964  fi
53965
53966
53967  # Check whether --enable-aot was given.
53968if test "${enable_aot+set}" = set; then :
53969  enableval=$enable_aot;
53970fi
53971
53972
53973  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
53974    ENABLE_AOT="true"
53975  elif test "x$enable_aot" = "xyes"; then
53976    ENABLE_AOT="true"
53977  elif test "x$enable_aot" = "xno"; then
53978    ENABLE_AOT="false"
53979    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
53980$as_echo_n "checking if aot should be enabled... " >&6; }
53981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53982$as_echo "no, forced" >&6; }
53983  else
53984    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
53985  fi
53986
53987  if test "x$ENABLE_AOT" = "xtrue"; then
53988    # Only enable AOT on X64 platforms.
53989    if test "x$OPENJDK_TARGET_OS" != "xwindows" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
53990      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
53991        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
53992          ENABLE_AOT="true"
53993        else
53994          ENABLE_AOT="false"
53995          if test "x$enable_aot" = "xyes"; then
53996            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
53997          fi
53998        fi
53999      else
54000        ENABLE_AOT="false"
54001        if test "x$enable_aot" = "xyes"; then
54002          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
54003        fi
54004      fi
54005    else
54006      ENABLE_AOT="false"
54007      if test "x$enable_aot" = "xyes"; then
54008        as_fn_error $? "AOT is currently only supported on x86_64. Remove --enable-aot." "$LINENO" 5
54009      fi
54010    fi
54011  fi
54012
54013
54014
54015
54016  # Check whether --enable-hotspot-gtest was given.
54017if test "${enable_hotspot_gtest+set}" = set; then :
54018  enableval=$enable_hotspot_gtest;
54019fi
54020
54021
54022  if test -e "$HOTSPOT_TOPDIR/test/native"; then
54023    GTEST_DIR_EXISTS="true"
54024  else
54025    GTEST_DIR_EXISTS="false"
54026  fi
54027
54028  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
54029$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
54030  if test "x$enable_hotspot_gtest" = "xyes"; then
54031    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54032      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54033$as_echo "yes, forced" >&6; }
54034      BUILD_GTEST="true"
54035    else
54036      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
54037    fi
54038  elif test "x$enable_hotspot_gtest" = "xno"; then
54039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54040$as_echo "no, forced" >&6; }
54041    BUILD_GTEST="false"
54042  elif test "x$enable_hotspot_gtest" = "x"; then
54043    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54044      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54045$as_echo "yes" >&6; }
54046      BUILD_GTEST="true"
54047    else
54048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54049$as_echo "no" >&6; }
54050      BUILD_GTEST="false"
54051    fi
54052  else
54053    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
54054  fi
54055
54056
54057
54058
54059###############################################################################
54060#
54061# Check dependencies for external and internal libraries.
54062#
54063###############################################################################
54064
54065# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
54066
54067  # When using cygwin or msys, we need a wrapper binary that renames
54068  # /cygdrive/c/ arguments into c:/ arguments and peeks into
54069  # @files and rewrites these too! This wrapper binary is
54070  # called fixpath.
54071  FIXPATH=
54072  if test "x$OPENJDK_BUILD_OS" = xwindows; then
54073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
54074$as_echo_n "checking if fixpath can be created... " >&6; }
54075    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
54076    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
54077    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
54078    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
54079      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
54080      FIXPATH="$FIXPATH_BIN -c"
54081    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
54082      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
54083      # @ was chosen as separator to minimize risk of other tools messing around with it
54084      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
54085          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
54086      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
54087      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
54088    fi
54089    FIXPATH_SRC_W="$FIXPATH_SRC"
54090    FIXPATH_BIN_W="$FIXPATH_BIN"
54091
54092  unix_path="$FIXPATH_SRC_W"
54093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54094    windows_path=`$CYGPATH -m "$unix_path"`
54095    FIXPATH_SRC_W="$windows_path"
54096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54097    windows_path=`cmd //c echo $unix_path`
54098    FIXPATH_SRC_W="$windows_path"
54099  fi
54100
54101
54102  unix_path="$FIXPATH_BIN_W"
54103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54104    windows_path=`$CYGPATH -m "$unix_path"`
54105    FIXPATH_BIN_W="$windows_path"
54106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54107    windows_path=`cmd //c echo $unix_path`
54108    FIXPATH_BIN_W="$windows_path"
54109  fi
54110
54111    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
54112    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
54113    cd $FIXPATH_DIR
54114    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
54115    cd $CURDIR
54116
54117    if test ! -x $FIXPATH_BIN; then
54118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54119$as_echo "no" >&6; }
54120      cat $FIXPATH_DIR/fixpath1.log
54121      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
54122    fi
54123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54124$as_echo "yes" >&6; }
54125    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
54126$as_echo_n "checking if fixpath.exe works... " >&6; }
54127    cd $FIXPATH_DIR
54128    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
54129        > $FIXPATH_DIR/fixpath2.log 2>&1
54130    cd $CURDIR
54131    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
54132      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54133$as_echo "no" >&6; }
54134      cat $FIXPATH_DIR/fixpath2.log
54135      as_fn_error $? "fixpath did not work!" "$LINENO" 5
54136    fi
54137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54138$as_echo "yes" >&6; }
54139
54140    FIXPATH_DETACH_FLAG="--detach"
54141  fi
54142
54143
54144
54145
54146
54147
54148  # Check if X11 is needed
54149  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
54150    # No X11 support on windows or macosx
54151    NEEDS_LIB_X11=false
54152  else
54153    # All other instances need X11, even if building headless only, libawt still
54154    # needs X11 headers.
54155    NEEDS_LIB_X11=true
54156  fi
54157
54158  # Check if cups is needed
54159  if test "x$OPENJDK_TARGET_OS" = xwindows; then
54160    # Windows have a separate print system
54161    NEEDS_LIB_CUPS=false
54162  else
54163    NEEDS_LIB_CUPS=true
54164  fi
54165
54166  # A custom hook may have set this already
54167  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
54168    NEEDS_LIB_FREETYPE=true
54169  fi
54170
54171  # Check if alsa is needed
54172  if test "x$OPENJDK_TARGET_OS" = xlinux; then
54173    NEEDS_LIB_ALSA=true
54174  else
54175    NEEDS_LIB_ALSA=false
54176  fi
54177
54178  # Check if ffi is needed
54179  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54180    NEEDS_LIB_FFI=true
54181  else
54182    NEEDS_LIB_FFI=false
54183  fi
54184
54185
54186  # statically link libstdc++ before C++ ABI is stablized on Linux unless
54187  # dynamic build is configured on command line.
54188
54189# Check whether --with-stdc++lib was given.
54190if test "${with_stdc__lib+set}" = set; then :
54191  withval=$with_stdc__lib;
54192        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
54193                && test "x$with_stdc__lib" != xdefault; then
54194          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
54195        fi
54196
54197else
54198  with_stdc__lib=default
54199
54200fi
54201
54202
54203  if test "x$OPENJDK_TARGET_OS" = xlinux; then
54204    # Test if stdc++ can be linked statically.
54205    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
54206$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
54207    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
54208    ac_ext=cpp
54209ac_cpp='$CXXCPP $CPPFLAGS'
54210ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54211ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54212ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54213
54214    OLD_LIBS="$LIBS"
54215    LIBS="$STATIC_STDCXX_FLAGS"
54216    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54217/* end confdefs.h.  */
54218
54219int
54220main ()
54221{
54222return 0;
54223  ;
54224  return 0;
54225}
54226_ACEOF
54227if ac_fn_cxx_try_link "$LINENO"; then :
54228  has_static_libstdcxx=yes
54229else
54230  has_static_libstdcxx=no
54231fi
54232rm -f core conftest.err conftest.$ac_objext \
54233    conftest$ac_exeext conftest.$ac_ext
54234    LIBS="$OLD_LIBS"
54235    ac_ext=cpp
54236ac_cpp='$CXXCPP $CPPFLAGS'
54237ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54238ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54239ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54240
54241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
54242$as_echo "$has_static_libstdcxx" >&6; }
54243
54244    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
54245      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
54246    fi
54247
54248    # If dynamic was requested, it's available since it would fail above otherwise.
54249    # If dynamic wasn't requested, go with static unless it isn't available.
54250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
54251$as_echo_n "checking how to link with libstdc++... " >&6; }
54252    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
54253        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54254      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
54255$as_echo "dynamic" >&6; }
54256    else
54257      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
54258      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54259      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
54260      # just use the same setting as for the TARGET toolchain.
54261      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
54263$as_echo "static" >&6; }
54264    fi
54265  fi
54266
54267  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
54268  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
54269    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
54270  fi
54271
54272
54273
54274  # Setup Windows runtime dlls
54275  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54276
54277
54278# Check whether --with-msvcr-dll was given.
54279if test "${with_msvcr_dll+set}" = set; then :
54280  withval=$with_msvcr_dll;
54281fi
54282
54283
54284  if test "x$with_msvcr_dll" != x; then
54285    # If given explicitly by user, do not probe. If not present, fail directly.
54286
54287  DLL_NAME="$MSVCR_NAME"
54288  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
54289  METHOD="--with-msvcr-dll"
54290  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54291    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54292$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54293
54294    # Need to check if the found msvcr is correct architecture
54295    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54296$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54297    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54298    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54299      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54300      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54301      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54302        CORRECT_MSVCR_ARCH="PE32 executable"
54303      else
54304        CORRECT_MSVCR_ARCH="PE32+ executable"
54305      fi
54306    else
54307      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54308        CORRECT_MSVCR_ARCH=386
54309      else
54310        CORRECT_MSVCR_ARCH=x86-64
54311      fi
54312    fi
54313    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54314      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54315$as_echo "ok" >&6; }
54316      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54317
54318  # Only process if variable expands to non-empty
54319
54320  if test "x$MSVC_DLL" != x; then
54321    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54322
54323  # Input might be given as Windows format, start by converting to
54324  # unix format.
54325  path="$MSVC_DLL"
54326  new_path=`$CYGPATH -u "$path"`
54327
54328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54331  # "foo.exe" is OK but "foo" is an error.
54332  #
54333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54334  # It is also a way to make sure we got the proper file name for the real test later on.
54335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54336  if test "x$test_shortpath" = x; then
54337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54338$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54339    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54340  fi
54341
54342  # Call helper function which possibly converts this using DOS-style short mode.
54343  # If so, the updated path is stored in $new_path.
54344
54345  input_path="$new_path"
54346  # Check if we need to convert this using DOS-style short mode. If the path
54347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54348  # take no chances and rewrite it.
54349  # Note: m4 eats our [], so we need to use [ and ] instead.
54350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54351  if test "x$has_forbidden_chars" != x; then
54352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54356      # Going to short mode and back again did indeed matter. Since short mode is
54357      # case insensitive, let's make it lowercase to improve readability.
54358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54359      # Now convert it back to Unix-style (cygpath)
54360      input_path=`$CYGPATH -u "$shortmode_path"`
54361      new_path="$input_path"
54362    fi
54363  fi
54364
54365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54366  if test "x$test_cygdrive_prefix" = x; then
54367    # As a simple fix, exclude /usr/bin since it's not a real path.
54368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54370      # a path prefixed by /cygdrive for fixpath to work.
54371      new_path="$CYGWIN_ROOT_PATH$input_path"
54372    fi
54373  fi
54374
54375
54376  if test "x$path" != "x$new_path"; then
54377    MSVC_DLL="$new_path"
54378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54379$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54380  fi
54381
54382    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54383
54384  path="$MSVC_DLL"
54385  has_colon=`$ECHO $path | $GREP ^.:`
54386  new_path="$path"
54387  if test "x$has_colon" = x; then
54388    # Not in mixed or Windows style, start by that.
54389    new_path=`cmd //c echo $path`
54390  fi
54391
54392
54393  input_path="$new_path"
54394  # Check if we need to convert this using DOS-style short mode. If the path
54395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54396  # take no chances and rewrite it.
54397  # Note: m4 eats our [], so we need to use [ and ] instead.
54398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54399  if test "x$has_forbidden_chars" != x; then
54400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54402  fi
54403
54404
54405  windows_path="$new_path"
54406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54407    unix_path=`$CYGPATH -u "$windows_path"`
54408    new_path="$unix_path"
54409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54411    new_path="$unix_path"
54412  fi
54413
54414  if test "x$path" != "x$new_path"; then
54415    MSVC_DLL="$new_path"
54416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54417$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54418  fi
54419
54420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54422
54423    else
54424      # We're on a unix platform. Hooray! :)
54425      path="$MSVC_DLL"
54426      has_space=`$ECHO "$path" | $GREP " "`
54427      if test "x$has_space" != x; then
54428        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54429$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54430        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54431      fi
54432
54433      # Use eval to expand a potential ~
54434      eval path="$path"
54435      if test ! -f "$path" && test ! -d "$path"; then
54436        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54437      fi
54438
54439      if test -d "$path"; then
54440        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54441      else
54442        dir="`$DIRNAME "$path"`"
54443        base="`$BASENAME "$path"`"
54444        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54445      fi
54446    fi
54447  fi
54448
54449      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54450$as_echo_n "checking for $DLL_NAME... " >&6; }
54451      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54452$as_echo "$MSVC_DLL" >&6; }
54453    else
54454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54455$as_echo "incorrect, ignoring" >&6; }
54456      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54457$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54458    fi
54459  fi
54460
54461    if test "x$MSVC_DLL" = x; then
54462      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
54463    fi
54464    MSVCR_DLL="$MSVC_DLL"
54465  elif test "x$DEVKIT_MSVCR_DLL" != x; then
54466
54467  DLL_NAME="$MSVCR_NAME"
54468  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
54469  METHOD="devkit"
54470  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54471    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54472$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54473
54474    # Need to check if the found msvcr is correct architecture
54475    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54476$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54477    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54478    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54479      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54480      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54481      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54482        CORRECT_MSVCR_ARCH="PE32 executable"
54483      else
54484        CORRECT_MSVCR_ARCH="PE32+ executable"
54485      fi
54486    else
54487      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54488        CORRECT_MSVCR_ARCH=386
54489      else
54490        CORRECT_MSVCR_ARCH=x86-64
54491      fi
54492    fi
54493    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54495$as_echo "ok" >&6; }
54496      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54497
54498  # Only process if variable expands to non-empty
54499
54500  if test "x$MSVC_DLL" != x; then
54501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54502
54503  # Input might be given as Windows format, start by converting to
54504  # unix format.
54505  path="$MSVC_DLL"
54506  new_path=`$CYGPATH -u "$path"`
54507
54508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54511  # "foo.exe" is OK but "foo" is an error.
54512  #
54513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54514  # It is also a way to make sure we got the proper file name for the real test later on.
54515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54516  if test "x$test_shortpath" = x; then
54517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54518$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54519    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54520  fi
54521
54522  # Call helper function which possibly converts this using DOS-style short mode.
54523  # If so, the updated path is stored in $new_path.
54524
54525  input_path="$new_path"
54526  # Check if we need to convert this using DOS-style short mode. If the path
54527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54528  # take no chances and rewrite it.
54529  # Note: m4 eats our [], so we need to use [ and ] instead.
54530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54531  if test "x$has_forbidden_chars" != x; then
54532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54536      # Going to short mode and back again did indeed matter. Since short mode is
54537      # case insensitive, let's make it lowercase to improve readability.
54538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54539      # Now convert it back to Unix-style (cygpath)
54540      input_path=`$CYGPATH -u "$shortmode_path"`
54541      new_path="$input_path"
54542    fi
54543  fi
54544
54545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54546  if test "x$test_cygdrive_prefix" = x; then
54547    # As a simple fix, exclude /usr/bin since it's not a real path.
54548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54550      # a path prefixed by /cygdrive for fixpath to work.
54551      new_path="$CYGWIN_ROOT_PATH$input_path"
54552    fi
54553  fi
54554
54555
54556  if test "x$path" != "x$new_path"; then
54557    MSVC_DLL="$new_path"
54558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54559$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54560  fi
54561
54562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54563
54564  path="$MSVC_DLL"
54565  has_colon=`$ECHO $path | $GREP ^.:`
54566  new_path="$path"
54567  if test "x$has_colon" = x; then
54568    # Not in mixed or Windows style, start by that.
54569    new_path=`cmd //c echo $path`
54570  fi
54571
54572
54573  input_path="$new_path"
54574  # Check if we need to convert this using DOS-style short mode. If the path
54575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54576  # take no chances and rewrite it.
54577  # Note: m4 eats our [], so we need to use [ and ] instead.
54578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54579  if test "x$has_forbidden_chars" != x; then
54580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54582  fi
54583
54584
54585  windows_path="$new_path"
54586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54587    unix_path=`$CYGPATH -u "$windows_path"`
54588    new_path="$unix_path"
54589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54591    new_path="$unix_path"
54592  fi
54593
54594  if test "x$path" != "x$new_path"; then
54595    MSVC_DLL="$new_path"
54596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54597$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54598  fi
54599
54600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54602
54603    else
54604      # We're on a unix platform. Hooray! :)
54605      path="$MSVC_DLL"
54606      has_space=`$ECHO "$path" | $GREP " "`
54607      if test "x$has_space" != x; then
54608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54609$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54610        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54611      fi
54612
54613      # Use eval to expand a potential ~
54614      eval path="$path"
54615      if test ! -f "$path" && test ! -d "$path"; then
54616        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54617      fi
54618
54619      if test -d "$path"; then
54620        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54621      else
54622        dir="`$DIRNAME "$path"`"
54623        base="`$BASENAME "$path"`"
54624        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54625      fi
54626    fi
54627  fi
54628
54629      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54630$as_echo_n "checking for $DLL_NAME... " >&6; }
54631      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54632$as_echo "$MSVC_DLL" >&6; }
54633    else
54634      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54635$as_echo "incorrect, ignoring" >&6; }
54636      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54637$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54638    fi
54639  fi
54640
54641    if test "x$MSVC_DLL" = x; then
54642      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54643    fi
54644    MSVCR_DLL="$MSVC_DLL"
54645  else
54646
54647  DLL_NAME="${MSVCR_NAME}"
54648  MSVC_DLL=
54649
54650  if test "x$MSVC_DLL" = x; then
54651    # Probe: Using well-known location from Visual Studio 10.0
54652    if test "x$VCINSTALLDIR" != x; then
54653      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54654
54655  windows_path="$CYGWIN_VC_INSTALL_DIR"
54656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54657    unix_path=`$CYGPATH -u "$windows_path"`
54658    CYGWIN_VC_INSTALL_DIR="$unix_path"
54659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54661    CYGWIN_VC_INSTALL_DIR="$unix_path"
54662  fi
54663
54664      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54665        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54666      else
54667        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54668      fi
54669      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54670
54671  DLL_NAME="$DLL_NAME"
54672  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54673  METHOD="well-known location in VCINSTALLDIR"
54674  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54675    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54676$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54677
54678    # Need to check if the found msvcr is correct architecture
54679    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54680$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54681    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54682    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54683      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54684      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54685      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54686        CORRECT_MSVCR_ARCH="PE32 executable"
54687      else
54688        CORRECT_MSVCR_ARCH="PE32+ executable"
54689      fi
54690    else
54691      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54692        CORRECT_MSVCR_ARCH=386
54693      else
54694        CORRECT_MSVCR_ARCH=x86-64
54695      fi
54696    fi
54697    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54698      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54699$as_echo "ok" >&6; }
54700      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54701
54702  # Only process if variable expands to non-empty
54703
54704  if test "x$MSVC_DLL" != x; then
54705    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54706
54707  # Input might be given as Windows format, start by converting to
54708  # unix format.
54709  path="$MSVC_DLL"
54710  new_path=`$CYGPATH -u "$path"`
54711
54712  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54713  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54714  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54715  # "foo.exe" is OK but "foo" is an error.
54716  #
54717  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54718  # It is also a way to make sure we got the proper file name for the real test later on.
54719  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54720  if test "x$test_shortpath" = x; then
54721    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54722$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54723    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54724  fi
54725
54726  # Call helper function which possibly converts this using DOS-style short mode.
54727  # If so, the updated path is stored in $new_path.
54728
54729  input_path="$new_path"
54730  # Check if we need to convert this using DOS-style short mode. If the path
54731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54732  # take no chances and rewrite it.
54733  # Note: m4 eats our [], so we need to use [ and ] instead.
54734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54735  if test "x$has_forbidden_chars" != x; then
54736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54737    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54738    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54739    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54740      # Going to short mode and back again did indeed matter. Since short mode is
54741      # case insensitive, let's make it lowercase to improve readability.
54742      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54743      # Now convert it back to Unix-style (cygpath)
54744      input_path=`$CYGPATH -u "$shortmode_path"`
54745      new_path="$input_path"
54746    fi
54747  fi
54748
54749  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54750  if test "x$test_cygdrive_prefix" = x; then
54751    # As a simple fix, exclude /usr/bin since it's not a real path.
54752    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54753      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54754      # a path prefixed by /cygdrive for fixpath to work.
54755      new_path="$CYGWIN_ROOT_PATH$input_path"
54756    fi
54757  fi
54758
54759
54760  if test "x$path" != "x$new_path"; then
54761    MSVC_DLL="$new_path"
54762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54763$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54764  fi
54765
54766    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54767
54768  path="$MSVC_DLL"
54769  has_colon=`$ECHO $path | $GREP ^.:`
54770  new_path="$path"
54771  if test "x$has_colon" = x; then
54772    # Not in mixed or Windows style, start by that.
54773    new_path=`cmd //c echo $path`
54774  fi
54775
54776
54777  input_path="$new_path"
54778  # Check if we need to convert this using DOS-style short mode. If the path
54779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54780  # take no chances and rewrite it.
54781  # Note: m4 eats our [], so we need to use [ and ] instead.
54782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54783  if test "x$has_forbidden_chars" != x; then
54784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54785    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54786  fi
54787
54788
54789  windows_path="$new_path"
54790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54791    unix_path=`$CYGPATH -u "$windows_path"`
54792    new_path="$unix_path"
54793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54795    new_path="$unix_path"
54796  fi
54797
54798  if test "x$path" != "x$new_path"; then
54799    MSVC_DLL="$new_path"
54800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54801$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54802  fi
54803
54804  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54805  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54806
54807    else
54808      # We're on a unix platform. Hooray! :)
54809      path="$MSVC_DLL"
54810      has_space=`$ECHO "$path" | $GREP " "`
54811      if test "x$has_space" != x; then
54812        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54813$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54814        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54815      fi
54816
54817      # Use eval to expand a potential ~
54818      eval path="$path"
54819      if test ! -f "$path" && test ! -d "$path"; then
54820        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54821      fi
54822
54823      if test -d "$path"; then
54824        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54825      else
54826        dir="`$DIRNAME "$path"`"
54827        base="`$BASENAME "$path"`"
54828        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54829      fi
54830    fi
54831  fi
54832
54833      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54834$as_echo_n "checking for $DLL_NAME... " >&6; }
54835      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54836$as_echo "$MSVC_DLL" >&6; }
54837    else
54838      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54839$as_echo "incorrect, ignoring" >&6; }
54840      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54841$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54842    fi
54843  fi
54844
54845    fi
54846  fi
54847
54848  if test "x$MSVC_DLL" = x; then
54849    # Probe: Check in the Boot JDK directory.
54850    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54851
54852  DLL_NAME="$DLL_NAME"
54853  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54854  METHOD="well-known location in Boot JDK"
54855  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54856    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54857$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54858
54859    # Need to check if the found msvcr is correct architecture
54860    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54861$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54862    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54863    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54864      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54865      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54866      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54867        CORRECT_MSVCR_ARCH="PE32 executable"
54868      else
54869        CORRECT_MSVCR_ARCH="PE32+ executable"
54870      fi
54871    else
54872      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54873        CORRECT_MSVCR_ARCH=386
54874      else
54875        CORRECT_MSVCR_ARCH=x86-64
54876      fi
54877    fi
54878    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54879      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54880$as_echo "ok" >&6; }
54881      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54882
54883  # Only process if variable expands to non-empty
54884
54885  if test "x$MSVC_DLL" != x; then
54886    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54887
54888  # Input might be given as Windows format, start by converting to
54889  # unix format.
54890  path="$MSVC_DLL"
54891  new_path=`$CYGPATH -u "$path"`
54892
54893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54896  # "foo.exe" is OK but "foo" is an error.
54897  #
54898  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54899  # It is also a way to make sure we got the proper file name for the real test later on.
54900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54901  if test "x$test_shortpath" = x; then
54902    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54903$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54904    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54905  fi
54906
54907  # Call helper function which possibly converts this using DOS-style short mode.
54908  # If so, the updated path is stored in $new_path.
54909
54910  input_path="$new_path"
54911  # Check if we need to convert this using DOS-style short mode. If the path
54912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54913  # take no chances and rewrite it.
54914  # Note: m4 eats our [], so we need to use [ and ] instead.
54915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54916  if test "x$has_forbidden_chars" != x; then
54917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54918    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54919    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54920    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54921      # Going to short mode and back again did indeed matter. Since short mode is
54922      # case insensitive, let's make it lowercase to improve readability.
54923      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54924      # Now convert it back to Unix-style (cygpath)
54925      input_path=`$CYGPATH -u "$shortmode_path"`
54926      new_path="$input_path"
54927    fi
54928  fi
54929
54930  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54931  if test "x$test_cygdrive_prefix" = x; then
54932    # As a simple fix, exclude /usr/bin since it's not a real path.
54933    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54934      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54935      # a path prefixed by /cygdrive for fixpath to work.
54936      new_path="$CYGWIN_ROOT_PATH$input_path"
54937    fi
54938  fi
54939
54940
54941  if test "x$path" != "x$new_path"; then
54942    MSVC_DLL="$new_path"
54943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54944$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54945  fi
54946
54947    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54948
54949  path="$MSVC_DLL"
54950  has_colon=`$ECHO $path | $GREP ^.:`
54951  new_path="$path"
54952  if test "x$has_colon" = x; then
54953    # Not in mixed or Windows style, start by that.
54954    new_path=`cmd //c echo $path`
54955  fi
54956
54957
54958  input_path="$new_path"
54959  # Check if we need to convert this using DOS-style short mode. If the path
54960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54961  # take no chances and rewrite it.
54962  # Note: m4 eats our [], so we need to use [ and ] instead.
54963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54964  if test "x$has_forbidden_chars" != x; then
54965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54967  fi
54968
54969
54970  windows_path="$new_path"
54971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54972    unix_path=`$CYGPATH -u "$windows_path"`
54973    new_path="$unix_path"
54974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54976    new_path="$unix_path"
54977  fi
54978
54979  if test "x$path" != "x$new_path"; then
54980    MSVC_DLL="$new_path"
54981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54982$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54983  fi
54984
54985  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54986  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54987
54988    else
54989      # We're on a unix platform. Hooray! :)
54990      path="$MSVC_DLL"
54991      has_space=`$ECHO "$path" | $GREP " "`
54992      if test "x$has_space" != x; then
54993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54994$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54995        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54996      fi
54997
54998      # Use eval to expand a potential ~
54999      eval path="$path"
55000      if test ! -f "$path" && test ! -d "$path"; then
55001        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55002      fi
55003
55004      if test -d "$path"; then
55005        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55006      else
55007        dir="`$DIRNAME "$path"`"
55008        base="`$BASENAME "$path"`"
55009        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55010      fi
55011    fi
55012  fi
55013
55014      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55015$as_echo_n "checking for $DLL_NAME... " >&6; }
55016      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55017$as_echo "$MSVC_DLL" >&6; }
55018    else
55019      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55020$as_echo "incorrect, ignoring" >&6; }
55021      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55022$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55023    fi
55024  fi
55025
55026  fi
55027
55028  if test "x$MSVC_DLL" = x; then
55029    # Probe: Look in the Windows system32 directory
55030    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55031
55032  windows_path="$CYGWIN_SYSTEMROOT"
55033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55034    unix_path=`$CYGPATH -u "$windows_path"`
55035    CYGWIN_SYSTEMROOT="$unix_path"
55036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55038    CYGWIN_SYSTEMROOT="$unix_path"
55039  fi
55040
55041    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55042
55043  DLL_NAME="$DLL_NAME"
55044  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55045  METHOD="well-known location in SYSTEMROOT"
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: If Visual Studio Express is installed, there is usually one with the debugger
55221    if test "x$VS100COMNTOOLS" != x; then
55222      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55223
55224  windows_path="$CYGWIN_VS_TOOLS_DIR"
55225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55226    unix_path=`$CYGPATH -u "$windows_path"`
55227    CYGWIN_VS_TOOLS_DIR="$unix_path"
55228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55230    CYGWIN_VS_TOOLS_DIR="$unix_path"
55231  fi
55232
55233      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55234        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55235	    | $GREP -i /x64/ | $HEAD --lines 1`
55236      else
55237        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55238	    | $GREP -i /x86/ | $HEAD --lines 1`
55239      fi
55240
55241  DLL_NAME="$DLL_NAME"
55242  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55243  METHOD="search of VS100COMNTOOLS"
55244  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55245    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55246$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55247
55248    # Need to check if the found msvcr is correct architecture
55249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55250$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55251    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55253      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55254      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55255      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55256        CORRECT_MSVCR_ARCH="PE32 executable"
55257      else
55258        CORRECT_MSVCR_ARCH="PE32+ executable"
55259      fi
55260    else
55261      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55262        CORRECT_MSVCR_ARCH=386
55263      else
55264        CORRECT_MSVCR_ARCH=x86-64
55265      fi
55266    fi
55267    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55268      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55269$as_echo "ok" >&6; }
55270      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55271
55272  # Only process if variable expands to non-empty
55273
55274  if test "x$MSVC_DLL" != x; then
55275    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55276
55277  # Input might be given as Windows format, start by converting to
55278  # unix format.
55279  path="$MSVC_DLL"
55280  new_path=`$CYGPATH -u "$path"`
55281
55282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55285  # "foo.exe" is OK but "foo" is an error.
55286  #
55287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55288  # It is also a way to make sure we got the proper file name for the real test later on.
55289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55290  if test "x$test_shortpath" = x; then
55291    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55292$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55293    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55294  fi
55295
55296  # Call helper function which possibly converts this using DOS-style short mode.
55297  # If so, the updated path is stored in $new_path.
55298
55299  input_path="$new_path"
55300  # Check if we need to convert this using DOS-style short mode. If the path
55301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55302  # take no chances and rewrite it.
55303  # Note: m4 eats our [], so we need to use [ and ] instead.
55304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55305  if test "x$has_forbidden_chars" != x; then
55306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55310      # Going to short mode and back again did indeed matter. Since short mode is
55311      # case insensitive, let's make it lowercase to improve readability.
55312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55313      # Now convert it back to Unix-style (cygpath)
55314      input_path=`$CYGPATH -u "$shortmode_path"`
55315      new_path="$input_path"
55316    fi
55317  fi
55318
55319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55320  if test "x$test_cygdrive_prefix" = x; then
55321    # As a simple fix, exclude /usr/bin since it's not a real path.
55322    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55324      # a path prefixed by /cygdrive for fixpath to work.
55325      new_path="$CYGWIN_ROOT_PATH$input_path"
55326    fi
55327  fi
55328
55329
55330  if test "x$path" != "x$new_path"; then
55331    MSVC_DLL="$new_path"
55332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55333$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55334  fi
55335
55336    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55337
55338  path="$MSVC_DLL"
55339  has_colon=`$ECHO $path | $GREP ^.:`
55340  new_path="$path"
55341  if test "x$has_colon" = x; then
55342    # Not in mixed or Windows style, start by that.
55343    new_path=`cmd //c echo $path`
55344  fi
55345
55346
55347  input_path="$new_path"
55348  # Check if we need to convert this using DOS-style short mode. If the path
55349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55350  # take no chances and rewrite it.
55351  # Note: m4 eats our [], so we need to use [ and ] instead.
55352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55353  if test "x$has_forbidden_chars" != x; then
55354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55356  fi
55357
55358
55359  windows_path="$new_path"
55360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55361    unix_path=`$CYGPATH -u "$windows_path"`
55362    new_path="$unix_path"
55363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55365    new_path="$unix_path"
55366  fi
55367
55368  if test "x$path" != "x$new_path"; then
55369    MSVC_DLL="$new_path"
55370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55371$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55372  fi
55373
55374  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55375  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55376
55377    else
55378      # We're on a unix platform. Hooray! :)
55379      path="$MSVC_DLL"
55380      has_space=`$ECHO "$path" | $GREP " "`
55381      if test "x$has_space" != x; then
55382        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55383$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55384        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55385      fi
55386
55387      # Use eval to expand a potential ~
55388      eval path="$path"
55389      if test ! -f "$path" && test ! -d "$path"; then
55390        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55391      fi
55392
55393      if test -d "$path"; then
55394        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55395      else
55396        dir="`$DIRNAME "$path"`"
55397        base="`$BASENAME "$path"`"
55398        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55399      fi
55400    fi
55401  fi
55402
55403      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55404$as_echo_n "checking for $DLL_NAME... " >&6; }
55405      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55406$as_echo "$MSVC_DLL" >&6; }
55407    else
55408      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55409$as_echo "incorrect, ignoring" >&6; }
55410      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55411$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55412    fi
55413  fi
55414
55415    fi
55416  fi
55417
55418  if test "x$MSVC_DLL" = x; then
55419    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55420    # (This was the original behaviour; kept since it might turn something up)
55421    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55422      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55423        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55424	    | $GREP x64 | $HEAD --lines 1`
55425      else
55426        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55427	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55428        if test "x$POSSIBLE_MSVC_DLL" = x; then
55429          # We're grasping at straws now...
55430          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55431	      | $HEAD --lines 1`
55432        fi
55433      fi
55434
55435
55436  DLL_NAME="$DLL_NAME"
55437  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55438  METHOD="search of VCINSTALLDIR"
55439  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55440    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55441$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55442
55443    # Need to check if the found msvcr is correct architecture
55444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55445$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55446    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55448      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55449      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55450      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55451        CORRECT_MSVCR_ARCH="PE32 executable"
55452      else
55453        CORRECT_MSVCR_ARCH="PE32+ executable"
55454      fi
55455    else
55456      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55457        CORRECT_MSVCR_ARCH=386
55458      else
55459        CORRECT_MSVCR_ARCH=x86-64
55460      fi
55461    fi
55462    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55464$as_echo "ok" >&6; }
55465      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55466
55467  # Only process if variable expands to non-empty
55468
55469  if test "x$MSVC_DLL" != x; then
55470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55471
55472  # Input might be given as Windows format, start by converting to
55473  # unix format.
55474  path="$MSVC_DLL"
55475  new_path=`$CYGPATH -u "$path"`
55476
55477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55480  # "foo.exe" is OK but "foo" is an error.
55481  #
55482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55483  # It is also a way to make sure we got the proper file name for the real test later on.
55484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55485  if test "x$test_shortpath" = x; then
55486    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55487$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55488    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55489  fi
55490
55491  # Call helper function which possibly converts this using DOS-style short mode.
55492  # If so, the updated path is stored in $new_path.
55493
55494  input_path="$new_path"
55495  # Check if we need to convert this using DOS-style short mode. If the path
55496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55497  # take no chances and rewrite it.
55498  # Note: m4 eats our [], so we need to use [ and ] instead.
55499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55500  if test "x$has_forbidden_chars" != x; then
55501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55505      # Going to short mode and back again did indeed matter. Since short mode is
55506      # case insensitive, let's make it lowercase to improve readability.
55507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55508      # Now convert it back to Unix-style (cygpath)
55509      input_path=`$CYGPATH -u "$shortmode_path"`
55510      new_path="$input_path"
55511    fi
55512  fi
55513
55514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55515  if test "x$test_cygdrive_prefix" = x; then
55516    # As a simple fix, exclude /usr/bin since it's not a real path.
55517    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55519      # a path prefixed by /cygdrive for fixpath to work.
55520      new_path="$CYGWIN_ROOT_PATH$input_path"
55521    fi
55522  fi
55523
55524
55525  if test "x$path" != "x$new_path"; then
55526    MSVC_DLL="$new_path"
55527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55528$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55529  fi
55530
55531    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55532
55533  path="$MSVC_DLL"
55534  has_colon=`$ECHO $path | $GREP ^.:`
55535  new_path="$path"
55536  if test "x$has_colon" = x; then
55537    # Not in mixed or Windows style, start by that.
55538    new_path=`cmd //c echo $path`
55539  fi
55540
55541
55542  input_path="$new_path"
55543  # Check if we need to convert this using DOS-style short mode. If the path
55544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55545  # take no chances and rewrite it.
55546  # Note: m4 eats our [], so we need to use [ and ] instead.
55547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55548  if test "x$has_forbidden_chars" != x; then
55549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55551  fi
55552
55553
55554  windows_path="$new_path"
55555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55556    unix_path=`$CYGPATH -u "$windows_path"`
55557    new_path="$unix_path"
55558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55560    new_path="$unix_path"
55561  fi
55562
55563  if test "x$path" != "x$new_path"; then
55564    MSVC_DLL="$new_path"
55565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55566$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55567  fi
55568
55569  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55570  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55571
55572    else
55573      # We're on a unix platform. Hooray! :)
55574      path="$MSVC_DLL"
55575      has_space=`$ECHO "$path" | $GREP " "`
55576      if test "x$has_space" != x; then
55577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55578$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55579        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55580      fi
55581
55582      # Use eval to expand a potential ~
55583      eval path="$path"
55584      if test ! -f "$path" && test ! -d "$path"; then
55585        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55586      fi
55587
55588      if test -d "$path"; then
55589        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55590      else
55591        dir="`$DIRNAME "$path"`"
55592        base="`$BASENAME "$path"`"
55593        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55594      fi
55595    fi
55596  fi
55597
55598      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55599$as_echo_n "checking for $DLL_NAME... " >&6; }
55600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55601$as_echo "$MSVC_DLL" >&6; }
55602    else
55603      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55604$as_echo "incorrect, ignoring" >&6; }
55605      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55606$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55607    fi
55608  fi
55609
55610    fi
55611  fi
55612
55613  if test "x$MSVC_DLL" = x; then
55614    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55615$as_echo_n "checking for $DLL_NAME... " >&6; }
55616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55617$as_echo "no" >&6; }
55618    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55619  fi
55620
55621    MSVCR_DLL="$MSVC_DLL"
55622  fi
55623
55624
55625
55626# Check whether --with-msvcp-dll was given.
55627if test "${with_msvcp_dll+set}" = set; then :
55628  withval=$with_msvcp_dll;
55629fi
55630
55631
55632  if test "x$MSVCP_NAME" != "x"; then
55633    if test "x$with_msvcp_dll" != x; then
55634      # If given explicitly by user, do not probe. If not present, fail directly.
55635
55636  DLL_NAME="$MSVCP_NAME"
55637  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55638  METHOD="--with-msvcp-dll"
55639  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55640    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55641$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55642
55643    # Need to check if the found msvcr is correct architecture
55644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55645$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55646    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55648      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55649      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55650      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55651        CORRECT_MSVCR_ARCH="PE32 executable"
55652      else
55653        CORRECT_MSVCR_ARCH="PE32+ executable"
55654      fi
55655    else
55656      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55657        CORRECT_MSVCR_ARCH=386
55658      else
55659        CORRECT_MSVCR_ARCH=x86-64
55660      fi
55661    fi
55662    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55664$as_echo "ok" >&6; }
55665      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55666
55667  # Only process if variable expands to non-empty
55668
55669  if test "x$MSVC_DLL" != x; then
55670    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55671
55672  # Input might be given as Windows format, start by converting to
55673  # unix format.
55674  path="$MSVC_DLL"
55675  new_path=`$CYGPATH -u "$path"`
55676
55677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55680  # "foo.exe" is OK but "foo" is an error.
55681  #
55682  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55683  # It is also a way to make sure we got the proper file name for the real test later on.
55684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55685  if test "x$test_shortpath" = x; then
55686    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55687$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55688    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55689  fi
55690
55691  # Call helper function which possibly converts this using DOS-style short mode.
55692  # If so, the updated path is stored in $new_path.
55693
55694  input_path="$new_path"
55695  # Check if we need to convert this using DOS-style short mode. If the path
55696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55697  # take no chances and rewrite it.
55698  # Note: m4 eats our [], so we need to use [ and ] instead.
55699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55700  if test "x$has_forbidden_chars" != x; then
55701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55705      # Going to short mode and back again did indeed matter. Since short mode is
55706      # case insensitive, let's make it lowercase to improve readability.
55707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55708      # Now convert it back to Unix-style (cygpath)
55709      input_path=`$CYGPATH -u "$shortmode_path"`
55710      new_path="$input_path"
55711    fi
55712  fi
55713
55714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55715  if test "x$test_cygdrive_prefix" = x; then
55716    # As a simple fix, exclude /usr/bin since it's not a real path.
55717    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55719      # a path prefixed by /cygdrive for fixpath to work.
55720      new_path="$CYGWIN_ROOT_PATH$input_path"
55721    fi
55722  fi
55723
55724
55725  if test "x$path" != "x$new_path"; then
55726    MSVC_DLL="$new_path"
55727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55728$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55729  fi
55730
55731    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55732
55733  path="$MSVC_DLL"
55734  has_colon=`$ECHO $path | $GREP ^.:`
55735  new_path="$path"
55736  if test "x$has_colon" = x; then
55737    # Not in mixed or Windows style, start by that.
55738    new_path=`cmd //c echo $path`
55739  fi
55740
55741
55742  input_path="$new_path"
55743  # Check if we need to convert this using DOS-style short mode. If the path
55744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55745  # take no chances and rewrite it.
55746  # Note: m4 eats our [], so we need to use [ and ] instead.
55747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55748  if test "x$has_forbidden_chars" != x; then
55749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55751  fi
55752
55753
55754  windows_path="$new_path"
55755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55756    unix_path=`$CYGPATH -u "$windows_path"`
55757    new_path="$unix_path"
55758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55760    new_path="$unix_path"
55761  fi
55762
55763  if test "x$path" != "x$new_path"; then
55764    MSVC_DLL="$new_path"
55765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55766$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55767  fi
55768
55769  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55770  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55771
55772    else
55773      # We're on a unix platform. Hooray! :)
55774      path="$MSVC_DLL"
55775      has_space=`$ECHO "$path" | $GREP " "`
55776      if test "x$has_space" != x; then
55777        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55778$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55779        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55780      fi
55781
55782      # Use eval to expand a potential ~
55783      eval path="$path"
55784      if test ! -f "$path" && test ! -d "$path"; then
55785        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55786      fi
55787
55788      if test -d "$path"; then
55789        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55790      else
55791        dir="`$DIRNAME "$path"`"
55792        base="`$BASENAME "$path"`"
55793        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55794      fi
55795    fi
55796  fi
55797
55798      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55799$as_echo_n "checking for $DLL_NAME... " >&6; }
55800      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55801$as_echo "$MSVC_DLL" >&6; }
55802    else
55803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55804$as_echo "incorrect, ignoring" >&6; }
55805      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55806$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55807    fi
55808  fi
55809
55810      if test "x$MSVC_DLL" = x; then
55811        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55812      fi
55813      MSVCP_DLL="$MSVC_DLL"
55814    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55815
55816  DLL_NAME="$MSVCP_NAME"
55817  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55818  METHOD="devkit"
55819  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55820    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55821$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55822
55823    # Need to check if the found msvcr is correct architecture
55824    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55825$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55826    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55828      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55829      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55830      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55831        CORRECT_MSVCR_ARCH="PE32 executable"
55832      else
55833        CORRECT_MSVCR_ARCH="PE32+ executable"
55834      fi
55835    else
55836      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55837        CORRECT_MSVCR_ARCH=386
55838      else
55839        CORRECT_MSVCR_ARCH=x86-64
55840      fi
55841    fi
55842    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55844$as_echo "ok" >&6; }
55845      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55846
55847  # Only process if variable expands to non-empty
55848
55849  if test "x$MSVC_DLL" != x; then
55850    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55851
55852  # Input might be given as Windows format, start by converting to
55853  # unix format.
55854  path="$MSVC_DLL"
55855  new_path=`$CYGPATH -u "$path"`
55856
55857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55860  # "foo.exe" is OK but "foo" is an error.
55861  #
55862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55863  # It is also a way to make sure we got the proper file name for the real test later on.
55864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55865  if test "x$test_shortpath" = x; then
55866    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55867$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55868    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55869  fi
55870
55871  # Call helper function which possibly converts this using DOS-style short mode.
55872  # If so, the updated path is stored in $new_path.
55873
55874  input_path="$new_path"
55875  # Check if we need to convert this using DOS-style short mode. If the path
55876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55877  # take no chances and rewrite it.
55878  # Note: m4 eats our [], so we need to use [ and ] instead.
55879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55880  if test "x$has_forbidden_chars" != x; then
55881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55885      # Going to short mode and back again did indeed matter. Since short mode is
55886      # case insensitive, let's make it lowercase to improve readability.
55887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55888      # Now convert it back to Unix-style (cygpath)
55889      input_path=`$CYGPATH -u "$shortmode_path"`
55890      new_path="$input_path"
55891    fi
55892  fi
55893
55894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55895  if test "x$test_cygdrive_prefix" = x; then
55896    # As a simple fix, exclude /usr/bin since it's not a real path.
55897    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55899      # a path prefixed by /cygdrive for fixpath to work.
55900      new_path="$CYGWIN_ROOT_PATH$input_path"
55901    fi
55902  fi
55903
55904
55905  if test "x$path" != "x$new_path"; then
55906    MSVC_DLL="$new_path"
55907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55908$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55909  fi
55910
55911    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55912
55913  path="$MSVC_DLL"
55914  has_colon=`$ECHO $path | $GREP ^.:`
55915  new_path="$path"
55916  if test "x$has_colon" = x; then
55917    # Not in mixed or Windows style, start by that.
55918    new_path=`cmd //c echo $path`
55919  fi
55920
55921
55922  input_path="$new_path"
55923  # Check if we need to convert this using DOS-style short mode. If the path
55924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55925  # take no chances and rewrite it.
55926  # Note: m4 eats our [], so we need to use [ and ] instead.
55927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55928  if test "x$has_forbidden_chars" != x; then
55929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55931  fi
55932
55933
55934  windows_path="$new_path"
55935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55936    unix_path=`$CYGPATH -u "$windows_path"`
55937    new_path="$unix_path"
55938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55940    new_path="$unix_path"
55941  fi
55942
55943  if test "x$path" != "x$new_path"; then
55944    MSVC_DLL="$new_path"
55945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55946$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55947  fi
55948
55949  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55950  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55951
55952    else
55953      # We're on a unix platform. Hooray! :)
55954      path="$MSVC_DLL"
55955      has_space=`$ECHO "$path" | $GREP " "`
55956      if test "x$has_space" != x; then
55957        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55958$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55959        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55960      fi
55961
55962      # Use eval to expand a potential ~
55963      eval path="$path"
55964      if test ! -f "$path" && test ! -d "$path"; then
55965        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55966      fi
55967
55968      if test -d "$path"; then
55969        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55970      else
55971        dir="`$DIRNAME "$path"`"
55972        base="`$BASENAME "$path"`"
55973        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55974      fi
55975    fi
55976  fi
55977
55978      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55979$as_echo_n "checking for $DLL_NAME... " >&6; }
55980      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55981$as_echo "$MSVC_DLL" >&6; }
55982    else
55983      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55984$as_echo "incorrect, ignoring" >&6; }
55985      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55986$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55987    fi
55988  fi
55989
55990      if test "x$MSVC_DLL" = x; then
55991        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55992      fi
55993      MSVCP_DLL="$MSVC_DLL"
55994    else
55995
55996  DLL_NAME="${MSVCP_NAME}"
55997  MSVC_DLL=
55998
55999  if test "x$MSVC_DLL" = x; then
56000    # Probe: Using well-known location from Visual Studio 10.0
56001    if test "x$VCINSTALLDIR" != x; then
56002      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
56003
56004  windows_path="$CYGWIN_VC_INSTALL_DIR"
56005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56006    unix_path=`$CYGPATH -u "$windows_path"`
56007    CYGWIN_VC_INSTALL_DIR="$unix_path"
56008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56010    CYGWIN_VC_INSTALL_DIR="$unix_path"
56011  fi
56012
56013      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56014        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56015      else
56016        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56017      fi
56018      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
56019
56020  DLL_NAME="$DLL_NAME"
56021  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56022  METHOD="well-known location in VCINSTALLDIR"
56023  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56024    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56025$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56026
56027    # Need to check if the found msvcr is correct architecture
56028    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56029$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56030    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56031    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56032      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56033      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56034      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56035        CORRECT_MSVCR_ARCH="PE32 executable"
56036      else
56037        CORRECT_MSVCR_ARCH="PE32+ executable"
56038      fi
56039    else
56040      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56041        CORRECT_MSVCR_ARCH=386
56042      else
56043        CORRECT_MSVCR_ARCH=x86-64
56044      fi
56045    fi
56046    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56047      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56048$as_echo "ok" >&6; }
56049      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56050
56051  # Only process if variable expands to non-empty
56052
56053  if test "x$MSVC_DLL" != x; then
56054    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56055
56056  # Input might be given as Windows format, start by converting to
56057  # unix format.
56058  path="$MSVC_DLL"
56059  new_path=`$CYGPATH -u "$path"`
56060
56061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56064  # "foo.exe" is OK but "foo" is an error.
56065  #
56066  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56067  # It is also a way to make sure we got the proper file name for the real test later on.
56068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56069  if test "x$test_shortpath" = x; then
56070    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56071$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56072    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56073  fi
56074
56075  # Call helper function which possibly converts this using DOS-style short mode.
56076  # If so, the updated path is stored in $new_path.
56077
56078  input_path="$new_path"
56079  # Check if we need to convert this using DOS-style short mode. If the path
56080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56081  # take no chances and rewrite it.
56082  # Note: m4 eats our [], so we need to use [ and ] instead.
56083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56084  if test "x$has_forbidden_chars" != x; then
56085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56089      # Going to short mode and back again did indeed matter. Since short mode is
56090      # case insensitive, let's make it lowercase to improve readability.
56091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56092      # Now convert it back to Unix-style (cygpath)
56093      input_path=`$CYGPATH -u "$shortmode_path"`
56094      new_path="$input_path"
56095    fi
56096  fi
56097
56098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56099  if test "x$test_cygdrive_prefix" = x; then
56100    # As a simple fix, exclude /usr/bin since it's not a real path.
56101    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56103      # a path prefixed by /cygdrive for fixpath to work.
56104      new_path="$CYGWIN_ROOT_PATH$input_path"
56105    fi
56106  fi
56107
56108
56109  if test "x$path" != "x$new_path"; then
56110    MSVC_DLL="$new_path"
56111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56112$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56113  fi
56114
56115    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56116
56117  path="$MSVC_DLL"
56118  has_colon=`$ECHO $path | $GREP ^.:`
56119  new_path="$path"
56120  if test "x$has_colon" = x; then
56121    # Not in mixed or Windows style, start by that.
56122    new_path=`cmd //c echo $path`
56123  fi
56124
56125
56126  input_path="$new_path"
56127  # Check if we need to convert this using DOS-style short mode. If the path
56128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56129  # take no chances and rewrite it.
56130  # Note: m4 eats our [], so we need to use [ and ] instead.
56131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56132  if test "x$has_forbidden_chars" != x; then
56133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56135  fi
56136
56137
56138  windows_path="$new_path"
56139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56140    unix_path=`$CYGPATH -u "$windows_path"`
56141    new_path="$unix_path"
56142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56144    new_path="$unix_path"
56145  fi
56146
56147  if test "x$path" != "x$new_path"; then
56148    MSVC_DLL="$new_path"
56149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56150$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56151  fi
56152
56153  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56154  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56155
56156    else
56157      # We're on a unix platform. Hooray! :)
56158      path="$MSVC_DLL"
56159      has_space=`$ECHO "$path" | $GREP " "`
56160      if test "x$has_space" != x; then
56161        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56162$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56163        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56164      fi
56165
56166      # Use eval to expand a potential ~
56167      eval path="$path"
56168      if test ! -f "$path" && test ! -d "$path"; then
56169        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56170      fi
56171
56172      if test -d "$path"; then
56173        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56174      else
56175        dir="`$DIRNAME "$path"`"
56176        base="`$BASENAME "$path"`"
56177        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56178      fi
56179    fi
56180  fi
56181
56182      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56183$as_echo_n "checking for $DLL_NAME... " >&6; }
56184      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56185$as_echo "$MSVC_DLL" >&6; }
56186    else
56187      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56188$as_echo "incorrect, ignoring" >&6; }
56189      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56190$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56191    fi
56192  fi
56193
56194    fi
56195  fi
56196
56197  if test "x$MSVC_DLL" = x; then
56198    # Probe: Check in the Boot JDK directory.
56199    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
56200
56201  DLL_NAME="$DLL_NAME"
56202  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56203  METHOD="well-known location in Boot JDK"
56204  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56205    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56206$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56207
56208    # Need to check if the found msvcr is correct architecture
56209    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56210$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56211    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56212    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56213      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56214      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56215      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56216        CORRECT_MSVCR_ARCH="PE32 executable"
56217      else
56218        CORRECT_MSVCR_ARCH="PE32+ executable"
56219      fi
56220    else
56221      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56222        CORRECT_MSVCR_ARCH=386
56223      else
56224        CORRECT_MSVCR_ARCH=x86-64
56225      fi
56226    fi
56227    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56228      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56229$as_echo "ok" >&6; }
56230      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56231
56232  # Only process if variable expands to non-empty
56233
56234  if test "x$MSVC_DLL" != x; then
56235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56236
56237  # Input might be given as Windows format, start by converting to
56238  # unix format.
56239  path="$MSVC_DLL"
56240  new_path=`$CYGPATH -u "$path"`
56241
56242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56245  # "foo.exe" is OK but "foo" is an error.
56246  #
56247  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56248  # It is also a way to make sure we got the proper file name for the real test later on.
56249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56250  if test "x$test_shortpath" = x; then
56251    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56252$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56253    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56254  fi
56255
56256  # Call helper function which possibly converts this using DOS-style short mode.
56257  # If so, the updated path is stored in $new_path.
56258
56259  input_path="$new_path"
56260  # Check if we need to convert this using DOS-style short mode. If the path
56261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56262  # take no chances and rewrite it.
56263  # Note: m4 eats our [], so we need to use [ and ] instead.
56264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56265  if test "x$has_forbidden_chars" != x; then
56266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56270      # Going to short mode and back again did indeed matter. Since short mode is
56271      # case insensitive, let's make it lowercase to improve readability.
56272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56273      # Now convert it back to Unix-style (cygpath)
56274      input_path=`$CYGPATH -u "$shortmode_path"`
56275      new_path="$input_path"
56276    fi
56277  fi
56278
56279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56280  if test "x$test_cygdrive_prefix" = x; then
56281    # As a simple fix, exclude /usr/bin since it's not a real path.
56282    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56284      # a path prefixed by /cygdrive for fixpath to work.
56285      new_path="$CYGWIN_ROOT_PATH$input_path"
56286    fi
56287  fi
56288
56289
56290  if test "x$path" != "x$new_path"; then
56291    MSVC_DLL="$new_path"
56292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56293$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56294  fi
56295
56296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56297
56298  path="$MSVC_DLL"
56299  has_colon=`$ECHO $path | $GREP ^.:`
56300  new_path="$path"
56301  if test "x$has_colon" = x; then
56302    # Not in mixed or Windows style, start by that.
56303    new_path=`cmd //c echo $path`
56304  fi
56305
56306
56307  input_path="$new_path"
56308  # Check if we need to convert this using DOS-style short mode. If the path
56309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56310  # take no chances and rewrite it.
56311  # Note: m4 eats our [], so we need to use [ and ] instead.
56312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56313  if test "x$has_forbidden_chars" != x; then
56314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56315    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56316  fi
56317
56318
56319  windows_path="$new_path"
56320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56321    unix_path=`$CYGPATH -u "$windows_path"`
56322    new_path="$unix_path"
56323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56325    new_path="$unix_path"
56326  fi
56327
56328  if test "x$path" != "x$new_path"; then
56329    MSVC_DLL="$new_path"
56330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56331$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56332  fi
56333
56334  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56335  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56336
56337    else
56338      # We're on a unix platform. Hooray! :)
56339      path="$MSVC_DLL"
56340      has_space=`$ECHO "$path" | $GREP " "`
56341      if test "x$has_space" != x; then
56342        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56343$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56344        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56345      fi
56346
56347      # Use eval to expand a potential ~
56348      eval path="$path"
56349      if test ! -f "$path" && test ! -d "$path"; then
56350        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56351      fi
56352
56353      if test -d "$path"; then
56354        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56355      else
56356        dir="`$DIRNAME "$path"`"
56357        base="`$BASENAME "$path"`"
56358        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56359      fi
56360    fi
56361  fi
56362
56363      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56364$as_echo_n "checking for $DLL_NAME... " >&6; }
56365      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56366$as_echo "$MSVC_DLL" >&6; }
56367    else
56368      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56369$as_echo "incorrect, ignoring" >&6; }
56370      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56371$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56372    fi
56373  fi
56374
56375  fi
56376
56377  if test "x$MSVC_DLL" = x; then
56378    # Probe: Look in the Windows system32 directory
56379    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
56380
56381  windows_path="$CYGWIN_SYSTEMROOT"
56382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56383    unix_path=`$CYGPATH -u "$windows_path"`
56384    CYGWIN_SYSTEMROOT="$unix_path"
56385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56387    CYGWIN_SYSTEMROOT="$unix_path"
56388  fi
56389
56390    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
56391
56392  DLL_NAME="$DLL_NAME"
56393  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56394  METHOD="well-known location in SYSTEMROOT"
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: If Visual Studio Express is installed, there is usually one with the debugger
56570    if test "x$VS100COMNTOOLS" != x; then
56571      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56572
56573  windows_path="$CYGWIN_VS_TOOLS_DIR"
56574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56575    unix_path=`$CYGPATH -u "$windows_path"`
56576    CYGWIN_VS_TOOLS_DIR="$unix_path"
56577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56579    CYGWIN_VS_TOOLS_DIR="$unix_path"
56580  fi
56581
56582      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56583        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56584	    | $GREP -i /x64/ | $HEAD --lines 1`
56585      else
56586        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56587	    | $GREP -i /x86/ | $HEAD --lines 1`
56588      fi
56589
56590  DLL_NAME="$DLL_NAME"
56591  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56592  METHOD="search of VS100COMNTOOLS"
56593  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56594    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56595$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56596
56597    # Need to check if the found msvcr is correct architecture
56598    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56599$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56600    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56601    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56602      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56603      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56604      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56605        CORRECT_MSVCR_ARCH="PE32 executable"
56606      else
56607        CORRECT_MSVCR_ARCH="PE32+ executable"
56608      fi
56609    else
56610      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56611        CORRECT_MSVCR_ARCH=386
56612      else
56613        CORRECT_MSVCR_ARCH=x86-64
56614      fi
56615    fi
56616    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56618$as_echo "ok" >&6; }
56619      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56620
56621  # Only process if variable expands to non-empty
56622
56623  if test "x$MSVC_DLL" != x; then
56624    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56625
56626  # Input might be given as Windows format, start by converting to
56627  # unix format.
56628  path="$MSVC_DLL"
56629  new_path=`$CYGPATH -u "$path"`
56630
56631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56634  # "foo.exe" is OK but "foo" is an error.
56635  #
56636  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56637  # It is also a way to make sure we got the proper file name for the real test later on.
56638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56639  if test "x$test_shortpath" = x; then
56640    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56641$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56642    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56643  fi
56644
56645  # Call helper function which possibly converts this using DOS-style short mode.
56646  # If so, the updated path is stored in $new_path.
56647
56648  input_path="$new_path"
56649  # Check if we need to convert this using DOS-style short mode. If the path
56650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56651  # take no chances and rewrite it.
56652  # Note: m4 eats our [], so we need to use [ and ] instead.
56653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56654  if test "x$has_forbidden_chars" != x; then
56655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56659      # Going to short mode and back again did indeed matter. Since short mode is
56660      # case insensitive, let's make it lowercase to improve readability.
56661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56662      # Now convert it back to Unix-style (cygpath)
56663      input_path=`$CYGPATH -u "$shortmode_path"`
56664      new_path="$input_path"
56665    fi
56666  fi
56667
56668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56669  if test "x$test_cygdrive_prefix" = x; then
56670    # As a simple fix, exclude /usr/bin since it's not a real path.
56671    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56673      # a path prefixed by /cygdrive for fixpath to work.
56674      new_path="$CYGWIN_ROOT_PATH$input_path"
56675    fi
56676  fi
56677
56678
56679  if test "x$path" != "x$new_path"; then
56680    MSVC_DLL="$new_path"
56681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56682$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56683  fi
56684
56685    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56686
56687  path="$MSVC_DLL"
56688  has_colon=`$ECHO $path | $GREP ^.:`
56689  new_path="$path"
56690  if test "x$has_colon" = x; then
56691    # Not in mixed or Windows style, start by that.
56692    new_path=`cmd //c echo $path`
56693  fi
56694
56695
56696  input_path="$new_path"
56697  # Check if we need to convert this using DOS-style short mode. If the path
56698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56699  # take no chances and rewrite it.
56700  # Note: m4 eats our [], so we need to use [ and ] instead.
56701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56702  if test "x$has_forbidden_chars" != x; then
56703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56705  fi
56706
56707
56708  windows_path="$new_path"
56709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56710    unix_path=`$CYGPATH -u "$windows_path"`
56711    new_path="$unix_path"
56712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56714    new_path="$unix_path"
56715  fi
56716
56717  if test "x$path" != "x$new_path"; then
56718    MSVC_DLL="$new_path"
56719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56720$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56721  fi
56722
56723  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56724  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56725
56726    else
56727      # We're on a unix platform. Hooray! :)
56728      path="$MSVC_DLL"
56729      has_space=`$ECHO "$path" | $GREP " "`
56730      if test "x$has_space" != x; then
56731        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56732$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56733        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56734      fi
56735
56736      # Use eval to expand a potential ~
56737      eval path="$path"
56738      if test ! -f "$path" && test ! -d "$path"; then
56739        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56740      fi
56741
56742      if test -d "$path"; then
56743        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56744      else
56745        dir="`$DIRNAME "$path"`"
56746        base="`$BASENAME "$path"`"
56747        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56748      fi
56749    fi
56750  fi
56751
56752      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56753$as_echo_n "checking for $DLL_NAME... " >&6; }
56754      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56755$as_echo "$MSVC_DLL" >&6; }
56756    else
56757      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56758$as_echo "incorrect, ignoring" >&6; }
56759      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56760$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56761    fi
56762  fi
56763
56764    fi
56765  fi
56766
56767  if test "x$MSVC_DLL" = x; then
56768    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56769    # (This was the original behaviour; kept since it might turn something up)
56770    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56771      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56772        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56773	    | $GREP x64 | $HEAD --lines 1`
56774      else
56775        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56776	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56777        if test "x$POSSIBLE_MSVC_DLL" = x; then
56778          # We're grasping at straws now...
56779          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56780	      | $HEAD --lines 1`
56781        fi
56782      fi
56783
56784
56785  DLL_NAME="$DLL_NAME"
56786  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56787  METHOD="search of VCINSTALLDIR"
56788  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56789    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56790$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56791
56792    # Need to check if the found msvcr is correct architecture
56793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56794$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56795    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56796    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56797      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56798      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56799      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56800        CORRECT_MSVCR_ARCH="PE32 executable"
56801      else
56802        CORRECT_MSVCR_ARCH="PE32+ executable"
56803      fi
56804    else
56805      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56806        CORRECT_MSVCR_ARCH=386
56807      else
56808        CORRECT_MSVCR_ARCH=x86-64
56809      fi
56810    fi
56811    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56812      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56813$as_echo "ok" >&6; }
56814      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56815
56816  # Only process if variable expands to non-empty
56817
56818  if test "x$MSVC_DLL" != x; then
56819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56820
56821  # Input might be given as Windows format, start by converting to
56822  # unix format.
56823  path="$MSVC_DLL"
56824  new_path=`$CYGPATH -u "$path"`
56825
56826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56829  # "foo.exe" is OK but "foo" is an error.
56830  #
56831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56832  # It is also a way to make sure we got the proper file name for the real test later on.
56833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56834  if test "x$test_shortpath" = x; then
56835    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56836$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56837    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56838  fi
56839
56840  # Call helper function which possibly converts this using DOS-style short mode.
56841  # If so, the updated path is stored in $new_path.
56842
56843  input_path="$new_path"
56844  # Check if we need to convert this using DOS-style short mode. If the path
56845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56846  # take no chances and rewrite it.
56847  # Note: m4 eats our [], so we need to use [ and ] instead.
56848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56849  if test "x$has_forbidden_chars" != x; then
56850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56854      # Going to short mode and back again did indeed matter. Since short mode is
56855      # case insensitive, let's make it lowercase to improve readability.
56856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56857      # Now convert it back to Unix-style (cygpath)
56858      input_path=`$CYGPATH -u "$shortmode_path"`
56859      new_path="$input_path"
56860    fi
56861  fi
56862
56863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56864  if test "x$test_cygdrive_prefix" = x; then
56865    # As a simple fix, exclude /usr/bin since it's not a real path.
56866    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56868      # a path prefixed by /cygdrive for fixpath to work.
56869      new_path="$CYGWIN_ROOT_PATH$input_path"
56870    fi
56871  fi
56872
56873
56874  if test "x$path" != "x$new_path"; then
56875    MSVC_DLL="$new_path"
56876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56877$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56878  fi
56879
56880    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56881
56882  path="$MSVC_DLL"
56883  has_colon=`$ECHO $path | $GREP ^.:`
56884  new_path="$path"
56885  if test "x$has_colon" = x; then
56886    # Not in mixed or Windows style, start by that.
56887    new_path=`cmd //c echo $path`
56888  fi
56889
56890
56891  input_path="$new_path"
56892  # Check if we need to convert this using DOS-style short mode. If the path
56893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56894  # take no chances and rewrite it.
56895  # Note: m4 eats our [], so we need to use [ and ] instead.
56896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56897  if test "x$has_forbidden_chars" != x; then
56898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56900  fi
56901
56902
56903  windows_path="$new_path"
56904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56905    unix_path=`$CYGPATH -u "$windows_path"`
56906    new_path="$unix_path"
56907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56909    new_path="$unix_path"
56910  fi
56911
56912  if test "x$path" != "x$new_path"; then
56913    MSVC_DLL="$new_path"
56914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56915$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56916  fi
56917
56918  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56919  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56920
56921    else
56922      # We're on a unix platform. Hooray! :)
56923      path="$MSVC_DLL"
56924      has_space=`$ECHO "$path" | $GREP " "`
56925      if test "x$has_space" != x; then
56926        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56927$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56928        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56929      fi
56930
56931      # Use eval to expand a potential ~
56932      eval path="$path"
56933      if test ! -f "$path" && test ! -d "$path"; then
56934        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56935      fi
56936
56937      if test -d "$path"; then
56938        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56939      else
56940        dir="`$DIRNAME "$path"`"
56941        base="`$BASENAME "$path"`"
56942        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56943      fi
56944    fi
56945  fi
56946
56947      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56948$as_echo_n "checking for $DLL_NAME... " >&6; }
56949      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56950$as_echo "$MSVC_DLL" >&6; }
56951    else
56952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56953$as_echo "incorrect, ignoring" >&6; }
56954      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56955$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56956    fi
56957  fi
56958
56959    fi
56960  fi
56961
56962  if test "x$MSVC_DLL" = x; then
56963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56964$as_echo_n "checking for $DLL_NAME... " >&6; }
56965    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56966$as_echo "no" >&6; }
56967    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56968  fi
56969
56970      MSVCP_DLL="$MSVC_DLL"
56971    fi
56972
56973  fi
56974
56975  fi
56976
56977
56978  if test "x$NEEDS_LIB_X11" = xfalse; then
56979    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56980      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56981$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56982    fi
56983    X_CFLAGS=
56984    X_LIBS=
56985  else
56986
56987    if test "x${with_x}" = xno; then
56988      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56989    fi
56990
56991    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56992      # The user has specified a X11 base directory. Use it for includes and
56993      # libraries, unless explicitly overridden.
56994      if test "x$x_includes" = xNONE; then
56995        x_includes="${with_x}/include"
56996      fi
56997      if test "x$x_libraries" = xNONE; then
56998        x_libraries="${with_x}/lib"
56999      fi
57000    else
57001      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
57002      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
57003      # --x-libraries for the sysroot, if that seems to be correct.
57004      if test "x$SYSROOT" != "x"; then
57005        if test "x$x_includes" = xNONE; then
57006          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
57007            x_includes="$SYSROOT/usr/X11R6/include"
57008          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
57009            x_includes="$SYSROOT/usr/include"
57010          fi
57011        fi
57012        if test "x$x_libraries" = xNONE; then
57013          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
57014            x_libraries="$SYSROOT/usr/X11R6/lib"
57015          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57016            x_libraries="$SYSROOT/usr/lib64"
57017          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
57018            x_libraries="$SYSROOT/usr/lib"
57019          fi
57020        fi
57021      fi
57022    fi
57023
57024    # Now let autoconf do it's magic
57025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
57026$as_echo_n "checking for X... " >&6; }
57027
57028
57029# Check whether --with-x was given.
57030if test "${with_x+set}" = set; then :
57031  withval=$with_x;
57032fi
57033
57034# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
57035if test "x$with_x" = xno; then
57036  # The user explicitly disabled X.
57037  have_x=disabled
57038else
57039  case $x_includes,$x_libraries in #(
57040    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
57041    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
57042  $as_echo_n "(cached) " >&6
57043else
57044  # One or both of the vars are not set, and there is no cached value.
57045ac_x_includes=no ac_x_libraries=no
57046rm -f -r conftest.dir
57047if mkdir conftest.dir; then
57048  cd conftest.dir
57049  cat >Imakefile <<'_ACEOF'
57050incroot:
57051	@echo incroot='${INCROOT}'
57052usrlibdir:
57053	@echo usrlibdir='${USRLIBDIR}'
57054libdir:
57055	@echo libdir='${LIBDIR}'
57056_ACEOF
57057  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
57058    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
57059    for ac_var in incroot usrlibdir libdir; do
57060      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
57061    done
57062    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
57063    for ac_extension in a so sl dylib la dll; do
57064      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
57065	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
57066	ac_im_usrlibdir=$ac_im_libdir; break
57067      fi
57068    done
57069    # Screen out bogus values from the imake configuration.  They are
57070    # bogus both because they are the default anyway, and because
57071    # using them would break gcc on systems where it needs fixed includes.
57072    case $ac_im_incroot in
57073	/usr/include) ac_x_includes= ;;
57074	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
57075    esac
57076    case $ac_im_usrlibdir in
57077	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
57078	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
57079    esac
57080  fi
57081  cd ..
57082  rm -f -r conftest.dir
57083fi
57084
57085# Standard set of common directories for X headers.
57086# Check X11 before X11Rn because it is often a symlink to the current release.
57087ac_x_header_dirs='
57088/usr/X11/include
57089/usr/X11R7/include
57090/usr/X11R6/include
57091/usr/X11R5/include
57092/usr/X11R4/include
57093
57094/usr/include/X11
57095/usr/include/X11R7
57096/usr/include/X11R6
57097/usr/include/X11R5
57098/usr/include/X11R4
57099
57100/usr/local/X11/include
57101/usr/local/X11R7/include
57102/usr/local/X11R6/include
57103/usr/local/X11R5/include
57104/usr/local/X11R4/include
57105
57106/usr/local/include/X11
57107/usr/local/include/X11R7
57108/usr/local/include/X11R6
57109/usr/local/include/X11R5
57110/usr/local/include/X11R4
57111
57112/usr/X386/include
57113/usr/x386/include
57114/usr/XFree86/include/X11
57115
57116/usr/include
57117/usr/local/include
57118/usr/unsupported/include
57119/usr/athena/include
57120/usr/local/x11r5/include
57121/usr/lpp/Xamples/include
57122
57123/usr/openwin/include
57124/usr/openwin/share/include'
57125
57126if test "$ac_x_includes" = no; then
57127  # Guess where to find include files, by looking for Xlib.h.
57128  # First, try using that file with no special directory specified.
57129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57130/* end confdefs.h.  */
57131#include <X11/Xlib.h>
57132_ACEOF
57133if ac_fn_cxx_try_cpp "$LINENO"; then :
57134  # We can compile using X headers with no special include directory.
57135ac_x_includes=
57136else
57137  for ac_dir in $ac_x_header_dirs; do
57138  if test -r "$ac_dir/X11/Xlib.h"; then
57139    ac_x_includes=$ac_dir
57140    break
57141  fi
57142done
57143fi
57144rm -f conftest.err conftest.i conftest.$ac_ext
57145fi # $ac_x_includes = no
57146
57147if test "$ac_x_libraries" = no; then
57148  # Check for the libraries.
57149  # See if we find them without any special options.
57150  # Don't add to $LIBS permanently.
57151  ac_save_LIBS=$LIBS
57152  LIBS="-lX11 $LIBS"
57153  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57154/* end confdefs.h.  */
57155#include <X11/Xlib.h>
57156int
57157main ()
57158{
57159XrmInitialize ()
57160  ;
57161  return 0;
57162}
57163_ACEOF
57164if ac_fn_cxx_try_link "$LINENO"; then :
57165  LIBS=$ac_save_LIBS
57166# We can link X programs with no special library path.
57167ac_x_libraries=
57168else
57169  LIBS=$ac_save_LIBS
57170for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
57171do
57172  # Don't even attempt the hair of trying to link an X program!
57173  for ac_extension in a so sl dylib la dll; do
57174    if test -r "$ac_dir/libX11.$ac_extension"; then
57175      ac_x_libraries=$ac_dir
57176      break 2
57177    fi
57178  done
57179done
57180fi
57181rm -f core conftest.err conftest.$ac_objext \
57182    conftest$ac_exeext conftest.$ac_ext
57183fi # $ac_x_libraries = no
57184
57185case $ac_x_includes,$ac_x_libraries in #(
57186  no,* | *,no | *\'*)
57187    # Didn't find X, or a directory has "'" in its name.
57188    ac_cv_have_x="have_x=no";; #(
57189  *)
57190    # Record where we found X for the cache.
57191    ac_cv_have_x="have_x=yes\
57192	ac_x_includes='$ac_x_includes'\
57193	ac_x_libraries='$ac_x_libraries'"
57194esac
57195fi
57196;; #(
57197    *) have_x=yes;;
57198  esac
57199  eval "$ac_cv_have_x"
57200fi # $with_x != no
57201
57202if test "$have_x" != yes; then
57203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
57204$as_echo "$have_x" >&6; }
57205  no_x=yes
57206else
57207  # If each of the values was on the command line, it overrides each guess.
57208  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
57209  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
57210  # Update the cache value to reflect the command line values.
57211  ac_cv_have_x="have_x=yes\
57212	ac_x_includes='$x_includes'\
57213	ac_x_libraries='$x_libraries'"
57214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
57215$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
57216fi
57217
57218    if test "$no_x" = yes; then
57219  # Not all programs may use this symbol, but it does not hurt to define it.
57220
57221$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
57222
57223  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
57224else
57225  if test -n "$x_includes"; then
57226    X_CFLAGS="$X_CFLAGS -I$x_includes"
57227  fi
57228
57229  # It would also be nice to do this for all -L options, not just this one.
57230  if test -n "$x_libraries"; then
57231    X_LIBS="$X_LIBS -L$x_libraries"
57232    # For Solaris; some versions of Sun CC require a space after -R and
57233    # others require no space.  Words are not sufficient . . . .
57234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
57235$as_echo_n "checking whether -R must be followed by a space... " >&6; }
57236    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
57237    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
57238    ac_cxx_werror_flag=yes
57239    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57240/* end confdefs.h.  */
57241
57242int
57243main ()
57244{
57245
57246  ;
57247  return 0;
57248}
57249_ACEOF
57250if ac_fn_cxx_try_link "$LINENO"; then :
57251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57252$as_echo "no" >&6; }
57253       X_LIBS="$X_LIBS -R$x_libraries"
57254else
57255  LIBS="$ac_xsave_LIBS -R $x_libraries"
57256       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57257/* end confdefs.h.  */
57258
57259int
57260main ()
57261{
57262
57263  ;
57264  return 0;
57265}
57266_ACEOF
57267if ac_fn_cxx_try_link "$LINENO"; then :
57268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57269$as_echo "yes" >&6; }
57270	  X_LIBS="$X_LIBS -R $x_libraries"
57271else
57272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
57273$as_echo "neither works" >&6; }
57274fi
57275rm -f core conftest.err conftest.$ac_objext \
57276    conftest$ac_exeext conftest.$ac_ext
57277fi
57278rm -f core conftest.err conftest.$ac_objext \
57279    conftest$ac_exeext conftest.$ac_ext
57280    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
57281    LIBS=$ac_xsave_LIBS
57282  fi
57283
57284  # Check for system-dependent libraries X programs must link with.
57285  # Do this before checking for the system-independent R6 libraries
57286  # (-lICE), since we may need -lsocket or whatever for X linking.
57287
57288  if test "$ISC" = yes; then
57289    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
57290  else
57291    # Martyn Johnson says this is needed for Ultrix, if the X
57292    # libraries were built with DECnet support.  And Karl Berry says
57293    # the Alpha needs dnet_stub (dnet does not exist).
57294    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
57295    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57296/* end confdefs.h.  */
57297
57298/* Override any GCC internal prototype to avoid an error.
57299   Use char because int might match the return type of a GCC
57300   builtin and then its argument prototype would still apply.  */
57301#ifdef __cplusplus
57302extern "C"
57303#endif
57304char XOpenDisplay ();
57305int
57306main ()
57307{
57308return XOpenDisplay ();
57309  ;
57310  return 0;
57311}
57312_ACEOF
57313if ac_fn_cxx_try_link "$LINENO"; then :
57314
57315else
57316  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
57317$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
57318if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
57319  $as_echo_n "(cached) " >&6
57320else
57321  ac_check_lib_save_LIBS=$LIBS
57322LIBS="-ldnet  $LIBS"
57323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57324/* end confdefs.h.  */
57325
57326/* Override any GCC internal prototype to avoid an error.
57327   Use char because int might match the return type of a GCC
57328   builtin and then its argument prototype would still apply.  */
57329#ifdef __cplusplus
57330extern "C"
57331#endif
57332char dnet_ntoa ();
57333int
57334main ()
57335{
57336return dnet_ntoa ();
57337  ;
57338  return 0;
57339}
57340_ACEOF
57341if ac_fn_cxx_try_link "$LINENO"; then :
57342  ac_cv_lib_dnet_dnet_ntoa=yes
57343else
57344  ac_cv_lib_dnet_dnet_ntoa=no
57345fi
57346rm -f core conftest.err conftest.$ac_objext \
57347    conftest$ac_exeext conftest.$ac_ext
57348LIBS=$ac_check_lib_save_LIBS
57349fi
57350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
57351$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
57352if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
57353  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
57354fi
57355
57356    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
57357      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
57358$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
57359if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
57360  $as_echo_n "(cached) " >&6
57361else
57362  ac_check_lib_save_LIBS=$LIBS
57363LIBS="-ldnet_stub  $LIBS"
57364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57365/* end confdefs.h.  */
57366
57367/* Override any GCC internal prototype to avoid an error.
57368   Use char because int might match the return type of a GCC
57369   builtin and then its argument prototype would still apply.  */
57370#ifdef __cplusplus
57371extern "C"
57372#endif
57373char dnet_ntoa ();
57374int
57375main ()
57376{
57377return dnet_ntoa ();
57378  ;
57379  return 0;
57380}
57381_ACEOF
57382if ac_fn_cxx_try_link "$LINENO"; then :
57383  ac_cv_lib_dnet_stub_dnet_ntoa=yes
57384else
57385  ac_cv_lib_dnet_stub_dnet_ntoa=no
57386fi
57387rm -f core conftest.err conftest.$ac_objext \
57388    conftest$ac_exeext conftest.$ac_ext
57389LIBS=$ac_check_lib_save_LIBS
57390fi
57391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
57392$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
57393if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
57394  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
57395fi
57396
57397    fi
57398fi
57399rm -f core conftest.err conftest.$ac_objext \
57400    conftest$ac_exeext conftest.$ac_ext
57401    LIBS="$ac_xsave_LIBS"
57402
57403    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
57404    # to get the SysV transport functions.
57405    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
57406    # needs -lnsl.
57407    # The nsl library prevents programs from opening the X display
57408    # on Irix 5.2, according to T.E. Dickey.
57409    # The functions gethostbyname, getservbyname, and inet_addr are
57410    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
57411    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
57412if test "x$ac_cv_func_gethostbyname" = xyes; then :
57413
57414fi
57415
57416    if test $ac_cv_func_gethostbyname = no; then
57417      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
57418$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
57419if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
57420  $as_echo_n "(cached) " >&6
57421else
57422  ac_check_lib_save_LIBS=$LIBS
57423LIBS="-lnsl  $LIBS"
57424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57425/* end confdefs.h.  */
57426
57427/* Override any GCC internal prototype to avoid an error.
57428   Use char because int might match the return type of a GCC
57429   builtin and then its argument prototype would still apply.  */
57430#ifdef __cplusplus
57431extern "C"
57432#endif
57433char gethostbyname ();
57434int
57435main ()
57436{
57437return gethostbyname ();
57438  ;
57439  return 0;
57440}
57441_ACEOF
57442if ac_fn_cxx_try_link "$LINENO"; then :
57443  ac_cv_lib_nsl_gethostbyname=yes
57444else
57445  ac_cv_lib_nsl_gethostbyname=no
57446fi
57447rm -f core conftest.err conftest.$ac_objext \
57448    conftest$ac_exeext conftest.$ac_ext
57449LIBS=$ac_check_lib_save_LIBS
57450fi
57451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
57452$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
57453if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
57454  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
57455fi
57456
57457      if test $ac_cv_lib_nsl_gethostbyname = no; then
57458	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
57459$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
57460if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
57461  $as_echo_n "(cached) " >&6
57462else
57463  ac_check_lib_save_LIBS=$LIBS
57464LIBS="-lbsd  $LIBS"
57465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57466/* end confdefs.h.  */
57467
57468/* Override any GCC internal prototype to avoid an error.
57469   Use char because int might match the return type of a GCC
57470   builtin and then its argument prototype would still apply.  */
57471#ifdef __cplusplus
57472extern "C"
57473#endif
57474char gethostbyname ();
57475int
57476main ()
57477{
57478return gethostbyname ();
57479  ;
57480  return 0;
57481}
57482_ACEOF
57483if ac_fn_cxx_try_link "$LINENO"; then :
57484  ac_cv_lib_bsd_gethostbyname=yes
57485else
57486  ac_cv_lib_bsd_gethostbyname=no
57487fi
57488rm -f core conftest.err conftest.$ac_objext \
57489    conftest$ac_exeext conftest.$ac_ext
57490LIBS=$ac_check_lib_save_LIBS
57491fi
57492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
57493$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
57494if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
57495  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
57496fi
57497
57498      fi
57499    fi
57500
57501    # lieder@skyler.mavd.honeywell.com says without -lsocket,
57502    # socket/setsockopt and other routines are undefined under SCO ODT
57503    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57504    # on later versions), says Simon Leinen: it contains gethostby*
57505    # variants that don't use the name server (or something).  -lsocket
57506    # must be given before -lnsl if both are needed.  We assume that
57507    # if connect needs -lnsl, so does gethostbyname.
57508    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57509if test "x$ac_cv_func_connect" = xyes; then :
57510
57511fi
57512
57513    if test $ac_cv_func_connect = no; then
57514      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57515$as_echo_n "checking for connect in -lsocket... " >&6; }
57516if ${ac_cv_lib_socket_connect+:} false; then :
57517  $as_echo_n "(cached) " >&6
57518else
57519  ac_check_lib_save_LIBS=$LIBS
57520LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57522/* end confdefs.h.  */
57523
57524/* Override any GCC internal prototype to avoid an error.
57525   Use char because int might match the return type of a GCC
57526   builtin and then its argument prototype would still apply.  */
57527#ifdef __cplusplus
57528extern "C"
57529#endif
57530char connect ();
57531int
57532main ()
57533{
57534return connect ();
57535  ;
57536  return 0;
57537}
57538_ACEOF
57539if ac_fn_cxx_try_link "$LINENO"; then :
57540  ac_cv_lib_socket_connect=yes
57541else
57542  ac_cv_lib_socket_connect=no
57543fi
57544rm -f core conftest.err conftest.$ac_objext \
57545    conftest$ac_exeext conftest.$ac_ext
57546LIBS=$ac_check_lib_save_LIBS
57547fi
57548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57549$as_echo "$ac_cv_lib_socket_connect" >&6; }
57550if test "x$ac_cv_lib_socket_connect" = xyes; then :
57551  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57552fi
57553
57554    fi
57555
57556    # Guillermo Gomez says -lposix is necessary on A/UX.
57557    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57558if test "x$ac_cv_func_remove" = xyes; then :
57559
57560fi
57561
57562    if test $ac_cv_func_remove = no; then
57563      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57564$as_echo_n "checking for remove in -lposix... " >&6; }
57565if ${ac_cv_lib_posix_remove+:} false; then :
57566  $as_echo_n "(cached) " >&6
57567else
57568  ac_check_lib_save_LIBS=$LIBS
57569LIBS="-lposix  $LIBS"
57570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57571/* end confdefs.h.  */
57572
57573/* Override any GCC internal prototype to avoid an error.
57574   Use char because int might match the return type of a GCC
57575   builtin and then its argument prototype would still apply.  */
57576#ifdef __cplusplus
57577extern "C"
57578#endif
57579char remove ();
57580int
57581main ()
57582{
57583return remove ();
57584  ;
57585  return 0;
57586}
57587_ACEOF
57588if ac_fn_cxx_try_link "$LINENO"; then :
57589  ac_cv_lib_posix_remove=yes
57590else
57591  ac_cv_lib_posix_remove=no
57592fi
57593rm -f core conftest.err conftest.$ac_objext \
57594    conftest$ac_exeext conftest.$ac_ext
57595LIBS=$ac_check_lib_save_LIBS
57596fi
57597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57598$as_echo "$ac_cv_lib_posix_remove" >&6; }
57599if test "x$ac_cv_lib_posix_remove" = xyes; then :
57600  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57601fi
57602
57603    fi
57604
57605    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57606    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57607if test "x$ac_cv_func_shmat" = xyes; then :
57608
57609fi
57610
57611    if test $ac_cv_func_shmat = no; then
57612      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57613$as_echo_n "checking for shmat in -lipc... " >&6; }
57614if ${ac_cv_lib_ipc_shmat+:} false; then :
57615  $as_echo_n "(cached) " >&6
57616else
57617  ac_check_lib_save_LIBS=$LIBS
57618LIBS="-lipc  $LIBS"
57619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57620/* end confdefs.h.  */
57621
57622/* Override any GCC internal prototype to avoid an error.
57623   Use char because int might match the return type of a GCC
57624   builtin and then its argument prototype would still apply.  */
57625#ifdef __cplusplus
57626extern "C"
57627#endif
57628char shmat ();
57629int
57630main ()
57631{
57632return shmat ();
57633  ;
57634  return 0;
57635}
57636_ACEOF
57637if ac_fn_cxx_try_link "$LINENO"; then :
57638  ac_cv_lib_ipc_shmat=yes
57639else
57640  ac_cv_lib_ipc_shmat=no
57641fi
57642rm -f core conftest.err conftest.$ac_objext \
57643    conftest$ac_exeext conftest.$ac_ext
57644LIBS=$ac_check_lib_save_LIBS
57645fi
57646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57647$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57648if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57649  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57650fi
57651
57652    fi
57653  fi
57654
57655  # Check for libraries that X11R6 Xt/Xaw programs need.
57656  ac_save_LDFLAGS=$LDFLAGS
57657  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57658  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57659  # check for ICE first), but we must link in the order -lSM -lICE or
57660  # we get undefined symbols.  So assume we have SM if we have ICE.
57661  # These have to be linked with before -lX11, unlike the other
57662  # libraries we check for below, so use a different variable.
57663  # John Interrante, Karl Berry
57664  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57665$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57666if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57667  $as_echo_n "(cached) " >&6
57668else
57669  ac_check_lib_save_LIBS=$LIBS
57670LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57672/* end confdefs.h.  */
57673
57674/* Override any GCC internal prototype to avoid an error.
57675   Use char because int might match the return type of a GCC
57676   builtin and then its argument prototype would still apply.  */
57677#ifdef __cplusplus
57678extern "C"
57679#endif
57680char IceConnectionNumber ();
57681int
57682main ()
57683{
57684return IceConnectionNumber ();
57685  ;
57686  return 0;
57687}
57688_ACEOF
57689if ac_fn_cxx_try_link "$LINENO"; then :
57690  ac_cv_lib_ICE_IceConnectionNumber=yes
57691else
57692  ac_cv_lib_ICE_IceConnectionNumber=no
57693fi
57694rm -f core conftest.err conftest.$ac_objext \
57695    conftest$ac_exeext conftest.$ac_ext
57696LIBS=$ac_check_lib_save_LIBS
57697fi
57698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57699$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57700if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57701  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57702fi
57703
57704  LDFLAGS=$ac_save_LDFLAGS
57705
57706fi
57707
57708
57709    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57710    # this doesn't make sense so we remove it.
57711    if test "x$COMPILE_TYPE" = xcross; then
57712      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57713    fi
57714
57715    if test "x$no_x" = xyes; then
57716
57717  # Print a helpful message on how to acquire the necessary build dependency.
57718  # x11 is the help tag: freetype, cups, alsa etc
57719  MISSING_DEPENDENCY=x11
57720
57721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57722    cygwin_help $MISSING_DEPENDENCY
57723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57724    msys_help $MISSING_DEPENDENCY
57725  else
57726    PKGHANDLER_COMMAND=
57727
57728    case $PKGHANDLER in
57729      apt-get)
57730        apt_help     $MISSING_DEPENDENCY ;;
57731      yum)
57732        yum_help     $MISSING_DEPENDENCY ;;
57733      brew)
57734        brew_help    $MISSING_DEPENDENCY ;;
57735      port)
57736        port_help    $MISSING_DEPENDENCY ;;
57737      pkgutil)
57738        pkgutil_help $MISSING_DEPENDENCY ;;
57739      pkgadd)
57740        pkgadd_help  $MISSING_DEPENDENCY ;;
57741    esac
57742
57743    if test "x$PKGHANDLER_COMMAND" != x; then
57744      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57745    fi
57746  fi
57747
57748      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57749    fi
57750
57751    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57752      OPENWIN_HOME="/usr/openwin"
57753      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57754      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57755          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57756    fi
57757
57758    ac_ext=c
57759ac_cpp='$CPP $CPPFLAGS'
57760ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57761ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57762ac_compiler_gnu=$ac_cv_c_compiler_gnu
57763
57764    OLD_CFLAGS="$CFLAGS"
57765    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57766
57767    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57768    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57769do :
57770  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57771ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57772          # include <X11/Xlib.h>
57773          # include <X11/Xutil.h>
57774
57775
57776"
57777if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57778  cat >>confdefs.h <<_ACEOF
57779#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57780_ACEOF
57781 X11_HEADERS_OK=yes
57782else
57783  X11_HEADERS_OK=no; break
57784fi
57785
57786done
57787
57788
57789    if test "x$X11_HEADERS_OK" = xno; then
57790
57791  # Print a helpful message on how to acquire the necessary build dependency.
57792  # x11 is the help tag: freetype, cups, alsa etc
57793  MISSING_DEPENDENCY=x11
57794
57795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57796    cygwin_help $MISSING_DEPENDENCY
57797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57798    msys_help $MISSING_DEPENDENCY
57799  else
57800    PKGHANDLER_COMMAND=
57801
57802    case $PKGHANDLER in
57803      apt-get)
57804        apt_help     $MISSING_DEPENDENCY ;;
57805      yum)
57806        yum_help     $MISSING_DEPENDENCY ;;
57807      brew)
57808        brew_help    $MISSING_DEPENDENCY ;;
57809      port)
57810        port_help    $MISSING_DEPENDENCY ;;
57811      pkgutil)
57812        pkgutil_help $MISSING_DEPENDENCY ;;
57813      pkgadd)
57814        pkgadd_help  $MISSING_DEPENDENCY ;;
57815    esac
57816
57817    if test "x$PKGHANDLER_COMMAND" != x; then
57818      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57819    fi
57820  fi
57821
57822      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57823    fi
57824
57825    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57826    # defined in libawt_xawt.
57827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57828$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57829    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57830/* end confdefs.h.  */
57831#include <X11/extensions/Xrender.h>
57832int
57833main ()
57834{
57835XLinearGradient x;
57836  ;
57837  return 0;
57838}
57839_ACEOF
57840if ac_fn_c_try_compile "$LINENO"; then :
57841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57842$as_echo "yes" >&6; }
57843else
57844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57845$as_echo "no" >&6; }
57846         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57847fi
57848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57849
57850    CFLAGS="$OLD_CFLAGS"
57851    ac_ext=cpp
57852ac_cpp='$CXXCPP $CPPFLAGS'
57853ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57854ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57855ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57856
57857  fi # NEEDS_LIB_X11
57858
57859
57860
57861
57862
57863
57864# Check whether --with-cups was given.
57865if test "${with_cups+set}" = set; then :
57866  withval=$with_cups;
57867fi
57868
57869
57870# Check whether --with-cups-include was given.
57871if test "${with_cups_include+set}" = set; then :
57872  withval=$with_cups_include;
57873fi
57874
57875
57876  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57877    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57878        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57879      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57880$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57881    fi
57882    CUPS_CFLAGS=
57883  else
57884    CUPS_FOUND=no
57885
57886    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57887      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57888    fi
57889
57890    if test "x${with_cups}" != x; then
57891      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57892$as_echo_n "checking for cups headers... " >&6; }
57893      if test -s "${with_cups}/include/cups/cups.h"; then
57894        CUPS_CFLAGS="-I${with_cups}/include"
57895        CUPS_FOUND=yes
57896        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57897$as_echo "$CUPS_FOUND" >&6; }
57898      else
57899        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57900      fi
57901    fi
57902    if test "x${with_cups_include}" != x; then
57903      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57904$as_echo_n "checking for cups headers... " >&6; }
57905      if test -s "${with_cups_include}/cups/cups.h"; then
57906        CUPS_CFLAGS="-I${with_cups_include}"
57907        CUPS_FOUND=yes
57908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57909$as_echo "$CUPS_FOUND" >&6; }
57910      else
57911        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57912      fi
57913    fi
57914    if test "x$CUPS_FOUND" = xno; then
57915      # Are the cups headers installed in the default /usr/include location?
57916      for ac_header in cups/cups.h cups/ppd.h
57917do :
57918  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57919ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57920if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57921  cat >>confdefs.h <<_ACEOF
57922#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57923_ACEOF
57924
57925          CUPS_FOUND=yes
57926          CUPS_CFLAGS=
57927          DEFAULT_CUPS=yes
57928
57929fi
57930
57931done
57932
57933    fi
57934    if test "x$CUPS_FOUND" = xno; then
57935
57936  # Print a helpful message on how to acquire the necessary build dependency.
57937  # cups is the help tag: freetype, cups, alsa etc
57938  MISSING_DEPENDENCY=cups
57939
57940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57941    cygwin_help $MISSING_DEPENDENCY
57942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57943    msys_help $MISSING_DEPENDENCY
57944  else
57945    PKGHANDLER_COMMAND=
57946
57947    case $PKGHANDLER in
57948      apt-get)
57949        apt_help     $MISSING_DEPENDENCY ;;
57950      yum)
57951        yum_help     $MISSING_DEPENDENCY ;;
57952      brew)
57953        brew_help    $MISSING_DEPENDENCY ;;
57954      port)
57955        port_help    $MISSING_DEPENDENCY ;;
57956      pkgutil)
57957        pkgutil_help $MISSING_DEPENDENCY ;;
57958      pkgadd)
57959        pkgadd_help  $MISSING_DEPENDENCY ;;
57960    esac
57961
57962    if test "x$PKGHANDLER_COMMAND" != x; then
57963      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57964    fi
57965  fi
57966
57967      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57968    fi
57969  fi
57970
57971
57972
57973
57974
57975# Check whether --with-freetype was given.
57976if test "${with_freetype+set}" = set; then :
57977  withval=$with_freetype;
57978fi
57979
57980
57981# Check whether --with-freetype-include was given.
57982if test "${with_freetype_include+set}" = set; then :
57983  withval=$with_freetype_include;
57984fi
57985
57986
57987# Check whether --with-freetype-lib was given.
57988if test "${with_freetype_lib+set}" = set; then :
57989  withval=$with_freetype_lib;
57990fi
57991
57992
57993# Check whether --with-freetype-src was given.
57994if test "${with_freetype_src+set}" = set; then :
57995  withval=$with_freetype_src;
57996fi
57997
57998  # Check whether --enable-freetype-bundling was given.
57999if test "${enable_freetype_bundling+set}" = set; then :
58000  enableval=$enable_freetype_bundling;
58001fi
58002
58003
58004  # Need to specify explicitly since it needs to be overridden on some versions of macosx
58005  FREETYPE_BASE_NAME=freetype
58006  FREETYPE_CFLAGS=
58007  FREETYPE_LIBS=
58008  FREETYPE_BUNDLE_LIB_PATH=
58009
58010  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
58011    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
58012        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
58013        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
58014        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
58015      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
58016$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
58017    fi
58018    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
58019      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
58020$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
58021    fi
58022  else
58023    # freetype is needed to build; go get it!
58024
58025    BUNDLE_FREETYPE="$enable_freetype_bundling"
58026
58027    if  test "x$with_freetype_src" != x; then
58028      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58029        # Try to build freetype if --with-freetype-src was given on Windows
58030
58031  FREETYPE_SRC_PATH="$with_freetype_src"
58032  BUILD_FREETYPE=yes
58033
58034  # Check if the freetype sources are acessible..
58035  if ! test -d $FREETYPE_SRC_PATH; then
58036    { $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
58037$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
58038    BUILD_FREETYPE=no
58039  fi
58040  # ..and contain a vc2010 project file
58041  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
58042  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
58043    { $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
58044$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
58045    BUILD_FREETYPE=no
58046  fi
58047  # Now check if configure found a version of 'msbuild.exe'
58048  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
58049    { $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
58050$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;}
58051    BUILD_FREETYPE=no
58052  fi
58053
58054  # Ready to go..
58055  if test "x$BUILD_FREETYPE" = xyes; then
58056    # msbuild requires trailing slashes for output directories
58057    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
58058    freetype_lib_path_unix="$freetype_lib_path"
58059    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
58060
58061  unix_path="$vcxproj_path"
58062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58063    windows_path=`$CYGPATH -m "$unix_path"`
58064    vcxproj_path="$windows_path"
58065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58066    windows_path=`cmd //c echo $unix_path`
58067    vcxproj_path="$windows_path"
58068  fi
58069
58070
58071  unix_path="$freetype_lib_path"
58072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58073    windows_path=`$CYGPATH -m "$unix_path"`
58074    freetype_lib_path="$windows_path"
58075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58076    windows_path=`cmd //c echo $unix_path`
58077    freetype_lib_path="$windows_path"
58078  fi
58079
58080
58081  unix_path="$freetype_obj_path"
58082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58083    windows_path=`$CYGPATH -m "$unix_path"`
58084    freetype_obj_path="$windows_path"
58085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58086    windows_path=`cmd //c echo $unix_path`
58087    freetype_obj_path="$windows_path"
58088  fi
58089
58090    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58091      freetype_platform=x64
58092    else
58093      freetype_platform=win32
58094    fi
58095
58096    # The original freetype project file is for VS 2010 (i.e. 'v100'),
58097    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
58098    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
58099    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
58100    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
58101$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
58102
58103    # First we try to build the freetype.dll
58104    $ECHO -e "@echo off\n"\
58105        "$MSBUILD $vcxproj_path "\
58106        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58107        "/p:Configuration=\"Release Multithreaded\" "\
58108        "/p:Platform=$freetype_platform "\
58109        "/p:ConfigurationType=DynamicLibrary "\
58110        "/p:TargetName=freetype "\
58111        "/p:OutDir=\"$freetype_lib_path\" "\
58112        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
58113    cmd /c freetype.bat
58114
58115    if test -s "$freetype_lib_path_unix/freetype.dll"; then
58116      # If that succeeds we also build freetype.lib
58117      $ECHO -e "@echo off\n"\
58118          "$MSBUILD $vcxproj_path "\
58119          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58120          "/p:Configuration=\"Release Multithreaded\" "\
58121          "/p:Platform=$freetype_platform "\
58122          "/p:ConfigurationType=StaticLibrary "\
58123          "/p:TargetName=freetype "\
58124          "/p:OutDir=\"$freetype_lib_path\" "\
58125          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
58126      cmd /c freetype.bat
58127
58128      if test -s "$freetype_lib_path_unix/freetype.lib"; then
58129        # Once we build both, lib and dll, set freetype lib and include path appropriately
58130        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
58131        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
58132        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
58133$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
58134      else
58135        BUILD_FREETYPE=no
58136      fi
58137    else
58138      BUILD_FREETYPE=no
58139    fi
58140  fi
58141
58142        if test "x$BUILD_FREETYPE" = xyes; then
58143          # Okay, we built it. Check that it works.
58144
58145  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58146  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58147  METHOD="--with-freetype-src"
58148
58149  # Let's start with an optimistic view of the world :-)
58150  FOUND_FREETYPE=yes
58151
58152  # First look for the canonical freetype main include file ft2build.h.
58153  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58154    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58155    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58156    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58157      # Fail.
58158      FOUND_FREETYPE=no
58159    fi
58160  fi
58161
58162  if test "x$FOUND_FREETYPE" = xyes; then
58163    # Include file found, let's continue the sanity check.
58164    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58165$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58166
58167    # Reset to default value
58168    FREETYPE_BASE_NAME=freetype
58169    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58170    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58171      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58172          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58173        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58174        # for the .6 version explicitly.
58175        FREETYPE_BASE_NAME=freetype.6
58176        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58177        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58178$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58179      else
58180        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58181$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58182        FOUND_FREETYPE=no
58183      fi
58184    else
58185      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58186        # On Windows, we will need both .lib and .dll file.
58187        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58188          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58189$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58190          FOUND_FREETYPE=no
58191        fi
58192      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58193          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58194        # Found lib in isa dir, use that instead.
58195        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58196        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58197$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58198      fi
58199    fi
58200  fi
58201
58202  if test "x$FOUND_FREETYPE" = xyes; then
58203
58204  # Only process if variable expands to non-empty
58205
58206  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58207    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58208
58209  # Input might be given as Windows format, start by converting to
58210  # unix format.
58211  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58212  new_path=`$CYGPATH -u "$path"`
58213
58214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58217  # "foo.exe" is OK but "foo" is an error.
58218  #
58219  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58220  # It is also a way to make sure we got the proper file name for the real test later on.
58221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58222  if test "x$test_shortpath" = x; then
58223    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58224$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58225    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58226  fi
58227
58228  # Call helper function which possibly converts this using DOS-style short mode.
58229  # If so, the updated path is stored in $new_path.
58230
58231  input_path="$new_path"
58232  # Check if we need to convert this using DOS-style short mode. If the path
58233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58234  # take no chances and rewrite it.
58235  # Note: m4 eats our [], so we need to use [ and ] instead.
58236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58237  if test "x$has_forbidden_chars" != x; then
58238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58242      # Going to short mode and back again did indeed matter. Since short mode is
58243      # case insensitive, let's make it lowercase to improve readability.
58244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58245      # Now convert it back to Unix-style (cygpath)
58246      input_path=`$CYGPATH -u "$shortmode_path"`
58247      new_path="$input_path"
58248    fi
58249  fi
58250
58251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58252  if test "x$test_cygdrive_prefix" = x; then
58253    # As a simple fix, exclude /usr/bin since it's not a real path.
58254    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58256      # a path prefixed by /cygdrive for fixpath to work.
58257      new_path="$CYGWIN_ROOT_PATH$input_path"
58258    fi
58259  fi
58260
58261
58262  if test "x$path" != "x$new_path"; then
58263    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58265$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58266  fi
58267
58268    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58269
58270  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58271  has_colon=`$ECHO $path | $GREP ^.:`
58272  new_path="$path"
58273  if test "x$has_colon" = x; then
58274    # Not in mixed or Windows style, start by that.
58275    new_path=`cmd //c echo $path`
58276  fi
58277
58278
58279  input_path="$new_path"
58280  # Check if we need to convert this using DOS-style short mode. If the path
58281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58282  # take no chances and rewrite it.
58283  # Note: m4 eats our [], so we need to use [ and ] instead.
58284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58285  if test "x$has_forbidden_chars" != x; then
58286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58288  fi
58289
58290
58291  windows_path="$new_path"
58292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58293    unix_path=`$CYGPATH -u "$windows_path"`
58294    new_path="$unix_path"
58295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58297    new_path="$unix_path"
58298  fi
58299
58300  if test "x$path" != "x$new_path"; then
58301    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58303$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58304  fi
58305
58306  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58307  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58308
58309    else
58310      # We're on a unix platform. Hooray! :)
58311      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58312      has_space=`$ECHO "$path" | $GREP " "`
58313      if test "x$has_space" != x; then
58314        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58315$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58316        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58317      fi
58318
58319      # Use eval to expand a potential ~
58320      eval path="$path"
58321      if test ! -f "$path" && test ! -d "$path"; then
58322        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58323      fi
58324
58325      if test -d "$path"; then
58326        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58327      else
58328        dir="`$DIRNAME "$path"`"
58329        base="`$BASENAME "$path"`"
58330        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58331      fi
58332    fi
58333  fi
58334
58335
58336  # Only process if variable expands to non-empty
58337
58338  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58340
58341  # Input might be given as Windows format, start by converting to
58342  # unix format.
58343  path="$POTENTIAL_FREETYPE_LIB_PATH"
58344  new_path=`$CYGPATH -u "$path"`
58345
58346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58349  # "foo.exe" is OK but "foo" is an error.
58350  #
58351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58352  # It is also a way to make sure we got the proper file name for the real test later on.
58353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58354  if test "x$test_shortpath" = x; then
58355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58356$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58357    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58358  fi
58359
58360  # Call helper function which possibly converts this using DOS-style short mode.
58361  # If so, the updated path is stored in $new_path.
58362
58363  input_path="$new_path"
58364  # Check if we need to convert this using DOS-style short mode. If the path
58365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58366  # take no chances and rewrite it.
58367  # Note: m4 eats our [], so we need to use [ and ] instead.
58368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58369  if test "x$has_forbidden_chars" != x; then
58370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58374      # Going to short mode and back again did indeed matter. Since short mode is
58375      # case insensitive, let's make it lowercase to improve readability.
58376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58377      # Now convert it back to Unix-style (cygpath)
58378      input_path=`$CYGPATH -u "$shortmode_path"`
58379      new_path="$input_path"
58380    fi
58381  fi
58382
58383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58384  if test "x$test_cygdrive_prefix" = x; then
58385    # As a simple fix, exclude /usr/bin since it's not a real path.
58386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58388      # a path prefixed by /cygdrive for fixpath to work.
58389      new_path="$CYGWIN_ROOT_PATH$input_path"
58390    fi
58391  fi
58392
58393
58394  if test "x$path" != "x$new_path"; then
58395    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58397$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58398  fi
58399
58400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58401
58402  path="$POTENTIAL_FREETYPE_LIB_PATH"
58403  has_colon=`$ECHO $path | $GREP ^.:`
58404  new_path="$path"
58405  if test "x$has_colon" = x; then
58406    # Not in mixed or Windows style, start by that.
58407    new_path=`cmd //c echo $path`
58408  fi
58409
58410
58411  input_path="$new_path"
58412  # Check if we need to convert this using DOS-style short mode. If the path
58413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58414  # take no chances and rewrite it.
58415  # Note: m4 eats our [], so we need to use [ and ] instead.
58416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58417  if test "x$has_forbidden_chars" != x; then
58418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58420  fi
58421
58422
58423  windows_path="$new_path"
58424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58425    unix_path=`$CYGPATH -u "$windows_path"`
58426    new_path="$unix_path"
58427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58429    new_path="$unix_path"
58430  fi
58431
58432  if test "x$path" != "x$new_path"; then
58433    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58435$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58436  fi
58437
58438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58440
58441    else
58442      # We're on a unix platform. Hooray! :)
58443      path="$POTENTIAL_FREETYPE_LIB_PATH"
58444      has_space=`$ECHO "$path" | $GREP " "`
58445      if test "x$has_space" != x; then
58446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58447$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58448        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58449      fi
58450
58451      # Use eval to expand a potential ~
58452      eval path="$path"
58453      if test ! -f "$path" && test ! -d "$path"; then
58454        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58455      fi
58456
58457      if test -d "$path"; then
58458        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58459      else
58460        dir="`$DIRNAME "$path"`"
58461        base="`$BASENAME "$path"`"
58462        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58463      fi
58464    fi
58465  fi
58466
58467
58468    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58469    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58470$as_echo_n "checking for freetype includes... " >&6; }
58471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58472$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58473    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58475$as_echo_n "checking for freetype libraries... " >&6; }
58476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58477$as_echo "$FREETYPE_LIB_PATH" >&6; }
58478  fi
58479
58480          if test "x$FOUND_FREETYPE" != xyes; then
58481            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
58482          fi
58483        else
58484          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
58485$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58486          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58487        fi
58488      else
58489        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58490$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58491      fi
58492    fi
58493
58494    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58495      # User has specified settings
58496
58497      if test "x$BUNDLE_FREETYPE" = x; then
58498        # If not specified, default is to bundle freetype
58499        BUNDLE_FREETYPE=yes
58500      fi
58501
58502      if test "x$with_freetype" != x; then
58503        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58504        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58505      fi
58506
58507      # Allow --with-freetype-lib and --with-freetype-include to override
58508      if test "x$with_freetype_include" != x; then
58509        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58510      fi
58511      if test "x$with_freetype_lib" != x; then
58512        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58513      fi
58514
58515      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58516        # Okay, we got it. Check that it works.
58517
58518  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58519  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58520  METHOD="--with-freetype"
58521
58522  # Let's start with an optimistic view of the world :-)
58523  FOUND_FREETYPE=yes
58524
58525  # First look for the canonical freetype main include file ft2build.h.
58526  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58527    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58528    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58529    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58530      # Fail.
58531      FOUND_FREETYPE=no
58532    fi
58533  fi
58534
58535  if test "x$FOUND_FREETYPE" = xyes; then
58536    # Include file found, let's continue the sanity check.
58537    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58538$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58539
58540    # Reset to default value
58541    FREETYPE_BASE_NAME=freetype
58542    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58543    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58544      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58545          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58546        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58547        # for the .6 version explicitly.
58548        FREETYPE_BASE_NAME=freetype.6
58549        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58550        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58551$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58552      else
58553        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58554$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58555        FOUND_FREETYPE=no
58556      fi
58557    else
58558      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58559        # On Windows, we will need both .lib and .dll file.
58560        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58561          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58562$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58563          FOUND_FREETYPE=no
58564        fi
58565      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58566          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58567        # Found lib in isa dir, use that instead.
58568        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58569        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58570$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58571      fi
58572    fi
58573  fi
58574
58575  if test "x$FOUND_FREETYPE" = xyes; then
58576
58577  # Only process if variable expands to non-empty
58578
58579  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58580    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58581
58582  # Input might be given as Windows format, start by converting to
58583  # unix format.
58584  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58585  new_path=`$CYGPATH -u "$path"`
58586
58587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58590  # "foo.exe" is OK but "foo" is an error.
58591  #
58592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58593  # It is also a way to make sure we got the proper file name for the real test later on.
58594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58595  if test "x$test_shortpath" = x; then
58596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58597$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58598    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58599  fi
58600
58601  # Call helper function which possibly converts this using DOS-style short mode.
58602  # If so, the updated path is stored in $new_path.
58603
58604  input_path="$new_path"
58605  # Check if we need to convert this using DOS-style short mode. If the path
58606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58607  # take no chances and rewrite it.
58608  # Note: m4 eats our [], so we need to use [ and ] instead.
58609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58610  if test "x$has_forbidden_chars" != x; then
58611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58615      # Going to short mode and back again did indeed matter. Since short mode is
58616      # case insensitive, let's make it lowercase to improve readability.
58617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58618      # Now convert it back to Unix-style (cygpath)
58619      input_path=`$CYGPATH -u "$shortmode_path"`
58620      new_path="$input_path"
58621    fi
58622  fi
58623
58624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58625  if test "x$test_cygdrive_prefix" = x; then
58626    # As a simple fix, exclude /usr/bin since it's not a real path.
58627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58629      # a path prefixed by /cygdrive for fixpath to work.
58630      new_path="$CYGWIN_ROOT_PATH$input_path"
58631    fi
58632  fi
58633
58634
58635  if test "x$path" != "x$new_path"; then
58636    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58638$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58639  fi
58640
58641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58642
58643  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58644  has_colon=`$ECHO $path | $GREP ^.:`
58645  new_path="$path"
58646  if test "x$has_colon" = x; then
58647    # Not in mixed or Windows style, start by that.
58648    new_path=`cmd //c echo $path`
58649  fi
58650
58651
58652  input_path="$new_path"
58653  # Check if we need to convert this using DOS-style short mode. If the path
58654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58655  # take no chances and rewrite it.
58656  # Note: m4 eats our [], so we need to use [ and ] instead.
58657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58658  if test "x$has_forbidden_chars" != x; then
58659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58661  fi
58662
58663
58664  windows_path="$new_path"
58665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58666    unix_path=`$CYGPATH -u "$windows_path"`
58667    new_path="$unix_path"
58668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58670    new_path="$unix_path"
58671  fi
58672
58673  if test "x$path" != "x$new_path"; then
58674    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58676$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58677  fi
58678
58679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58681
58682    else
58683      # We're on a unix platform. Hooray! :)
58684      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58685      has_space=`$ECHO "$path" | $GREP " "`
58686      if test "x$has_space" != x; then
58687        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58688$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58689        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58690      fi
58691
58692      # Use eval to expand a potential ~
58693      eval path="$path"
58694      if test ! -f "$path" && test ! -d "$path"; then
58695        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58696      fi
58697
58698      if test -d "$path"; then
58699        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58700      else
58701        dir="`$DIRNAME "$path"`"
58702        base="`$BASENAME "$path"`"
58703        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58704      fi
58705    fi
58706  fi
58707
58708
58709  # Only process if variable expands to non-empty
58710
58711  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58712    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58713
58714  # Input might be given as Windows format, start by converting to
58715  # unix format.
58716  path="$POTENTIAL_FREETYPE_LIB_PATH"
58717  new_path=`$CYGPATH -u "$path"`
58718
58719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58722  # "foo.exe" is OK but "foo" is an error.
58723  #
58724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58725  # It is also a way to make sure we got the proper file name for the real test later on.
58726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58727  if test "x$test_shortpath" = x; then
58728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58729$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58730    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58731  fi
58732
58733  # Call helper function which possibly converts this using DOS-style short mode.
58734  # If so, the updated path is stored in $new_path.
58735
58736  input_path="$new_path"
58737  # Check if we need to convert this using DOS-style short mode. If the path
58738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58739  # take no chances and rewrite it.
58740  # Note: m4 eats our [], so we need to use [ and ] instead.
58741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58742  if test "x$has_forbidden_chars" != x; then
58743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58747      # Going to short mode and back again did indeed matter. Since short mode is
58748      # case insensitive, let's make it lowercase to improve readability.
58749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58750      # Now convert it back to Unix-style (cygpath)
58751      input_path=`$CYGPATH -u "$shortmode_path"`
58752      new_path="$input_path"
58753    fi
58754  fi
58755
58756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58757  if test "x$test_cygdrive_prefix" = x; then
58758    # As a simple fix, exclude /usr/bin since it's not a real path.
58759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58761      # a path prefixed by /cygdrive for fixpath to work.
58762      new_path="$CYGWIN_ROOT_PATH$input_path"
58763    fi
58764  fi
58765
58766
58767  if test "x$path" != "x$new_path"; then
58768    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58770$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58771  fi
58772
58773    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58774
58775  path="$POTENTIAL_FREETYPE_LIB_PATH"
58776  has_colon=`$ECHO $path | $GREP ^.:`
58777  new_path="$path"
58778  if test "x$has_colon" = x; then
58779    # Not in mixed or Windows style, start by that.
58780    new_path=`cmd //c echo $path`
58781  fi
58782
58783
58784  input_path="$new_path"
58785  # Check if we need to convert this using DOS-style short mode. If the path
58786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58787  # take no chances and rewrite it.
58788  # Note: m4 eats our [], so we need to use [ and ] instead.
58789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58790  if test "x$has_forbidden_chars" != x; then
58791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58793  fi
58794
58795
58796  windows_path="$new_path"
58797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58798    unix_path=`$CYGPATH -u "$windows_path"`
58799    new_path="$unix_path"
58800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58802    new_path="$unix_path"
58803  fi
58804
58805  if test "x$path" != "x$new_path"; then
58806    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58808$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58809  fi
58810
58811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58813
58814    else
58815      # We're on a unix platform. Hooray! :)
58816      path="$POTENTIAL_FREETYPE_LIB_PATH"
58817      has_space=`$ECHO "$path" | $GREP " "`
58818      if test "x$has_space" != x; then
58819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58820$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58821        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58822      fi
58823
58824      # Use eval to expand a potential ~
58825      eval path="$path"
58826      if test ! -f "$path" && test ! -d "$path"; then
58827        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58828      fi
58829
58830      if test -d "$path"; then
58831        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58832      else
58833        dir="`$DIRNAME "$path"`"
58834        base="`$BASENAME "$path"`"
58835        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58836      fi
58837    fi
58838  fi
58839
58840
58841    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58842    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58843$as_echo_n "checking for freetype includes... " >&6; }
58844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58845$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58846    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58847    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58848$as_echo_n "checking for freetype libraries... " >&6; }
58849    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58850$as_echo "$FREETYPE_LIB_PATH" >&6; }
58851  fi
58852
58853        if test "x$FOUND_FREETYPE" != xyes; then
58854          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58855        fi
58856      else
58857        # User specified only one of lib or include. This is an error.
58858        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58859          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58860$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58861          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58862        else
58863          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58864$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58865          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58866        fi
58867      fi
58868    else
58869      # User did not specify settings, but we need freetype. Try to locate it.
58870
58871      if test "x$BUNDLE_FREETYPE" = x; then
58872        # If not specified, default is to bundle freetype only on windows
58873        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58874          BUNDLE_FREETYPE=yes
58875        else
58876          BUNDLE_FREETYPE=no
58877        fi
58878      fi
58879
58880      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58881      if test "x$SYSROOT" = x; then
58882        if test "x$FOUND_FREETYPE" != xyes; then
58883          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58884          if test "x$PKG_CONFIG" != x; then
58885
58886pkg_failed=no
58887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58888$as_echo_n "checking for FREETYPE... " >&6; }
58889
58890if test -n "$FREETYPE_CFLAGS"; then
58891    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58892 elif test -n "$PKG_CONFIG"; then
58893    if test -n "$PKG_CONFIG" && \
58894    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58895  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58896  ac_status=$?
58897  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58898  test $ac_status = 0; }; then
58899  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58900else
58901  pkg_failed=yes
58902fi
58903 else
58904    pkg_failed=untried
58905fi
58906if test -n "$FREETYPE_LIBS"; then
58907    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58908 elif test -n "$PKG_CONFIG"; then
58909    if test -n "$PKG_CONFIG" && \
58910    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58911  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58912  ac_status=$?
58913  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58914  test $ac_status = 0; }; then
58915  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58916else
58917  pkg_failed=yes
58918fi
58919 else
58920    pkg_failed=untried
58921fi
58922
58923
58924
58925if test $pkg_failed = yes; then
58926
58927if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58928        _pkg_short_errors_supported=yes
58929else
58930        _pkg_short_errors_supported=no
58931fi
58932        if test $_pkg_short_errors_supported = yes; then
58933	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58934        else
58935	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58936        fi
58937	# Put the nasty error message in config.log where it belongs
58938	echo "$FREETYPE_PKG_ERRORS" >&5
58939
58940	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58941$as_echo "no" >&6; }
58942                FOUND_FREETYPE=no
58943elif test $pkg_failed = untried; then
58944	FOUND_FREETYPE=no
58945else
58946	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58947	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58949$as_echo "yes" >&6; }
58950	FOUND_FREETYPE=yes
58951fi
58952            if test "x$FOUND_FREETYPE" = xyes; then
58953              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58954              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58955              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58956              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58957                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58958              fi
58959              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58960              if test "x$BUNDLE_FREETYPE" = xyes; then
58961                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58962$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58963                FOUND_FREETYPE=no
58964              else
58965                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58966$as_echo_n "checking for freetype... " >&6; }
58967                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58968$as_echo "yes (using pkg-config)" >&6; }
58969              fi
58970            fi
58971          fi
58972        fi
58973      fi
58974
58975      if test "x$FOUND_FREETYPE" != xyes; then
58976        # Check in well-known locations
58977        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58978          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58979
58980  windows_path="$FREETYPE_BASE_DIR"
58981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58982    unix_path=`$CYGPATH -u "$windows_path"`
58983    FREETYPE_BASE_DIR="$unix_path"
58984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58986    FREETYPE_BASE_DIR="$unix_path"
58987  fi
58988
58989
58990  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58991  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58992  METHOD="well-known location"
58993
58994  # Let's start with an optimistic view of the world :-)
58995  FOUND_FREETYPE=yes
58996
58997  # First look for the canonical freetype main include file ft2build.h.
58998  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58999    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59000    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59001    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59002      # Fail.
59003      FOUND_FREETYPE=no
59004    fi
59005  fi
59006
59007  if test "x$FOUND_FREETYPE" = xyes; then
59008    # Include file found, let's continue the sanity check.
59009    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59010$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59011
59012    # Reset to default value
59013    FREETYPE_BASE_NAME=freetype
59014    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59015    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59016      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59017          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59018        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59019        # for the .6 version explicitly.
59020        FREETYPE_BASE_NAME=freetype.6
59021        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59022        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59023$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59024      else
59025        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59026$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59027        FOUND_FREETYPE=no
59028      fi
59029    else
59030      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59031        # On Windows, we will need both .lib and .dll file.
59032        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59033          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59034$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59035          FOUND_FREETYPE=no
59036        fi
59037      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59038          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59039        # Found lib in isa dir, use that instead.
59040        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59041        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59042$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59043      fi
59044    fi
59045  fi
59046
59047  if test "x$FOUND_FREETYPE" = xyes; then
59048
59049  # Only process if variable expands to non-empty
59050
59051  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59052    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59053
59054  # Input might be given as Windows format, start by converting to
59055  # unix format.
59056  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59057  new_path=`$CYGPATH -u "$path"`
59058
59059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59062  # "foo.exe" is OK but "foo" is an error.
59063  #
59064  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59065  # It is also a way to make sure we got the proper file name for the real test later on.
59066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59067  if test "x$test_shortpath" = x; then
59068    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59069$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59070    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59071  fi
59072
59073  # Call helper function which possibly converts this using DOS-style short mode.
59074  # If so, the updated path is stored in $new_path.
59075
59076  input_path="$new_path"
59077  # Check if we need to convert this using DOS-style short mode. If the path
59078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59079  # take no chances and rewrite it.
59080  # Note: m4 eats our [], so we need to use [ and ] instead.
59081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59082  if test "x$has_forbidden_chars" != x; then
59083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59087      # Going to short mode and back again did indeed matter. Since short mode is
59088      # case insensitive, let's make it lowercase to improve readability.
59089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59090      # Now convert it back to Unix-style (cygpath)
59091      input_path=`$CYGPATH -u "$shortmode_path"`
59092      new_path="$input_path"
59093    fi
59094  fi
59095
59096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59097  if test "x$test_cygdrive_prefix" = x; then
59098    # As a simple fix, exclude /usr/bin since it's not a real path.
59099    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59101      # a path prefixed by /cygdrive for fixpath to work.
59102      new_path="$CYGWIN_ROOT_PATH$input_path"
59103    fi
59104  fi
59105
59106
59107  if test "x$path" != "x$new_path"; then
59108    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59110$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59111  fi
59112
59113    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59114
59115  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59116  has_colon=`$ECHO $path | $GREP ^.:`
59117  new_path="$path"
59118  if test "x$has_colon" = x; then
59119    # Not in mixed or Windows style, start by that.
59120    new_path=`cmd //c echo $path`
59121  fi
59122
59123
59124  input_path="$new_path"
59125  # Check if we need to convert this using DOS-style short mode. If the path
59126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59127  # take no chances and rewrite it.
59128  # Note: m4 eats our [], so we need to use [ and ] instead.
59129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59130  if test "x$has_forbidden_chars" != x; then
59131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59133  fi
59134
59135
59136  windows_path="$new_path"
59137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59138    unix_path=`$CYGPATH -u "$windows_path"`
59139    new_path="$unix_path"
59140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59142    new_path="$unix_path"
59143  fi
59144
59145  if test "x$path" != "x$new_path"; then
59146    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59148$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59149  fi
59150
59151  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59152  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59153
59154    else
59155      # We're on a unix platform. Hooray! :)
59156      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59157      has_space=`$ECHO "$path" | $GREP " "`
59158      if test "x$has_space" != x; then
59159        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59160$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59161        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59162      fi
59163
59164      # Use eval to expand a potential ~
59165      eval path="$path"
59166      if test ! -f "$path" && test ! -d "$path"; then
59167        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59168      fi
59169
59170      if test -d "$path"; then
59171        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59172      else
59173        dir="`$DIRNAME "$path"`"
59174        base="`$BASENAME "$path"`"
59175        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59176      fi
59177    fi
59178  fi
59179
59180
59181  # Only process if variable expands to non-empty
59182
59183  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59185
59186  # Input might be given as Windows format, start by converting to
59187  # unix format.
59188  path="$POTENTIAL_FREETYPE_LIB_PATH"
59189  new_path=`$CYGPATH -u "$path"`
59190
59191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59194  # "foo.exe" is OK but "foo" is an error.
59195  #
59196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59197  # It is also a way to make sure we got the proper file name for the real test later on.
59198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59199  if test "x$test_shortpath" = x; then
59200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59201$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59202    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59203  fi
59204
59205  # Call helper function which possibly converts this using DOS-style short mode.
59206  # If so, the updated path is stored in $new_path.
59207
59208  input_path="$new_path"
59209  # Check if we need to convert this using DOS-style short mode. If the path
59210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59211  # take no chances and rewrite it.
59212  # Note: m4 eats our [], so we need to use [ and ] instead.
59213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59214  if test "x$has_forbidden_chars" != x; then
59215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59219      # Going to short mode and back again did indeed matter. Since short mode is
59220      # case insensitive, let's make it lowercase to improve readability.
59221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59222      # Now convert it back to Unix-style (cygpath)
59223      input_path=`$CYGPATH -u "$shortmode_path"`
59224      new_path="$input_path"
59225    fi
59226  fi
59227
59228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59229  if test "x$test_cygdrive_prefix" = x; then
59230    # As a simple fix, exclude /usr/bin since it's not a real path.
59231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59233      # a path prefixed by /cygdrive for fixpath to work.
59234      new_path="$CYGWIN_ROOT_PATH$input_path"
59235    fi
59236  fi
59237
59238
59239  if test "x$path" != "x$new_path"; then
59240    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59242$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59243  fi
59244
59245    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59246
59247  path="$POTENTIAL_FREETYPE_LIB_PATH"
59248  has_colon=`$ECHO $path | $GREP ^.:`
59249  new_path="$path"
59250  if test "x$has_colon" = x; then
59251    # Not in mixed or Windows style, start by that.
59252    new_path=`cmd //c echo $path`
59253  fi
59254
59255
59256  input_path="$new_path"
59257  # Check if we need to convert this using DOS-style short mode. If the path
59258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59259  # take no chances and rewrite it.
59260  # Note: m4 eats our [], so we need to use [ and ] instead.
59261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59262  if test "x$has_forbidden_chars" != x; then
59263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59265  fi
59266
59267
59268  windows_path="$new_path"
59269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59270    unix_path=`$CYGPATH -u "$windows_path"`
59271    new_path="$unix_path"
59272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59274    new_path="$unix_path"
59275  fi
59276
59277  if test "x$path" != "x$new_path"; then
59278    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59280$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59281  fi
59282
59283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59285
59286    else
59287      # We're on a unix platform. Hooray! :)
59288      path="$POTENTIAL_FREETYPE_LIB_PATH"
59289      has_space=`$ECHO "$path" | $GREP " "`
59290      if test "x$has_space" != x; then
59291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59292$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59293        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59294      fi
59295
59296      # Use eval to expand a potential ~
59297      eval path="$path"
59298      if test ! -f "$path" && test ! -d "$path"; then
59299        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59300      fi
59301
59302      if test -d "$path"; then
59303        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59304      else
59305        dir="`$DIRNAME "$path"`"
59306        base="`$BASENAME "$path"`"
59307        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59308      fi
59309    fi
59310  fi
59311
59312
59313    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59315$as_echo_n "checking for freetype includes... " >&6; }
59316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59317$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59318    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59320$as_echo_n "checking for freetype libraries... " >&6; }
59321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59322$as_echo "$FREETYPE_LIB_PATH" >&6; }
59323  fi
59324
59325          if test "x$FOUND_FREETYPE" != xyes; then
59326            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
59327
59328  windows_path="$FREETYPE_BASE_DIR"
59329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59330    unix_path=`$CYGPATH -u "$windows_path"`
59331    FREETYPE_BASE_DIR="$unix_path"
59332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59334    FREETYPE_BASE_DIR="$unix_path"
59335  fi
59336
59337
59338  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59339  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59340  METHOD="well-known location"
59341
59342  # Let's start with an optimistic view of the world :-)
59343  FOUND_FREETYPE=yes
59344
59345  # First look for the canonical freetype main include file ft2build.h.
59346  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59347    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59348    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59349    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59350      # Fail.
59351      FOUND_FREETYPE=no
59352    fi
59353  fi
59354
59355  if test "x$FOUND_FREETYPE" = xyes; then
59356    # Include file found, let's continue the sanity check.
59357    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59358$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59359
59360    # Reset to default value
59361    FREETYPE_BASE_NAME=freetype
59362    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59363    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59364      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59365          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59366        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59367        # for the .6 version explicitly.
59368        FREETYPE_BASE_NAME=freetype.6
59369        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59370        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59371$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59372      else
59373        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59374$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59375        FOUND_FREETYPE=no
59376      fi
59377    else
59378      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59379        # On Windows, we will need both .lib and .dll file.
59380        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59381          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59382$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59383          FOUND_FREETYPE=no
59384        fi
59385      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59386          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59387        # Found lib in isa dir, use that instead.
59388        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59389        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59390$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59391      fi
59392    fi
59393  fi
59394
59395  if test "x$FOUND_FREETYPE" = xyes; then
59396
59397  # Only process if variable expands to non-empty
59398
59399  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59401
59402  # Input might be given as Windows format, start by converting to
59403  # unix format.
59404  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59405  new_path=`$CYGPATH -u "$path"`
59406
59407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59410  # "foo.exe" is OK but "foo" is an error.
59411  #
59412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59413  # It is also a way to make sure we got the proper file name for the real test later on.
59414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59415  if test "x$test_shortpath" = x; then
59416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59417$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59418    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59419  fi
59420
59421  # Call helper function which possibly converts this using DOS-style short mode.
59422  # If so, the updated path is stored in $new_path.
59423
59424  input_path="$new_path"
59425  # Check if we need to convert this using DOS-style short mode. If the path
59426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59427  # take no chances and rewrite it.
59428  # Note: m4 eats our [], so we need to use [ and ] instead.
59429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59430  if test "x$has_forbidden_chars" != x; then
59431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59435      # Going to short mode and back again did indeed matter. Since short mode is
59436      # case insensitive, let's make it lowercase to improve readability.
59437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59438      # Now convert it back to Unix-style (cygpath)
59439      input_path=`$CYGPATH -u "$shortmode_path"`
59440      new_path="$input_path"
59441    fi
59442  fi
59443
59444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59445  if test "x$test_cygdrive_prefix" = x; then
59446    # As a simple fix, exclude /usr/bin since it's not a real path.
59447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59449      # a path prefixed by /cygdrive for fixpath to work.
59450      new_path="$CYGWIN_ROOT_PATH$input_path"
59451    fi
59452  fi
59453
59454
59455  if test "x$path" != "x$new_path"; then
59456    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59458$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59459  fi
59460
59461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59462
59463  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59464  has_colon=`$ECHO $path | $GREP ^.:`
59465  new_path="$path"
59466  if test "x$has_colon" = x; then
59467    # Not in mixed or Windows style, start by that.
59468    new_path=`cmd //c echo $path`
59469  fi
59470
59471
59472  input_path="$new_path"
59473  # Check if we need to convert this using DOS-style short mode. If the path
59474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59475  # take no chances and rewrite it.
59476  # Note: m4 eats our [], so we need to use [ and ] instead.
59477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59478  if test "x$has_forbidden_chars" != x; then
59479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59481  fi
59482
59483
59484  windows_path="$new_path"
59485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59486    unix_path=`$CYGPATH -u "$windows_path"`
59487    new_path="$unix_path"
59488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59490    new_path="$unix_path"
59491  fi
59492
59493  if test "x$path" != "x$new_path"; then
59494    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59496$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59497  fi
59498
59499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59501
59502    else
59503      # We're on a unix platform. Hooray! :)
59504      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59505      has_space=`$ECHO "$path" | $GREP " "`
59506      if test "x$has_space" != x; then
59507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59508$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59509        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59510      fi
59511
59512      # Use eval to expand a potential ~
59513      eval path="$path"
59514      if test ! -f "$path" && test ! -d "$path"; then
59515        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59516      fi
59517
59518      if test -d "$path"; then
59519        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59520      else
59521        dir="`$DIRNAME "$path"`"
59522        base="`$BASENAME "$path"`"
59523        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59524      fi
59525    fi
59526  fi
59527
59528
59529  # Only process if variable expands to non-empty
59530
59531  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59533
59534  # Input might be given as Windows format, start by converting to
59535  # unix format.
59536  path="$POTENTIAL_FREETYPE_LIB_PATH"
59537  new_path=`$CYGPATH -u "$path"`
59538
59539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59542  # "foo.exe" is OK but "foo" is an error.
59543  #
59544  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59545  # It is also a way to make sure we got the proper file name for the real test later on.
59546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59547  if test "x$test_shortpath" = x; then
59548    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59549$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59550    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59551  fi
59552
59553  # Call helper function which possibly converts this using DOS-style short mode.
59554  # If so, the updated path is stored in $new_path.
59555
59556  input_path="$new_path"
59557  # Check if we need to convert this using DOS-style short mode. If the path
59558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59559  # take no chances and rewrite it.
59560  # Note: m4 eats our [], so we need to use [ and ] instead.
59561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59562  if test "x$has_forbidden_chars" != x; then
59563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59567      # Going to short mode and back again did indeed matter. Since short mode is
59568      # case insensitive, let's make it lowercase to improve readability.
59569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59570      # Now convert it back to Unix-style (cygpath)
59571      input_path=`$CYGPATH -u "$shortmode_path"`
59572      new_path="$input_path"
59573    fi
59574  fi
59575
59576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59577  if test "x$test_cygdrive_prefix" = x; then
59578    # As a simple fix, exclude /usr/bin since it's not a real path.
59579    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59581      # a path prefixed by /cygdrive for fixpath to work.
59582      new_path="$CYGWIN_ROOT_PATH$input_path"
59583    fi
59584  fi
59585
59586
59587  if test "x$path" != "x$new_path"; then
59588    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59590$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59591  fi
59592
59593    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59594
59595  path="$POTENTIAL_FREETYPE_LIB_PATH"
59596  has_colon=`$ECHO $path | $GREP ^.:`
59597  new_path="$path"
59598  if test "x$has_colon" = x; then
59599    # Not in mixed or Windows style, start by that.
59600    new_path=`cmd //c echo $path`
59601  fi
59602
59603
59604  input_path="$new_path"
59605  # Check if we need to convert this using DOS-style short mode. If the path
59606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59607  # take no chances and rewrite it.
59608  # Note: m4 eats our [], so we need to use [ and ] instead.
59609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59610  if test "x$has_forbidden_chars" != x; then
59611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59613  fi
59614
59615
59616  windows_path="$new_path"
59617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59618    unix_path=`$CYGPATH -u "$windows_path"`
59619    new_path="$unix_path"
59620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59622    new_path="$unix_path"
59623  fi
59624
59625  if test "x$path" != "x$new_path"; then
59626    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59628$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59629  fi
59630
59631  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59632  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59633
59634    else
59635      # We're on a unix platform. Hooray! :)
59636      path="$POTENTIAL_FREETYPE_LIB_PATH"
59637      has_space=`$ECHO "$path" | $GREP " "`
59638      if test "x$has_space" != x; then
59639        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59640$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59641        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59642      fi
59643
59644      # Use eval to expand a potential ~
59645      eval path="$path"
59646      if test ! -f "$path" && test ! -d "$path"; then
59647        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59648      fi
59649
59650      if test -d "$path"; then
59651        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59652      else
59653        dir="`$DIRNAME "$path"`"
59654        base="`$BASENAME "$path"`"
59655        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59656      fi
59657    fi
59658  fi
59659
59660
59661    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59662    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59663$as_echo_n "checking for freetype includes... " >&6; }
59664    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59665$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59666    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59668$as_echo_n "checking for freetype libraries... " >&6; }
59669    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59670$as_echo "$FREETYPE_LIB_PATH" >&6; }
59671  fi
59672
59673          fi
59674          if test "x$FOUND_FREETYPE" != xyes; then
59675            FREETYPE_BASE_DIR="$HOME/freetype"
59676
59677  windows_path="$FREETYPE_BASE_DIR"
59678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59679    unix_path=`$CYGPATH -u "$windows_path"`
59680    FREETYPE_BASE_DIR="$unix_path"
59681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59683    FREETYPE_BASE_DIR="$unix_path"
59684  fi
59685
59686            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59687
59688  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59689  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59690  METHOD="well-known location"
59691
59692  # Let's start with an optimistic view of the world :-)
59693  FOUND_FREETYPE=yes
59694
59695  # First look for the canonical freetype main include file ft2build.h.
59696  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59697    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59698    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59699    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59700      # Fail.
59701      FOUND_FREETYPE=no
59702    fi
59703  fi
59704
59705  if test "x$FOUND_FREETYPE" = xyes; then
59706    # Include file found, let's continue the sanity check.
59707    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59708$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59709
59710    # Reset to default value
59711    FREETYPE_BASE_NAME=freetype
59712    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59713    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59714      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59715          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59716        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59717        # for the .6 version explicitly.
59718        FREETYPE_BASE_NAME=freetype.6
59719        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59720        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59721$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59722      else
59723        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59724$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59725        FOUND_FREETYPE=no
59726      fi
59727    else
59728      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59729        # On Windows, we will need both .lib and .dll file.
59730        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59731          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59732$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59733          FOUND_FREETYPE=no
59734        fi
59735      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59736          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59737        # Found lib in isa dir, use that instead.
59738        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59739        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59740$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59741      fi
59742    fi
59743  fi
59744
59745  if test "x$FOUND_FREETYPE" = xyes; then
59746
59747  # Only process if variable expands to non-empty
59748
59749  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59751
59752  # Input might be given as Windows format, start by converting to
59753  # unix format.
59754  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59755  new_path=`$CYGPATH -u "$path"`
59756
59757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59760  # "foo.exe" is OK but "foo" is an error.
59761  #
59762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59763  # It is also a way to make sure we got the proper file name for the real test later on.
59764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59765  if test "x$test_shortpath" = x; then
59766    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59767$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59768    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59769  fi
59770
59771  # Call helper function which possibly converts this using DOS-style short mode.
59772  # If so, the updated path is stored in $new_path.
59773
59774  input_path="$new_path"
59775  # Check if we need to convert this using DOS-style short mode. If the path
59776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59777  # take no chances and rewrite it.
59778  # Note: m4 eats our [], so we need to use [ and ] instead.
59779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59780  if test "x$has_forbidden_chars" != x; then
59781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59785      # Going to short mode and back again did indeed matter. Since short mode is
59786      # case insensitive, let's make it lowercase to improve readability.
59787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59788      # Now convert it back to Unix-style (cygpath)
59789      input_path=`$CYGPATH -u "$shortmode_path"`
59790      new_path="$input_path"
59791    fi
59792  fi
59793
59794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59795  if test "x$test_cygdrive_prefix" = x; then
59796    # As a simple fix, exclude /usr/bin since it's not a real path.
59797    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59799      # a path prefixed by /cygdrive for fixpath to work.
59800      new_path="$CYGWIN_ROOT_PATH$input_path"
59801    fi
59802  fi
59803
59804
59805  if test "x$path" != "x$new_path"; then
59806    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59808$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59809  fi
59810
59811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59812
59813  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59814  has_colon=`$ECHO $path | $GREP ^.:`
59815  new_path="$path"
59816  if test "x$has_colon" = x; then
59817    # Not in mixed or Windows style, start by that.
59818    new_path=`cmd //c echo $path`
59819  fi
59820
59821
59822  input_path="$new_path"
59823  # Check if we need to convert this using DOS-style short mode. If the path
59824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59825  # take no chances and rewrite it.
59826  # Note: m4 eats our [], so we need to use [ and ] instead.
59827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59828  if test "x$has_forbidden_chars" != x; then
59829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59831  fi
59832
59833
59834  windows_path="$new_path"
59835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59836    unix_path=`$CYGPATH -u "$windows_path"`
59837    new_path="$unix_path"
59838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59840    new_path="$unix_path"
59841  fi
59842
59843  if test "x$path" != "x$new_path"; then
59844    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59846$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59847  fi
59848
59849  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59850  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59851
59852    else
59853      # We're on a unix platform. Hooray! :)
59854      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59855      has_space=`$ECHO "$path" | $GREP " "`
59856      if test "x$has_space" != x; then
59857        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59858$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59859        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59860      fi
59861
59862      # Use eval to expand a potential ~
59863      eval path="$path"
59864      if test ! -f "$path" && test ! -d "$path"; then
59865        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59866      fi
59867
59868      if test -d "$path"; then
59869        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59870      else
59871        dir="`$DIRNAME "$path"`"
59872        base="`$BASENAME "$path"`"
59873        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59874      fi
59875    fi
59876  fi
59877
59878
59879  # Only process if variable expands to non-empty
59880
59881  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59882    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59883
59884  # Input might be given as Windows format, start by converting to
59885  # unix format.
59886  path="$POTENTIAL_FREETYPE_LIB_PATH"
59887  new_path=`$CYGPATH -u "$path"`
59888
59889  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59890  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59891  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59892  # "foo.exe" is OK but "foo" is an error.
59893  #
59894  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59895  # It is also a way to make sure we got the proper file name for the real test later on.
59896  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59897  if test "x$test_shortpath" = x; then
59898    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59899$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59900    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59901  fi
59902
59903  # Call helper function which possibly converts this using DOS-style short mode.
59904  # If so, the updated path is stored in $new_path.
59905
59906  input_path="$new_path"
59907  # Check if we need to convert this using DOS-style short mode. If the path
59908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59909  # take no chances and rewrite it.
59910  # Note: m4 eats our [], so we need to use [ and ] instead.
59911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59912  if test "x$has_forbidden_chars" != x; then
59913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59917      # Going to short mode and back again did indeed matter. Since short mode is
59918      # case insensitive, let's make it lowercase to improve readability.
59919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59920      # Now convert it back to Unix-style (cygpath)
59921      input_path=`$CYGPATH -u "$shortmode_path"`
59922      new_path="$input_path"
59923    fi
59924  fi
59925
59926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59927  if test "x$test_cygdrive_prefix" = x; then
59928    # As a simple fix, exclude /usr/bin since it's not a real path.
59929    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59931      # a path prefixed by /cygdrive for fixpath to work.
59932      new_path="$CYGWIN_ROOT_PATH$input_path"
59933    fi
59934  fi
59935
59936
59937  if test "x$path" != "x$new_path"; then
59938    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59940$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59941  fi
59942
59943    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59944
59945  path="$POTENTIAL_FREETYPE_LIB_PATH"
59946  has_colon=`$ECHO $path | $GREP ^.:`
59947  new_path="$path"
59948  if test "x$has_colon" = x; then
59949    # Not in mixed or Windows style, start by that.
59950    new_path=`cmd //c echo $path`
59951  fi
59952
59953
59954  input_path="$new_path"
59955  # Check if we need to convert this using DOS-style short mode. If the path
59956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59957  # take no chances and rewrite it.
59958  # Note: m4 eats our [], so we need to use [ and ] instead.
59959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59960  if test "x$has_forbidden_chars" != x; then
59961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59962    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59963  fi
59964
59965
59966  windows_path="$new_path"
59967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59968    unix_path=`$CYGPATH -u "$windows_path"`
59969    new_path="$unix_path"
59970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59972    new_path="$unix_path"
59973  fi
59974
59975  if test "x$path" != "x$new_path"; then
59976    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59978$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59979  fi
59980
59981  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59982  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59983
59984    else
59985      # We're on a unix platform. Hooray! :)
59986      path="$POTENTIAL_FREETYPE_LIB_PATH"
59987      has_space=`$ECHO "$path" | $GREP " "`
59988      if test "x$has_space" != x; then
59989        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59990$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59991        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59992      fi
59993
59994      # Use eval to expand a potential ~
59995      eval path="$path"
59996      if test ! -f "$path" && test ! -d "$path"; then
59997        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59998      fi
59999
60000      if test -d "$path"; then
60001        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60002      else
60003        dir="`$DIRNAME "$path"`"
60004        base="`$BASENAME "$path"`"
60005        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60006      fi
60007    fi
60008  fi
60009
60010
60011    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60012    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60013$as_echo_n "checking for freetype includes... " >&6; }
60014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60015$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60016    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60018$as_echo_n "checking for freetype libraries... " >&6; }
60019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60020$as_echo "$FREETYPE_LIB_PATH" >&6; }
60021  fi
60022
60023            else
60024
60025  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60026  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60027  METHOD="well-known location"
60028
60029  # Let's start with an optimistic view of the world :-)
60030  FOUND_FREETYPE=yes
60031
60032  # First look for the canonical freetype main include file ft2build.h.
60033  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60034    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60035    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60036    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60037      # Fail.
60038      FOUND_FREETYPE=no
60039    fi
60040  fi
60041
60042  if test "x$FOUND_FREETYPE" = xyes; then
60043    # Include file found, let's continue the sanity check.
60044    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60045$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60046
60047    # Reset to default value
60048    FREETYPE_BASE_NAME=freetype
60049    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60050    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60051      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60052          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60053        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60054        # for the .6 version explicitly.
60055        FREETYPE_BASE_NAME=freetype.6
60056        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60057        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60058$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60059      else
60060        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60061$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60062        FOUND_FREETYPE=no
60063      fi
60064    else
60065      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60066        # On Windows, we will need both .lib and .dll file.
60067        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60068          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60069$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60070          FOUND_FREETYPE=no
60071        fi
60072      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60073          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60074        # Found lib in isa dir, use that instead.
60075        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60076        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60077$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60078      fi
60079    fi
60080  fi
60081
60082  if test "x$FOUND_FREETYPE" = xyes; then
60083
60084  # Only process if variable expands to non-empty
60085
60086  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60087    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60088
60089  # Input might be given as Windows format, start by converting to
60090  # unix format.
60091  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60092  new_path=`$CYGPATH -u "$path"`
60093
60094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60097  # "foo.exe" is OK but "foo" is an error.
60098  #
60099  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60100  # It is also a way to make sure we got the proper file name for the real test later on.
60101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60102  if test "x$test_shortpath" = x; then
60103    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60104$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60105    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60106  fi
60107
60108  # Call helper function which possibly converts this using DOS-style short mode.
60109  # If so, the updated path is stored in $new_path.
60110
60111  input_path="$new_path"
60112  # Check if we need to convert this using DOS-style short mode. If the path
60113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60114  # take no chances and rewrite it.
60115  # Note: m4 eats our [], so we need to use [ and ] instead.
60116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60117  if test "x$has_forbidden_chars" != x; then
60118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60122      # Going to short mode and back again did indeed matter. Since short mode is
60123      # case insensitive, let's make it lowercase to improve readability.
60124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60125      # Now convert it back to Unix-style (cygpath)
60126      input_path=`$CYGPATH -u "$shortmode_path"`
60127      new_path="$input_path"
60128    fi
60129  fi
60130
60131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60132  if test "x$test_cygdrive_prefix" = x; then
60133    # As a simple fix, exclude /usr/bin since it's not a real path.
60134    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60136      # a path prefixed by /cygdrive for fixpath to work.
60137      new_path="$CYGWIN_ROOT_PATH$input_path"
60138    fi
60139  fi
60140
60141
60142  if test "x$path" != "x$new_path"; then
60143    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60145$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60146  fi
60147
60148    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60149
60150  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60151  has_colon=`$ECHO $path | $GREP ^.:`
60152  new_path="$path"
60153  if test "x$has_colon" = x; then
60154    # Not in mixed or Windows style, start by that.
60155    new_path=`cmd //c echo $path`
60156  fi
60157
60158
60159  input_path="$new_path"
60160  # Check if we need to convert this using DOS-style short mode. If the path
60161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60162  # take no chances and rewrite it.
60163  # Note: m4 eats our [], so we need to use [ and ] instead.
60164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60165  if test "x$has_forbidden_chars" != x; then
60166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60168  fi
60169
60170
60171  windows_path="$new_path"
60172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60173    unix_path=`$CYGPATH -u "$windows_path"`
60174    new_path="$unix_path"
60175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60177    new_path="$unix_path"
60178  fi
60179
60180  if test "x$path" != "x$new_path"; then
60181    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60183$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60184  fi
60185
60186  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60187  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60188
60189    else
60190      # We're on a unix platform. Hooray! :)
60191      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60192      has_space=`$ECHO "$path" | $GREP " "`
60193      if test "x$has_space" != x; then
60194        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60195$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60196        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60197      fi
60198
60199      # Use eval to expand a potential ~
60200      eval path="$path"
60201      if test ! -f "$path" && test ! -d "$path"; then
60202        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60203      fi
60204
60205      if test -d "$path"; then
60206        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60207      else
60208        dir="`$DIRNAME "$path"`"
60209        base="`$BASENAME "$path"`"
60210        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60211      fi
60212    fi
60213  fi
60214
60215
60216  # Only process if variable expands to non-empty
60217
60218  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60220
60221  # Input might be given as Windows format, start by converting to
60222  # unix format.
60223  path="$POTENTIAL_FREETYPE_LIB_PATH"
60224  new_path=`$CYGPATH -u "$path"`
60225
60226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60229  # "foo.exe" is OK but "foo" is an error.
60230  #
60231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60232  # It is also a way to make sure we got the proper file name for the real test later on.
60233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60234  if test "x$test_shortpath" = x; then
60235    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60236$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60237    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60238  fi
60239
60240  # Call helper function which possibly converts this using DOS-style short mode.
60241  # If so, the updated path is stored in $new_path.
60242
60243  input_path="$new_path"
60244  # Check if we need to convert this using DOS-style short mode. If the path
60245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60246  # take no chances and rewrite it.
60247  # Note: m4 eats our [], so we need to use [ and ] instead.
60248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60249  if test "x$has_forbidden_chars" != x; then
60250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60254      # Going to short mode and back again did indeed matter. Since short mode is
60255      # case insensitive, let's make it lowercase to improve readability.
60256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60257      # Now convert it back to Unix-style (cygpath)
60258      input_path=`$CYGPATH -u "$shortmode_path"`
60259      new_path="$input_path"
60260    fi
60261  fi
60262
60263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60264  if test "x$test_cygdrive_prefix" = x; then
60265    # As a simple fix, exclude /usr/bin since it's not a real path.
60266    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60268      # a path prefixed by /cygdrive for fixpath to work.
60269      new_path="$CYGWIN_ROOT_PATH$input_path"
60270    fi
60271  fi
60272
60273
60274  if test "x$path" != "x$new_path"; then
60275    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60277$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60278  fi
60279
60280    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60281
60282  path="$POTENTIAL_FREETYPE_LIB_PATH"
60283  has_colon=`$ECHO $path | $GREP ^.:`
60284  new_path="$path"
60285  if test "x$has_colon" = x; then
60286    # Not in mixed or Windows style, start by that.
60287    new_path=`cmd //c echo $path`
60288  fi
60289
60290
60291  input_path="$new_path"
60292  # Check if we need to convert this using DOS-style short mode. If the path
60293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60294  # take no chances and rewrite it.
60295  # Note: m4 eats our [], so we need to use [ and ] instead.
60296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60297  if test "x$has_forbidden_chars" != x; then
60298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60300  fi
60301
60302
60303  windows_path="$new_path"
60304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60305    unix_path=`$CYGPATH -u "$windows_path"`
60306    new_path="$unix_path"
60307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60309    new_path="$unix_path"
60310  fi
60311
60312  if test "x$path" != "x$new_path"; then
60313    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60315$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60316  fi
60317
60318  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60319  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60320
60321    else
60322      # We're on a unix platform. Hooray! :)
60323      path="$POTENTIAL_FREETYPE_LIB_PATH"
60324      has_space=`$ECHO "$path" | $GREP " "`
60325      if test "x$has_space" != x; then
60326        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60327$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60328        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60329      fi
60330
60331      # Use eval to expand a potential ~
60332      eval path="$path"
60333      if test ! -f "$path" && test ! -d "$path"; then
60334        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60335      fi
60336
60337      if test -d "$path"; then
60338        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60339      else
60340        dir="`$DIRNAME "$path"`"
60341        base="`$BASENAME "$path"`"
60342        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60343      fi
60344    fi
60345  fi
60346
60347
60348    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60350$as_echo_n "checking for freetype includes... " >&6; }
60351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60352$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60353    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60354    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60355$as_echo_n "checking for freetype libraries... " >&6; }
60356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60357$as_echo "$FREETYPE_LIB_PATH" >&6; }
60358  fi
60359
60360            fi
60361            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
60362                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
60363              # Source is available, as a last resort try to build freetype in default location
60364
60365  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
60366  BUILD_FREETYPE=yes
60367
60368  # Check if the freetype sources are acessible..
60369  if ! test -d $FREETYPE_SRC_PATH; then
60370    { $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
60371$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
60372    BUILD_FREETYPE=no
60373  fi
60374  # ..and contain a vc2010 project file
60375  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
60376  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
60377    { $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
60378$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
60379    BUILD_FREETYPE=no
60380  fi
60381  # Now check if configure found a version of 'msbuild.exe'
60382  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
60383    { $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
60384$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;}
60385    BUILD_FREETYPE=no
60386  fi
60387
60388  # Ready to go..
60389  if test "x$BUILD_FREETYPE" = xyes; then
60390    # msbuild requires trailing slashes for output directories
60391    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
60392    freetype_lib_path_unix="$freetype_lib_path"
60393    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
60394
60395  unix_path="$vcxproj_path"
60396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60397    windows_path=`$CYGPATH -m "$unix_path"`
60398    vcxproj_path="$windows_path"
60399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60400    windows_path=`cmd //c echo $unix_path`
60401    vcxproj_path="$windows_path"
60402  fi
60403
60404
60405  unix_path="$freetype_lib_path"
60406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60407    windows_path=`$CYGPATH -m "$unix_path"`
60408    freetype_lib_path="$windows_path"
60409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60410    windows_path=`cmd //c echo $unix_path`
60411    freetype_lib_path="$windows_path"
60412  fi
60413
60414
60415  unix_path="$freetype_obj_path"
60416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60417    windows_path=`$CYGPATH -m "$unix_path"`
60418    freetype_obj_path="$windows_path"
60419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60420    windows_path=`cmd //c echo $unix_path`
60421    freetype_obj_path="$windows_path"
60422  fi
60423
60424    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60425      freetype_platform=x64
60426    else
60427      freetype_platform=win32
60428    fi
60429
60430    # The original freetype project file is for VS 2010 (i.e. 'v100'),
60431    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
60432    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
60433    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
60434    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
60435$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
60436
60437    # First we try to build the freetype.dll
60438    $ECHO -e "@echo off\n"\
60439        "$MSBUILD $vcxproj_path "\
60440        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60441        "/p:Configuration=\"Release Multithreaded\" "\
60442        "/p:Platform=$freetype_platform "\
60443        "/p:ConfigurationType=DynamicLibrary "\
60444        "/p:TargetName=freetype "\
60445        "/p:OutDir=\"$freetype_lib_path\" "\
60446        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
60447    cmd /c freetype.bat
60448
60449    if test -s "$freetype_lib_path_unix/freetype.dll"; then
60450      # If that succeeds we also build freetype.lib
60451      $ECHO -e "@echo off\n"\
60452          "$MSBUILD $vcxproj_path "\
60453          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60454          "/p:Configuration=\"Release Multithreaded\" "\
60455          "/p:Platform=$freetype_platform "\
60456          "/p:ConfigurationType=StaticLibrary "\
60457          "/p:TargetName=freetype "\
60458          "/p:OutDir=\"$freetype_lib_path\" "\
60459          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
60460      cmd /c freetype.bat
60461
60462      if test -s "$freetype_lib_path_unix/freetype.lib"; then
60463        # Once we build both, lib and dll, set freetype lib and include path appropriately
60464        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
60465        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
60466        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
60467$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
60468      else
60469        BUILD_FREETYPE=no
60470      fi
60471    else
60472      BUILD_FREETYPE=no
60473    fi
60474  fi
60475
60476              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60477
60478  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60479  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60480  METHOD="well-known location"
60481
60482  # Let's start with an optimistic view of the world :-)
60483  FOUND_FREETYPE=yes
60484
60485  # First look for the canonical freetype main include file ft2build.h.
60486  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60487    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60488    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60489    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60490      # Fail.
60491      FOUND_FREETYPE=no
60492    fi
60493  fi
60494
60495  if test "x$FOUND_FREETYPE" = xyes; then
60496    # Include file found, let's continue the sanity check.
60497    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60498$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60499
60500    # Reset to default value
60501    FREETYPE_BASE_NAME=freetype
60502    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60503    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60504      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60505          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60506        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60507        # for the .6 version explicitly.
60508        FREETYPE_BASE_NAME=freetype.6
60509        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60510        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60511$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60512      else
60513        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60514$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60515        FOUND_FREETYPE=no
60516      fi
60517    else
60518      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60519        # On Windows, we will need both .lib and .dll file.
60520        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60521          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60522$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60523          FOUND_FREETYPE=no
60524        fi
60525      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60526          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60527        # Found lib in isa dir, use that instead.
60528        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60529        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60530$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60531      fi
60532    fi
60533  fi
60534
60535  if test "x$FOUND_FREETYPE" = xyes; then
60536
60537  # Only process if variable expands to non-empty
60538
60539  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60540    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60541
60542  # Input might be given as Windows format, start by converting to
60543  # unix format.
60544  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60545  new_path=`$CYGPATH -u "$path"`
60546
60547  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60548  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60549  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60550  # "foo.exe" is OK but "foo" is an error.
60551  #
60552  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60553  # It is also a way to make sure we got the proper file name for the real test later on.
60554  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60555  if test "x$test_shortpath" = x; then
60556    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60557$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60558    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60559  fi
60560
60561  # Call helper function which possibly converts this using DOS-style short mode.
60562  # If so, the updated path is stored in $new_path.
60563
60564  input_path="$new_path"
60565  # Check if we need to convert this using DOS-style short mode. If the path
60566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60567  # take no chances and rewrite it.
60568  # Note: m4 eats our [], so we need to use [ and ] instead.
60569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60570  if test "x$has_forbidden_chars" != x; then
60571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60572    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60573    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60574    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60575      # Going to short mode and back again did indeed matter. Since short mode is
60576      # case insensitive, let's make it lowercase to improve readability.
60577      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60578      # Now convert it back to Unix-style (cygpath)
60579      input_path=`$CYGPATH -u "$shortmode_path"`
60580      new_path="$input_path"
60581    fi
60582  fi
60583
60584  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60585  if test "x$test_cygdrive_prefix" = x; then
60586    # As a simple fix, exclude /usr/bin since it's not a real path.
60587    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60588      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60589      # a path prefixed by /cygdrive for fixpath to work.
60590      new_path="$CYGWIN_ROOT_PATH$input_path"
60591    fi
60592  fi
60593
60594
60595  if test "x$path" != "x$new_path"; then
60596    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60598$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60599  fi
60600
60601    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60602
60603  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60604  has_colon=`$ECHO $path | $GREP ^.:`
60605  new_path="$path"
60606  if test "x$has_colon" = x; then
60607    # Not in mixed or Windows style, start by that.
60608    new_path=`cmd //c echo $path`
60609  fi
60610
60611
60612  input_path="$new_path"
60613  # Check if we need to convert this using DOS-style short mode. If the path
60614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60615  # take no chances and rewrite it.
60616  # Note: m4 eats our [], so we need to use [ and ] instead.
60617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60618  if test "x$has_forbidden_chars" != x; then
60619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60620    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60621  fi
60622
60623
60624  windows_path="$new_path"
60625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60626    unix_path=`$CYGPATH -u "$windows_path"`
60627    new_path="$unix_path"
60628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60630    new_path="$unix_path"
60631  fi
60632
60633  if test "x$path" != "x$new_path"; then
60634    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60636$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60637  fi
60638
60639  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60640  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60641
60642    else
60643      # We're on a unix platform. Hooray! :)
60644      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60645      has_space=`$ECHO "$path" | $GREP " "`
60646      if test "x$has_space" != x; then
60647        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60648$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60649        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60650      fi
60651
60652      # Use eval to expand a potential ~
60653      eval path="$path"
60654      if test ! -f "$path" && test ! -d "$path"; then
60655        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60656      fi
60657
60658      if test -d "$path"; then
60659        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60660      else
60661        dir="`$DIRNAME "$path"`"
60662        base="`$BASENAME "$path"`"
60663        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60664      fi
60665    fi
60666  fi
60667
60668
60669  # Only process if variable expands to non-empty
60670
60671  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60672    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60673
60674  # Input might be given as Windows format, start by converting to
60675  # unix format.
60676  path="$POTENTIAL_FREETYPE_LIB_PATH"
60677  new_path=`$CYGPATH -u "$path"`
60678
60679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60682  # "foo.exe" is OK but "foo" is an error.
60683  #
60684  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60685  # It is also a way to make sure we got the proper file name for the real test later on.
60686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60687  if test "x$test_shortpath" = x; then
60688    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60689$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60690    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60691  fi
60692
60693  # Call helper function which possibly converts this using DOS-style short mode.
60694  # If so, the updated path is stored in $new_path.
60695
60696  input_path="$new_path"
60697  # Check if we need to convert this using DOS-style short mode. If the path
60698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60699  # take no chances and rewrite it.
60700  # Note: m4 eats our [], so we need to use [ and ] instead.
60701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60702  if test "x$has_forbidden_chars" != x; then
60703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60707      # Going to short mode and back again did indeed matter. Since short mode is
60708      # case insensitive, let's make it lowercase to improve readability.
60709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60710      # Now convert it back to Unix-style (cygpath)
60711      input_path=`$CYGPATH -u "$shortmode_path"`
60712      new_path="$input_path"
60713    fi
60714  fi
60715
60716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60717  if test "x$test_cygdrive_prefix" = x; then
60718    # As a simple fix, exclude /usr/bin since it's not a real path.
60719    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60721      # a path prefixed by /cygdrive for fixpath to work.
60722      new_path="$CYGWIN_ROOT_PATH$input_path"
60723    fi
60724  fi
60725
60726
60727  if test "x$path" != "x$new_path"; then
60728    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60730$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60731  fi
60732
60733    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60734
60735  path="$POTENTIAL_FREETYPE_LIB_PATH"
60736  has_colon=`$ECHO $path | $GREP ^.:`
60737  new_path="$path"
60738  if test "x$has_colon" = x; then
60739    # Not in mixed or Windows style, start by that.
60740    new_path=`cmd //c echo $path`
60741  fi
60742
60743
60744  input_path="$new_path"
60745  # Check if we need to convert this using DOS-style short mode. If the path
60746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60747  # take no chances and rewrite it.
60748  # Note: m4 eats our [], so we need to use [ and ] instead.
60749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60750  if test "x$has_forbidden_chars" != x; then
60751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60752    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60753  fi
60754
60755
60756  windows_path="$new_path"
60757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60758    unix_path=`$CYGPATH -u "$windows_path"`
60759    new_path="$unix_path"
60760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60762    new_path="$unix_path"
60763  fi
60764
60765  if test "x$path" != "x$new_path"; then
60766    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60768$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60769  fi
60770
60771  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60772  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60773
60774    else
60775      # We're on a unix platform. Hooray! :)
60776      path="$POTENTIAL_FREETYPE_LIB_PATH"
60777      has_space=`$ECHO "$path" | $GREP " "`
60778      if test "x$has_space" != x; then
60779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60780$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60781        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60782      fi
60783
60784      # Use eval to expand a potential ~
60785      eval path="$path"
60786      if test ! -f "$path" && test ! -d "$path"; then
60787        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60788      fi
60789
60790      if test -d "$path"; then
60791        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60792      else
60793        dir="`$DIRNAME "$path"`"
60794        base="`$BASENAME "$path"`"
60795        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60796      fi
60797    fi
60798  fi
60799
60800
60801    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60802    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60803$as_echo_n "checking for freetype includes... " >&6; }
60804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60805$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60806    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60808$as_echo_n "checking for freetype libraries... " >&6; }
60809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60810$as_echo "$FREETYPE_LIB_PATH" >&6; }
60811  fi
60812
60813              else
60814
60815  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60816  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60817  METHOD="well-known location"
60818
60819  # Let's start with an optimistic view of the world :-)
60820  FOUND_FREETYPE=yes
60821
60822  # First look for the canonical freetype main include file ft2build.h.
60823  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60824    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60825    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60826    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60827      # Fail.
60828      FOUND_FREETYPE=no
60829    fi
60830  fi
60831
60832  if test "x$FOUND_FREETYPE" = xyes; then
60833    # Include file found, let's continue the sanity check.
60834    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60835$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60836
60837    # Reset to default value
60838    FREETYPE_BASE_NAME=freetype
60839    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60840    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60841      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60842          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60843        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60844        # for the .6 version explicitly.
60845        FREETYPE_BASE_NAME=freetype.6
60846        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60847        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60848$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60849      else
60850        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60851$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60852        FOUND_FREETYPE=no
60853      fi
60854    else
60855      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60856        # On Windows, we will need both .lib and .dll file.
60857        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60858          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60859$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60860          FOUND_FREETYPE=no
60861        fi
60862      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60863          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60864        # Found lib in isa dir, use that instead.
60865        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60866        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60867$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60868      fi
60869    fi
60870  fi
60871
60872  if test "x$FOUND_FREETYPE" = xyes; then
60873
60874  # Only process if variable expands to non-empty
60875
60876  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60877    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60878
60879  # Input might be given as Windows format, start by converting to
60880  # unix format.
60881  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60882  new_path=`$CYGPATH -u "$path"`
60883
60884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60887  # "foo.exe" is OK but "foo" is an error.
60888  #
60889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60890  # It is also a way to make sure we got the proper file name for the real test later on.
60891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60892  if test "x$test_shortpath" = x; then
60893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60894$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60895    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60896  fi
60897
60898  # Call helper function which possibly converts this using DOS-style short mode.
60899  # If so, the updated path is stored in $new_path.
60900
60901  input_path="$new_path"
60902  # Check if we need to convert this using DOS-style short mode. If the path
60903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60904  # take no chances and rewrite it.
60905  # Note: m4 eats our [], so we need to use [ and ] instead.
60906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60907  if test "x$has_forbidden_chars" != x; then
60908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60912      # Going to short mode and back again did indeed matter. Since short mode is
60913      # case insensitive, let's make it lowercase to improve readability.
60914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60915      # Now convert it back to Unix-style (cygpath)
60916      input_path=`$CYGPATH -u "$shortmode_path"`
60917      new_path="$input_path"
60918    fi
60919  fi
60920
60921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60922  if test "x$test_cygdrive_prefix" = x; then
60923    # As a simple fix, exclude /usr/bin since it's not a real path.
60924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60926      # a path prefixed by /cygdrive for fixpath to work.
60927      new_path="$CYGWIN_ROOT_PATH$input_path"
60928    fi
60929  fi
60930
60931
60932  if test "x$path" != "x$new_path"; then
60933    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60935$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60936  fi
60937
60938    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60939
60940  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60941  has_colon=`$ECHO $path | $GREP ^.:`
60942  new_path="$path"
60943  if test "x$has_colon" = x; then
60944    # Not in mixed or Windows style, start by that.
60945    new_path=`cmd //c echo $path`
60946  fi
60947
60948
60949  input_path="$new_path"
60950  # Check if we need to convert this using DOS-style short mode. If the path
60951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60952  # take no chances and rewrite it.
60953  # Note: m4 eats our [], so we need to use [ and ] instead.
60954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60955  if test "x$has_forbidden_chars" != x; then
60956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60958  fi
60959
60960
60961  windows_path="$new_path"
60962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60963    unix_path=`$CYGPATH -u "$windows_path"`
60964    new_path="$unix_path"
60965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60967    new_path="$unix_path"
60968  fi
60969
60970  if test "x$path" != "x$new_path"; then
60971    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60973$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60974  fi
60975
60976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60978
60979    else
60980      # We're on a unix platform. Hooray! :)
60981      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60982      has_space=`$ECHO "$path" | $GREP " "`
60983      if test "x$has_space" != x; then
60984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60985$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60986        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60987      fi
60988
60989      # Use eval to expand a potential ~
60990      eval path="$path"
60991      if test ! -f "$path" && test ! -d "$path"; then
60992        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60993      fi
60994
60995      if test -d "$path"; then
60996        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60997      else
60998        dir="`$DIRNAME "$path"`"
60999        base="`$BASENAME "$path"`"
61000        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61001      fi
61002    fi
61003  fi
61004
61005
61006  # Only process if variable expands to non-empty
61007
61008  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61009    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61010
61011  # Input might be given as Windows format, start by converting to
61012  # unix format.
61013  path="$POTENTIAL_FREETYPE_LIB_PATH"
61014  new_path=`$CYGPATH -u "$path"`
61015
61016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61019  # "foo.exe" is OK but "foo" is an error.
61020  #
61021  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61022  # It is also a way to make sure we got the proper file name for the real test later on.
61023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61024  if test "x$test_shortpath" = x; then
61025    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61026$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61027    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61028  fi
61029
61030  # Call helper function which possibly converts this using DOS-style short mode.
61031  # If so, the updated path is stored in $new_path.
61032
61033  input_path="$new_path"
61034  # Check if we need to convert this using DOS-style short mode. If the path
61035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61036  # take no chances and rewrite it.
61037  # Note: m4 eats our [], so we need to use [ and ] instead.
61038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61039  if test "x$has_forbidden_chars" != x; then
61040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61041    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61042    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61043    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61044      # Going to short mode and back again did indeed matter. Since short mode is
61045      # case insensitive, let's make it lowercase to improve readability.
61046      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61047      # Now convert it back to Unix-style (cygpath)
61048      input_path=`$CYGPATH -u "$shortmode_path"`
61049      new_path="$input_path"
61050    fi
61051  fi
61052
61053  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61054  if test "x$test_cygdrive_prefix" = x; then
61055    # As a simple fix, exclude /usr/bin since it's not a real path.
61056    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61057      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61058      # a path prefixed by /cygdrive for fixpath to work.
61059      new_path="$CYGWIN_ROOT_PATH$input_path"
61060    fi
61061  fi
61062
61063
61064  if test "x$path" != "x$new_path"; then
61065    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61067$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61068  fi
61069
61070    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61071
61072  path="$POTENTIAL_FREETYPE_LIB_PATH"
61073  has_colon=`$ECHO $path | $GREP ^.:`
61074  new_path="$path"
61075  if test "x$has_colon" = x; then
61076    # Not in mixed or Windows style, start by that.
61077    new_path=`cmd //c echo $path`
61078  fi
61079
61080
61081  input_path="$new_path"
61082  # Check if we need to convert this using DOS-style short mode. If the path
61083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61084  # take no chances and rewrite it.
61085  # Note: m4 eats our [], so we need to use [ and ] instead.
61086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61087  if test "x$has_forbidden_chars" != x; then
61088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61090  fi
61091
61092
61093  windows_path="$new_path"
61094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61095    unix_path=`$CYGPATH -u "$windows_path"`
61096    new_path="$unix_path"
61097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61099    new_path="$unix_path"
61100  fi
61101
61102  if test "x$path" != "x$new_path"; then
61103    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61105$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61106  fi
61107
61108  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61109  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61110
61111    else
61112      # We're on a unix platform. Hooray! :)
61113      path="$POTENTIAL_FREETYPE_LIB_PATH"
61114      has_space=`$ECHO "$path" | $GREP " "`
61115      if test "x$has_space" != x; then
61116        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61117$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61118        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61119      fi
61120
61121      # Use eval to expand a potential ~
61122      eval path="$path"
61123      if test ! -f "$path" && test ! -d "$path"; then
61124        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61125      fi
61126
61127      if test -d "$path"; then
61128        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61129      else
61130        dir="`$DIRNAME "$path"`"
61131        base="`$BASENAME "$path"`"
61132        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61133      fi
61134    fi
61135  fi
61136
61137
61138    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61140$as_echo_n "checking for freetype includes... " >&6; }
61141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61142$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61143    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61145$as_echo_n "checking for freetype libraries... " >&6; }
61146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61147$as_echo "$FREETYPE_LIB_PATH" >&6; }
61148  fi
61149
61150              fi
61151            fi
61152          fi
61153        else
61154          FREETYPE_BASE_DIR="$SYSROOT/usr"
61155
61156  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61157  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61158  METHOD="well-known location"
61159
61160  # Let's start with an optimistic view of the world :-)
61161  FOUND_FREETYPE=yes
61162
61163  # First look for the canonical freetype main include file ft2build.h.
61164  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61165    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61166    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61167    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61168      # Fail.
61169      FOUND_FREETYPE=no
61170    fi
61171  fi
61172
61173  if test "x$FOUND_FREETYPE" = xyes; then
61174    # Include file found, let's continue the sanity check.
61175    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61176$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61177
61178    # Reset to default value
61179    FREETYPE_BASE_NAME=freetype
61180    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61181    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61182      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61183          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61184        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61185        # for the .6 version explicitly.
61186        FREETYPE_BASE_NAME=freetype.6
61187        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61188        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61189$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61190      else
61191        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61192$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61193        FOUND_FREETYPE=no
61194      fi
61195    else
61196      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61197        # On Windows, we will need both .lib and .dll file.
61198        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61199          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61200$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61201          FOUND_FREETYPE=no
61202        fi
61203      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61204          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61205        # Found lib in isa dir, use that instead.
61206        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61207        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61208$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61209      fi
61210    fi
61211  fi
61212
61213  if test "x$FOUND_FREETYPE" = xyes; then
61214
61215  # Only process if variable expands to non-empty
61216
61217  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61219
61220  # Input might be given as Windows format, start by converting to
61221  # unix format.
61222  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61223  new_path=`$CYGPATH -u "$path"`
61224
61225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61228  # "foo.exe" is OK but "foo" is an error.
61229  #
61230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61231  # It is also a way to make sure we got the proper file name for the real test later on.
61232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61233  if test "x$test_shortpath" = x; then
61234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61235$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61236    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61237  fi
61238
61239  # Call helper function which possibly converts this using DOS-style short mode.
61240  # If so, the updated path is stored in $new_path.
61241
61242  input_path="$new_path"
61243  # Check if we need to convert this using DOS-style short mode. If the path
61244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61245  # take no chances and rewrite it.
61246  # Note: m4 eats our [], so we need to use [ and ] instead.
61247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61248  if test "x$has_forbidden_chars" != x; then
61249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61253      # Going to short mode and back again did indeed matter. Since short mode is
61254      # case insensitive, let's make it lowercase to improve readability.
61255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61256      # Now convert it back to Unix-style (cygpath)
61257      input_path=`$CYGPATH -u "$shortmode_path"`
61258      new_path="$input_path"
61259    fi
61260  fi
61261
61262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61263  if test "x$test_cygdrive_prefix" = x; then
61264    # As a simple fix, exclude /usr/bin since it's not a real path.
61265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61267      # a path prefixed by /cygdrive for fixpath to work.
61268      new_path="$CYGWIN_ROOT_PATH$input_path"
61269    fi
61270  fi
61271
61272
61273  if test "x$path" != "x$new_path"; then
61274    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61276$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61277  fi
61278
61279    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61280
61281  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61282  has_colon=`$ECHO $path | $GREP ^.:`
61283  new_path="$path"
61284  if test "x$has_colon" = x; then
61285    # Not in mixed or Windows style, start by that.
61286    new_path=`cmd //c echo $path`
61287  fi
61288
61289
61290  input_path="$new_path"
61291  # Check if we need to convert this using DOS-style short mode. If the path
61292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61293  # take no chances and rewrite it.
61294  # Note: m4 eats our [], so we need to use [ and ] instead.
61295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61296  if test "x$has_forbidden_chars" != x; then
61297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61299  fi
61300
61301
61302  windows_path="$new_path"
61303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61304    unix_path=`$CYGPATH -u "$windows_path"`
61305    new_path="$unix_path"
61306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61308    new_path="$unix_path"
61309  fi
61310
61311  if test "x$path" != "x$new_path"; then
61312    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61314$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61315  fi
61316
61317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61319
61320    else
61321      # We're on a unix platform. Hooray! :)
61322      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61323      has_space=`$ECHO "$path" | $GREP " "`
61324      if test "x$has_space" != x; then
61325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61326$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61327        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61328      fi
61329
61330      # Use eval to expand a potential ~
61331      eval path="$path"
61332      if test ! -f "$path" && test ! -d "$path"; then
61333        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61334      fi
61335
61336      if test -d "$path"; then
61337        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61338      else
61339        dir="`$DIRNAME "$path"`"
61340        base="`$BASENAME "$path"`"
61341        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61342      fi
61343    fi
61344  fi
61345
61346
61347  # Only process if variable expands to non-empty
61348
61349  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61350    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61351
61352  # Input might be given as Windows format, start by converting to
61353  # unix format.
61354  path="$POTENTIAL_FREETYPE_LIB_PATH"
61355  new_path=`$CYGPATH -u "$path"`
61356
61357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61360  # "foo.exe" is OK but "foo" is an error.
61361  #
61362  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61363  # It is also a way to make sure we got the proper file name for the real test later on.
61364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61365  if test "x$test_shortpath" = x; then
61366    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61367$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61368    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61369  fi
61370
61371  # Call helper function which possibly converts this using DOS-style short mode.
61372  # If so, the updated path is stored in $new_path.
61373
61374  input_path="$new_path"
61375  # Check if we need to convert this using DOS-style short mode. If the path
61376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61377  # take no chances and rewrite it.
61378  # Note: m4 eats our [], so we need to use [ and ] instead.
61379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61380  if test "x$has_forbidden_chars" != x; then
61381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61385      # Going to short mode and back again did indeed matter. Since short mode is
61386      # case insensitive, let's make it lowercase to improve readability.
61387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61388      # Now convert it back to Unix-style (cygpath)
61389      input_path=`$CYGPATH -u "$shortmode_path"`
61390      new_path="$input_path"
61391    fi
61392  fi
61393
61394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61395  if test "x$test_cygdrive_prefix" = x; then
61396    # As a simple fix, exclude /usr/bin since it's not a real path.
61397    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61399      # a path prefixed by /cygdrive for fixpath to work.
61400      new_path="$CYGWIN_ROOT_PATH$input_path"
61401    fi
61402  fi
61403
61404
61405  if test "x$path" != "x$new_path"; then
61406    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61408$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61409  fi
61410
61411    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61412
61413  path="$POTENTIAL_FREETYPE_LIB_PATH"
61414  has_colon=`$ECHO $path | $GREP ^.:`
61415  new_path="$path"
61416  if test "x$has_colon" = x; then
61417    # Not in mixed or Windows style, start by that.
61418    new_path=`cmd //c echo $path`
61419  fi
61420
61421
61422  input_path="$new_path"
61423  # Check if we need to convert this using DOS-style short mode. If the path
61424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61425  # take no chances and rewrite it.
61426  # Note: m4 eats our [], so we need to use [ and ] instead.
61427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61428  if test "x$has_forbidden_chars" != x; then
61429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61431  fi
61432
61433
61434  windows_path="$new_path"
61435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61436    unix_path=`$CYGPATH -u "$windows_path"`
61437    new_path="$unix_path"
61438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61440    new_path="$unix_path"
61441  fi
61442
61443  if test "x$path" != "x$new_path"; then
61444    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61446$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61447  fi
61448
61449  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61450  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61451
61452    else
61453      # We're on a unix platform. Hooray! :)
61454      path="$POTENTIAL_FREETYPE_LIB_PATH"
61455      has_space=`$ECHO "$path" | $GREP " "`
61456      if test "x$has_space" != x; then
61457        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61458$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61459        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61460      fi
61461
61462      # Use eval to expand a potential ~
61463      eval path="$path"
61464      if test ! -f "$path" && test ! -d "$path"; then
61465        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61466      fi
61467
61468      if test -d "$path"; then
61469        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61470      else
61471        dir="`$DIRNAME "$path"`"
61472        base="`$BASENAME "$path"`"
61473        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61474      fi
61475    fi
61476  fi
61477
61478
61479    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61480    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61481$as_echo_n "checking for freetype includes... " >&6; }
61482    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61483$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61484    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61485    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61486$as_echo_n "checking for freetype libraries... " >&6; }
61487    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61488$as_echo "$FREETYPE_LIB_PATH" >&6; }
61489  fi
61490
61491
61492          if test "x$FOUND_FREETYPE" != xyes; then
61493            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61494
61495  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61496  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61497  METHOD="well-known location"
61498
61499  # Let's start with an optimistic view of the world :-)
61500  FOUND_FREETYPE=yes
61501
61502  # First look for the canonical freetype main include file ft2build.h.
61503  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61504    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61505    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61506    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61507      # Fail.
61508      FOUND_FREETYPE=no
61509    fi
61510  fi
61511
61512  if test "x$FOUND_FREETYPE" = xyes; then
61513    # Include file found, let's continue the sanity check.
61514    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61515$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61516
61517    # Reset to default value
61518    FREETYPE_BASE_NAME=freetype
61519    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61520    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61521      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61522          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61523        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61524        # for the .6 version explicitly.
61525        FREETYPE_BASE_NAME=freetype.6
61526        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61527        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61528$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61529      else
61530        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61531$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61532        FOUND_FREETYPE=no
61533      fi
61534    else
61535      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61536        # On Windows, we will need both .lib and .dll file.
61537        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61538          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61539$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61540          FOUND_FREETYPE=no
61541        fi
61542      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61543          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61544        # Found lib in isa dir, use that instead.
61545        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61546        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61547$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61548      fi
61549    fi
61550  fi
61551
61552  if test "x$FOUND_FREETYPE" = xyes; then
61553
61554  # Only process if variable expands to non-empty
61555
61556  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61557    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61558
61559  # Input might be given as Windows format, start by converting to
61560  # unix format.
61561  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61562  new_path=`$CYGPATH -u "$path"`
61563
61564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61567  # "foo.exe" is OK but "foo" is an error.
61568  #
61569  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61570  # It is also a way to make sure we got the proper file name for the real test later on.
61571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61572  if test "x$test_shortpath" = x; then
61573    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61574$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61575    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61576  fi
61577
61578  # Call helper function which possibly converts this using DOS-style short mode.
61579  # If so, the updated path is stored in $new_path.
61580
61581  input_path="$new_path"
61582  # Check if we need to convert this using DOS-style short mode. If the path
61583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61584  # take no chances and rewrite it.
61585  # Note: m4 eats our [], so we need to use [ and ] instead.
61586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61587  if test "x$has_forbidden_chars" != x; then
61588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61592      # Going to short mode and back again did indeed matter. Since short mode is
61593      # case insensitive, let's make it lowercase to improve readability.
61594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61595      # Now convert it back to Unix-style (cygpath)
61596      input_path=`$CYGPATH -u "$shortmode_path"`
61597      new_path="$input_path"
61598    fi
61599  fi
61600
61601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61602  if test "x$test_cygdrive_prefix" = x; then
61603    # As a simple fix, exclude /usr/bin since it's not a real path.
61604    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61606      # a path prefixed by /cygdrive for fixpath to work.
61607      new_path="$CYGWIN_ROOT_PATH$input_path"
61608    fi
61609  fi
61610
61611
61612  if test "x$path" != "x$new_path"; then
61613    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61615$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61616  fi
61617
61618    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61619
61620  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61621  has_colon=`$ECHO $path | $GREP ^.:`
61622  new_path="$path"
61623  if test "x$has_colon" = x; then
61624    # Not in mixed or Windows style, start by that.
61625    new_path=`cmd //c echo $path`
61626  fi
61627
61628
61629  input_path="$new_path"
61630  # Check if we need to convert this using DOS-style short mode. If the path
61631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61632  # take no chances and rewrite it.
61633  # Note: m4 eats our [], so we need to use [ and ] instead.
61634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61635  if test "x$has_forbidden_chars" != x; then
61636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61638  fi
61639
61640
61641  windows_path="$new_path"
61642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61643    unix_path=`$CYGPATH -u "$windows_path"`
61644    new_path="$unix_path"
61645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61647    new_path="$unix_path"
61648  fi
61649
61650  if test "x$path" != "x$new_path"; then
61651    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61653$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61654  fi
61655
61656  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61657  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61658
61659    else
61660      # We're on a unix platform. Hooray! :)
61661      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61662      has_space=`$ECHO "$path" | $GREP " "`
61663      if test "x$has_space" != x; then
61664        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61665$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61666        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61667      fi
61668
61669      # Use eval to expand a potential ~
61670      eval path="$path"
61671      if test ! -f "$path" && test ! -d "$path"; then
61672        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61673      fi
61674
61675      if test -d "$path"; then
61676        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61677      else
61678        dir="`$DIRNAME "$path"`"
61679        base="`$BASENAME "$path"`"
61680        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61681      fi
61682    fi
61683  fi
61684
61685
61686  # Only process if variable expands to non-empty
61687
61688  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61689    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61690
61691  # Input might be given as Windows format, start by converting to
61692  # unix format.
61693  path="$POTENTIAL_FREETYPE_LIB_PATH"
61694  new_path=`$CYGPATH -u "$path"`
61695
61696  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61697  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61698  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61699  # "foo.exe" is OK but "foo" is an error.
61700  #
61701  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61702  # It is also a way to make sure we got the proper file name for the real test later on.
61703  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61704  if test "x$test_shortpath" = x; then
61705    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61706$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61707    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61708  fi
61709
61710  # Call helper function which possibly converts this using DOS-style short mode.
61711  # If so, the updated path is stored in $new_path.
61712
61713  input_path="$new_path"
61714  # Check if we need to convert this using DOS-style short mode. If the path
61715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61716  # take no chances and rewrite it.
61717  # Note: m4 eats our [], so we need to use [ and ] instead.
61718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61719  if test "x$has_forbidden_chars" != x; then
61720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61724      # Going to short mode and back again did indeed matter. Since short mode is
61725      # case insensitive, let's make it lowercase to improve readability.
61726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61727      # Now convert it back to Unix-style (cygpath)
61728      input_path=`$CYGPATH -u "$shortmode_path"`
61729      new_path="$input_path"
61730    fi
61731  fi
61732
61733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61734  if test "x$test_cygdrive_prefix" = x; then
61735    # As a simple fix, exclude /usr/bin since it's not a real path.
61736    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61738      # a path prefixed by /cygdrive for fixpath to work.
61739      new_path="$CYGWIN_ROOT_PATH$input_path"
61740    fi
61741  fi
61742
61743
61744  if test "x$path" != "x$new_path"; then
61745    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61747$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61748  fi
61749
61750    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61751
61752  path="$POTENTIAL_FREETYPE_LIB_PATH"
61753  has_colon=`$ECHO $path | $GREP ^.:`
61754  new_path="$path"
61755  if test "x$has_colon" = x; then
61756    # Not in mixed or Windows style, start by that.
61757    new_path=`cmd //c echo $path`
61758  fi
61759
61760
61761  input_path="$new_path"
61762  # Check if we need to convert this using DOS-style short mode. If the path
61763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61764  # take no chances and rewrite it.
61765  # Note: m4 eats our [], so we need to use [ and ] instead.
61766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61767  if test "x$has_forbidden_chars" != x; then
61768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61769    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61770  fi
61771
61772
61773  windows_path="$new_path"
61774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61775    unix_path=`$CYGPATH -u "$windows_path"`
61776    new_path="$unix_path"
61777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61779    new_path="$unix_path"
61780  fi
61781
61782  if test "x$path" != "x$new_path"; then
61783    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61785$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61786  fi
61787
61788  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61789  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61790
61791    else
61792      # We're on a unix platform. Hooray! :)
61793      path="$POTENTIAL_FREETYPE_LIB_PATH"
61794      has_space=`$ECHO "$path" | $GREP " "`
61795      if test "x$has_space" != x; then
61796        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61797$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61798        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61799      fi
61800
61801      # Use eval to expand a potential ~
61802      eval path="$path"
61803      if test ! -f "$path" && test ! -d "$path"; then
61804        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61805      fi
61806
61807      if test -d "$path"; then
61808        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61809      else
61810        dir="`$DIRNAME "$path"`"
61811        base="`$BASENAME "$path"`"
61812        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61813      fi
61814    fi
61815  fi
61816
61817
61818    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61820$as_echo_n "checking for freetype includes... " >&6; }
61821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61822$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61823    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61824    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61825$as_echo_n "checking for freetype libraries... " >&6; }
61826    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61827$as_echo "$FREETYPE_LIB_PATH" >&6; }
61828  fi
61829
61830          fi
61831          if test "x$FOUND_FREETYPE" != xyes; then
61832            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61833
61834  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61835  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61836  METHOD="well-known location"
61837
61838  # Let's start with an optimistic view of the world :-)
61839  FOUND_FREETYPE=yes
61840
61841  # First look for the canonical freetype main include file ft2build.h.
61842  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61843    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61844    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61845    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61846      # Fail.
61847      FOUND_FREETYPE=no
61848    fi
61849  fi
61850
61851  if test "x$FOUND_FREETYPE" = xyes; then
61852    # Include file found, let's continue the sanity check.
61853    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61854$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61855
61856    # Reset to default value
61857    FREETYPE_BASE_NAME=freetype
61858    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61859    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61860      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61861          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61862        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61863        # for the .6 version explicitly.
61864        FREETYPE_BASE_NAME=freetype.6
61865        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61866        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61867$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61868      else
61869        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61870$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61871        FOUND_FREETYPE=no
61872      fi
61873    else
61874      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61875        # On Windows, we will need both .lib and .dll file.
61876        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61877          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61878$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61879          FOUND_FREETYPE=no
61880        fi
61881      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61882          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61883        # Found lib in isa dir, use that instead.
61884        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61885        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61886$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61887      fi
61888    fi
61889  fi
61890
61891  if test "x$FOUND_FREETYPE" = xyes; then
61892
61893  # Only process if variable expands to non-empty
61894
61895  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61897
61898  # Input might be given as Windows format, start by converting to
61899  # unix format.
61900  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61901  new_path=`$CYGPATH -u "$path"`
61902
61903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61906  # "foo.exe" is OK but "foo" is an error.
61907  #
61908  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61909  # It is also a way to make sure we got the proper file name for the real test later on.
61910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61911  if test "x$test_shortpath" = x; then
61912    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61913$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61914    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61915  fi
61916
61917  # Call helper function which possibly converts this using DOS-style short mode.
61918  # If so, the updated path is stored in $new_path.
61919
61920  input_path="$new_path"
61921  # Check if we need to convert this using DOS-style short mode. If the path
61922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61923  # take no chances and rewrite it.
61924  # Note: m4 eats our [], so we need to use [ and ] instead.
61925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61926  if test "x$has_forbidden_chars" != x; then
61927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61931      # Going to short mode and back again did indeed matter. Since short mode is
61932      # case insensitive, let's make it lowercase to improve readability.
61933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61934      # Now convert it back to Unix-style (cygpath)
61935      input_path=`$CYGPATH -u "$shortmode_path"`
61936      new_path="$input_path"
61937    fi
61938  fi
61939
61940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61941  if test "x$test_cygdrive_prefix" = x; then
61942    # As a simple fix, exclude /usr/bin since it's not a real path.
61943    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61945      # a path prefixed by /cygdrive for fixpath to work.
61946      new_path="$CYGWIN_ROOT_PATH$input_path"
61947    fi
61948  fi
61949
61950
61951  if test "x$path" != "x$new_path"; then
61952    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61954$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61955  fi
61956
61957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61958
61959  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61960  has_colon=`$ECHO $path | $GREP ^.:`
61961  new_path="$path"
61962  if test "x$has_colon" = x; then
61963    # Not in mixed or Windows style, start by that.
61964    new_path=`cmd //c echo $path`
61965  fi
61966
61967
61968  input_path="$new_path"
61969  # Check if we need to convert this using DOS-style short mode. If the path
61970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61971  # take no chances and rewrite it.
61972  # Note: m4 eats our [], so we need to use [ and ] instead.
61973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61974  if test "x$has_forbidden_chars" != x; then
61975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61977  fi
61978
61979
61980  windows_path="$new_path"
61981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61982    unix_path=`$CYGPATH -u "$windows_path"`
61983    new_path="$unix_path"
61984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61986    new_path="$unix_path"
61987  fi
61988
61989  if test "x$path" != "x$new_path"; then
61990    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61992$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61993  fi
61994
61995  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61996  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61997
61998    else
61999      # We're on a unix platform. Hooray! :)
62000      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62001      has_space=`$ECHO "$path" | $GREP " "`
62002      if test "x$has_space" != x; then
62003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62004$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62005        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62006      fi
62007
62008      # Use eval to expand a potential ~
62009      eval path="$path"
62010      if test ! -f "$path" && test ! -d "$path"; then
62011        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62012      fi
62013
62014      if test -d "$path"; then
62015        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62016      else
62017        dir="`$DIRNAME "$path"`"
62018        base="`$BASENAME "$path"`"
62019        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62020      fi
62021    fi
62022  fi
62023
62024
62025  # Only process if variable expands to non-empty
62026
62027  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62028    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62029
62030  # Input might be given as Windows format, start by converting to
62031  # unix format.
62032  path="$POTENTIAL_FREETYPE_LIB_PATH"
62033  new_path=`$CYGPATH -u "$path"`
62034
62035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62038  # "foo.exe" is OK but "foo" is an error.
62039  #
62040  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62041  # It is also a way to make sure we got the proper file name for the real test later on.
62042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62043  if test "x$test_shortpath" = x; then
62044    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62045$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62046    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62047  fi
62048
62049  # Call helper function which possibly converts this using DOS-style short mode.
62050  # If so, the updated path is stored in $new_path.
62051
62052  input_path="$new_path"
62053  # Check if we need to convert this using DOS-style short mode. If the path
62054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62055  # take no chances and rewrite it.
62056  # Note: m4 eats our [], so we need to use [ and ] instead.
62057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62058  if test "x$has_forbidden_chars" != x; then
62059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62063      # Going to short mode and back again did indeed matter. Since short mode is
62064      # case insensitive, let's make it lowercase to improve readability.
62065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62066      # Now convert it back to Unix-style (cygpath)
62067      input_path=`$CYGPATH -u "$shortmode_path"`
62068      new_path="$input_path"
62069    fi
62070  fi
62071
62072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62073  if test "x$test_cygdrive_prefix" = x; then
62074    # As a simple fix, exclude /usr/bin since it's not a real path.
62075    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62077      # a path prefixed by /cygdrive for fixpath to work.
62078      new_path="$CYGWIN_ROOT_PATH$input_path"
62079    fi
62080  fi
62081
62082
62083  if test "x$path" != "x$new_path"; then
62084    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62086$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62087  fi
62088
62089    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62090
62091  path="$POTENTIAL_FREETYPE_LIB_PATH"
62092  has_colon=`$ECHO $path | $GREP ^.:`
62093  new_path="$path"
62094  if test "x$has_colon" = x; then
62095    # Not in mixed or Windows style, start by that.
62096    new_path=`cmd //c echo $path`
62097  fi
62098
62099
62100  input_path="$new_path"
62101  # Check if we need to convert this using DOS-style short mode. If the path
62102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62103  # take no chances and rewrite it.
62104  # Note: m4 eats our [], so we need to use [ and ] instead.
62105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62106  if test "x$has_forbidden_chars" != x; then
62107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62109  fi
62110
62111
62112  windows_path="$new_path"
62113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62114    unix_path=`$CYGPATH -u "$windows_path"`
62115    new_path="$unix_path"
62116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62118    new_path="$unix_path"
62119  fi
62120
62121  if test "x$path" != "x$new_path"; then
62122    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62124$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62125  fi
62126
62127  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62128  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62129
62130    else
62131      # We're on a unix platform. Hooray! :)
62132      path="$POTENTIAL_FREETYPE_LIB_PATH"
62133      has_space=`$ECHO "$path" | $GREP " "`
62134      if test "x$has_space" != x; then
62135        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62136$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62137        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62138      fi
62139
62140      # Use eval to expand a potential ~
62141      eval path="$path"
62142      if test ! -f "$path" && test ! -d "$path"; then
62143        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62144      fi
62145
62146      if test -d "$path"; then
62147        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62148      else
62149        dir="`$DIRNAME "$path"`"
62150        base="`$BASENAME "$path"`"
62151        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62152      fi
62153    fi
62154  fi
62155
62156
62157    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62159$as_echo_n "checking for freetype includes... " >&6; }
62160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62161$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62162    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62163    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62164$as_echo_n "checking for freetype libraries... " >&6; }
62165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62166$as_echo "$FREETYPE_LIB_PATH" >&6; }
62167  fi
62168
62169          fi
62170
62171          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
62172            if test "x$FOUND_FREETYPE" != xyes; then
62173              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
62174              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
62175
62176  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62177  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62178  METHOD="well-known location"
62179
62180  # Let's start with an optimistic view of the world :-)
62181  FOUND_FREETYPE=yes
62182
62183  # First look for the canonical freetype main include file ft2build.h.
62184  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62185    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62186    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62187    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62188      # Fail.
62189      FOUND_FREETYPE=no
62190    fi
62191  fi
62192
62193  if test "x$FOUND_FREETYPE" = xyes; then
62194    # Include file found, let's continue the sanity check.
62195    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62196$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62197
62198    # Reset to default value
62199    FREETYPE_BASE_NAME=freetype
62200    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62201    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62202      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62203          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62204        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62205        # for the .6 version explicitly.
62206        FREETYPE_BASE_NAME=freetype.6
62207        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62208        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62209$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62210      else
62211        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62212$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62213        FOUND_FREETYPE=no
62214      fi
62215    else
62216      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62217        # On Windows, we will need both .lib and .dll file.
62218        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62219          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62220$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62221          FOUND_FREETYPE=no
62222        fi
62223      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62224          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62225        # Found lib in isa dir, use that instead.
62226        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62227        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62228$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62229      fi
62230    fi
62231  fi
62232
62233  if test "x$FOUND_FREETYPE" = xyes; then
62234
62235  # Only process if variable expands to non-empty
62236
62237  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62239
62240  # Input might be given as Windows format, start by converting to
62241  # unix format.
62242  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62243  new_path=`$CYGPATH -u "$path"`
62244
62245  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62246  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62247  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62248  # "foo.exe" is OK but "foo" is an error.
62249  #
62250  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62251  # It is also a way to make sure we got the proper file name for the real test later on.
62252  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62253  if test "x$test_shortpath" = x; then
62254    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62255$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62256    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62257  fi
62258
62259  # Call helper function which possibly converts this using DOS-style short mode.
62260  # If so, the updated path is stored in $new_path.
62261
62262  input_path="$new_path"
62263  # Check if we need to convert this using DOS-style short mode. If the path
62264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62265  # take no chances and rewrite it.
62266  # Note: m4 eats our [], so we need to use [ and ] instead.
62267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62268  if test "x$has_forbidden_chars" != x; then
62269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62273      # Going to short mode and back again did indeed matter. Since short mode is
62274      # case insensitive, let's make it lowercase to improve readability.
62275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62276      # Now convert it back to Unix-style (cygpath)
62277      input_path=`$CYGPATH -u "$shortmode_path"`
62278      new_path="$input_path"
62279    fi
62280  fi
62281
62282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62283  if test "x$test_cygdrive_prefix" = x; then
62284    # As a simple fix, exclude /usr/bin since it's not a real path.
62285    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62287      # a path prefixed by /cygdrive for fixpath to work.
62288      new_path="$CYGWIN_ROOT_PATH$input_path"
62289    fi
62290  fi
62291
62292
62293  if test "x$path" != "x$new_path"; then
62294    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62296$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62297  fi
62298
62299    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62300
62301  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62302  has_colon=`$ECHO $path | $GREP ^.:`
62303  new_path="$path"
62304  if test "x$has_colon" = x; then
62305    # Not in mixed or Windows style, start by that.
62306    new_path=`cmd //c echo $path`
62307  fi
62308
62309
62310  input_path="$new_path"
62311  # Check if we need to convert this using DOS-style short mode. If the path
62312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62313  # take no chances and rewrite it.
62314  # Note: m4 eats our [], so we need to use [ and ] instead.
62315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62316  if test "x$has_forbidden_chars" != x; then
62317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62318    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62319  fi
62320
62321
62322  windows_path="$new_path"
62323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62324    unix_path=`$CYGPATH -u "$windows_path"`
62325    new_path="$unix_path"
62326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62328    new_path="$unix_path"
62329  fi
62330
62331  if test "x$path" != "x$new_path"; then
62332    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62334$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62335  fi
62336
62337  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62338  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62339
62340    else
62341      # We're on a unix platform. Hooray! :)
62342      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62343      has_space=`$ECHO "$path" | $GREP " "`
62344      if test "x$has_space" != x; then
62345        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62346$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62347        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62348      fi
62349
62350      # Use eval to expand a potential ~
62351      eval path="$path"
62352      if test ! -f "$path" && test ! -d "$path"; then
62353        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62354      fi
62355
62356      if test -d "$path"; then
62357        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62358      else
62359        dir="`$DIRNAME "$path"`"
62360        base="`$BASENAME "$path"`"
62361        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62362      fi
62363    fi
62364  fi
62365
62366
62367  # Only process if variable expands to non-empty
62368
62369  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62371
62372  # Input might be given as Windows format, start by converting to
62373  # unix format.
62374  path="$POTENTIAL_FREETYPE_LIB_PATH"
62375  new_path=`$CYGPATH -u "$path"`
62376
62377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62380  # "foo.exe" is OK but "foo" is an error.
62381  #
62382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62383  # It is also a way to make sure we got the proper file name for the real test later on.
62384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62385  if test "x$test_shortpath" = x; then
62386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62387$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62388    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62389  fi
62390
62391  # Call helper function which possibly converts this using DOS-style short mode.
62392  # If so, the updated path is stored in $new_path.
62393
62394  input_path="$new_path"
62395  # Check if we need to convert this using DOS-style short mode. If the path
62396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62397  # take no chances and rewrite it.
62398  # Note: m4 eats our [], so we need to use [ and ] instead.
62399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62400  if test "x$has_forbidden_chars" != x; then
62401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62405      # Going to short mode and back again did indeed matter. Since short mode is
62406      # case insensitive, let's make it lowercase to improve readability.
62407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62408      # Now convert it back to Unix-style (cygpath)
62409      input_path=`$CYGPATH -u "$shortmode_path"`
62410      new_path="$input_path"
62411    fi
62412  fi
62413
62414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62415  if test "x$test_cygdrive_prefix" = x; then
62416    # As a simple fix, exclude /usr/bin since it's not a real path.
62417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62419      # a path prefixed by /cygdrive for fixpath to work.
62420      new_path="$CYGWIN_ROOT_PATH$input_path"
62421    fi
62422  fi
62423
62424
62425  if test "x$path" != "x$new_path"; then
62426    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62428$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62429  fi
62430
62431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62432
62433  path="$POTENTIAL_FREETYPE_LIB_PATH"
62434  has_colon=`$ECHO $path | $GREP ^.:`
62435  new_path="$path"
62436  if test "x$has_colon" = x; then
62437    # Not in mixed or Windows style, start by that.
62438    new_path=`cmd //c echo $path`
62439  fi
62440
62441
62442  input_path="$new_path"
62443  # Check if we need to convert this using DOS-style short mode. If the path
62444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62445  # take no chances and rewrite it.
62446  # Note: m4 eats our [], so we need to use [ and ] instead.
62447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62448  if test "x$has_forbidden_chars" != x; then
62449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62451  fi
62452
62453
62454  windows_path="$new_path"
62455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62456    unix_path=`$CYGPATH -u "$windows_path"`
62457    new_path="$unix_path"
62458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62460    new_path="$unix_path"
62461  fi
62462
62463  if test "x$path" != "x$new_path"; then
62464    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62466$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62467  fi
62468
62469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62471
62472    else
62473      # We're on a unix platform. Hooray! :)
62474      path="$POTENTIAL_FREETYPE_LIB_PATH"
62475      has_space=`$ECHO "$path" | $GREP " "`
62476      if test "x$has_space" != x; then
62477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62478$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62479        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62480      fi
62481
62482      # Use eval to expand a potential ~
62483      eval path="$path"
62484      if test ! -f "$path" && test ! -d "$path"; then
62485        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62486      fi
62487
62488      if test -d "$path"; then
62489        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62490      else
62491        dir="`$DIRNAME "$path"`"
62492        base="`$BASENAME "$path"`"
62493        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62494      fi
62495    fi
62496  fi
62497
62498
62499    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62501$as_echo_n "checking for freetype includes... " >&6; }
62502    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62503$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62504    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62505    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62506$as_echo_n "checking for freetype libraries... " >&6; }
62507    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62508$as_echo "$FREETYPE_LIB_PATH" >&6; }
62509  fi
62510
62511            fi
62512          fi
62513
62514          if test "x$FOUND_FREETYPE" != xyes; then
62515            FREETYPE_BASE_DIR="$SYSROOT/usr"
62516            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62517
62518  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62519  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
62520  METHOD="well-known location"
62521
62522  # Let's start with an optimistic view of the world :-)
62523  FOUND_FREETYPE=yes
62524
62525  # First look for the canonical freetype main include file ft2build.h.
62526  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62527    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62528    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62529    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62530      # Fail.
62531      FOUND_FREETYPE=no
62532    fi
62533  fi
62534
62535  if test "x$FOUND_FREETYPE" = xyes; then
62536    # Include file found, let's continue the sanity check.
62537    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62538$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62539
62540    # Reset to default value
62541    FREETYPE_BASE_NAME=freetype
62542    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62543    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62544      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62545          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62546        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62547        # for the .6 version explicitly.
62548        FREETYPE_BASE_NAME=freetype.6
62549        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62550        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62551$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62552      else
62553        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62554$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62555        FOUND_FREETYPE=no
62556      fi
62557    else
62558      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62559        # On Windows, we will need both .lib and .dll file.
62560        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62561          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62562$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62563          FOUND_FREETYPE=no
62564        fi
62565      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62566          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62567        # Found lib in isa dir, use that instead.
62568        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62569        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62570$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62571      fi
62572    fi
62573  fi
62574
62575  if test "x$FOUND_FREETYPE" = xyes; then
62576
62577  # Only process if variable expands to non-empty
62578
62579  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62580    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62581
62582  # Input might be given as Windows format, start by converting to
62583  # unix format.
62584  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62585  new_path=`$CYGPATH -u "$path"`
62586
62587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62590  # "foo.exe" is OK but "foo" is an error.
62591  #
62592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62593  # It is also a way to make sure we got the proper file name for the real test later on.
62594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62595  if test "x$test_shortpath" = x; then
62596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62597$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62598    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62599  fi
62600
62601  # Call helper function which possibly converts this using DOS-style short mode.
62602  # If so, the updated path is stored in $new_path.
62603
62604  input_path="$new_path"
62605  # Check if we need to convert this using DOS-style short mode. If the path
62606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62607  # take no chances and rewrite it.
62608  # Note: m4 eats our [], so we need to use [ and ] instead.
62609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62610  if test "x$has_forbidden_chars" != x; then
62611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62615      # Going to short mode and back again did indeed matter. Since short mode is
62616      # case insensitive, let's make it lowercase to improve readability.
62617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62618      # Now convert it back to Unix-style (cygpath)
62619      input_path=`$CYGPATH -u "$shortmode_path"`
62620      new_path="$input_path"
62621    fi
62622  fi
62623
62624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62625  if test "x$test_cygdrive_prefix" = x; then
62626    # As a simple fix, exclude /usr/bin since it's not a real path.
62627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62629      # a path prefixed by /cygdrive for fixpath to work.
62630      new_path="$CYGWIN_ROOT_PATH$input_path"
62631    fi
62632  fi
62633
62634
62635  if test "x$path" != "x$new_path"; then
62636    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62638$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62639  fi
62640
62641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62642
62643  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62644  has_colon=`$ECHO $path | $GREP ^.:`
62645  new_path="$path"
62646  if test "x$has_colon" = x; then
62647    # Not in mixed or Windows style, start by that.
62648    new_path=`cmd //c echo $path`
62649  fi
62650
62651
62652  input_path="$new_path"
62653  # Check if we need to convert this using DOS-style short mode. If the path
62654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62655  # take no chances and rewrite it.
62656  # Note: m4 eats our [], so we need to use [ and ] instead.
62657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62658  if test "x$has_forbidden_chars" != x; then
62659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62661  fi
62662
62663
62664  windows_path="$new_path"
62665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62666    unix_path=`$CYGPATH -u "$windows_path"`
62667    new_path="$unix_path"
62668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62670    new_path="$unix_path"
62671  fi
62672
62673  if test "x$path" != "x$new_path"; then
62674    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62676$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62677  fi
62678
62679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62681
62682    else
62683      # We're on a unix platform. Hooray! :)
62684      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62685      has_space=`$ECHO "$path" | $GREP " "`
62686      if test "x$has_space" != x; then
62687        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62688$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62689        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62690      fi
62691
62692      # Use eval to expand a potential ~
62693      eval path="$path"
62694      if test ! -f "$path" && test ! -d "$path"; then
62695        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62696      fi
62697
62698      if test -d "$path"; then
62699        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62700      else
62701        dir="`$DIRNAME "$path"`"
62702        base="`$BASENAME "$path"`"
62703        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62704      fi
62705    fi
62706  fi
62707
62708
62709  # Only process if variable expands to non-empty
62710
62711  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62712    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62713
62714  # Input might be given as Windows format, start by converting to
62715  # unix format.
62716  path="$POTENTIAL_FREETYPE_LIB_PATH"
62717  new_path=`$CYGPATH -u "$path"`
62718
62719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62722  # "foo.exe" is OK but "foo" is an error.
62723  #
62724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62725  # It is also a way to make sure we got the proper file name for the real test later on.
62726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62727  if test "x$test_shortpath" = x; then
62728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62729$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62730    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62731  fi
62732
62733  # Call helper function which possibly converts this using DOS-style short mode.
62734  # If so, the updated path is stored in $new_path.
62735
62736  input_path="$new_path"
62737  # Check if we need to convert this using DOS-style short mode. If the path
62738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62739  # take no chances and rewrite it.
62740  # Note: m4 eats our [], so we need to use [ and ] instead.
62741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62742  if test "x$has_forbidden_chars" != x; then
62743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62747      # Going to short mode and back again did indeed matter. Since short mode is
62748      # case insensitive, let's make it lowercase to improve readability.
62749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62750      # Now convert it back to Unix-style (cygpath)
62751      input_path=`$CYGPATH -u "$shortmode_path"`
62752      new_path="$input_path"
62753    fi
62754  fi
62755
62756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62757  if test "x$test_cygdrive_prefix" = x; then
62758    # As a simple fix, exclude /usr/bin since it's not a real path.
62759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62761      # a path prefixed by /cygdrive for fixpath to work.
62762      new_path="$CYGWIN_ROOT_PATH$input_path"
62763    fi
62764  fi
62765
62766
62767  if test "x$path" != "x$new_path"; then
62768    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62770$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62771  fi
62772
62773    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62774
62775  path="$POTENTIAL_FREETYPE_LIB_PATH"
62776  has_colon=`$ECHO $path | $GREP ^.:`
62777  new_path="$path"
62778  if test "x$has_colon" = x; then
62779    # Not in mixed or Windows style, start by that.
62780    new_path=`cmd //c echo $path`
62781  fi
62782
62783
62784  input_path="$new_path"
62785  # Check if we need to convert this using DOS-style short mode. If the path
62786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62787  # take no chances and rewrite it.
62788  # Note: m4 eats our [], so we need to use [ and ] instead.
62789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62790  if test "x$has_forbidden_chars" != x; then
62791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62793  fi
62794
62795
62796  windows_path="$new_path"
62797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62798    unix_path=`$CYGPATH -u "$windows_path"`
62799    new_path="$unix_path"
62800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62802    new_path="$unix_path"
62803  fi
62804
62805  if test "x$path" != "x$new_path"; then
62806    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62808$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62809  fi
62810
62811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62813
62814    else
62815      # We're on a unix platform. Hooray! :)
62816      path="$POTENTIAL_FREETYPE_LIB_PATH"
62817      has_space=`$ECHO "$path" | $GREP " "`
62818      if test "x$has_space" != x; then
62819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62820$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62821        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62822      fi
62823
62824      # Use eval to expand a potential ~
62825      eval path="$path"
62826      if test ! -f "$path" && test ! -d "$path"; then
62827        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62828      fi
62829
62830      if test -d "$path"; then
62831        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62832      else
62833        dir="`$DIRNAME "$path"`"
62834        base="`$BASENAME "$path"`"
62835        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62836      fi
62837    fi
62838  fi
62839
62840
62841    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62842    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62843$as_echo_n "checking for freetype includes... " >&6; }
62844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62845$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62846    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62847    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62848$as_echo_n "checking for freetype libraries... " >&6; }
62849    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62850$as_echo "$FREETYPE_LIB_PATH" >&6; }
62851  fi
62852
62853            else
62854
62855  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62856  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62857  METHOD="well-known location"
62858
62859  # Let's start with an optimistic view of the world :-)
62860  FOUND_FREETYPE=yes
62861
62862  # First look for the canonical freetype main include file ft2build.h.
62863  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62864    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62865    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62866    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62867      # Fail.
62868      FOUND_FREETYPE=no
62869    fi
62870  fi
62871
62872  if test "x$FOUND_FREETYPE" = xyes; then
62873    # Include file found, let's continue the sanity check.
62874    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62875$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62876
62877    # Reset to default value
62878    FREETYPE_BASE_NAME=freetype
62879    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62880    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62881      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62882          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62883        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62884        # for the .6 version explicitly.
62885        FREETYPE_BASE_NAME=freetype.6
62886        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62887        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62888$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62889      else
62890        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62891$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62892        FOUND_FREETYPE=no
62893      fi
62894    else
62895      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62896        # On Windows, we will need both .lib and .dll file.
62897        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62898          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62899$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62900          FOUND_FREETYPE=no
62901        fi
62902      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62903          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62904        # Found lib in isa dir, use that instead.
62905        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62906        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62907$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62908      fi
62909    fi
62910  fi
62911
62912  if test "x$FOUND_FREETYPE" = xyes; then
62913
62914  # Only process if variable expands to non-empty
62915
62916  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62917    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62918
62919  # Input might be given as Windows format, start by converting to
62920  # unix format.
62921  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62922  new_path=`$CYGPATH -u "$path"`
62923
62924  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62925  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62926  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62927  # "foo.exe" is OK but "foo" is an error.
62928  #
62929  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62930  # It is also a way to make sure we got the proper file name for the real test later on.
62931  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62932  if test "x$test_shortpath" = x; then
62933    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62934$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62935    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62936  fi
62937
62938  # Call helper function which possibly converts this using DOS-style short mode.
62939  # If so, the updated path is stored in $new_path.
62940
62941  input_path="$new_path"
62942  # Check if we need to convert this using DOS-style short mode. If the path
62943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62944  # take no chances and rewrite it.
62945  # Note: m4 eats our [], so we need to use [ and ] instead.
62946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62947  if test "x$has_forbidden_chars" != x; then
62948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62949    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62950    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62951    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62952      # Going to short mode and back again did indeed matter. Since short mode is
62953      # case insensitive, let's make it lowercase to improve readability.
62954      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62955      # Now convert it back to Unix-style (cygpath)
62956      input_path=`$CYGPATH -u "$shortmode_path"`
62957      new_path="$input_path"
62958    fi
62959  fi
62960
62961  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62962  if test "x$test_cygdrive_prefix" = x; then
62963    # As a simple fix, exclude /usr/bin since it's not a real path.
62964    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62965      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62966      # a path prefixed by /cygdrive for fixpath to work.
62967      new_path="$CYGWIN_ROOT_PATH$input_path"
62968    fi
62969  fi
62970
62971
62972  if test "x$path" != "x$new_path"; then
62973    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62975$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62976  fi
62977
62978    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62979
62980  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62981  has_colon=`$ECHO $path | $GREP ^.:`
62982  new_path="$path"
62983  if test "x$has_colon" = x; then
62984    # Not in mixed or Windows style, start by that.
62985    new_path=`cmd //c echo $path`
62986  fi
62987
62988
62989  input_path="$new_path"
62990  # Check if we need to convert this using DOS-style short mode. If the path
62991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62992  # take no chances and rewrite it.
62993  # Note: m4 eats our [], so we need to use [ and ] instead.
62994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62995  if test "x$has_forbidden_chars" != x; then
62996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62998  fi
62999
63000
63001  windows_path="$new_path"
63002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63003    unix_path=`$CYGPATH -u "$windows_path"`
63004    new_path="$unix_path"
63005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63007    new_path="$unix_path"
63008  fi
63009
63010  if test "x$path" != "x$new_path"; then
63011    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63013$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63014  fi
63015
63016  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63017  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63018
63019    else
63020      # We're on a unix platform. Hooray! :)
63021      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63022      has_space=`$ECHO "$path" | $GREP " "`
63023      if test "x$has_space" != x; then
63024        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63025$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63026        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63027      fi
63028
63029      # Use eval to expand a potential ~
63030      eval path="$path"
63031      if test ! -f "$path" && test ! -d "$path"; then
63032        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63033      fi
63034
63035      if test -d "$path"; then
63036        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63037      else
63038        dir="`$DIRNAME "$path"`"
63039        base="`$BASENAME "$path"`"
63040        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63041      fi
63042    fi
63043  fi
63044
63045
63046  # Only process if variable expands to non-empty
63047
63048  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63049    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63050
63051  # Input might be given as Windows format, start by converting to
63052  # unix format.
63053  path="$POTENTIAL_FREETYPE_LIB_PATH"
63054  new_path=`$CYGPATH -u "$path"`
63055
63056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63059  # "foo.exe" is OK but "foo" is an error.
63060  #
63061  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63062  # It is also a way to make sure we got the proper file name for the real test later on.
63063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63064  if test "x$test_shortpath" = x; then
63065    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63066$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63067    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63068  fi
63069
63070  # Call helper function which possibly converts this using DOS-style short mode.
63071  # If so, the updated path is stored in $new_path.
63072
63073  input_path="$new_path"
63074  # Check if we need to convert this using DOS-style short mode. If the path
63075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63076  # take no chances and rewrite it.
63077  # Note: m4 eats our [], so we need to use [ and ] instead.
63078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63079  if test "x$has_forbidden_chars" != x; then
63080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63084      # Going to short mode and back again did indeed matter. Since short mode is
63085      # case insensitive, let's make it lowercase to improve readability.
63086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63087      # Now convert it back to Unix-style (cygpath)
63088      input_path=`$CYGPATH -u "$shortmode_path"`
63089      new_path="$input_path"
63090    fi
63091  fi
63092
63093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63094  if test "x$test_cygdrive_prefix" = x; then
63095    # As a simple fix, exclude /usr/bin since it's not a real path.
63096    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63098      # a path prefixed by /cygdrive for fixpath to work.
63099      new_path="$CYGWIN_ROOT_PATH$input_path"
63100    fi
63101  fi
63102
63103
63104  if test "x$path" != "x$new_path"; then
63105    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63107$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63108  fi
63109
63110    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63111
63112  path="$POTENTIAL_FREETYPE_LIB_PATH"
63113  has_colon=`$ECHO $path | $GREP ^.:`
63114  new_path="$path"
63115  if test "x$has_colon" = x; then
63116    # Not in mixed or Windows style, start by that.
63117    new_path=`cmd //c echo $path`
63118  fi
63119
63120
63121  input_path="$new_path"
63122  # Check if we need to convert this using DOS-style short mode. If the path
63123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63124  # take no chances and rewrite it.
63125  # Note: m4 eats our [], so we need to use [ and ] instead.
63126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63127  if test "x$has_forbidden_chars" != x; then
63128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63130  fi
63131
63132
63133  windows_path="$new_path"
63134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63135    unix_path=`$CYGPATH -u "$windows_path"`
63136    new_path="$unix_path"
63137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63139    new_path="$unix_path"
63140  fi
63141
63142  if test "x$path" != "x$new_path"; then
63143    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63145$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63146  fi
63147
63148  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63149  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63150
63151    else
63152      # We're on a unix platform. Hooray! :)
63153      path="$POTENTIAL_FREETYPE_LIB_PATH"
63154      has_space=`$ECHO "$path" | $GREP " "`
63155      if test "x$has_space" != x; then
63156        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63157$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63158        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63159      fi
63160
63161      # Use eval to expand a potential ~
63162      eval path="$path"
63163      if test ! -f "$path" && test ! -d "$path"; then
63164        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63165      fi
63166
63167      if test -d "$path"; then
63168        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63169      else
63170        dir="`$DIRNAME "$path"`"
63171        base="`$BASENAME "$path"`"
63172        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63173      fi
63174    fi
63175  fi
63176
63177
63178    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63180$as_echo_n "checking for freetype includes... " >&6; }
63181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63182$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63183    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63185$as_echo_n "checking for freetype libraries... " >&6; }
63186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63187$as_echo "$FREETYPE_LIB_PATH" >&6; }
63188  fi
63189
63190              if test "x$FOUND_FREETYPE" != xyes; then
63191
63192  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63193  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
63194  METHOD="well-known location"
63195
63196  # Let's start with an optimistic view of the world :-)
63197  FOUND_FREETYPE=yes
63198
63199  # First look for the canonical freetype main include file ft2build.h.
63200  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63201    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63202    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63203    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63204      # Fail.
63205      FOUND_FREETYPE=no
63206    fi
63207  fi
63208
63209  if test "x$FOUND_FREETYPE" = xyes; then
63210    # Include file found, let's continue the sanity check.
63211    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63212$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63213
63214    # Reset to default value
63215    FREETYPE_BASE_NAME=freetype
63216    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63217    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63218      if test "x$OPENJDK_TARGET_OS" = xmacosx \
63219          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63220        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63221        # for the .6 version explicitly.
63222        FREETYPE_BASE_NAME=freetype.6
63223        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63224        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63225$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63226      else
63227        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63228$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63229        FOUND_FREETYPE=no
63230      fi
63231    else
63232      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63233        # On Windows, we will need both .lib and .dll file.
63234        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63235          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63236$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63237          FOUND_FREETYPE=no
63238        fi
63239      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63240          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63241        # Found lib in isa dir, use that instead.
63242        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63243        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63244$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63245      fi
63246    fi
63247  fi
63248
63249  if test "x$FOUND_FREETYPE" = xyes; then
63250
63251  # Only process if variable expands to non-empty
63252
63253  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63254    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63255
63256  # Input might be given as Windows format, start by converting to
63257  # unix format.
63258  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63259  new_path=`$CYGPATH -u "$path"`
63260
63261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63264  # "foo.exe" is OK but "foo" is an error.
63265  #
63266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63267  # It is also a way to make sure we got the proper file name for the real test later on.
63268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63269  if test "x$test_shortpath" = x; then
63270    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63271$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63272    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63273  fi
63274
63275  # Call helper function which possibly converts this using DOS-style short mode.
63276  # If so, the updated path is stored in $new_path.
63277
63278  input_path="$new_path"
63279  # Check if we need to convert this using DOS-style short mode. If the path
63280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63281  # take no chances and rewrite it.
63282  # Note: m4 eats our [], so we need to use [ and ] instead.
63283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63284  if test "x$has_forbidden_chars" != x; then
63285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63289      # Going to short mode and back again did indeed matter. Since short mode is
63290      # case insensitive, let's make it lowercase to improve readability.
63291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63292      # Now convert it back to Unix-style (cygpath)
63293      input_path=`$CYGPATH -u "$shortmode_path"`
63294      new_path="$input_path"
63295    fi
63296  fi
63297
63298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63299  if test "x$test_cygdrive_prefix" = x; then
63300    # As a simple fix, exclude /usr/bin since it's not a real path.
63301    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63303      # a path prefixed by /cygdrive for fixpath to work.
63304      new_path="$CYGWIN_ROOT_PATH$input_path"
63305    fi
63306  fi
63307
63308
63309  if test "x$path" != "x$new_path"; then
63310    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63312$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63313  fi
63314
63315    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63316
63317  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63318  has_colon=`$ECHO $path | $GREP ^.:`
63319  new_path="$path"
63320  if test "x$has_colon" = x; then
63321    # Not in mixed or Windows style, start by that.
63322    new_path=`cmd //c echo $path`
63323  fi
63324
63325
63326  input_path="$new_path"
63327  # Check if we need to convert this using DOS-style short mode. If the path
63328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63329  # take no chances and rewrite it.
63330  # Note: m4 eats our [], so we need to use [ and ] instead.
63331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63332  if test "x$has_forbidden_chars" != x; then
63333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63335  fi
63336
63337
63338  windows_path="$new_path"
63339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63340    unix_path=`$CYGPATH -u "$windows_path"`
63341    new_path="$unix_path"
63342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63344    new_path="$unix_path"
63345  fi
63346
63347  if test "x$path" != "x$new_path"; then
63348    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63350$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63351  fi
63352
63353  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63354  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63355
63356    else
63357      # We're on a unix platform. Hooray! :)
63358      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63359      has_space=`$ECHO "$path" | $GREP " "`
63360      if test "x$has_space" != x; then
63361        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63362$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63363        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63364      fi
63365
63366      # Use eval to expand a potential ~
63367      eval path="$path"
63368      if test ! -f "$path" && test ! -d "$path"; then
63369        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63370      fi
63371
63372      if test -d "$path"; then
63373        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63374      else
63375        dir="`$DIRNAME "$path"`"
63376        base="`$BASENAME "$path"`"
63377        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63378      fi
63379    fi
63380  fi
63381
63382
63383  # Only process if variable expands to non-empty
63384
63385  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63386    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63387
63388  # Input might be given as Windows format, start by converting to
63389  # unix format.
63390  path="$POTENTIAL_FREETYPE_LIB_PATH"
63391  new_path=`$CYGPATH -u "$path"`
63392
63393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63396  # "foo.exe" is OK but "foo" is an error.
63397  #
63398  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63399  # It is also a way to make sure we got the proper file name for the real test later on.
63400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63401  if test "x$test_shortpath" = x; then
63402    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63403$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63404    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63405  fi
63406
63407  # Call helper function which possibly converts this using DOS-style short mode.
63408  # If so, the updated path is stored in $new_path.
63409
63410  input_path="$new_path"
63411  # Check if we need to convert this using DOS-style short mode. If the path
63412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63413  # take no chances and rewrite it.
63414  # Note: m4 eats our [], so we need to use [ and ] instead.
63415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63416  if test "x$has_forbidden_chars" != x; then
63417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63421      # Going to short mode and back again did indeed matter. Since short mode is
63422      # case insensitive, let's make it lowercase to improve readability.
63423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63424      # Now convert it back to Unix-style (cygpath)
63425      input_path=`$CYGPATH -u "$shortmode_path"`
63426      new_path="$input_path"
63427    fi
63428  fi
63429
63430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63431  if test "x$test_cygdrive_prefix" = x; then
63432    # As a simple fix, exclude /usr/bin since it's not a real path.
63433    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63435      # a path prefixed by /cygdrive for fixpath to work.
63436      new_path="$CYGWIN_ROOT_PATH$input_path"
63437    fi
63438  fi
63439
63440
63441  if test "x$path" != "x$new_path"; then
63442    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63444$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63445  fi
63446
63447    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63448
63449  path="$POTENTIAL_FREETYPE_LIB_PATH"
63450  has_colon=`$ECHO $path | $GREP ^.:`
63451  new_path="$path"
63452  if test "x$has_colon" = x; then
63453    # Not in mixed or Windows style, start by that.
63454    new_path=`cmd //c echo $path`
63455  fi
63456
63457
63458  input_path="$new_path"
63459  # Check if we need to convert this using DOS-style short mode. If the path
63460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63461  # take no chances and rewrite it.
63462  # Note: m4 eats our [], so we need to use [ and ] instead.
63463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63464  if test "x$has_forbidden_chars" != x; then
63465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63467  fi
63468
63469
63470  windows_path="$new_path"
63471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63472    unix_path=`$CYGPATH -u "$windows_path"`
63473    new_path="$unix_path"
63474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63476    new_path="$unix_path"
63477  fi
63478
63479  if test "x$path" != "x$new_path"; then
63480    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63482$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63483  fi
63484
63485  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63486  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63487
63488    else
63489      # We're on a unix platform. Hooray! :)
63490      path="$POTENTIAL_FREETYPE_LIB_PATH"
63491      has_space=`$ECHO "$path" | $GREP " "`
63492      if test "x$has_space" != x; then
63493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63494$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63495        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63496      fi
63497
63498      # Use eval to expand a potential ~
63499      eval path="$path"
63500      if test ! -f "$path" && test ! -d "$path"; then
63501        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63502      fi
63503
63504      if test -d "$path"; then
63505        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63506      else
63507        dir="`$DIRNAME "$path"`"
63508        base="`$BASENAME "$path"`"
63509        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63510      fi
63511    fi
63512  fi
63513
63514
63515    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63516    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63517$as_echo_n "checking for freetype includes... " >&6; }
63518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63519$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63520    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63521    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63522$as_echo_n "checking for freetype libraries... " >&6; }
63523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63524$as_echo "$FREETYPE_LIB_PATH" >&6; }
63525  fi
63526
63527              fi
63528            fi
63529          fi
63530        fi
63531      fi # end check in well-known locations
63532
63533      if test "x$FOUND_FREETYPE" != xyes; then
63534
63535  # Print a helpful message on how to acquire the necessary build dependency.
63536  # freetype is the help tag: freetype, cups, alsa etc
63537  MISSING_DEPENDENCY=freetype
63538
63539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63540    cygwin_help $MISSING_DEPENDENCY
63541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63542    msys_help $MISSING_DEPENDENCY
63543  else
63544    PKGHANDLER_COMMAND=
63545
63546    case $PKGHANDLER in
63547      apt-get)
63548        apt_help     $MISSING_DEPENDENCY ;;
63549      yum)
63550        yum_help     $MISSING_DEPENDENCY ;;
63551      brew)
63552        brew_help    $MISSING_DEPENDENCY ;;
63553      port)
63554        port_help    $MISSING_DEPENDENCY ;;
63555      pkgutil)
63556        pkgutil_help $MISSING_DEPENDENCY ;;
63557      pkgadd)
63558        pkgadd_help  $MISSING_DEPENDENCY ;;
63559    esac
63560
63561    if test "x$PKGHANDLER_COMMAND" != x; then
63562      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63563    fi
63564  fi
63565
63566        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63567      fi
63568    fi # end user specified settings
63569
63570    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63571    if test "x$FREETYPE_CFLAGS" = x; then
63572
63573  # Only process if variable expands to non-empty
63574
63575  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63576    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63577
63578  # Input might be given as Windows format, start by converting to
63579  # unix format.
63580  path="$FREETYPE_INCLUDE_PATH"
63581  new_path=`$CYGPATH -u "$path"`
63582
63583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63586  # "foo.exe" is OK but "foo" is an error.
63587  #
63588  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63589  # It is also a way to make sure we got the proper file name for the real test later on.
63590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63591  if test "x$test_shortpath" = x; then
63592    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63593$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63594    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63595  fi
63596
63597  # Call helper function which possibly converts this using DOS-style short mode.
63598  # If so, the updated path is stored in $new_path.
63599
63600  input_path="$new_path"
63601  # Check if we need to convert this using DOS-style short mode. If the path
63602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63603  # take no chances and rewrite it.
63604  # Note: m4 eats our [], so we need to use [ and ] instead.
63605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63606  if test "x$has_forbidden_chars" != x; then
63607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63611      # Going to short mode and back again did indeed matter. Since short mode is
63612      # case insensitive, let's make it lowercase to improve readability.
63613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63614      # Now convert it back to Unix-style (cygpath)
63615      input_path=`$CYGPATH -u "$shortmode_path"`
63616      new_path="$input_path"
63617    fi
63618  fi
63619
63620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63621  if test "x$test_cygdrive_prefix" = x; then
63622    # As a simple fix, exclude /usr/bin since it's not a real path.
63623    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63625      # a path prefixed by /cygdrive for fixpath to work.
63626      new_path="$CYGWIN_ROOT_PATH$input_path"
63627    fi
63628  fi
63629
63630
63631  if test "x$path" != "x$new_path"; then
63632    FREETYPE_INCLUDE_PATH="$new_path"
63633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63634$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63635  fi
63636
63637    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63638
63639  path="$FREETYPE_INCLUDE_PATH"
63640  has_colon=`$ECHO $path | $GREP ^.:`
63641  new_path="$path"
63642  if test "x$has_colon" = x; then
63643    # Not in mixed or Windows style, start by that.
63644    new_path=`cmd //c echo $path`
63645  fi
63646
63647
63648  input_path="$new_path"
63649  # Check if we need to convert this using DOS-style short mode. If the path
63650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63651  # take no chances and rewrite it.
63652  # Note: m4 eats our [], so we need to use [ and ] instead.
63653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63654  if test "x$has_forbidden_chars" != x; then
63655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63656    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63657  fi
63658
63659
63660  windows_path="$new_path"
63661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63662    unix_path=`$CYGPATH -u "$windows_path"`
63663    new_path="$unix_path"
63664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63666    new_path="$unix_path"
63667  fi
63668
63669  if test "x$path" != "x$new_path"; then
63670    FREETYPE_INCLUDE_PATH="$new_path"
63671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63672$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63673  fi
63674
63675  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63676  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63677
63678    else
63679      # We're on a unix platform. Hooray! :)
63680      path="$FREETYPE_INCLUDE_PATH"
63681      has_space=`$ECHO "$path" | $GREP " "`
63682      if test "x$has_space" != x; then
63683        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63684$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63685        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63686      fi
63687
63688      # Use eval to expand a potential ~
63689      eval path="$path"
63690      if test ! -f "$path" && test ! -d "$path"; then
63691        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63692      fi
63693
63694      if test -d "$path"; then
63695        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63696      else
63697        dir="`$DIRNAME "$path"`"
63698        base="`$BASENAME "$path"`"
63699        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63700      fi
63701    fi
63702  fi
63703
63704      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63705        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63706      else
63707        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63708      fi
63709    fi
63710
63711    if test "x$FREETYPE_LIBS" = x; then
63712
63713  # Only process if variable expands to non-empty
63714
63715  if test "x$FREETYPE_LIB_PATH" != x; then
63716    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63717
63718  # Input might be given as Windows format, start by converting to
63719  # unix format.
63720  path="$FREETYPE_LIB_PATH"
63721  new_path=`$CYGPATH -u "$path"`
63722
63723  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63724  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63725  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63726  # "foo.exe" is OK but "foo" is an error.
63727  #
63728  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63729  # It is also a way to make sure we got the proper file name for the real test later on.
63730  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63731  if test "x$test_shortpath" = x; then
63732    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63733$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63734    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63735  fi
63736
63737  # Call helper function which possibly converts this using DOS-style short mode.
63738  # If so, the updated path is stored in $new_path.
63739
63740  input_path="$new_path"
63741  # Check if we need to convert this using DOS-style short mode. If the path
63742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63743  # take no chances and rewrite it.
63744  # Note: m4 eats our [], so we need to use [ and ] instead.
63745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63746  if test "x$has_forbidden_chars" != x; then
63747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63751      # Going to short mode and back again did indeed matter. Since short mode is
63752      # case insensitive, let's make it lowercase to improve readability.
63753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63754      # Now convert it back to Unix-style (cygpath)
63755      input_path=`$CYGPATH -u "$shortmode_path"`
63756      new_path="$input_path"
63757    fi
63758  fi
63759
63760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63761  if test "x$test_cygdrive_prefix" = x; then
63762    # As a simple fix, exclude /usr/bin since it's not a real path.
63763    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63765      # a path prefixed by /cygdrive for fixpath to work.
63766      new_path="$CYGWIN_ROOT_PATH$input_path"
63767    fi
63768  fi
63769
63770
63771  if test "x$path" != "x$new_path"; then
63772    FREETYPE_LIB_PATH="$new_path"
63773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63774$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63775  fi
63776
63777    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63778
63779  path="$FREETYPE_LIB_PATH"
63780  has_colon=`$ECHO $path | $GREP ^.:`
63781  new_path="$path"
63782  if test "x$has_colon" = x; then
63783    # Not in mixed or Windows style, start by that.
63784    new_path=`cmd //c echo $path`
63785  fi
63786
63787
63788  input_path="$new_path"
63789  # Check if we need to convert this using DOS-style short mode. If the path
63790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63791  # take no chances and rewrite it.
63792  # Note: m4 eats our [], so we need to use [ and ] instead.
63793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63794  if test "x$has_forbidden_chars" != x; then
63795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63797  fi
63798
63799
63800  windows_path="$new_path"
63801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63802    unix_path=`$CYGPATH -u "$windows_path"`
63803    new_path="$unix_path"
63804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63806    new_path="$unix_path"
63807  fi
63808
63809  if test "x$path" != "x$new_path"; then
63810    FREETYPE_LIB_PATH="$new_path"
63811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63812$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63813  fi
63814
63815  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63816  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63817
63818    else
63819      # We're on a unix platform. Hooray! :)
63820      path="$FREETYPE_LIB_PATH"
63821      has_space=`$ECHO "$path" | $GREP " "`
63822      if test "x$has_space" != x; then
63823        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63824$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63825        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63826      fi
63827
63828      # Use eval to expand a potential ~
63829      eval path="$path"
63830      if test ! -f "$path" && test ! -d "$path"; then
63831        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63832      fi
63833
63834      if test -d "$path"; then
63835        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63836      else
63837        dir="`$DIRNAME "$path"`"
63838        base="`$BASENAME "$path"`"
63839        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63840      fi
63841    fi
63842  fi
63843
63844      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63845        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63846      else
63847        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63848      fi
63849    fi
63850
63851    # Try to compile it
63852    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63853$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63854    ac_ext=cpp
63855ac_cpp='$CXXCPP $CPPFLAGS'
63856ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63857ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63858ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63859
63860    PREV_CXXCFLAGS="$CXXFLAGS"
63861    PREV_LIBS="$LIBS"
63862    PREV_CXX="$CXX"
63863    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63864    LIBS="$LIBS $FREETYPE_LIBS"
63865    CXX="$FIXPATH $CXX"
63866    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63867/* end confdefs.h.  */
63868
63869          #include<ft2build.h>
63870          #include FT_FREETYPE_H
63871          int main () {
63872            FT_Init_FreeType(NULL);
63873            return 0;
63874          }
63875
63876_ACEOF
63877if ac_fn_cxx_try_link "$LINENO"; then :
63878
63879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63880$as_echo "yes" >&6; }
63881
63882else
63883
63884          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63885$as_echo "no" >&6; }
63886          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63887$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63888          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63889$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63890
63891
63892  # Print a helpful message on how to acquire the necessary build dependency.
63893  # freetype is the help tag: freetype, cups, alsa etc
63894  MISSING_DEPENDENCY=freetype
63895
63896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63897    cygwin_help $MISSING_DEPENDENCY
63898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63899    msys_help $MISSING_DEPENDENCY
63900  else
63901    PKGHANDLER_COMMAND=
63902
63903    case $PKGHANDLER in
63904      apt-get)
63905        apt_help     $MISSING_DEPENDENCY ;;
63906      yum)
63907        yum_help     $MISSING_DEPENDENCY ;;
63908      brew)
63909        brew_help    $MISSING_DEPENDENCY ;;
63910      port)
63911        port_help    $MISSING_DEPENDENCY ;;
63912      pkgutil)
63913        pkgutil_help $MISSING_DEPENDENCY ;;
63914      pkgadd)
63915        pkgadd_help  $MISSING_DEPENDENCY ;;
63916    esac
63917
63918    if test "x$PKGHANDLER_COMMAND" != x; then
63919      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63920    fi
63921  fi
63922
63923
63924          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63925
63926
63927fi
63928rm -f core conftest.err conftest.$ac_objext \
63929    conftest$ac_exeext conftest.$ac_ext
63930    CXXCFLAGS="$PREV_CXXFLAGS"
63931    LIBS="$PREV_LIBS"
63932    CXX="$PREV_CXX"
63933    ac_ext=cpp
63934ac_cpp='$CXXCPP $CPPFLAGS'
63935ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63936ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63937ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63938
63939
63940    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63941$as_echo_n "checking if we should bundle freetype... " >&6; }
63942    if test "x$BUNDLE_FREETYPE" = xyes; then
63943      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63944    fi
63945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63946$as_echo "$BUNDLE_FREETYPE" >&6; }
63947
63948  fi # end freetype needed
63949
63950
63951
63952
63953
63954
63955
63956# Check whether --with-alsa was given.
63957if test "${with_alsa+set}" = set; then :
63958  withval=$with_alsa;
63959fi
63960
63961
63962# Check whether --with-alsa-include was given.
63963if test "${with_alsa_include+set}" = set; then :
63964  withval=$with_alsa_include;
63965fi
63966
63967
63968# Check whether --with-alsa-lib was given.
63969if test "${with_alsa_lib+set}" = set; then :
63970  withval=$with_alsa_lib;
63971fi
63972
63973
63974  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63975    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63976        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63977        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63978      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63979$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63980    fi
63981    ALSA_CFLAGS=
63982    ALSA_LIBS=
63983  else
63984    ALSA_FOUND=no
63985
63986    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63987      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63988    fi
63989
63990    if test "x${with_alsa}" != x; then
63991      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63992      ALSA_CFLAGS="-I${with_alsa}/include"
63993      ALSA_FOUND=yes
63994    fi
63995    if test "x${with_alsa_include}" != x; then
63996      ALSA_CFLAGS="-I${with_alsa_include}"
63997      ALSA_FOUND=yes
63998    fi
63999    if test "x${with_alsa_lib}" != x; then
64000      ALSA_LIBS="-L${with_alsa_lib} -lasound"
64001      ALSA_FOUND=yes
64002    fi
64003    # Do not try pkg-config if we have a sysroot set.
64004    if test "x$SYSROOT" = x; then
64005      if test "x$ALSA_FOUND" = xno; then
64006
64007pkg_failed=no
64008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
64009$as_echo_n "checking for ALSA... " >&6; }
64010
64011if test -n "$ALSA_CFLAGS"; then
64012    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
64013 elif test -n "$PKG_CONFIG"; then
64014    if test -n "$PKG_CONFIG" && \
64015    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64016  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64017  ac_status=$?
64018  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64019  test $ac_status = 0; }; then
64020  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
64021else
64022  pkg_failed=yes
64023fi
64024 else
64025    pkg_failed=untried
64026fi
64027if test -n "$ALSA_LIBS"; then
64028    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
64029 elif test -n "$PKG_CONFIG"; then
64030    if test -n "$PKG_CONFIG" && \
64031    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64032  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64033  ac_status=$?
64034  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64035  test $ac_status = 0; }; then
64036  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
64037else
64038  pkg_failed=yes
64039fi
64040 else
64041    pkg_failed=untried
64042fi
64043
64044
64045
64046if test $pkg_failed = yes; then
64047
64048if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64049        _pkg_short_errors_supported=yes
64050else
64051        _pkg_short_errors_supported=no
64052fi
64053        if test $_pkg_short_errors_supported = yes; then
64054	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
64055        else
64056	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
64057        fi
64058	# Put the nasty error message in config.log where it belongs
64059	echo "$ALSA_PKG_ERRORS" >&5
64060
64061	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64062$as_echo "no" >&6; }
64063                ALSA_FOUND=no
64064elif test $pkg_failed = untried; then
64065	ALSA_FOUND=no
64066else
64067	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
64068	ALSA_LIBS=$pkg_cv_ALSA_LIBS
64069        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64070$as_echo "yes" >&6; }
64071	ALSA_FOUND=yes
64072fi
64073      fi
64074    fi
64075    if test "x$ALSA_FOUND" = xno; then
64076      for ac_header in alsa/asoundlib.h
64077do :
64078  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
64079if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
64080  cat >>confdefs.h <<_ACEOF
64081#define HAVE_ALSA_ASOUNDLIB_H 1
64082_ACEOF
64083
64084            ALSA_FOUND=yes
64085            ALSA_CFLAGS=-Iignoreme
64086            ALSA_LIBS=-lasound
64087            DEFAULT_ALSA=yes
64088
64089else
64090  ALSA_FOUND=no
64091
64092fi
64093
64094done
64095
64096    fi
64097    if test "x$ALSA_FOUND" = xno; then
64098
64099  # Print a helpful message on how to acquire the necessary build dependency.
64100  # alsa is the help tag: freetype, cups, alsa etc
64101  MISSING_DEPENDENCY=alsa
64102
64103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64104    cygwin_help $MISSING_DEPENDENCY
64105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64106    msys_help $MISSING_DEPENDENCY
64107  else
64108    PKGHANDLER_COMMAND=
64109
64110    case $PKGHANDLER in
64111      apt-get)
64112        apt_help     $MISSING_DEPENDENCY ;;
64113      yum)
64114        yum_help     $MISSING_DEPENDENCY ;;
64115      brew)
64116        brew_help    $MISSING_DEPENDENCY ;;
64117      port)
64118        port_help    $MISSING_DEPENDENCY ;;
64119      pkgutil)
64120        pkgutil_help $MISSING_DEPENDENCY ;;
64121      pkgadd)
64122        pkgadd_help  $MISSING_DEPENDENCY ;;
64123    esac
64124
64125    if test "x$PKGHANDLER_COMMAND" != x; then
64126      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64127    fi
64128  fi
64129
64130      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
64131    fi
64132  fi
64133
64134
64135
64136
64137
64138
64139# Check whether --with-libffi was given.
64140if test "${with_libffi+set}" = set; then :
64141  withval=$with_libffi;
64142fi
64143
64144
64145# Check whether --with-libffi-include was given.
64146if test "${with_libffi_include+set}" = set; then :
64147  withval=$with_libffi_include;
64148fi
64149
64150
64151# Check whether --with-libffi-lib was given.
64152if test "${with_libffi_lib+set}" = set; then :
64153  withval=$with_libffi_lib;
64154fi
64155
64156  # Check whether --enable-libffi-bundling was given.
64157if test "${enable_libffi_bundling+set}" = set; then :
64158  enableval=$enable_libffi_bundling;
64159fi
64160
64161
64162  if test "x$NEEDS_LIB_FFI" = xfalse; then
64163    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
64164        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
64165        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
64166      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
64167$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
64168    fi
64169    LIBFFI_CFLAGS=
64170    LIBFFI_LIBS=
64171  else
64172    LIBFFI_FOUND=no
64173
64174    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
64175      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
64176    fi
64177
64178    if test "x${with_libffi}" != x; then
64179      LIBFFI_LIB_PATH="${with_libffi}/lib"
64180      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
64181      LIBFFI_CFLAGS="-I${with_libffi}/include"
64182      LIBFFI_FOUND=yes
64183    fi
64184    if test "x${with_libffi_include}" != x; then
64185      LIBFFI_CFLAGS="-I${with_libffi_include}"
64186      LIBFFI_FOUND=yes
64187    fi
64188    if test "x${with_libffi_lib}" != x; then
64189      LIBFFI_LIB_PATH="${with_libffi_lib}"
64190      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
64191      LIBFFI_FOUND=yes
64192    fi
64193    # Do not try pkg-config if we have a sysroot set.
64194    if test "x$SYSROOT" = x; then
64195      if test "x$LIBFFI_FOUND" = xno; then
64196        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
64197
64198pkg_failed=no
64199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
64200$as_echo_n "checking for LIBFFI... " >&6; }
64201
64202if test -n "$LIBFFI_CFLAGS"; then
64203    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
64204 elif test -n "$PKG_CONFIG"; then
64205    if test -n "$PKG_CONFIG" && \
64206    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64207  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64208  ac_status=$?
64209  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64210  test $ac_status = 0; }; then
64211  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
64212else
64213  pkg_failed=yes
64214fi
64215 else
64216    pkg_failed=untried
64217fi
64218if test -n "$LIBFFI_LIBS"; then
64219    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
64220 elif test -n "$PKG_CONFIG"; then
64221    if test -n "$PKG_CONFIG" && \
64222    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64223  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64224  ac_status=$?
64225  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64226  test $ac_status = 0; }; then
64227  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
64228else
64229  pkg_failed=yes
64230fi
64231 else
64232    pkg_failed=untried
64233fi
64234
64235
64236
64237if test $pkg_failed = yes; then
64238
64239if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64240        _pkg_short_errors_supported=yes
64241else
64242        _pkg_short_errors_supported=no
64243fi
64244        if test $_pkg_short_errors_supported = yes; then
64245	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
64246        else
64247	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
64248        fi
64249	# Put the nasty error message in config.log where it belongs
64250	echo "$LIBFFI_PKG_ERRORS" >&5
64251
64252	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64253$as_echo "no" >&6; }
64254                LIBFFI_FOUND=no
64255elif test $pkg_failed = untried; then
64256	LIBFFI_FOUND=no
64257else
64258	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
64259	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
64260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64261$as_echo "yes" >&6; }
64262	LIBFFI_FOUND=yes
64263fi
64264      fi
64265    fi
64266    if test "x$LIBFFI_FOUND" = xno; then
64267      for ac_header in ffi.h
64268do :
64269  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
64270if test "x$ac_cv_header_ffi_h" = xyes; then :
64271  cat >>confdefs.h <<_ACEOF
64272#define HAVE_FFI_H 1
64273_ACEOF
64274
64275            LIBFFI_FOUND=yes
64276            LIBFFI_CFLAGS=
64277            LIBFFI_LIBS=-lffi
64278
64279else
64280  LIBFFI_FOUND=no
64281
64282fi
64283
64284done
64285
64286    fi
64287    if test "x$LIBFFI_FOUND" = xno; then
64288
64289  # Print a helpful message on how to acquire the necessary build dependency.
64290  # ffi is the help tag: freetype, cups, alsa etc
64291  MISSING_DEPENDENCY=ffi
64292
64293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64294    cygwin_help $MISSING_DEPENDENCY
64295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64296    msys_help $MISSING_DEPENDENCY
64297  else
64298    PKGHANDLER_COMMAND=
64299
64300    case $PKGHANDLER in
64301      apt-get)
64302        apt_help     $MISSING_DEPENDENCY ;;
64303      yum)
64304        yum_help     $MISSING_DEPENDENCY ;;
64305      brew)
64306        brew_help    $MISSING_DEPENDENCY ;;
64307      port)
64308        port_help    $MISSING_DEPENDENCY ;;
64309      pkgutil)
64310        pkgutil_help $MISSING_DEPENDENCY ;;
64311      pkgadd)
64312        pkgadd_help  $MISSING_DEPENDENCY ;;
64313    esac
64314
64315    if test "x$PKGHANDLER_COMMAND" != x; then
64316      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64317    fi
64318  fi
64319
64320      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
64321    fi
64322
64323    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
64324$as_echo_n "checking if libffi works... " >&6; }
64325    ac_ext=c
64326ac_cpp='$CPP $CPPFLAGS'
64327ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64328ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64329ac_compiler_gnu=$ac_cv_c_compiler_gnu
64330
64331    OLD_CFLAGS="$CFLAGS"
64332    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
64333    OLD_LIBS="$LIBS"
64334    LIBS="$LIBS $LIBFFI_LIBS"
64335    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64336/* end confdefs.h.  */
64337#include <ffi.h>
64338int
64339main ()
64340{
64341
64342          ffi_call(NULL, NULL, NULL, NULL);
64343          return 0;
64344
64345  ;
64346  return 0;
64347}
64348_ACEOF
64349if ac_fn_c_try_link "$LINENO"; then :
64350  LIBFFI_WORKS=yes
64351else
64352  LIBFFI_WORKS=no
64353
64354fi
64355rm -f core conftest.err conftest.$ac_objext \
64356    conftest$ac_exeext conftest.$ac_ext
64357    CFLAGS="$OLD_CFLAGS"
64358    LIBS="$OLD_LIBS"
64359    ac_ext=cpp
64360ac_cpp='$CXXCPP $CPPFLAGS'
64361ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64362ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64363ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64364
64365    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
64366$as_echo "$LIBFFI_WORKS" >&6; }
64367
64368    if test "x$LIBFFI_WORKS" = xno; then
64369
64370  # Print a helpful message on how to acquire the necessary build dependency.
64371  # ffi is the help tag: freetype, cups, alsa etc
64372  MISSING_DEPENDENCY=ffi
64373
64374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64375    cygwin_help $MISSING_DEPENDENCY
64376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64377    msys_help $MISSING_DEPENDENCY
64378  else
64379    PKGHANDLER_COMMAND=
64380
64381    case $PKGHANDLER in
64382      apt-get)
64383        apt_help     $MISSING_DEPENDENCY ;;
64384      yum)
64385        yum_help     $MISSING_DEPENDENCY ;;
64386      brew)
64387        brew_help    $MISSING_DEPENDENCY ;;
64388      port)
64389        port_help    $MISSING_DEPENDENCY ;;
64390      pkgutil)
64391        pkgutil_help $MISSING_DEPENDENCY ;;
64392      pkgadd)
64393        pkgadd_help  $MISSING_DEPENDENCY ;;
64394    esac
64395
64396    if test "x$PKGHANDLER_COMMAND" != x; then
64397      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64398    fi
64399  fi
64400
64401      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
64402    fi
64403
64404    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
64405$as_echo_n "checking if libffi should be bundled... " >&6; }
64406    if test "x$enable_libffi_bundling" = "x"; then
64407      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64408$as_echo "no" >&6; }
64409      ENABLE_LIBFFI_BUNDLING=false
64410    elif  test "x$enable_libffi_bundling" = "xno"; then
64411      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64412$as_echo "no, forced" >&6; }
64413      ENABLE_LIBFFI_BUNDLING=false
64414    elif  test "x$enable_libffi_bundling" = "xyes"; then
64415      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64416$as_echo "yes, forced" >&6; }
64417      ENABLE_LIBFFI_BUNDLING=true
64418    else
64419      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
64420    fi
64421
64422    # Find the libffi.so.X to bundle
64423    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
64424      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
64425$as_echo_n "checking for libffi lib file location... " >&6; }
64426      if test "x${LIBFFI_LIB_PATH}" != x; then
64427        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
64428          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
64429        else
64430          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
64431        fi
64432      else
64433        # If we don't have an explicit path, look in a few obvious places
64434        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
64435          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64436            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64437          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
64438            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
64439          else
64440            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64441          fi
64442        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
64443          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
64444            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
64445          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
64446            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
64447          else
64448            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64449          fi
64450        else
64451          # Fallback on the default /usr/lib dir
64452          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64453            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64454          else
64455            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64456          fi
64457        fi
64458      fi
64459      # Make sure the wildcard is evaluated
64460      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64462$as_echo "${LIBFFI_LIB_FILE}" >&6; }
64463    fi
64464  fi
64465
64466
64467
64468
64469
64470
64471
64472  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64473    # Extract the first word of "llvm-config", so it can be a program name with args.
64474set dummy llvm-config; ac_word=$2
64475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64476$as_echo_n "checking for $ac_word... " >&6; }
64477if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64478  $as_echo_n "(cached) " >&6
64479else
64480  if test -n "$LLVM_CONFIG"; then
64481  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64482else
64483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64484for as_dir in $PATH
64485do
64486  IFS=$as_save_IFS
64487  test -z "$as_dir" && as_dir=.
64488    for ac_exec_ext in '' $ac_executable_extensions; do
64489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64490    ac_cv_prog_LLVM_CONFIG="llvm-config"
64491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64492    break 2
64493  fi
64494done
64495  done
64496IFS=$as_save_IFS
64497
64498fi
64499fi
64500LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64501if test -n "$LLVM_CONFIG"; then
64502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64503$as_echo "$LLVM_CONFIG" >&6; }
64504else
64505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64506$as_echo "no" >&6; }
64507fi
64508
64509
64510
64511    if test "x$LLVM_CONFIG" != xllvm-config; then
64512      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64513    fi
64514
64515    llvm_components="jit mcjit engine nativecodegen native"
64516    unset LLVM_CFLAGS
64517    for flag in $("$LLVM_CONFIG" --cxxflags); do
64518      if echo "${flag}" | grep -q '^-[ID]'; then
64519        if test "${flag}" != "-D_DEBUG" ; then
64520          if test "${LLVM_CFLAGS}" != "" ; then
64521            LLVM_CFLAGS="${LLVM_CFLAGS} "
64522          fi
64523          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64524        fi
64525      fi
64526    done
64527    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64528    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64529
64530    unset LLVM_LDFLAGS
64531    for flag in $("${LLVM_CONFIG}" --ldflags); do
64532      if echo "${flag}" | grep -q '^-L'; then
64533        if test "${LLVM_LDFLAGS}" != ""; then
64534          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64535        fi
64536        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64537      fi
64538    done
64539
64540    unset LLVM_LIBS
64541    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64542      if echo "${flag}" | grep -q '^-l'; then
64543        if test "${LLVM_LIBS}" != ""; then
64544          LLVM_LIBS="${LLVM_LIBS} "
64545        fi
64546        LLVM_LIBS="${LLVM_LIBS}${flag}"
64547      fi
64548    done
64549
64550    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64551    # always properly detect -ltinfo
64552    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64553
64554
64555
64556
64557  fi
64558
64559
64560
64561# Check whether --with-libjpeg was given.
64562if test "${with_libjpeg+set}" = set; then :
64563  withval=$with_libjpeg;
64564fi
64565
64566
64567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64568$as_echo_n "checking for which libjpeg to use... " >&6; }
64569  # default is bundled
64570  DEFAULT_LIBJPEG=bundled
64571  # if user didn't specify, use DEFAULT_LIBJPEG
64572  if test "x${with_libjpeg}" = "x"; then
64573    with_libjpeg=${DEFAULT_LIBJPEG}
64574  fi
64575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64576$as_echo "${with_libjpeg}" >&6; }
64577
64578  if test "x${with_libjpeg}" = "xbundled"; then
64579    USE_EXTERNAL_LIBJPEG=false
64580  elif test "x${with_libjpeg}" = "xsystem"; then
64581    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64582if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64583
64584else
64585   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64586fi
64587
64588
64589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64590$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64591if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64592  $as_echo_n "(cached) " >&6
64593else
64594  ac_check_lib_save_LIBS=$LIBS
64595LIBS="-ljpeg  $LIBS"
64596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64597/* end confdefs.h.  */
64598
64599/* Override any GCC internal prototype to avoid an error.
64600   Use char because int might match the return type of a GCC
64601   builtin and then its argument prototype would still apply.  */
64602#ifdef __cplusplus
64603extern "C"
64604#endif
64605char jpeg_CreateDecompress ();
64606int
64607main ()
64608{
64609return jpeg_CreateDecompress ();
64610  ;
64611  return 0;
64612}
64613_ACEOF
64614if ac_fn_cxx_try_link "$LINENO"; then :
64615  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64616else
64617  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64618fi
64619rm -f core conftest.err conftest.$ac_objext \
64620    conftest$ac_exeext conftest.$ac_ext
64621LIBS=$ac_check_lib_save_LIBS
64622fi
64623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64624$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64625if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64626  cat >>confdefs.h <<_ACEOF
64627#define HAVE_LIBJPEG 1
64628_ACEOF
64629
64630  LIBS="-ljpeg $LIBS"
64631
64632else
64633   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64634fi
64635
64636
64637    USE_EXTERNAL_LIBJPEG=true
64638  else
64639    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64640  fi
64641
64642
64643
64644
64645
64646# Check whether --with-giflib was given.
64647if test "${with_giflib+set}" = set; then :
64648  withval=$with_giflib;
64649fi
64650
64651
64652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64653$as_echo_n "checking for which giflib to use... " >&6; }
64654  # default is bundled
64655  DEFAULT_GIFLIB=bundled
64656  # if user didn't specify, use DEFAULT_GIFLIB
64657  if test "x${with_giflib}" = "x"; then
64658    with_giflib=${DEFAULT_GIFLIB}
64659  fi
64660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64661$as_echo "${with_giflib}" >&6; }
64662
64663  if test "x${with_giflib}" = "xbundled"; then
64664    USE_EXTERNAL_LIBGIF=false
64665  elif test "x${with_giflib}" = "xsystem"; then
64666    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64667if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64668
64669else
64670   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64671fi
64672
64673
64674    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64675$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64676if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64677  $as_echo_n "(cached) " >&6
64678else
64679  ac_check_lib_save_LIBS=$LIBS
64680LIBS="-lgif  $LIBS"
64681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64682/* end confdefs.h.  */
64683
64684/* Override any GCC internal prototype to avoid an error.
64685   Use char because int might match the return type of a GCC
64686   builtin and then its argument prototype would still apply.  */
64687#ifdef __cplusplus
64688extern "C"
64689#endif
64690char DGifGetCode ();
64691int
64692main ()
64693{
64694return DGifGetCode ();
64695  ;
64696  return 0;
64697}
64698_ACEOF
64699if ac_fn_cxx_try_link "$LINENO"; then :
64700  ac_cv_lib_gif_DGifGetCode=yes
64701else
64702  ac_cv_lib_gif_DGifGetCode=no
64703fi
64704rm -f core conftest.err conftest.$ac_objext \
64705    conftest$ac_exeext conftest.$ac_ext
64706LIBS=$ac_check_lib_save_LIBS
64707fi
64708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64709$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64710if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64711  cat >>confdefs.h <<_ACEOF
64712#define HAVE_LIBGIF 1
64713_ACEOF
64714
64715  LIBS="-lgif $LIBS"
64716
64717else
64718   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64719fi
64720
64721
64722    USE_EXTERNAL_LIBGIF=true
64723  else
64724    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64725  fi
64726
64727
64728
64729
64730
64731# Check whether --with-libpng was given.
64732if test "${with_libpng+set}" = set; then :
64733  withval=$with_libpng;
64734fi
64735
64736
64737  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64738$as_echo_n "checking for which libpng to use... " >&6; }
64739
64740  # default is bundled
64741  DEFAULT_LIBPNG=bundled
64742  # if user didn't specify, use DEFAULT_LIBPNG
64743  if test "x${with_libpng}" = "x"; then
64744    with_libpng=${DEFAULT_LIBPNG}
64745  fi
64746
64747  if test "x${with_libpng}" = "xbundled"; then
64748    USE_EXTERNAL_LIBPNG=false
64749    PNG_CFLAGS=""
64750    PNG_LIBS=""
64751    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64752$as_echo "bundled" >&6; }
64753  elif test "x${with_libpng}" = "xsystem"; then
64754
64755pkg_failed=no
64756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64757$as_echo_n "checking for PNG... " >&6; }
64758
64759if test -n "$PNG_CFLAGS"; then
64760    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64761 elif test -n "$PKG_CONFIG"; then
64762    if test -n "$PKG_CONFIG" && \
64763    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64764  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64765  ac_status=$?
64766  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64767  test $ac_status = 0; }; then
64768  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64769else
64770  pkg_failed=yes
64771fi
64772 else
64773    pkg_failed=untried
64774fi
64775if test -n "$PNG_LIBS"; then
64776    pkg_cv_PNG_LIBS="$PNG_LIBS"
64777 elif test -n "$PKG_CONFIG"; then
64778    if test -n "$PKG_CONFIG" && \
64779    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64780  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64781  ac_status=$?
64782  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64783  test $ac_status = 0; }; then
64784  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64785else
64786  pkg_failed=yes
64787fi
64788 else
64789    pkg_failed=untried
64790fi
64791
64792
64793
64794if test $pkg_failed = yes; then
64795
64796if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64797        _pkg_short_errors_supported=yes
64798else
64799        _pkg_short_errors_supported=no
64800fi
64801        if test $_pkg_short_errors_supported = yes; then
64802	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64803        else
64804	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64805        fi
64806	# Put the nasty error message in config.log where it belongs
64807	echo "$PNG_PKG_ERRORS" >&5
64808
64809	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64810$as_echo "no" >&6; }
64811                LIBPNG_FOUND=no
64812elif test $pkg_failed = untried; then
64813	LIBPNG_FOUND=no
64814else
64815	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64816	PNG_LIBS=$pkg_cv_PNG_LIBS
64817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64818$as_echo "yes" >&6; }
64819	LIBPNG_FOUND=yes
64820fi
64821    if test "x${LIBPNG_FOUND}" = "xyes"; then
64822      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
64823      USE_EXTERNAL_LIBPNG=true
64824      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64825$as_echo "system" >&6; }
64826    else
64827      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64828$as_echo "system not found" >&6; }
64829      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64830    fi
64831  else
64832    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64833  fi
64834
64835
64836
64837
64838
64839
64840
64841# Check whether --with-zlib was given.
64842if test "${with_zlib+set}" = set; then :
64843  withval=$with_zlib;
64844fi
64845
64846
64847  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64848$as_echo_n "checking for compress in -lz... " >&6; }
64849if ${ac_cv_lib_z_compress+:} false; then :
64850  $as_echo_n "(cached) " >&6
64851else
64852  ac_check_lib_save_LIBS=$LIBS
64853LIBS="-lz  $LIBS"
64854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64855/* end confdefs.h.  */
64856
64857/* Override any GCC internal prototype to avoid an error.
64858   Use char because int might match the return type of a GCC
64859   builtin and then its argument prototype would still apply.  */
64860#ifdef __cplusplus
64861extern "C"
64862#endif
64863char compress ();
64864int
64865main ()
64866{
64867return compress ();
64868  ;
64869  return 0;
64870}
64871_ACEOF
64872if ac_fn_cxx_try_link "$LINENO"; then :
64873  ac_cv_lib_z_compress=yes
64874else
64875  ac_cv_lib_z_compress=no
64876fi
64877rm -f core conftest.err conftest.$ac_objext \
64878    conftest$ac_exeext conftest.$ac_ext
64879LIBS=$ac_check_lib_save_LIBS
64880fi
64881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64882$as_echo "$ac_cv_lib_z_compress" >&6; }
64883if test "x$ac_cv_lib_z_compress" = xyes; then :
64884   ZLIB_FOUND=yes
64885else
64886   ZLIB_FOUND=no
64887fi
64888
64889
64890  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64891$as_echo_n "checking for which zlib to use... " >&6; }
64892
64893  DEFAULT_ZLIB=system
64894  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64895    # On windows default is bundled...on others default is system
64896    DEFAULT_ZLIB=bundled
64897  fi
64898
64899  if test "x${ZLIB_FOUND}" != "xyes"; then
64900    # If we don't find any system...set default to bundled
64901    DEFAULT_ZLIB=bundled
64902  fi
64903
64904  # If user didn't specify, use DEFAULT_ZLIB
64905  if test "x${with_zlib}" = "x"; then
64906    with_zlib=${DEFAULT_ZLIB}
64907  fi
64908
64909  if test "x${with_zlib}" = "xbundled"; then
64910    USE_EXTERNAL_LIBZ=false
64911    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64912$as_echo "bundled" >&6; }
64913  elif test "x${with_zlib}" = "xsystem"; then
64914    if test "x${ZLIB_FOUND}" = "xyes"; then
64915      USE_EXTERNAL_LIBZ=true
64916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64917$as_echo "system" >&6; }
64918    else
64919      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64920$as_echo "system not found" >&6; }
64921      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64922    fi
64923  else
64924    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64925  fi
64926
64927
64928
64929
64930
64931# Check whether --with-lcms was given.
64932if test "${with_lcms+set}" = set; then :
64933  withval=$with_lcms;
64934fi
64935
64936
64937  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64938$as_echo_n "checking for which lcms to use... " >&6; }
64939
64940  DEFAULT_LCMS=bundled
64941  # If user didn't specify, use DEFAULT_LCMS
64942  if test "x${with_lcms}" = "x"; then
64943    with_lcms=${DEFAULT_LCMS}
64944  fi
64945
64946  if test "x${with_lcms}" = "xbundled"; then
64947    USE_EXTERNAL_LCMS=false
64948    LCMS_CFLAGS=""
64949    LCMS_LIBS=""
64950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64951$as_echo "bundled" >&6; }
64952  elif test "x${with_lcms}" = "xsystem"; then
64953    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64954$as_echo "system" >&6; }
64955
64956pkg_failed=no
64957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64958$as_echo_n "checking for LCMS... " >&6; }
64959
64960if test -n "$LCMS_CFLAGS"; then
64961    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64962 elif test -n "$PKG_CONFIG"; then
64963    if test -n "$PKG_CONFIG" && \
64964    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64965  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64966  ac_status=$?
64967  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64968  test $ac_status = 0; }; then
64969  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64970else
64971  pkg_failed=yes
64972fi
64973 else
64974    pkg_failed=untried
64975fi
64976if test -n "$LCMS_LIBS"; then
64977    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64978 elif test -n "$PKG_CONFIG"; then
64979    if test -n "$PKG_CONFIG" && \
64980    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64981  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64982  ac_status=$?
64983  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64984  test $ac_status = 0; }; then
64985  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64986else
64987  pkg_failed=yes
64988fi
64989 else
64990    pkg_failed=untried
64991fi
64992
64993
64994
64995if test $pkg_failed = yes; then
64996
64997if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64998        _pkg_short_errors_supported=yes
64999else
65000        _pkg_short_errors_supported=no
65001fi
65002        if test $_pkg_short_errors_supported = yes; then
65003	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
65004        else
65005	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
65006        fi
65007	# Put the nasty error message in config.log where it belongs
65008	echo "$LCMS_PKG_ERRORS" >&5
65009
65010	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65011$as_echo "no" >&6; }
65012                LCMS_FOUND=no
65013elif test $pkg_failed = untried; then
65014	LCMS_FOUND=no
65015else
65016	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
65017	LCMS_LIBS=$pkg_cv_LCMS_LIBS
65018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65019$as_echo "yes" >&6; }
65020	LCMS_FOUND=yes
65021fi
65022    if test "x${LCMS_FOUND}" = "xyes"; then
65023      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
65024      USE_EXTERNAL_LCMS=true
65025    else
65026      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
65027    fi
65028  else
65029    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
65030  fi
65031
65032
65033
65034
65035
65036
65037
65038
65039
65040
65041
65042
65043
65044  # Setup libm (the maths library)
65045  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
65046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
65047$as_echo_n "checking for cos in -lm... " >&6; }
65048if ${ac_cv_lib_m_cos+:} false; then :
65049  $as_echo_n "(cached) " >&6
65050else
65051  ac_check_lib_save_LIBS=$LIBS
65052LIBS="-lm  $LIBS"
65053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65054/* end confdefs.h.  */
65055
65056/* Override any GCC internal prototype to avoid an error.
65057   Use char because int might match the return type of a GCC
65058   builtin and then its argument prototype would still apply.  */
65059#ifdef __cplusplus
65060extern "C"
65061#endif
65062char cos ();
65063int
65064main ()
65065{
65066return cos ();
65067  ;
65068  return 0;
65069}
65070_ACEOF
65071if ac_fn_cxx_try_link "$LINENO"; then :
65072  ac_cv_lib_m_cos=yes
65073else
65074  ac_cv_lib_m_cos=no
65075fi
65076rm -f core conftest.err conftest.$ac_objext \
65077    conftest$ac_exeext conftest.$ac_ext
65078LIBS=$ac_check_lib_save_LIBS
65079fi
65080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
65081$as_echo "$ac_cv_lib_m_cos" >&6; }
65082if test "x$ac_cv_lib_m_cos" = xyes; then :
65083  cat >>confdefs.h <<_ACEOF
65084#define HAVE_LIBM 1
65085_ACEOF
65086
65087  LIBS="-lm $LIBS"
65088
65089else
65090
65091        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
65092$as_echo "$as_me: Maths library was not found" >&6;}
65093
65094fi
65095
65096    LIBM="-lm"
65097  else
65098    LIBM=""
65099  fi
65100
65101
65102  # Setup libdl (for dynamic library loading)
65103  save_LIBS="$LIBS"
65104  LIBS=""
65105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
65106$as_echo_n "checking for dlopen in -ldl... " >&6; }
65107if ${ac_cv_lib_dl_dlopen+:} false; then :
65108  $as_echo_n "(cached) " >&6
65109else
65110  ac_check_lib_save_LIBS=$LIBS
65111LIBS="-ldl  $LIBS"
65112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65113/* end confdefs.h.  */
65114
65115/* Override any GCC internal prototype to avoid an error.
65116   Use char because int might match the return type of a GCC
65117   builtin and then its argument prototype would still apply.  */
65118#ifdef __cplusplus
65119extern "C"
65120#endif
65121char dlopen ();
65122int
65123main ()
65124{
65125return dlopen ();
65126  ;
65127  return 0;
65128}
65129_ACEOF
65130if ac_fn_cxx_try_link "$LINENO"; then :
65131  ac_cv_lib_dl_dlopen=yes
65132else
65133  ac_cv_lib_dl_dlopen=no
65134fi
65135rm -f core conftest.err conftest.$ac_objext \
65136    conftest$ac_exeext conftest.$ac_ext
65137LIBS=$ac_check_lib_save_LIBS
65138fi
65139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
65140$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
65141if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
65142  cat >>confdefs.h <<_ACEOF
65143#define HAVE_LIBDL 1
65144_ACEOF
65145
65146  LIBS="-ldl $LIBS"
65147
65148fi
65149
65150  LIBDL="$LIBS"
65151
65152  LIBS="$save_LIBS"
65153
65154  # Deprecated libraries, keep the flags for backwards compatibility
65155  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
65156
65157
65158# Check whether --with-dxsdk was given.
65159if test "${with_dxsdk+set}" = set; then :
65160  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
65161$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
65162fi
65163
65164
65165
65166
65167# Check whether --with-dxsdk-lib was given.
65168if test "${with_dxsdk_lib+set}" = set; then :
65169  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
65170$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
65171fi
65172
65173
65174
65175
65176# Check whether --with-dxsdk-include was given.
65177if test "${with_dxsdk_include+set}" = set; then :
65178  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
65179$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
65180fi
65181
65182
65183  fi
65184
65185  # Control if libzip can use mmap. Available for purposes of overriding.
65186  LIBZIP_CAN_USE_MMAP=true
65187
65188
65189
65190  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
65191    # Find the root of the Solaris Studio installation from the compiler path
65192    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
65193    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
65194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
65195$as_echo_n "checking for libstlport.so.1... " >&6; }
65196    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
65197      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
65198      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
65199    fi
65200    if test -f "$STLPORT_LIB"; then
65201      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
65202$as_echo "yes, $STLPORT_LIB" >&6; }
65203
65204  # Only process if variable expands to non-empty
65205
65206  if test "x$STLPORT_LIB" != x; then
65207    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65208
65209  # Input might be given as Windows format, start by converting to
65210  # unix format.
65211  path="$STLPORT_LIB"
65212  new_path=`$CYGPATH -u "$path"`
65213
65214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65217  # "foo.exe" is OK but "foo" is an error.
65218  #
65219  # This test is therefore slightly more accurate than "test -f" to check for file precense.
65220  # It is also a way to make sure we got the proper file name for the real test later on.
65221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65222  if test "x$test_shortpath" = x; then
65223    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65224$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65225    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
65226  fi
65227
65228  # Call helper function which possibly converts this using DOS-style short mode.
65229  # If so, the updated path is stored in $new_path.
65230
65231  input_path="$new_path"
65232  # Check if we need to convert this using DOS-style short mode. If the path
65233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65234  # take no chances and rewrite it.
65235  # Note: m4 eats our [], so we need to use [ and ] instead.
65236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65237  if test "x$has_forbidden_chars" != x; then
65238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65242      # Going to short mode and back again did indeed matter. Since short mode is
65243      # case insensitive, let's make it lowercase to improve readability.
65244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65245      # Now convert it back to Unix-style (cygpath)
65246      input_path=`$CYGPATH -u "$shortmode_path"`
65247      new_path="$input_path"
65248    fi
65249  fi
65250
65251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65252  if test "x$test_cygdrive_prefix" = x; then
65253    # As a simple fix, exclude /usr/bin since it's not a real path.
65254    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65256      # a path prefixed by /cygdrive for fixpath to work.
65257      new_path="$CYGWIN_ROOT_PATH$input_path"
65258    fi
65259  fi
65260
65261
65262  if test "x$path" != "x$new_path"; then
65263    STLPORT_LIB="$new_path"
65264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65265$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65266  fi
65267
65268    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65269
65270  path="$STLPORT_LIB"
65271  has_colon=`$ECHO $path | $GREP ^.:`
65272  new_path="$path"
65273  if test "x$has_colon" = x; then
65274    # Not in mixed or Windows style, start by that.
65275    new_path=`cmd //c echo $path`
65276  fi
65277
65278
65279  input_path="$new_path"
65280  # Check if we need to convert this using DOS-style short mode. If the path
65281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65282  # take no chances and rewrite it.
65283  # Note: m4 eats our [], so we need to use [ and ] instead.
65284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65285  if test "x$has_forbidden_chars" != x; then
65286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65288  fi
65289
65290
65291  windows_path="$new_path"
65292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65293    unix_path=`$CYGPATH -u "$windows_path"`
65294    new_path="$unix_path"
65295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65297    new_path="$unix_path"
65298  fi
65299
65300  if test "x$path" != "x$new_path"; then
65301    STLPORT_LIB="$new_path"
65302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65303$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65304  fi
65305
65306  # Save the first 10 bytes of this path to the storage, so fixpath can work.
65307  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65308
65309    else
65310      # We're on a unix platform. Hooray! :)
65311      path="$STLPORT_LIB"
65312      has_space=`$ECHO "$path" | $GREP " "`
65313      if test "x$has_space" != x; then
65314        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65315$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65316        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65317      fi
65318
65319      # Use eval to expand a potential ~
65320      eval path="$path"
65321      if test ! -f "$path" && test ! -d "$path"; then
65322        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
65323      fi
65324
65325      if test -d "$path"; then
65326        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
65327      else
65328        dir="`$DIRNAME "$path"`"
65329        base="`$BASENAME "$path"`"
65330        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
65331      fi
65332    fi
65333  fi
65334
65335    else
65336      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
65337$as_echo "no, not found at $STLPORT_LIB" >&6; }
65338      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
65339    fi
65340
65341  fi
65342
65343
65344
65345
65346
65347
65348
65349
65350
65351
65352
65353
65354
65355
65356# Hotspot setup depends on lib checks (AOT needs libelf).
65357
65358
65359  # The user can in some cases supply additional jvm features. For the custom
65360  # variant, this defines the entire variant.
65361
65362# Check whether --with-jvm-features was given.
65363if test "${with_jvm_features+set}" = set; then :
65364  withval=$with_jvm_features;
65365fi
65366
65367  if test "x$with_jvm_features" != x; then
65368    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65369$as_echo_n "checking additional JVM features... " >&6; }
65370    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65371    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65372$as_echo "$JVM_FEATURES" >&6; }
65373  fi
65374
65375  # Override hotspot cpu definitions for ARM platforms
65376  if test "x$OPENJDK_TARGET_CPU" = xarm; then
65377    HOTSPOT_TARGET_CPU=arm_32
65378    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65379    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65380    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65381  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65382    HOTSPOT_TARGET_CPU=arm_64
65383    HOTSPOT_TARGET_CPU_ARCH=arm
65384    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65385    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65386  fi
65387
65388  # Verify that dependencies are met for explicitly set features.
65389  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65390    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65391  fi
65392
65393  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65394    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65395  fi
65396
65397  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65398    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65399  fi
65400
65401  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65402    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65403  fi
65404
65405  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65406    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65407  fi
65408
65409  # Turn on additional features based on other parts of configure
65410  if test "x$INCLUDE_DTRACE" = "xtrue"; then
65411    JVM_FEATURES="$JVM_FEATURES dtrace"
65412  else
65413    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65414      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65415    fi
65416  fi
65417
65418  if test "x$STATIC_BUILD" = "xtrue"; then
65419    JVM_FEATURES="$JVM_FEATURES static-build"
65420  else
65421    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65422      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65423    fi
65424  fi
65425
65426  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65427    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65428      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65429    fi
65430  fi
65431
65432  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65433    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65434      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65435    fi
65436  fi
65437
65438  # Only enable jvmci on x86_64, sparcv9 and aarch64.
65439  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65440     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65441     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65442    JVM_FEATURES_jvmci="jvmci"
65443  else
65444    JVM_FEATURES_jvmci=""
65445  fi
65446
65447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65448$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65449  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65451$as_echo "yes, forced" >&6; }
65452    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65453      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65454    fi
65455    INCLUDE_GRAAL="true"
65456  else
65457    # By default enable graal build where AOT is available
65458    if test "x$ENABLE_AOT" = "xtrue"; then
65459      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65460$as_echo "yes" >&6; }
65461      JVM_FEATURES_graal="graal"
65462      INCLUDE_GRAAL="true"
65463    else
65464      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65465$as_echo "no" >&6; }
65466      JVM_FEATURES_graal=""
65467      INCLUDE_GRAAL="false"
65468    fi
65469  fi
65470
65471
65472
65473  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65474$as_echo_n "checking if aot should be enabled... " >&6; }
65475  if test "x$ENABLE_AOT" = "xtrue"; then
65476    if test "x$enable_aot" = "xyes"; then
65477      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65478$as_echo "yes, forced" >&6; }
65479    else
65480      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65481$as_echo "yes" >&6; }
65482    fi
65483    JVM_FEATURES_aot="aot"
65484  else
65485    if test "x$enable_aot" = "xno"; then
65486      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65487$as_echo "no, forced" >&6; }
65488    else
65489      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65490$as_echo "no" >&6; }
65491    fi
65492    JVM_FEATURES_aot=""
65493  fi
65494
65495  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65496    # Default to use link time optimizations on minimal on arm
65497    JVM_FEATURES_link_time_opt="link-time-opt"
65498  else
65499    JVM_FEATURES_link_time_opt=""
65500  fi
65501
65502  # All variants but minimal (and custom) get these features
65503  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65504
65505  # Enable features depending on variant.
65506  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65507  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65508  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65509  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65510  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65511  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65512  JVM_FEATURES_custom="$JVM_FEATURES"
65513
65514
65515
65516
65517
65518
65519
65520
65521
65522  # Used for verification of Makefiles by check-jvm-feature
65523
65524
65525  # We don't support --with-jvm-interpreter anymore, use zero instead.
65526
65527
65528# Check whether --with-jvm-interpreter was given.
65529if test "${with_jvm_interpreter+set}" = set; then :
65530  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65531$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65532fi
65533
65534
65535
65536
65537###############################################################################
65538#
65539# We need to do some final tweaking, when everything else is done.
65540#
65541###############################################################################
65542
65543
65544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65545$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65546
65547  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65548    ENABLE_INTREE_EC=true
65549    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65550$as_echo "yes" >&6; }
65551  else
65552    ENABLE_INTREE_EC=false
65553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65554$as_echo "no" >&6; }
65555  fi
65556
65557
65558
65559
65560  # Check whether --enable-jtreg-failure-handler was given.
65561if test "${enable_jtreg_failure_handler+set}" = set; then :
65562  enableval=$enable_jtreg_failure_handler;
65563fi
65564
65565
65566  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65567$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65568
65569  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65570    if test "x$JT_HOME" = "x"; then
65571      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65572    else
65573      BUILD_FAILURE_HANDLER=true
65574      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65575$as_echo "yes, forced" >&6; }
65576    fi
65577  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65578    BUILD_FAILURE_HANDLER=false
65579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65580$as_echo "no, forced" >&6; }
65581  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65582      || test "x$enable_jtreg_failure_handler" = "x"; then
65583    if test "x$JT_HOME" = "x"; then
65584      BUILD_FAILURE_HANDLER=false
65585      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65586$as_echo "no, missing jtreg" >&6; }
65587    else
65588      BUILD_FAILURE_HANDLER=true
65589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65590$as_echo "yes, jtreg present" >&6; }
65591    fi
65592  else
65593    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65594  fi
65595
65596
65597
65598
65599  # Check whether --enable-generate-classlist was given.
65600if test "${enable_generate_classlist+set}" = set; then :
65601  enableval=$enable_generate_classlist;
65602fi
65603
65604
65605  # Check if it's likely that it's possible to generate the classlist. Depending
65606  # on exact jvm configuration it could be possible anyway.
65607  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65608    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65609  else
65610    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65611  fi
65612
65613  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65614$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65615  if test "x$enable_generate_classlist" = "xyes"; then
65616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65617$as_echo "yes, forced" >&6; }
65618    ENABLE_GENERATE_CLASSLIST="true"
65619    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65620      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65621$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65622    fi
65623  elif test "x$enable_generate_classlist" = "xno"; then
65624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65625$as_echo "no, forced" >&6; }
65626    ENABLE_GENERATE_CLASSLIST="false"
65627  elif test "x$enable_generate_classlist" = "x"; then
65628    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65629      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65630$as_echo "yes" >&6; }
65631      ENABLE_GENERATE_CLASSLIST="true"
65632    else
65633      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65634$as_echo "no" >&6; }
65635      ENABLE_GENERATE_CLASSLIST="false"
65636    fi
65637  else
65638    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65639  fi
65640
65641
65642
65643
65644###############################################################################
65645#
65646# Configure parts of the build that only affect the build performance,
65647# not the result.
65648#
65649###############################################################################
65650
65651
65652  # How many cores do we have on this build system?
65653
65654# Check whether --with-num-cores was given.
65655if test "${with_num_cores+set}" = set; then :
65656  withval=$with_num_cores;
65657fi
65658
65659  if test "x$with_num_cores" = x; then
65660    # The number of cores were not specified, try to probe them.
65661
65662  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
65663$as_echo_n "checking for number of cores... " >&6; }
65664  NUM_CORES=1
65665  FOUND_CORES=no
65666
65667  if test -f /proc/cpuinfo; then
65668    # Looks like a Linux (or cygwin) system
65669    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
65670    FOUND_CORES=yes
65671  elif test -x /usr/sbin/psrinfo; then
65672    # Looks like a Solaris system
65673    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
65674    FOUND_CORES=yes
65675  elif test -x /usr/sbin/sysctl; then
65676    # Looks like a MacOSX system
65677    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
65678    FOUND_CORES=yes
65679  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
65680    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
65681    FOUND_CORES=yes
65682  elif test -n "$NUMBER_OF_PROCESSORS"; then
65683    # On windows, look in the env
65684    NUM_CORES=$NUMBER_OF_PROCESSORS
65685    FOUND_CORES=yes
65686  fi
65687
65688  if test "x$FOUND_CORES" = xyes; then
65689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
65690$as_echo "$NUM_CORES" >&6; }
65691  else
65692    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
65693$as_echo "could not detect number of cores, defaulting to 1" >&6; }
65694    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
65695$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
65696  fi
65697
65698  else
65699    NUM_CORES=$with_num_cores
65700  fi
65701
65702
65703
65704  # How much memory do we have on this build system?
65705
65706# Check whether --with-memory-size was given.
65707if test "${with_memory_size+set}" = set; then :
65708  withval=$with_memory_size;
65709fi
65710
65711  if test "x$with_memory_size" = x; then
65712    # The memory size was not specified, try to probe it.
65713
65714  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
65715$as_echo_n "checking for memory size... " >&6; }
65716  # Default to 1024 MB
65717  MEMORY_SIZE=1024
65718  FOUND_MEM=no
65719
65720  if test -f /proc/meminfo; then
65721    # Looks like a Linux (or cygwin) system
65722    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
65723    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
65724    FOUND_MEM=yes
65725  elif test -x /usr/sbin/prtconf; then
65726    # Looks like a Solaris or AIX system
65727    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
65728    FOUND_MEM=yes
65729  elif test -x /usr/sbin/sysctl; then
65730    # Looks like a MacOSX system
65731    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
65732    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65733    FOUND_MEM=yes
65734  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
65735    # Windows, but without cygwin
65736    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
65737    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65738    FOUND_MEM=yes
65739  fi
65740
65741  if test "x$FOUND_MEM" = xyes; then
65742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
65743$as_echo "$MEMORY_SIZE MB" >&6; }
65744  else
65745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
65746$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
65747    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
65748$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
65749  fi
65750
65751  else
65752    MEMORY_SIZE=$with_memory_size
65753  fi
65754
65755
65756
65757  # Provide a decent default number of parallel jobs for make depending on
65758  # number of cores, amount of memory and machine architecture.
65759
65760# Check whether --with-jobs was given.
65761if test "${with_jobs+set}" = set; then :
65762  withval=$with_jobs;
65763fi
65764
65765  if test "x$with_jobs" = x; then
65766    # Number of jobs was not specified, calculate.
65767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65768$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65769    # Approximate memory in GB.
65770    memory_gb=`expr $MEMORY_SIZE / 1024`
65771    # Pick the lowest of memory in gb and number of cores.
65772    if test "$memory_gb" -lt "$NUM_CORES"; then
65773      JOBS="$memory_gb"
65774    else
65775      JOBS="$NUM_CORES"
65776    fi
65777    if test "$JOBS" -eq "0"; then
65778      JOBS=1
65779    fi
65780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65781$as_echo "$JOBS" >&6; }
65782  else
65783    JOBS=$with_jobs
65784  fi
65785
65786
65787
65788  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65789
65790# Check whether --with-test-jobs was given.
65791if test "${with_test_jobs+set}" = set; then :
65792  withval=$with_test_jobs;
65793fi
65794
65795  if test "x$with_test_jobs" = x; then
65796      TEST_JOBS=0
65797  else
65798      TEST_JOBS=$with_test_jobs
65799  fi
65800
65801
65802
65803# Setup arguments for the boot jdk (after cores and memory have been setup)
65804
65805  ##############################################################################
65806  #
65807  # Specify jvm options for anything that is run with the Boot JDK.
65808  # Not all JVM:s accept the same arguments on the command line.
65809  #
65810
65811# Check whether --with-boot-jdk-jvmargs was given.
65812if test "${with_boot_jdk_jvmargs+set}" = set; then :
65813  withval=$with_boot_jdk_jvmargs;
65814fi
65815
65816
65817  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65818$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65819
65820  # Disable special log output when a debug build is used as Boot JDK...
65821
65822  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65823  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65824  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65825  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65826  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65827  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65828    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65829    JVM_ARG_OK=true
65830  else
65831    $ECHO "Arg failed:" >&5
65832    $ECHO "$OUTPUT" >&5
65833    JVM_ARG_OK=false
65834  fi
65835
65836
65837  # Force en-US environment
65838
65839  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65840  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65841  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65842  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65843  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65844  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65845    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65846    JVM_ARG_OK=true
65847  else
65848    $ECHO "Arg failed:" >&5
65849    $ECHO "$OUTPUT" >&5
65850    JVM_ARG_OK=false
65851  fi
65852
65853
65854  # Apply user provided options.
65855
65856  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65857  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65858  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65859  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65860  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65861  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65862    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65863    JVM_ARG_OK=true
65864  else
65865    $ECHO "Arg failed:" >&5
65866    $ECHO "$OUTPUT" >&5
65867    JVM_ARG_OK=false
65868  fi
65869
65870
65871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65872$as_echo "$boot_jdk_jvmargs" >&6; }
65873
65874  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65875  JAVA_FLAGS=$boot_jdk_jvmargs
65876
65877
65878
65879  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65880$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65881
65882  # Starting amount of heap memory.
65883
65884  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65885  $ECHO "Command: $JAVA -Xms64M -version" >&5
65886  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65887  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65888  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65889  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65890    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65891    JVM_ARG_OK=true
65892  else
65893    $ECHO "Arg failed:" >&5
65894    $ECHO "$OUTPUT" >&5
65895    JVM_ARG_OK=false
65896  fi
65897
65898  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65899
65900  # Maximum amount of heap memory and stack size.
65901  JVM_HEAP_LIMIT_32="1024"
65902  # Running a 64 bit JVM allows for and requires a bigger heap
65903  JVM_HEAP_LIMIT_64="1600"
65904  STACK_SIZE_32=768
65905  STACK_SIZE_64=1536
65906  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65907  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65908    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65909  fi
65910  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65911    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65912  fi
65913  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65914    JVM_HEAP_LIMIT_32=512
65915    JVM_HEAP_LIMIT_64=512
65916  fi
65917
65918  if test "x$BOOT_JDK_BITS" = "x32"; then
65919    STACK_SIZE=$STACK_SIZE_32
65920    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65921  else
65922    STACK_SIZE=$STACK_SIZE_64
65923    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65924  fi
65925
65926  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65927  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65928  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65929  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65930  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65931  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65932    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65933    JVM_ARG_OK=true
65934  else
65935    $ECHO "Arg failed:" >&5
65936    $ECHO "$OUTPUT" >&5
65937    JVM_ARG_OK=false
65938  fi
65939
65940
65941  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65942  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65943  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65944  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65945  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65946  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65947    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65948    JVM_ARG_OK=true
65949  else
65950    $ECHO "Arg failed:" >&5
65951    $ECHO "$OUTPUT" >&5
65952    JVM_ARG_OK=false
65953  fi
65954
65955
65956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65957$as_echo "$boot_jdk_jvmargs_big" >&6; }
65958
65959  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65960
65961
65962  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65963    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65964    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65965  else
65966    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65967    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65968  fi
65969  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65970  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65971  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65972$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65974$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65975
65976
65977  # By default, the main javac compilations use big
65978  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65979
65980
65981  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65982$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65983
65984  # Use serial gc for small short lived tools if possible
65985
65986  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65987  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65988  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65989  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65990  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65991  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65992    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65993    JVM_ARG_OK=true
65994  else
65995    $ECHO "Arg failed:" >&5
65996    $ECHO "$OUTPUT" >&5
65997    JVM_ARG_OK=false
65998  fi
65999
66000
66001  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
66002  $ECHO "Command: $JAVA -Xms32M -version" >&5
66003  OUTPUT=`$JAVA -Xms32M -version 2>&1`
66004  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66005  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66006  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66007    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
66008    JVM_ARG_OK=true
66009  else
66010    $ECHO "Arg failed:" >&5
66011    $ECHO "$OUTPUT" >&5
66012    JVM_ARG_OK=false
66013  fi
66014
66015
66016  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
66017  $ECHO "Command: $JAVA -Xmx512M -version" >&5
66018  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
66019  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66020  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66021  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66022    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
66023    JVM_ARG_OK=true
66024  else
66025    $ECHO "Arg failed:" >&5
66026    $ECHO "$OUTPUT" >&5
66027    JVM_ARG_OK=false
66028  fi
66029
66030
66031  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
66032  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
66033  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
66034  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66035  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66036  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66037    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
66038    JVM_ARG_OK=true
66039  else
66040    $ECHO "Arg failed:" >&5
66041    $ECHO "$OUTPUT" >&5
66042    JVM_ARG_OK=false
66043  fi
66044
66045
66046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
66047$as_echo "$boot_jdk_jvmargs_small" >&6; }
66048
66049  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
66050
66051
66052  JAVA_TOOL_FLAGS_SMALL=""
66053  for f in $JAVA_FLAGS_SMALL; do
66054    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
66055  done
66056
66057
66058
66059# Setup smart javac (after cores and memory have been setup)
66060
66061
66062# Check whether --with-sjavac-server-java was given.
66063if test "${with_sjavac_server_java+set}" = set; then :
66064  withval=$with_sjavac_server_java;
66065fi
66066
66067
66068  if test "x$with_sjavac_server_java" != x; then
66069    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
66070    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
66071    if test "x$FOUND_VERSION" = x; then
66072      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
66073    fi
66074  else
66075    SJAVAC_SERVER_JAVA="$JAVA"
66076  fi
66077
66078
66079  if test "$MEMORY_SIZE" -gt "3000"; then
66080    if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
66081      JVM_64BIT=true
66082    fi
66083  fi
66084
66085  MX_VALUE=`expr $MEMORY_SIZE / 2`
66086  if test "$JVM_64BIT" = true; then
66087    # Set ms lower than mx since more than one instance of the server might
66088    # get launched at the same time before they figure out which instance won.
66089    MS_VALUE=512
66090    if test "$MX_VALUE" -gt "2048"; then
66091      MX_VALUE=2048
66092    fi
66093  else
66094    MS_VALUE=256
66095    if test "$MX_VALUE" -gt "1500"; then
66096      MX_VALUE=1500
66097    fi
66098  fi
66099  if test "$MX_VALUE" -lt "512"; then
66100    MX_VALUE=512
66101  fi
66102
66103  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
66104  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
66105  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
66106  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66107  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66108  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66109    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
66110    JVM_ARG_OK=true
66111  else
66112    $ECHO "Arg failed:" >&5
66113    $ECHO "$OUTPUT" >&5
66114    JVM_ARG_OK=false
66115  fi
66116
66117
66118
66119  # Check whether --enable-sjavac was given.
66120if test "${enable_sjavac+set}" = set; then :
66121  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
66122else
66123  ENABLE_SJAVAC="no"
66124fi
66125
66126  if test "x$JVM_ARG_OK" = "xfalse"; then
66127    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
66128$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
66129    ENABLE_SJAVAC="no"
66130  fi
66131  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
66132$as_echo_n "checking whether to use sjavac... " >&6; }
66133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
66134$as_echo "$ENABLE_SJAVAC" >&6; }
66135
66136
66137  # Check whether --enable-javac-server was given.
66138if test "${enable_javac_server+set}" = set; then :
66139  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
66140else
66141  ENABLE_JAVAC_SERVER="yes"
66142fi
66143
66144  if test "x$JVM_ARG_OK" = "xfalse"; then
66145    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
66146$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
66147    ENABLE_JAVAC_SERVER="no"
66148  fi
66149  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
66150$as_echo_n "checking whether to use javac server... " >&6; }
66151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
66152$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
66153
66154
66155  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
66156    # When using a server javac, the small client instances do not need much
66157    # resources.
66158    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
66159  fi
66160
66161
66162# Setup use of icecc if requested
66163
66164  # Check whether --enable-icecc was given.
66165if test "${enable_icecc+set}" = set; then :
66166  enableval=$enable_icecc;
66167fi
66168
66169
66170  if test "x${enable_icecc}" = "xyes"; then
66171
66172
66173
66174  # Publish this variable in the help.
66175
66176
66177  if [ -z "${ICECC_CMD+x}" ]; then
66178    # The variable is not set by user, try to locate tool using the code snippet
66179    for ac_prog in icecc
66180do
66181  # Extract the first word of "$ac_prog", so it can be a program name with args.
66182set dummy $ac_prog; ac_word=$2
66183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66184$as_echo_n "checking for $ac_word... " >&6; }
66185if ${ac_cv_path_ICECC_CMD+:} false; then :
66186  $as_echo_n "(cached) " >&6
66187else
66188  case $ICECC_CMD in
66189  [\\/]* | ?:[\\/]*)
66190  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66191  ;;
66192  *)
66193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66194for as_dir in $PATH
66195do
66196  IFS=$as_save_IFS
66197  test -z "$as_dir" && as_dir=.
66198    for ac_exec_ext in '' $ac_executable_extensions; do
66199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66200    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66202    break 2
66203  fi
66204done
66205  done
66206IFS=$as_save_IFS
66207
66208  ;;
66209esac
66210fi
66211ICECC_CMD=$ac_cv_path_ICECC_CMD
66212if test -n "$ICECC_CMD"; then
66213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66214$as_echo "$ICECC_CMD" >&6; }
66215else
66216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66217$as_echo "no" >&6; }
66218fi
66219
66220
66221  test -n "$ICECC_CMD" && break
66222done
66223
66224  else
66225    # The variable is set, but is it from the command line or the environment?
66226
66227    # Try to remove the string !ICECC_CMD! from our list.
66228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
66229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66230      # If it failed, the variable was not from the command line. Ignore it,
66231      # but warn the user (except for BASH, which is always set by the calling BASH).
66232      if test "xICECC_CMD" != xBASH; then
66233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
66234$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
66235      fi
66236      # Try to locate tool using the code snippet
66237      for ac_prog in icecc
66238do
66239  # Extract the first word of "$ac_prog", so it can be a program name with args.
66240set dummy $ac_prog; ac_word=$2
66241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66242$as_echo_n "checking for $ac_word... " >&6; }
66243if ${ac_cv_path_ICECC_CMD+:} false; then :
66244  $as_echo_n "(cached) " >&6
66245else
66246  case $ICECC_CMD in
66247  [\\/]* | ?:[\\/]*)
66248  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66249  ;;
66250  *)
66251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66252for as_dir in $PATH
66253do
66254  IFS=$as_save_IFS
66255  test -z "$as_dir" && as_dir=.
66256    for ac_exec_ext in '' $ac_executable_extensions; do
66257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66258    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66260    break 2
66261  fi
66262done
66263  done
66264IFS=$as_save_IFS
66265
66266  ;;
66267esac
66268fi
66269ICECC_CMD=$ac_cv_path_ICECC_CMD
66270if test -n "$ICECC_CMD"; then
66271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66272$as_echo "$ICECC_CMD" >&6; }
66273else
66274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66275$as_echo "no" >&6; }
66276fi
66277
66278
66279  test -n "$ICECC_CMD" && break
66280done
66281
66282    else
66283      # If it succeeded, then it was overridden by the user. We will use it
66284      # for the tool.
66285
66286      # First remove it from the list of overridden variables, so we can test
66287      # for unknown variables in the end.
66288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66289
66290      # Check if we try to supply an empty value
66291      if test "x$ICECC_CMD" = x; then
66292        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
66293$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
66294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66295$as_echo_n "checking for ICECC_CMD... " >&6; }
66296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66297$as_echo "disabled" >&6; }
66298      else
66299        # Check if the provided tool contains a complete path.
66300        tool_specified="$ICECC_CMD"
66301        tool_basename="${tool_specified##*/}"
66302        if test "x$tool_basename" = "x$tool_specified"; then
66303          # A command without a complete path is provided, search $PATH.
66304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
66305$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
66306          # Extract the first word of "$tool_basename", so it can be a program name with args.
66307set dummy $tool_basename; ac_word=$2
66308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66309$as_echo_n "checking for $ac_word... " >&6; }
66310if ${ac_cv_path_ICECC_CMD+:} false; then :
66311  $as_echo_n "(cached) " >&6
66312else
66313  case $ICECC_CMD in
66314  [\\/]* | ?:[\\/]*)
66315  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66316  ;;
66317  *)
66318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66319for as_dir in $PATH
66320do
66321  IFS=$as_save_IFS
66322  test -z "$as_dir" && as_dir=.
66323    for ac_exec_ext in '' $ac_executable_extensions; do
66324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66325    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66327    break 2
66328  fi
66329done
66330  done
66331IFS=$as_save_IFS
66332
66333  ;;
66334esac
66335fi
66336ICECC_CMD=$ac_cv_path_ICECC_CMD
66337if test -n "$ICECC_CMD"; then
66338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66339$as_echo "$ICECC_CMD" >&6; }
66340else
66341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66342$as_echo "no" >&6; }
66343fi
66344
66345
66346          if test "x$ICECC_CMD" = x; then
66347            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66348          fi
66349        else
66350          # Otherwise we believe it is a complete path. Use it as it is.
66351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
66352$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
66353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66354$as_echo_n "checking for ICECC_CMD... " >&6; }
66355          if test ! -x "$tool_specified"; then
66356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66357$as_echo "not found" >&6; }
66358            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66359          fi
66360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66361$as_echo "$tool_specified" >&6; }
66362        fi
66363      fi
66364    fi
66365
66366  fi
66367
66368
66369
66370  if test "x$ICECC_CMD" = x; then
66371    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66372  fi
66373
66374
66375    old_path="$PATH"
66376
66377    # Look for icecc-create-env in some known places
66378    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66379
66380
66381
66382  # Publish this variable in the help.
66383
66384
66385  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66386    # The variable is not set by user, try to locate tool using the code snippet
66387    for ac_prog in icecc-create-env
66388do
66389  # Extract the first word of "$ac_prog", so it can be a program name with args.
66390set dummy $ac_prog; ac_word=$2
66391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66392$as_echo_n "checking for $ac_word... " >&6; }
66393if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66394  $as_echo_n "(cached) " >&6
66395else
66396  case $ICECC_CREATE_ENV in
66397  [\\/]* | ?:[\\/]*)
66398  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66399  ;;
66400  *)
66401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66402for as_dir in $PATH
66403do
66404  IFS=$as_save_IFS
66405  test -z "$as_dir" && as_dir=.
66406    for ac_exec_ext in '' $ac_executable_extensions; do
66407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66408    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66410    break 2
66411  fi
66412done
66413  done
66414IFS=$as_save_IFS
66415
66416  ;;
66417esac
66418fi
66419ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66420if test -n "$ICECC_CREATE_ENV"; then
66421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66422$as_echo "$ICECC_CREATE_ENV" >&6; }
66423else
66424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66425$as_echo "no" >&6; }
66426fi
66427
66428
66429  test -n "$ICECC_CREATE_ENV" && break
66430done
66431
66432  else
66433    # The variable is set, but is it from the command line or the environment?
66434
66435    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66436    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66437    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66438      # If it failed, the variable was not from the command line. Ignore it,
66439      # but warn the user (except for BASH, which is always set by the calling BASH).
66440      if test "xICECC_CREATE_ENV" != xBASH; then
66441        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66442$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66443      fi
66444      # Try to locate tool using the code snippet
66445      for ac_prog in icecc-create-env
66446do
66447  # Extract the first word of "$ac_prog", so it can be a program name with args.
66448set dummy $ac_prog; ac_word=$2
66449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66450$as_echo_n "checking for $ac_word... " >&6; }
66451if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66452  $as_echo_n "(cached) " >&6
66453else
66454  case $ICECC_CREATE_ENV in
66455  [\\/]* | ?:[\\/]*)
66456  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66457  ;;
66458  *)
66459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66460for as_dir in $PATH
66461do
66462  IFS=$as_save_IFS
66463  test -z "$as_dir" && as_dir=.
66464    for ac_exec_ext in '' $ac_executable_extensions; do
66465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66466    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66468    break 2
66469  fi
66470done
66471  done
66472IFS=$as_save_IFS
66473
66474  ;;
66475esac
66476fi
66477ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66478if test -n "$ICECC_CREATE_ENV"; then
66479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66480$as_echo "$ICECC_CREATE_ENV" >&6; }
66481else
66482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66483$as_echo "no" >&6; }
66484fi
66485
66486
66487  test -n "$ICECC_CREATE_ENV" && break
66488done
66489
66490    else
66491      # If it succeeded, then it was overridden by the user. We will use it
66492      # for the tool.
66493
66494      # First remove it from the list of overridden variables, so we can test
66495      # for unknown variables in the end.
66496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66497
66498      # Check if we try to supply an empty value
66499      if test "x$ICECC_CREATE_ENV" = x; then
66500        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66501$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66503$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66505$as_echo "disabled" >&6; }
66506      else
66507        # Check if the provided tool contains a complete path.
66508        tool_specified="$ICECC_CREATE_ENV"
66509        tool_basename="${tool_specified##*/}"
66510        if test "x$tool_basename" = "x$tool_specified"; then
66511          # A command without a complete path is provided, search $PATH.
66512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66513$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66514          # Extract the first word of "$tool_basename", so it can be a program name with args.
66515set dummy $tool_basename; ac_word=$2
66516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66517$as_echo_n "checking for $ac_word... " >&6; }
66518if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66519  $as_echo_n "(cached) " >&6
66520else
66521  case $ICECC_CREATE_ENV in
66522  [\\/]* | ?:[\\/]*)
66523  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66524  ;;
66525  *)
66526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66527for as_dir in $PATH
66528do
66529  IFS=$as_save_IFS
66530  test -z "$as_dir" && as_dir=.
66531    for ac_exec_ext in '' $ac_executable_extensions; do
66532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66533    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66535    break 2
66536  fi
66537done
66538  done
66539IFS=$as_save_IFS
66540
66541  ;;
66542esac
66543fi
66544ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66545if test -n "$ICECC_CREATE_ENV"; then
66546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66547$as_echo "$ICECC_CREATE_ENV" >&6; }
66548else
66549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66550$as_echo "no" >&6; }
66551fi
66552
66553
66554          if test "x$ICECC_CREATE_ENV" = x; then
66555            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66556          fi
66557        else
66558          # Otherwise we believe it is a complete path. Use it as it is.
66559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66560$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66561          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66562$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66563          if test ! -x "$tool_specified"; then
66564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66565$as_echo "not found" >&6; }
66566            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66567          fi
66568          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66569$as_echo "$tool_specified" >&6; }
66570        fi
66571      fi
66572    fi
66573
66574  fi
66575
66576
66577
66578  if test "x$ICECC_CREATE_ENV" = x; then
66579    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66580  fi
66581
66582
66583    # Use icecc-create-env to create a minimal compilation environment that can
66584    # be sent to the other hosts in the icecream cluster.
66585    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66586    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66587    # Older versions of icecc does not have the --gcc parameter
66588    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66589      icecc_gcc_arg="--gcc"
66590    fi
66591    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66592
66593  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66594      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66595          ${icecc_create_env_log} 2>&1 )
66596  if test "$?" != "0"; then
66597    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66598$as_echo "$as_me: icecc-create-env output:" >&6;}
66599    cat \
66600          ${icecc_create_env_log}
66601    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66602  fi
66603
66604    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66605      # For clang, the icecc compilerwrapper is needed. It usually resides next
66606      # to icecc-create-env.
66607
66608
66609
66610  # Publish this variable in the help.
66611
66612
66613  if [ -z "${ICECC_WRAPPER+x}" ]; then
66614    # The variable is not set by user, try to locate tool using the code snippet
66615    for ac_prog in compilerwrapper
66616do
66617  # Extract the first word of "$ac_prog", so it can be a program name with args.
66618set dummy $ac_prog; ac_word=$2
66619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66620$as_echo_n "checking for $ac_word... " >&6; }
66621if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66622  $as_echo_n "(cached) " >&6
66623else
66624  case $ICECC_WRAPPER in
66625  [\\/]* | ?:[\\/]*)
66626  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66627  ;;
66628  *)
66629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66630for as_dir in $PATH
66631do
66632  IFS=$as_save_IFS
66633  test -z "$as_dir" && as_dir=.
66634    for ac_exec_ext in '' $ac_executable_extensions; do
66635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66636    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66638    break 2
66639  fi
66640done
66641  done
66642IFS=$as_save_IFS
66643
66644  ;;
66645esac
66646fi
66647ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66648if test -n "$ICECC_WRAPPER"; then
66649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66650$as_echo "$ICECC_WRAPPER" >&6; }
66651else
66652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66653$as_echo "no" >&6; }
66654fi
66655
66656
66657  test -n "$ICECC_WRAPPER" && break
66658done
66659
66660  else
66661    # The variable is set, but is it from the command line or the environment?
66662
66663    # Try to remove the string !ICECC_WRAPPER! from our list.
66664    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
66665    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66666      # If it failed, the variable was not from the command line. Ignore it,
66667      # but warn the user (except for BASH, which is always set by the calling BASH).
66668      if test "xICECC_WRAPPER" != xBASH; then
66669        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
66670$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
66671      fi
66672      # Try to locate tool using the code snippet
66673      for ac_prog in compilerwrapper
66674do
66675  # Extract the first word of "$ac_prog", so it can be a program name with args.
66676set dummy $ac_prog; ac_word=$2
66677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66678$as_echo_n "checking for $ac_word... " >&6; }
66679if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66680  $as_echo_n "(cached) " >&6
66681else
66682  case $ICECC_WRAPPER in
66683  [\\/]* | ?:[\\/]*)
66684  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66685  ;;
66686  *)
66687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66688for as_dir in $PATH
66689do
66690  IFS=$as_save_IFS
66691  test -z "$as_dir" && as_dir=.
66692    for ac_exec_ext in '' $ac_executable_extensions; do
66693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66694    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66696    break 2
66697  fi
66698done
66699  done
66700IFS=$as_save_IFS
66701
66702  ;;
66703esac
66704fi
66705ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66706if test -n "$ICECC_WRAPPER"; then
66707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66708$as_echo "$ICECC_WRAPPER" >&6; }
66709else
66710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66711$as_echo "no" >&6; }
66712fi
66713
66714
66715  test -n "$ICECC_WRAPPER" && break
66716done
66717
66718    else
66719      # If it succeeded, then it was overridden by the user. We will use it
66720      # for the tool.
66721
66722      # First remove it from the list of overridden variables, so we can test
66723      # for unknown variables in the end.
66724      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66725
66726      # Check if we try to supply an empty value
66727      if test "x$ICECC_WRAPPER" = x; then
66728        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
66729$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
66730        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66731$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66733$as_echo "disabled" >&6; }
66734      else
66735        # Check if the provided tool contains a complete path.
66736        tool_specified="$ICECC_WRAPPER"
66737        tool_basename="${tool_specified##*/}"
66738        if test "x$tool_basename" = "x$tool_specified"; then
66739          # A command without a complete path is provided, search $PATH.
66740          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
66741$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
66742          # Extract the first word of "$tool_basename", so it can be a program name with args.
66743set dummy $tool_basename; ac_word=$2
66744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66745$as_echo_n "checking for $ac_word... " >&6; }
66746if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66747  $as_echo_n "(cached) " >&6
66748else
66749  case $ICECC_WRAPPER in
66750  [\\/]* | ?:[\\/]*)
66751  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66752  ;;
66753  *)
66754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66755for as_dir in $PATH
66756do
66757  IFS=$as_save_IFS
66758  test -z "$as_dir" && as_dir=.
66759    for ac_exec_ext in '' $ac_executable_extensions; do
66760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66761    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66763    break 2
66764  fi
66765done
66766  done
66767IFS=$as_save_IFS
66768
66769  ;;
66770esac
66771fi
66772ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66773if test -n "$ICECC_WRAPPER"; then
66774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66775$as_echo "$ICECC_WRAPPER" >&6; }
66776else
66777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66778$as_echo "no" >&6; }
66779fi
66780
66781
66782          if test "x$ICECC_WRAPPER" = x; then
66783            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66784          fi
66785        else
66786          # Otherwise we believe it is a complete path. Use it as it is.
66787          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66788$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66789          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66790$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66791          if test ! -x "$tool_specified"; then
66792            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66793$as_echo "not found" >&6; }
66794            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66795          fi
66796          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66797$as_echo "$tool_specified" >&6; }
66798        fi
66799      fi
66800    fi
66801
66802  fi
66803
66804
66805
66806  if test "x$ICECC_WRAPPER" = x; then
66807    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66808  fi
66809
66810
66811
66812  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66813      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66814  if test "$?" != "0"; then
66815    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66816$as_echo "$as_me: icecc-create-env output:" >&6;}
66817    cat ${icecc_create_env_log}
66818    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66819  fi
66820
66821    else
66822      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66823    fi
66824    PATH="$old_path"
66825    # The bundle with the compiler gets a name based on checksums. Parse log file
66826    # to find it.
66827    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66828    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66829    if test ! -f ${ICECC_ENV_BUNDLE}; then
66830      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66831    fi
66832    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66833$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66834    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66835$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66836    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66837
66838    if test "x${COMPILE_TYPE}" = "xcross"; then
66839      # If cross compiling, create a separate env package for the build compiler
66840      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66841      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66842      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66843
66844  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66845      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66846            ${icecc_create_env_log_build} 2>&1 )
66847  if test "$?" != "0"; then
66848    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66849$as_echo "$as_me: icecc-create-env output:" >&6;}
66850    cat \
66851            ${icecc_create_env_log_build}
66852    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66853  fi
66854
66855      elif test "x${BUILD_CC##*/}" = "xclang"; then
66856
66857  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66858      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66859  if test "$?" != "0"; then
66860    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66861$as_echo "$as_me: icecc-create-env output:" >&6;}
66862    cat ${icecc_create_env_log_build}
66863    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66864  fi
66865
66866      else
66867        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66868      fi
66869      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66870      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66871      if test ! -f ${ICECC_ENV_BUNDLE}; then
66872        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66873      fi
66874      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66875$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66876      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66877$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66878      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66879          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66880    else
66881      BUILD_ICECC="${ICECC}"
66882    fi
66883
66884
66885  fi
66886
66887
66888# Can the C/C++ compiler use precompiled headers?
66889
66890
66891  ###############################################################################
66892  #
66893  # Can the C/C++ compiler use precompiled headers?
66894  #
66895  # Check whether --enable-precompiled-headers was given.
66896if test "${enable_precompiled_headers+set}" = set; then :
66897  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66898else
66899  ENABLE_PRECOMPH=yes
66900fi
66901
66902
66903  USE_PRECOMPILED_HEADER=true
66904  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66905$as_echo_n "checking If precompiled header is enabled... " >&6; }
66906  if test "x$ENABLE_PRECOMPH" = xno; then
66907    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66908$as_echo "no, forced" >&6; }
66909    USE_PRECOMPILED_HEADER=false
66910  elif test "x$ICECC" != "x"; then
66911    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66912$as_echo "no, does not work effectively with icecc" >&6; }
66913    USE_PRECOMPILED_HEADER=false
66914  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66916$as_echo "no, does not work with Solaris Studio" >&6; }
66917    USE_PRECOMPILED_HEADER=false
66918  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66920$as_echo "no, does not work with xlc" >&6; }
66921    USE_PRECOMPILED_HEADER=false
66922  else
66923    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66924$as_echo "yes" >&6; }
66925  fi
66926
66927  if test "x$ENABLE_PRECOMPH" = xyes; then
66928    # Check that the compiler actually supports precomp headers.
66929    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66930      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66931$as_echo_n "checking that precompiled headers work... " >&6; }
66932      echo "int alfa();" > conftest.h
66933      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66934      if test ! -f conftest.hpp.gch; then
66935        USE_PRECOMPILED_HEADER=false
66936        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66937$as_echo "no" >&6; }
66938      else
66939        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66940$as_echo "yes" >&6; }
66941      fi
66942      $RM conftest.h conftest.hpp.gch
66943    fi
66944  fi
66945
66946
66947
66948
66949# Setup use of ccache, if available
66950
66951  # Check whether --enable-ccache was given.
66952if test "${enable_ccache+set}" = set; then :
66953  enableval=$enable_ccache;
66954fi
66955
66956
66957  CCACHE_STATUS=
66958  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66959$as_echo_n "checking is ccache enabled... " >&6; }
66960  if test "x$enable_ccache" = xyes; then
66961    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66962      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66963$as_echo "yes" >&6; }
66964      OLD_PATH="$PATH"
66965      if test "x$TOOLCHAIN_PATH" != x; then
66966        PATH=$TOOLCHAIN_PATH:$PATH
66967      fi
66968
66969
66970
66971  # Publish this variable in the help.
66972
66973
66974  if [ -z "${CCACHE+x}" ]; then
66975    # The variable is not set by user, try to locate tool using the code snippet
66976    for ac_prog in ccache
66977do
66978  # Extract the first word of "$ac_prog", so it can be a program name with args.
66979set dummy $ac_prog; ac_word=$2
66980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66981$as_echo_n "checking for $ac_word... " >&6; }
66982if ${ac_cv_path_CCACHE+:} false; then :
66983  $as_echo_n "(cached) " >&6
66984else
66985  case $CCACHE in
66986  [\\/]* | ?:[\\/]*)
66987  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66988  ;;
66989  *)
66990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66991for as_dir in $PATH
66992do
66993  IFS=$as_save_IFS
66994  test -z "$as_dir" && as_dir=.
66995    for ac_exec_ext in '' $ac_executable_extensions; do
66996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66997    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66999    break 2
67000  fi
67001done
67002  done
67003IFS=$as_save_IFS
67004
67005  ;;
67006esac
67007fi
67008CCACHE=$ac_cv_path_CCACHE
67009if test -n "$CCACHE"; then
67010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67011$as_echo "$CCACHE" >&6; }
67012else
67013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67014$as_echo "no" >&6; }
67015fi
67016
67017
67018  test -n "$CCACHE" && break
67019done
67020
67021  else
67022    # The variable is set, but is it from the command line or the environment?
67023
67024    # Try to remove the string !CCACHE! from our list.
67025    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
67026    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67027      # If it failed, the variable was not from the command line. Ignore it,
67028      # but warn the user (except for BASH, which is always set by the calling BASH).
67029      if test "xCCACHE" != xBASH; then
67030        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
67031$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
67032      fi
67033      # Try to locate tool using the code snippet
67034      for ac_prog in ccache
67035do
67036  # Extract the first word of "$ac_prog", so it can be a program name with args.
67037set dummy $ac_prog; ac_word=$2
67038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67039$as_echo_n "checking for $ac_word... " >&6; }
67040if ${ac_cv_path_CCACHE+:} false; then :
67041  $as_echo_n "(cached) " >&6
67042else
67043  case $CCACHE in
67044  [\\/]* | ?:[\\/]*)
67045  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67046  ;;
67047  *)
67048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67049for as_dir in $PATH
67050do
67051  IFS=$as_save_IFS
67052  test -z "$as_dir" && as_dir=.
67053    for ac_exec_ext in '' $ac_executable_extensions; do
67054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67055    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67057    break 2
67058  fi
67059done
67060  done
67061IFS=$as_save_IFS
67062
67063  ;;
67064esac
67065fi
67066CCACHE=$ac_cv_path_CCACHE
67067if test -n "$CCACHE"; then
67068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67069$as_echo "$CCACHE" >&6; }
67070else
67071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67072$as_echo "no" >&6; }
67073fi
67074
67075
67076  test -n "$CCACHE" && break
67077done
67078
67079    else
67080      # If it succeeded, then it was overridden by the user. We will use it
67081      # for the tool.
67082
67083      # First remove it from the list of overridden variables, so we can test
67084      # for unknown variables in the end.
67085      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67086
67087      # Check if we try to supply an empty value
67088      if test "x$CCACHE" = x; then
67089        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
67090$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
67091        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67092$as_echo_n "checking for CCACHE... " >&6; }
67093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67094$as_echo "disabled" >&6; }
67095      else
67096        # Check if the provided tool contains a complete path.
67097        tool_specified="$CCACHE"
67098        tool_basename="${tool_specified##*/}"
67099        if test "x$tool_basename" = "x$tool_specified"; then
67100          # A command without a complete path is provided, search $PATH.
67101          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
67102$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
67103          # Extract the first word of "$tool_basename", so it can be a program name with args.
67104set dummy $tool_basename; ac_word=$2
67105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67106$as_echo_n "checking for $ac_word... " >&6; }
67107if ${ac_cv_path_CCACHE+:} false; then :
67108  $as_echo_n "(cached) " >&6
67109else
67110  case $CCACHE in
67111  [\\/]* | ?:[\\/]*)
67112  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67113  ;;
67114  *)
67115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67116for as_dir in $PATH
67117do
67118  IFS=$as_save_IFS
67119  test -z "$as_dir" && as_dir=.
67120    for ac_exec_ext in '' $ac_executable_extensions; do
67121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67122    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67124    break 2
67125  fi
67126done
67127  done
67128IFS=$as_save_IFS
67129
67130  ;;
67131esac
67132fi
67133CCACHE=$ac_cv_path_CCACHE
67134if test -n "$CCACHE"; then
67135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67136$as_echo "$CCACHE" >&6; }
67137else
67138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67139$as_echo "no" >&6; }
67140fi
67141
67142
67143          if test "x$CCACHE" = x; then
67144            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67145          fi
67146        else
67147          # Otherwise we believe it is a complete path. Use it as it is.
67148          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
67149$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
67150          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67151$as_echo_n "checking for CCACHE... " >&6; }
67152          if test ! -x "$tool_specified"; then
67153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67154$as_echo "not found" >&6; }
67155            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
67156          fi
67157          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67158$as_echo "$tool_specified" >&6; }
67159        fi
67160      fi
67161    fi
67162
67163  fi
67164
67165
67166
67167  if test "x$CCACHE" = x; then
67168    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
67169  fi
67170
67171
67172      PATH="$OLD_PATH"
67173      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
67174      CCACHE_STATUS="Active ($CCACHE_VERSION)"
67175    else
67176      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67177$as_echo "no" >&6; }
67178      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
67179$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
67180    fi
67181  elif test "x$enable_ccache" = xno; then
67182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
67183$as_echo "no, explicitly disabled" >&6; }
67184    CCACHE_STATUS="Disabled"
67185  elif test "x$enable_ccache" = x; then
67186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67187$as_echo "no" >&6; }
67188  else
67189    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
67190$as_echo "unknown" >&6; }
67191    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
67192  fi
67193
67194
67195
67196# Check whether --with-ccache-dir was given.
67197if test "${with_ccache_dir+set}" = set; then :
67198  withval=$with_ccache_dir;
67199fi
67200
67201
67202  if test "x$with_ccache_dir" != x; then
67203    # When using a non home ccache directory, assume the use is to share ccache files
67204    # with other users. Thus change the umask.
67205    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
67206    if test "x$CCACHE" = x; then
67207      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
67208$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
67209    fi
67210  fi
67211
67212  if test "x$CCACHE" != x; then
67213
67214  if test "x$CCACHE" != x; then
67215    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
67216      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67217          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
67218      if test "x$HAS_BAD_CCACHE" != "x"; then
67219        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
67220      fi
67221    fi
67222    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
67223      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67224          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
67225      if test "x$HAS_BAD_CCACHE" != "x"; then
67226        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
67227      fi
67228      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
67229$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
67230      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
67231      PUSHED_FLAGS="$CXXFLAGS"
67232      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
67233      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67234/* end confdefs.h.  */
67235
67236int
67237main ()
67238{
67239
67240  ;
67241  return 0;
67242}
67243_ACEOF
67244if ac_fn_cxx_try_compile "$LINENO"; then :
67245  CC_KNOWS_CCACHE_TRICK=yes
67246else
67247  CC_KNOWS_CCACHE_TRICK=no
67248fi
67249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67250      CXXFLAGS="$PUSHED_FLAGS"
67251      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
67252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67253$as_echo "yes" >&6; }
67254        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
67255
67256        CCACHE_SLOPPINESS=pch_defines,time_macros
67257      else
67258        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67259$as_echo "no" >&6; }
67260        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
67261      fi
67262    fi
67263
67264    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
67265        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
67266
67267    if test "x$SET_CCACHE_DIR" != x; then
67268      mkdir -p $CCACHE_DIR > /dev/null 2>&1
67269      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
67270    fi
67271  fi
67272
67273  fi
67274
67275
67276###############################################################################
67277#
67278# And now the finish...
67279#
67280###############################################################################
67281
67282# Check for some common pitfalls
67283
67284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
67285    file_to_test="$SRC_ROOT/LICENSE"
67286    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
67287      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
67288    fi
67289  fi
67290
67291
67292  # Did user specify any unknown variables?
67293
67294  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
67295    # Replace the separating ! with spaces before presenting for end user.
67296    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
67297    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
67298$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
67299  fi
67300
67301
67302  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
67303$as_echo_n "checking if build directory is on local disk... " >&6; }
67304
67305  # df -l lists only local disks; if the given directory is not found then
67306  # a non-zero exit code is given
67307  if test "x$DF" = x; then
67308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67309      # msys does not have df; use Windows "net use" instead.
67310      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
67311      if test "x$IS_NETWORK_DISK" = x; then
67312        OUTPUT_DIR_IS_LOCAL="yes"
67313      else
67314        OUTPUT_DIR_IS_LOCAL="no"
67315      fi
67316    else
67317      # No df here, say it's local
67318      OUTPUT_DIR_IS_LOCAL="yes"
67319    fi
67320  else
67321    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
67322      OUTPUT_DIR_IS_LOCAL="yes"
67323    else
67324      OUTPUT_DIR_IS_LOCAL="no"
67325    fi
67326  fi
67327
67328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
67329$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
67330
67331
67332
67333  # Check if the user has any old-style ALT_ variables set.
67334  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
67335
67336  # Before generating output files, test if they exist. If they do, this is a reconfigure.
67337  # Since we can't properly handle the dependencies for this, warn the user about the situation
67338  if test -e $OUTPUT_ROOT/spec.gmk; then
67339    IS_RECONFIGURE=yes
67340  else
67341    IS_RECONFIGURE=no
67342  fi
67343
67344
67345# At the end, call the custom hook. (Dummy macro if no custom sources available)
67346
67347
67348# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67349
67350  # Keep feature lists sorted and free of duplicates
67351  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67352  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67353  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67354  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67355  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67356  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67357  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67358
67359  # Validate features
67360  for variant in $JVM_VARIANTS; do
67361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67362$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67363    features_var_name=JVM_FEATURES_$variant
67364    JVM_FEATURES_TO_TEST=${!features_var_name}
67365    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67366$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67367    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67368    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67369    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67370    if test "x$INVALID_FEATURES" != x; then
67371      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67372    fi
67373  done
67374
67375
67376# We're messing a bit with internal autoconf variables to put the config.status
67377# in the output directory instead of the current directory.
67378CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67379
67380# Create the actual output files. Now the main work of configure is done.
67381cat >confcache <<\_ACEOF
67382# This file is a shell script that caches the results of configure
67383# tests run on this system so they can be shared between configure
67384# scripts and configure runs, see configure's option --config-cache.
67385# It is not useful on other systems.  If it contains results you don't
67386# want to keep, you may remove or edit it.
67387#
67388# config.status only pays attention to the cache file if you give it
67389# the --recheck option to rerun configure.
67390#
67391# `ac_cv_env_foo' variables (set or unset) will be overridden when
67392# loading this file, other *unset* `ac_cv_foo' will be assigned the
67393# following values.
67394
67395_ACEOF
67396
67397# The following way of writing the cache mishandles newlines in values,
67398# but we know of no workaround that is simple, portable, and efficient.
67399# So, we kill variables containing newlines.
67400# Ultrix sh set writes to stderr and can't be redirected directly,
67401# and sets the high bit in the cache file unless we assign to the vars.
67402(
67403  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67404    eval ac_val=\$$ac_var
67405    case $ac_val in #(
67406    *${as_nl}*)
67407      case $ac_var in #(
67408      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67409$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67410      esac
67411      case $ac_var in #(
67412      _ | IFS | as_nl) ;; #(
67413      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67414      *) { eval $ac_var=; unset $ac_var;} ;;
67415      esac ;;
67416    esac
67417  done
67418
67419  (set) 2>&1 |
67420    case $as_nl`(ac_space=' '; set) 2>&1` in #(
67421    *${as_nl}ac_space=\ *)
67422      # `set' does not quote correctly, so add quotes: double-quote
67423      # substitution turns \\\\ into \\, and sed turns \\ into \.
67424      sed -n \
67425	"s/'/'\\\\''/g;
67426	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67427      ;; #(
67428    *)
67429      # `set' quotes correctly as required by POSIX, so do not add quotes.
67430      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67431      ;;
67432    esac |
67433    sort
67434) |
67435  sed '
67436     /^ac_cv_env_/b end
67437     t clear
67438     :clear
67439     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67440     t end
67441     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67442     :end' >>confcache
67443if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67444  if test -w "$cache_file"; then
67445    if test "x$cache_file" != "x/dev/null"; then
67446      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67447$as_echo "$as_me: updating cache $cache_file" >&6;}
67448      if test ! -f "$cache_file" || test -h "$cache_file"; then
67449	cat confcache >"$cache_file"
67450      else
67451        case $cache_file in #(
67452        */* | ?:*)
67453	  mv -f confcache "$cache_file"$$ &&
67454	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67455        *)
67456	  mv -f confcache "$cache_file" ;;
67457	esac
67458      fi
67459    fi
67460  else
67461    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67462$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67463  fi
67464fi
67465rm -f confcache
67466
67467test "x$prefix" = xNONE && prefix=$ac_default_prefix
67468# Let make expand exec_prefix.
67469test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67470
67471# Transform confdefs.h into DEFS.
67472# Protect against shell expansion while executing Makefile rules.
67473# Protect against Makefile macro expansion.
67474#
67475# If the first sed substitution is executed (which looks for macros that
67476# take arguments), then branch to the quote section.  Otherwise,
67477# look for a macro that doesn't take arguments.
67478ac_script='
67479:mline
67480/\\$/{
67481 N
67482 s,\\\n,,
67483 b mline
67484}
67485t clear
67486:clear
67487s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67488t quote
67489s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67490t quote
67491b any
67492:quote
67493s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67494s/\[/\\&/g
67495s/\]/\\&/g
67496s/\$/$$/g
67497H
67498:any
67499${
67500	g
67501	s/^\n//
67502	s/\n/ /g
67503	p
67504}
67505'
67506DEFS=`sed -n "$ac_script" confdefs.h`
67507
67508
67509ac_libobjs=
67510ac_ltlibobjs=
67511U=
67512for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67513  # 1. Remove the extension, and $U if already installed.
67514  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67515  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67516  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67517  #    will be set to the directory where LIBOBJS objects are built.
67518  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67519  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67520done
67521LIBOBJS=$ac_libobjs
67522
67523LTLIBOBJS=$ac_ltlibobjs
67524
67525
67526
67527: "${CONFIG_STATUS=./config.status}"
67528ac_write_fail=0
67529ac_clean_files_save=$ac_clean_files
67530ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67531{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67532$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67533as_write_fail=0
67534cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67535#! $SHELL
67536# Generated by $as_me.
67537# Run this file to recreate the current configuration.
67538# Compiler output produced by configure, useful for debugging
67539# configure, is in config.log if it exists.
67540
67541debug=false
67542ac_cs_recheck=false
67543ac_cs_silent=false
67544
67545SHELL=\${CONFIG_SHELL-$SHELL}
67546export SHELL
67547_ASEOF
67548cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67549## -------------------- ##
67550## M4sh Initialization. ##
67551## -------------------- ##
67552
67553# Be more Bourne compatible
67554DUALCASE=1; export DUALCASE # for MKS sh
67555if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67556  emulate sh
67557  NULLCMD=:
67558  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67559  # is contrary to our usage.  Disable this feature.
67560  alias -g '${1+"$@"}'='"$@"'
67561  setopt NO_GLOB_SUBST
67562else
67563  case `(set -o) 2>/dev/null` in #(
67564  *posix*) :
67565    set -o posix ;; #(
67566  *) :
67567     ;;
67568esac
67569fi
67570
67571
67572as_nl='
67573'
67574export as_nl
67575# Printing a long string crashes Solaris 7 /usr/bin/printf.
67576as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67577as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67578as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67579# Prefer a ksh shell builtin over an external printf program on Solaris,
67580# but without wasting forks for bash or zsh.
67581if test -z "$BASH_VERSION$ZSH_VERSION" \
67582    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67583  as_echo='print -r --'
67584  as_echo_n='print -rn --'
67585elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67586  as_echo='printf %s\n'
67587  as_echo_n='printf %s'
67588else
67589  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67590    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67591    as_echo_n='/usr/ucb/echo -n'
67592  else
67593    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67594    as_echo_n_body='eval
67595      arg=$1;
67596      case $arg in #(
67597      *"$as_nl"*)
67598	expr "X$arg" : "X\\(.*\\)$as_nl";
67599	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67600      esac;
67601      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67602    '
67603    export as_echo_n_body
67604    as_echo_n='sh -c $as_echo_n_body as_echo'
67605  fi
67606  export as_echo_body
67607  as_echo='sh -c $as_echo_body as_echo'
67608fi
67609
67610# The user is always right.
67611if test "${PATH_SEPARATOR+set}" != set; then
67612  PATH_SEPARATOR=:
67613  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67614    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67615      PATH_SEPARATOR=';'
67616  }
67617fi
67618
67619
67620# IFS
67621# We need space, tab and new line, in precisely that order.  Quoting is
67622# there to prevent editors from complaining about space-tab.
67623# (If _AS_PATH_WALK were called with IFS unset, it would disable word
67624# splitting by setting IFS to empty value.)
67625IFS=" ""	$as_nl"
67626
67627# Find who we are.  Look in the path if we contain no directory separator.
67628as_myself=
67629case $0 in #((
67630  *[\\/]* ) as_myself=$0 ;;
67631  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67632for as_dir in $PATH
67633do
67634  IFS=$as_save_IFS
67635  test -z "$as_dir" && as_dir=.
67636    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67637  done
67638IFS=$as_save_IFS
67639
67640     ;;
67641esac
67642# We did not find ourselves, most probably we were run as `sh COMMAND'
67643# in which case we are not to be found in the path.
67644if test "x$as_myself" = x; then
67645  as_myself=$0
67646fi
67647if test ! -f "$as_myself"; then
67648  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67649  exit 1
67650fi
67651
67652# Unset variables that we do not need and which cause bugs (e.g. in
67653# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67654# suppresses any "Segmentation fault" message there.  '((' could
67655# trigger a bug in pdksh 5.2.14.
67656for as_var in BASH_ENV ENV MAIL MAILPATH
67657do eval test x\${$as_var+set} = xset \
67658  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
67659done
67660PS1='$ '
67661PS2='> '
67662PS4='+ '
67663
67664# NLS nuisances.
67665LC_ALL=C
67666export LC_ALL
67667LANGUAGE=C
67668export LANGUAGE
67669
67670# CDPATH.
67671(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
67672
67673
67674# as_fn_error STATUS ERROR [LINENO LOG_FD]
67675# ----------------------------------------
67676# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
67677# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
67678# script with STATUS, using 1 if that was 0.
67679as_fn_error ()
67680{
67681  as_status=$1; test $as_status -eq 0 && as_status=1
67682  if test "$4"; then
67683    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
67684    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
67685  fi
67686  $as_echo "$as_me: error: $2" >&2
67687  as_fn_exit $as_status
67688} # as_fn_error
67689
67690
67691# as_fn_set_status STATUS
67692# -----------------------
67693# Set $? to STATUS, without forking.
67694as_fn_set_status ()
67695{
67696  return $1
67697} # as_fn_set_status
67698
67699# as_fn_exit STATUS
67700# -----------------
67701# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
67702as_fn_exit ()
67703{
67704  set +e
67705  as_fn_set_status $1
67706  exit $1
67707} # as_fn_exit
67708
67709# as_fn_unset VAR
67710# ---------------
67711# Portably unset VAR.
67712as_fn_unset ()
67713{
67714  { eval $1=; unset $1;}
67715}
67716as_unset=as_fn_unset
67717# as_fn_append VAR VALUE
67718# ----------------------
67719# Append the text in VALUE to the end of the definition contained in VAR. Take
67720# advantage of any shell optimizations that allow amortized linear growth over
67721# repeated appends, instead of the typical quadratic growth present in naive
67722# implementations.
67723if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
67724  eval 'as_fn_append ()
67725  {
67726    eval $1+=\$2
67727  }'
67728else
67729  as_fn_append ()
67730  {
67731    eval $1=\$$1\$2
67732  }
67733fi # as_fn_append
67734
67735# as_fn_arith ARG...
67736# ------------------
67737# Perform arithmetic evaluation on the ARGs, and store the result in the
67738# global $as_val. Take advantage of shells that can avoid forks. The arguments
67739# must be portable across $(()) and expr.
67740if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
67741  eval 'as_fn_arith ()
67742  {
67743    as_val=$(( $* ))
67744  }'
67745else
67746  as_fn_arith ()
67747  {
67748    as_val=`expr "$@" || test $? -eq 1`
67749  }
67750fi # as_fn_arith
67751
67752
67753if expr a : '\(a\)' >/dev/null 2>&1 &&
67754   test "X`expr 00001 : '.*\(...\)'`" = X001; then
67755  as_expr=expr
67756else
67757  as_expr=false
67758fi
67759
67760if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67761  as_basename=basename
67762else
67763  as_basename=false
67764fi
67765
67766if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67767  as_dirname=dirname
67768else
67769  as_dirname=false
67770fi
67771
67772as_me=`$as_basename -- "$0" ||
67773$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67774	 X"$0" : 'X\(//\)$' \| \
67775	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67776$as_echo X/"$0" |
67777    sed '/^.*\/\([^/][^/]*\)\/*$/{
67778	    s//\1/
67779	    q
67780	  }
67781	  /^X\/\(\/\/\)$/{
67782	    s//\1/
67783	    q
67784	  }
67785	  /^X\/\(\/\).*/{
67786	    s//\1/
67787	    q
67788	  }
67789	  s/.*/./; q'`
67790
67791# Avoid depending upon Character Ranges.
67792as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67793as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67794as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67795as_cr_digits='0123456789'
67796as_cr_alnum=$as_cr_Letters$as_cr_digits
67797
67798ECHO_C= ECHO_N= ECHO_T=
67799case `echo -n x` in #(((((
67800-n*)
67801  case `echo 'xy\c'` in
67802  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67803  xy)  ECHO_C='\c';;
67804  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67805       ECHO_T='	';;
67806  esac;;
67807*)
67808  ECHO_N='-n';;
67809esac
67810
67811rm -f conf$$ conf$$.exe conf$$.file
67812if test -d conf$$.dir; then
67813  rm -f conf$$.dir/conf$$.file
67814else
67815  rm -f conf$$.dir
67816  mkdir conf$$.dir 2>/dev/null
67817fi
67818if (echo >conf$$.file) 2>/dev/null; then
67819  if ln -s conf$$.file conf$$ 2>/dev/null; then
67820    as_ln_s='ln -s'
67821    # ... but there are two gotchas:
67822    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67823    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67824    # In both cases, we have to default to `cp -pR'.
67825    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67826      as_ln_s='cp -pR'
67827  elif ln conf$$.file conf$$ 2>/dev/null; then
67828    as_ln_s=ln
67829  else
67830    as_ln_s='cp -pR'
67831  fi
67832else
67833  as_ln_s='cp -pR'
67834fi
67835rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67836rmdir conf$$.dir 2>/dev/null
67837
67838
67839# as_fn_mkdir_p
67840# -------------
67841# Create "$as_dir" as a directory, including parents if necessary.
67842as_fn_mkdir_p ()
67843{
67844
67845  case $as_dir in #(
67846  -*) as_dir=./$as_dir;;
67847  esac
67848  test -d "$as_dir" || eval $as_mkdir_p || {
67849    as_dirs=
67850    while :; do
67851      case $as_dir in #(
67852      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67853      *) as_qdir=$as_dir;;
67854      esac
67855      as_dirs="'$as_qdir' $as_dirs"
67856      as_dir=`$as_dirname -- "$as_dir" ||
67857$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67858	 X"$as_dir" : 'X\(//\)[^/]' \| \
67859	 X"$as_dir" : 'X\(//\)$' \| \
67860	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67861$as_echo X"$as_dir" |
67862    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67863	    s//\1/
67864	    q
67865	  }
67866	  /^X\(\/\/\)[^/].*/{
67867	    s//\1/
67868	    q
67869	  }
67870	  /^X\(\/\/\)$/{
67871	    s//\1/
67872	    q
67873	  }
67874	  /^X\(\/\).*/{
67875	    s//\1/
67876	    q
67877	  }
67878	  s/.*/./; q'`
67879      test -d "$as_dir" && break
67880    done
67881    test -z "$as_dirs" || eval "mkdir $as_dirs"
67882  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67883
67884
67885} # as_fn_mkdir_p
67886if mkdir -p . 2>/dev/null; then
67887  as_mkdir_p='mkdir -p "$as_dir"'
67888else
67889  test -d ./-p && rmdir ./-p
67890  as_mkdir_p=false
67891fi
67892
67893
67894# as_fn_executable_p FILE
67895# -----------------------
67896# Test if FILE is an executable regular file.
67897as_fn_executable_p ()
67898{
67899  test -f "$1" && test -x "$1"
67900} # as_fn_executable_p
67901as_test_x='test -x'
67902as_executable_p=as_fn_executable_p
67903
67904# Sed expression to map a string onto a valid CPP name.
67905as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67906
67907# Sed expression to map a string onto a valid variable name.
67908as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67909
67910
67911exec 6>&1
67912## ----------------------------------- ##
67913## Main body of $CONFIG_STATUS script. ##
67914## ----------------------------------- ##
67915_ASEOF
67916test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67917
67918cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67919# Save the log message, to keep $0 and so on meaningful, and to
67920# report actual input values of CONFIG_FILES etc. instead of their
67921# values after options handling.
67922ac_log="
67923This file was extended by OpenJDK $as_me jdk9, which was
67924generated by GNU Autoconf 2.69.  Invocation command line was
67925
67926  CONFIG_FILES    = $CONFIG_FILES
67927  CONFIG_HEADERS  = $CONFIG_HEADERS
67928  CONFIG_LINKS    = $CONFIG_LINKS
67929  CONFIG_COMMANDS = $CONFIG_COMMANDS
67930  $ $0 $@
67931
67932on `(hostname || uname -n) 2>/dev/null | sed 1q`
67933"
67934
67935_ACEOF
67936
67937case $ac_config_files in *"
67938"*) set x $ac_config_files; shift; ac_config_files=$*;;
67939esac
67940
67941
67942
67943cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67944# Files that config.status was made for.
67945config_files="$ac_config_files"
67946
67947_ACEOF
67948
67949cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67950ac_cs_usage="\
67951\`$as_me' instantiates files and other configuration actions
67952from templates according to the current configuration.  Unless the files
67953and actions are specified as TAGs, all are instantiated by default.
67954
67955Usage: $0 [OPTION]... [TAG]...
67956
67957  -h, --help       print this help, then exit
67958  -V, --version    print version number and configuration settings, then exit
67959      --config     print configuration, then exit
67960  -q, --quiet, --silent
67961                   do not print progress messages
67962  -d, --debug      don't remove temporary files
67963      --recheck    update $as_me by reconfiguring in the same conditions
67964      --file=FILE[:TEMPLATE]
67965                   instantiate the configuration file FILE
67966
67967Configuration files:
67968$config_files
67969
67970Report bugs to <build-dev@openjdk.java.net>.
67971OpenJDK home page: <http://openjdk.java.net>."
67972
67973_ACEOF
67974cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67975ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67976ac_cs_version="\\
67977OpenJDK config.status jdk9
67978configured by $0, generated by GNU Autoconf 2.69,
67979  with options \\"\$ac_cs_config\\"
67980
67981Copyright (C) 2012 Free Software Foundation, Inc.
67982This config.status script is free software; the Free Software Foundation
67983gives unlimited permission to copy, distribute and modify it."
67984
67985ac_pwd='$ac_pwd'
67986srcdir='$srcdir'
67987AWK='$AWK'
67988test -n "\$AWK" || AWK=awk
67989_ACEOF
67990
67991cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67992# The default lists apply if the user does not specify any file.
67993ac_need_defaults=:
67994while test $# != 0
67995do
67996  case $1 in
67997  --*=?*)
67998    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67999    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
68000    ac_shift=:
68001    ;;
68002  --*=)
68003    ac_option=`expr "X$1" : 'X\([^=]*\)='`
68004    ac_optarg=
68005    ac_shift=:
68006    ;;
68007  *)
68008    ac_option=$1
68009    ac_optarg=$2
68010    ac_shift=shift
68011    ;;
68012  esac
68013
68014  case $ac_option in
68015  # Handling of the options.
68016  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
68017    ac_cs_recheck=: ;;
68018  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
68019    $as_echo "$ac_cs_version"; exit ;;
68020  --config | --confi | --conf | --con | --co | --c )
68021    $as_echo "$ac_cs_config"; exit ;;
68022  --debug | --debu | --deb | --de | --d | -d )
68023    debug=: ;;
68024  --file | --fil | --fi | --f )
68025    $ac_shift
68026    case $ac_optarg in
68027    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
68028    '') as_fn_error $? "missing file argument" ;;
68029    esac
68030    as_fn_append CONFIG_FILES " '$ac_optarg'"
68031    ac_need_defaults=false;;
68032  --he | --h |  --help | --hel | -h )
68033    $as_echo "$ac_cs_usage"; exit ;;
68034  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
68035  | -silent | --silent | --silen | --sile | --sil | --si | --s)
68036    ac_cs_silent=: ;;
68037
68038  # This is an error.
68039  -*) as_fn_error $? "unrecognized option: \`$1'
68040Try \`$0 --help' for more information." ;;
68041
68042  *) as_fn_append ac_config_targets " $1"
68043     ac_need_defaults=false ;;
68044
68045  esac
68046  shift
68047done
68048
68049ac_configure_extra_args=
68050
68051if $ac_cs_silent; then
68052  exec 6>/dev/null
68053  ac_configure_extra_args="$ac_configure_extra_args --silent"
68054fi
68055
68056_ACEOF
68057cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68058if \$ac_cs_recheck; then
68059  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
68060  shift
68061  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
68062  CONFIG_SHELL='$SHELL'
68063  export CONFIG_SHELL
68064  exec "\$@"
68065fi
68066
68067_ACEOF
68068cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68069exec 5>>config.log
68070{
68071  echo
68072  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
68073## Running $as_me. ##
68074_ASBOX
68075  $as_echo "$ac_log"
68076} >&5
68077
68078_ACEOF
68079cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68080_ACEOF
68081
68082cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68083
68084# Handling of arguments.
68085for ac_config_target in $ac_config_targets
68086do
68087  case $ac_config_target in
68088    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
68089    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
68090    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
68091    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
68092    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
68093
68094  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
68095  esac
68096done
68097
68098
68099# If the user did not use the arguments to specify the items to instantiate,
68100# then the envvar interface is used.  Set only those that are not.
68101# We use the long form for the default assignment because of an extremely
68102# bizarre bug on SunOS 4.1.3.
68103if $ac_need_defaults; then
68104  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
68105fi
68106
68107# Have a temporary directory for convenience.  Make it in the build tree
68108# simply because there is no reason against having it here, and in addition,
68109# creating and moving files from /tmp can sometimes cause problems.
68110# Hook for its removal unless debugging.
68111# Note that there is a small window in which the directory will not be cleaned:
68112# after its creation but before its name has been assigned to `$tmp'.
68113$debug ||
68114{
68115  tmp= ac_tmp=
68116  trap 'exit_status=$?
68117  : "${ac_tmp:=$tmp}"
68118  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
68119' 0
68120  trap 'as_fn_exit 1' 1 2 13 15
68121}
68122# Create a (secure) tmp directory for tmp files.
68123
68124{
68125  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
68126  test -d "$tmp"
68127}  ||
68128{
68129  tmp=./conf$$-$RANDOM
68130  (umask 077 && mkdir "$tmp")
68131} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
68132ac_tmp=$tmp
68133
68134# Set up the scripts for CONFIG_FILES section.
68135# No need to generate them if there are no CONFIG_FILES.
68136# This happens for instance with `./config.status config.h'.
68137if test -n "$CONFIG_FILES"; then
68138
68139
68140ac_cr=`echo X | tr X '\015'`
68141# On cygwin, bash can eat \r inside `` if the user requested igncr.
68142# But we know of no other shell where ac_cr would be empty at this
68143# point, so we can use a bashism as a fallback.
68144if test "x$ac_cr" = x; then
68145  eval ac_cr=\$\'\\r\'
68146fi
68147ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
68148if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
68149  ac_cs_awk_cr='\\r'
68150else
68151  ac_cs_awk_cr=$ac_cr
68152fi
68153
68154echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
68155_ACEOF
68156
68157
68158{
68159  echo "cat >conf$$subs.awk <<_ACEOF" &&
68160  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
68161  echo "_ACEOF"
68162} >conf$$subs.sh ||
68163  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68164ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
68165ac_delim='%!_!# '
68166for ac_last_try in false false false false false :; do
68167  . ./conf$$subs.sh ||
68168    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68169
68170  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
68171  if test $ac_delim_n = $ac_delim_num; then
68172    break
68173  elif $ac_last_try; then
68174    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68175  else
68176    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
68177  fi
68178done
68179rm -f conf$$subs.sh
68180
68181cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68182cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
68183_ACEOF
68184sed -n '
68185h
68186s/^/S["/; s/!.*/"]=/
68187p
68188g
68189s/^[^!]*!//
68190:repl
68191t repl
68192s/'"$ac_delim"'$//
68193t delim
68194:nl
68195h
68196s/\(.\{148\}\)..*/\1/
68197t more1
68198s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
68199p
68200n
68201b repl
68202:more1
68203s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68204p
68205g
68206s/.\{148\}//
68207t nl
68208:delim
68209h
68210s/\(.\{148\}\)..*/\1/
68211t more2
68212s/["\\]/\\&/g; s/^/"/; s/$/"/
68213p
68214b
68215:more2
68216s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68217p
68218g
68219s/.\{148\}//
68220t delim
68221' <conf$$subs.awk | sed '
68222/^[^""]/{
68223  N
68224  s/\n//
68225}
68226' >>$CONFIG_STATUS || ac_write_fail=1
68227rm -f conf$$subs.awk
68228cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68229_ACAWK
68230cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
68231  for (key in S) S_is_set[key] = 1
68232  FS = ""
68233
68234}
68235{
68236  line = $ 0
68237  nfields = split(line, field, "@")
68238  substed = 0
68239  len = length(field[1])
68240  for (i = 2; i < nfields; i++) {
68241    key = field[i]
68242    keylen = length(key)
68243    if (S_is_set[key]) {
68244      value = S[key]
68245      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
68246      len += length(value) + length(field[++i])
68247      substed = 1
68248    } else
68249      len += 1 + keylen
68250  }
68251
68252  print line
68253}
68254
68255_ACAWK
68256_ACEOF
68257cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68258if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
68259  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
68260else
68261  cat
68262fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
68263  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
68264_ACEOF
68265
68266# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
68267# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
68268# trailing colons and then remove the whole line if VPATH becomes empty
68269# (actually we leave an empty line to preserve line numbers).
68270if test "x$srcdir" = x.; then
68271  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
68272h
68273s///
68274s/^/:/
68275s/[	 ]*$/:/
68276s/:\$(srcdir):/:/g
68277s/:\${srcdir}:/:/g
68278s/:@srcdir@:/:/g
68279s/^:*//
68280s/:*$//
68281x
68282s/\(=[	 ]*\).*/\1/
68283G
68284s/\n//
68285s/^[^=]*=[	 ]*$//
68286}'
68287fi
68288
68289cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68290fi # test -n "$CONFIG_FILES"
68291
68292
68293eval set X "  :F $CONFIG_FILES      "
68294shift
68295for ac_tag
68296do
68297  case $ac_tag in
68298  :[FHLC]) ac_mode=$ac_tag; continue;;
68299  esac
68300  case $ac_mode$ac_tag in
68301  :[FHL]*:*);;
68302  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
68303  :[FH]-) ac_tag=-:-;;
68304  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
68305  esac
68306  ac_save_IFS=$IFS
68307  IFS=:
68308  set x $ac_tag
68309  IFS=$ac_save_IFS
68310  shift
68311  ac_file=$1
68312  shift
68313
68314  case $ac_mode in
68315  :L) ac_source=$1;;
68316  :[FH])
68317    ac_file_inputs=
68318    for ac_f
68319    do
68320      case $ac_f in
68321      -) ac_f="$ac_tmp/stdin";;
68322      *) # Look for the file first in the build tree, then in the source tree
68323	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
68324	 # because $ac_f cannot contain `:'.
68325	 test -f "$ac_f" ||
68326	   case $ac_f in
68327	   [\\/$]*) false;;
68328	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
68329	   esac ||
68330	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
68331      esac
68332      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
68333      as_fn_append ac_file_inputs " '$ac_f'"
68334    done
68335
68336    # Let's still pretend it is `configure' which instantiates (i.e., don't
68337    # use $as_me), people would be surprised to read:
68338    #    /* config.h.  Generated by config.status.  */
68339    configure_input='Generated from '`
68340	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
68341	`' by configure.'
68342    if test x"$ac_file" != x-; then
68343      configure_input="$ac_file.  $configure_input"
68344      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
68345$as_echo "$as_me: creating $ac_file" >&6;}
68346    fi
68347    # Neutralize special characters interpreted by sed in replacement strings.
68348    case $configure_input in #(
68349    *\&* | *\|* | *\\* )
68350       ac_sed_conf_input=`$as_echo "$configure_input" |
68351       sed 's/[\\\\&|]/\\\\&/g'`;; #(
68352    *) ac_sed_conf_input=$configure_input;;
68353    esac
68354
68355    case $ac_tag in
68356    *:-:* | *:-) cat >"$ac_tmp/stdin" \
68357      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68358    esac
68359    ;;
68360  esac
68361
68362  ac_dir=`$as_dirname -- "$ac_file" ||
68363$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68364	 X"$ac_file" : 'X\(//\)[^/]' \| \
68365	 X"$ac_file" : 'X\(//\)$' \| \
68366	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68367$as_echo X"$ac_file" |
68368    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68369	    s//\1/
68370	    q
68371	  }
68372	  /^X\(\/\/\)[^/].*/{
68373	    s//\1/
68374	    q
68375	  }
68376	  /^X\(\/\/\)$/{
68377	    s//\1/
68378	    q
68379	  }
68380	  /^X\(\/\).*/{
68381	    s//\1/
68382	    q
68383	  }
68384	  s/.*/./; q'`
68385  as_dir="$ac_dir"; as_fn_mkdir_p
68386  ac_builddir=.
68387
68388case "$ac_dir" in
68389.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68390*)
68391  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68392  # A ".." for each directory in $ac_dir_suffix.
68393  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68394  case $ac_top_builddir_sub in
68395  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68396  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68397  esac ;;
68398esac
68399ac_abs_top_builddir=$ac_pwd
68400ac_abs_builddir=$ac_pwd$ac_dir_suffix
68401# for backward compatibility:
68402ac_top_builddir=$ac_top_build_prefix
68403
68404case $srcdir in
68405  .)  # We are building in place.
68406    ac_srcdir=.
68407    ac_top_srcdir=$ac_top_builddir_sub
68408    ac_abs_top_srcdir=$ac_pwd ;;
68409  [\\/]* | ?:[\\/]* )  # Absolute name.
68410    ac_srcdir=$srcdir$ac_dir_suffix;
68411    ac_top_srcdir=$srcdir
68412    ac_abs_top_srcdir=$srcdir ;;
68413  *) # Relative name.
68414    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68415    ac_top_srcdir=$ac_top_build_prefix$srcdir
68416    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68417esac
68418ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68419
68420
68421  case $ac_mode in
68422  :F)
68423  #
68424  # CONFIG_FILE
68425  #
68426
68427_ACEOF
68428
68429cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68430# If the template does not know about datarootdir, expand it.
68431# FIXME: This hack should be removed a few years after 2.60.
68432ac_datarootdir_hack=; ac_datarootdir_seen=
68433ac_sed_dataroot='
68434/datarootdir/ {
68435  p
68436  q
68437}
68438/@datadir@/p
68439/@docdir@/p
68440/@infodir@/p
68441/@localedir@/p
68442/@mandir@/p'
68443case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68444*datarootdir*) ac_datarootdir_seen=yes;;
68445*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68446  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68447$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68448_ACEOF
68449cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68450  ac_datarootdir_hack='
68451  s&@datadir@&$datadir&g
68452  s&@docdir@&$docdir&g
68453  s&@infodir@&$infodir&g
68454  s&@localedir@&$localedir&g
68455  s&@mandir@&$mandir&g
68456  s&\\\${datarootdir}&$datarootdir&g' ;;
68457esac
68458_ACEOF
68459
68460# Neutralize VPATH when `$srcdir' = `.'.
68461# Shell code in configure.ac might set extrasub.
68462# FIXME: do we really want to maintain this feature?
68463cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68464ac_sed_extra="$ac_vpsub
68465$extrasub
68466_ACEOF
68467cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68468:t
68469/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68470s|@configure_input@|$ac_sed_conf_input|;t t
68471s&@top_builddir@&$ac_top_builddir_sub&;t t
68472s&@top_build_prefix@&$ac_top_build_prefix&;t t
68473s&@srcdir@&$ac_srcdir&;t t
68474s&@abs_srcdir@&$ac_abs_srcdir&;t t
68475s&@top_srcdir@&$ac_top_srcdir&;t t
68476s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68477s&@builddir@&$ac_builddir&;t t
68478s&@abs_builddir@&$ac_abs_builddir&;t t
68479s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68480$ac_datarootdir_hack
68481"
68482eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68483  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68484
68485test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68486  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68487  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68488      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68489  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68490which seems to be undefined.  Please make sure it is defined" >&5
68491$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68492which seems to be undefined.  Please make sure it is defined" >&2;}
68493
68494  rm -f "$ac_tmp/stdin"
68495  case $ac_file in
68496  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68497  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68498  esac \
68499  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68500 ;;
68501
68502
68503
68504  esac
68505
68506done # for ac_tag
68507
68508
68509as_fn_exit 0
68510_ACEOF
68511ac_clean_files=$ac_clean_files_save
68512
68513test $ac_write_fail = 0 ||
68514  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68515
68516
68517# configure is writing to config.log, and then calls config.status.
68518# config.status does its own redirection, appending to config.log.
68519# Unfortunately, on DOS this fails, as config.log is still kept open
68520# by configure, so config.status won't be able to write to it; its
68521# output is simply discarded.  So we exec the FD to /dev/null,
68522# effectively closing config.log, so it can be properly (re)opened and
68523# appended to by config.status.  When coming back to configure, we
68524# need to make the FD available again.
68525if test "$no_create" != yes; then
68526  ac_cs_success=:
68527  ac_config_status_args=
68528  test "$silent" = yes &&
68529    ac_config_status_args="$ac_config_status_args --quiet"
68530  exec 5>/dev/null
68531  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68532  exec 5>>config.log
68533  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68534  # would make configure fail if this is the last instruction.
68535  $ac_cs_success || as_fn_exit 1
68536fi
68537if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68538  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68539$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68540fi
68541
68542
68543# After AC_OUTPUT, we need to do final work
68544
68545
68546  # Try to move config.log (generated by autoconf) to the configure-support directory.
68547  if test -e ./config.log; then
68548    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68549  fi
68550
68551  # Rotate our log file (configure.log)
68552  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68553    $RM -f "$OUTPUT_ROOT/configure.log.old"
68554  fi
68555  if test -e "$OUTPUT_ROOT/configure.log"; then
68556    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68557  fi
68558
68559  # Move configure.log from current directory to the build output root
68560  if test -e ./configure.log; then
68561    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68562  fi
68563
68564  # Make the compare script executable
68565  $CHMOD +x $OUTPUT_ROOT/compare.sh
68566
68567
68568# Finally output some useful information to the user
68569
68570  # Finally output some useful information to the user
68571
68572  printf "\n"
68573  printf "====================================================\n"
68574  if test "x$no_create" != "xyes"; then
68575    if test "x$IS_RECONFIGURE" != "xyes"; then
68576      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68577    else
68578      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68579    fi
68580  else
68581    if test "x$IS_RECONFIGURE" != "xyes"; then
68582      printf "A configuration has been successfully checked but not created\n"
68583    else
68584      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68585    fi
68586  fi
68587  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68588    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68589  else
68590    printf "using default settings.\n"
68591  fi
68592
68593  printf "\n"
68594  printf "Configuration summary:\n"
68595  printf "* Debug level:    $DEBUG_LEVEL\n"
68596  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68597  printf "* JDK variant:    $JDK_VARIANT\n"
68598  printf "* JVM variants:   $JVM_VARIANTS\n"
68599  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68600  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68601
68602  printf "\n"
68603  printf "Tools summary:\n"
68604  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68605    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68606  fi
68607  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68608  if test "x$TOOLCHAIN_VERSION" != "x"; then
68609    print_version=" $TOOLCHAIN_VERSION"
68610  fi
68611  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68612  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68613  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68614
68615  printf "\n"
68616  printf "Build performance summary:\n"
68617  printf "* Cores to use:   $JOBS\n"
68618  printf "* Memory limit:   $MEMORY_SIZE MB\n"
68619  if test "x$CCACHE_STATUS" != "x"; then
68620    printf "* ccache status:  $CCACHE_STATUS\n"
68621  fi
68622  printf "\n"
68623
68624  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68625    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68626    printf "will result in longer build times.\n"
68627    printf "\n"
68628  fi
68629
68630  if test "x$FOUND_ALT_VARIABLES" != "x"; then
68631    printf "WARNING: You have old-style ALT_ environment variables set.\n"
68632    printf "These are not respected, and will be ignored. It is recommended\n"
68633    printf "that you clean your environment. The following variables are set:\n"
68634    printf "$FOUND_ALT_VARIABLES\n"
68635    printf "\n"
68636  fi
68637
68638  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68639    printf "WARNING: Your build output directory is not on a local disk.\n"
68640    printf "This will severely degrade build performance!\n"
68641    printf "It is recommended that you create an output directory on a local disk,\n"
68642    printf "and run the configure script again from that directory.\n"
68643    printf "\n"
68644  fi
68645
68646  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68647    printf "WARNING: The result of this configuration has overridden an older\n"
68648    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68649    printf "proper build. Failure to do so might result in strange build problems.\n"
68650    printf "\n"
68651  fi
68652
68653  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68654    printf "WARNING: The result of this configuration was not saved.\n"
68655    printf "You should run without '--no-create | -n' to create the configuration.\n"
68656    printf "\n"
68657  fi
68658
68659
68660
68661  # Locate config.log.
68662  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
68663    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
68664  elif test -e "./config.log"; then
68665    CONFIG_LOG_PATH="."
68666  fi
68667
68668  if test -e "$CONFIG_LOG_PATH/config.log"; then
68669    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
68670    if test $? -eq 0; then
68671      printf "The following warnings were produced. Repeated here for convenience:\n"
68672      # We must quote sed expression (using []) to stop m4 from eating the [].
68673      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
68674      printf "\n"
68675    fi
68676  fi
68677
68678