generated-configure.sh revision 2761:d51f7271f795
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657VALID_JVM_FEATURES
658JVM_FEATURES_custom
659JVM_FEATURES_zeroshark
660JVM_FEATURES_zero
661JVM_FEATURES_minimal
662JVM_FEATURES_core
663JVM_FEATURES_client
664JVM_FEATURES_server
665INCLUDE_GRAAL
666STLPORT_LIB
667LIBZIP_CAN_USE_MMAP
668LIBDL
669LIBM
670USE_EXTERNAL_LCMS
671LCMS_LIBS
672LCMS_CFLAGS
673USE_EXTERNAL_LIBZ
674USE_EXTERNAL_LIBPNG
675PNG_LIBS
676PNG_CFLAGS
677USE_EXTERNAL_LIBGIF
678USE_EXTERNAL_LIBJPEG
679LLVM_LIBS
680LLVM_LDFLAGS
681LLVM_CFLAGS
682LLVM_CONFIG
683LIBFFI_LIB_FILE
684ENABLE_LIBFFI_BUNDLING
685LIBFFI_LIBS
686LIBFFI_CFLAGS
687ALSA_LIBS
688ALSA_CFLAGS
689FREETYPE_LICENSE
690FREETYPE_BUNDLE_LIB_PATH
691FREETYPE_LIBS
692FREETYPE_CFLAGS
693CUPS_CFLAGS
694X_EXTRA_LIBS
695X_LIBS
696X_PRE_LIBS
697X_CFLAGS
698XMKMF
699MSVCP_DLL
700MSVCR_DLL
701LIBCXX
702FIXPATH_DETACH_FLAG
703FIXPATH
704BUILD_GTEST
705ENABLE_AOT
706GCOV_ENABLED
707ZIP_EXTERNAL_DEBUG_SYMBOLS
708COPY_DEBUG_SYMBOLS
709COMPILE_WITH_DEBUG_SYMBOLS
710CFLAGS_WARNINGS_ARE_ERRORS
711BUILD_CC_DISABLE_WARNING_PREFIX
712DISABLE_WARNING_PREFIX
713WARNINGS_AS_ERRORS
714COMPILER_SUPPORTS_TARGET_BITS_FLAG
715LDFLAGS_TESTEXE
716LDFLAGS_TESTLIB
717CXXFLAGS_TESTEXE
718CXXFLAGS_TESTLIB
719CFLAGS_TESTEXE
720CFLAGS_TESTLIB
721OPENJDK_BUILD_JVM_LIBS
722OPENJDK_BUILD_JVM_ASFLAGS
723OPENJDK_BUILD_JVM_LDFLAGS
724OPENJDK_BUILD_JVM_CFLAGS
725OPENJDK_BUILD_LDFLAGS_HASH_STYLE
726OPENJDK_BUILD_LDFLAGS_CXX_JDK
727OPENJDK_BUILD_JDKEXE_LIBS
728OPENJDK_BUILD_JDKLIB_LIBS
729OPENJDK_BUILD_LDFLAGS_JDKEXE
730OPENJDK_BUILD_LDFLAGS_JDKLIB
731OPENJDK_BUILD_CXXFLAGS_JDKEXE
732OPENJDK_BUILD_CXXFLAGS_JDKLIB
733OPENJDK_BUILD_CFLAGS_JDKEXE
734OPENJDK_BUILD_CFLAGS_JDKLIB
735OPENJDK_BUILD_CXXSTD_CXXFLAG
736JVM_LIBS
737JVM_ASFLAGS
738JVM_LDFLAGS
739JVM_CFLAGS
740LDFLAGS_HASH_STYLE
741LDFLAGS_CXX_JDK
742JDKEXE_LIBS
743JDKLIB_LIBS
744LDFLAGS_JDKEXE
745LDFLAGS_JDKLIB
746CXXFLAGS_JDKEXE
747CXXFLAGS_JDKLIB
748CFLAGS_JDKEXE
749CFLAGS_JDKLIB
750MACOSX_VERSION_MAX
751MACOSX_VERSION_MIN
752CXXSTD_CXXFLAG
753JDK_ARCH_ABI_PROP_NAME
754CXX_O_FLAG_SIZE
755CXX_O_FLAG_NONE
756CXX_O_FLAG_DEBUG
757CXX_O_FLAG_NORM
758CXX_O_FLAG_HI
759CXX_O_FLAG_HIGHEST
760CXX_O_FLAG_HIGHEST_JVM
761C_O_FLAG_SIZE
762C_O_FLAG_NONE
763C_O_FLAG_DEBUG
764C_O_FLAG_NORM
765C_O_FLAG_HI
766C_O_FLAG_HIGHEST
767C_O_FLAG_HIGHEST_JVM
768JVM_CFLAGS_SYMBOLS
769CXXFLAGS_DEBUG_SYMBOLS
770CFLAGS_DEBUG_SYMBOLS
771CXX_FLAG_DEPS
772C_FLAG_DEPS
773SHARED_LIBRARY_FLAGS
774SET_SHARED_LIBRARY_MAPFILE
775SET_SHARED_LIBRARY_NAME
776SET_SHARED_LIBRARY_ORIGIN
777SET_EXECUTABLE_ORIGIN
778CXX_FLAG_REORDER
779C_FLAG_REORDER
780JVM_RCFLAGS
781RC_FLAGS
782AR_OUT_OPTION
783LD_OUT_OPTION
784EXE_OUT_OPTION
785CC_OUT_OPTION
786STRIPFLAGS
787ARFLAGS
788COMPILER_BINDCMD_FILE_FLAG
789COMPILER_COMMAND_FILE_FLAG
790COMPILER_TARGET_BITS_FLAG
791JIB_JAR
792JT_HOME
793JTREGEXE
794HOTSPOT_TOOLCHAIN_TYPE
795USING_BROKEN_SUSE_LD
796PACKAGE_PATH
797BUILD_AS
798BUILD_LDCXX
799BUILD_LD
800BUILD_STRIP
801BUILD_OBJCOPY
802BUILD_AR
803BUILD_NM
804BUILD_CXX
805BUILD_CC
806BUILD_SYSROOT_LDFLAGS
807BUILD_SYSROOT_CFLAGS
808ac_ct_OBJDUMP
809OBJDUMP
810ac_ct_OBJCOPY
811OBJCOPY
812ac_ct_NM
813ac_ct_STRIP
814GNM
815NM
816STRIP
817MSBUILD
818DUMPBIN
819RC
820MT
821LIPO
822ac_ct_AR
823AR
824AS
825LDCXX
826LD
827CXXCPP
828CPP
829CXX_VERSION_NUMBER
830CC_VERSION_NUMBER
831ac_ct_CXX
832CXXFLAGS
833CXX
834TOOLCHAIN_PATH_CXX
835POTENTIAL_CXX
836OBJEXT
837EXEEXT
838ac_ct_CC
839CPPFLAGS
840LDFLAGS
841CFLAGS
842CC
843TOOLCHAIN_PATH_CC
844POTENTIAL_CC
845TOOLCHAIN_VERSION
846VS_LIB
847VS_INCLUDE
848VS_PATH
849CYGWIN_LINK
850SYSROOT_LDFLAGS
851SYSROOT_CFLAGS
852EXTRA_LDFLAGS
853EXTRA_CXXFLAGS
854EXTRA_CFLAGS
855EXE_SUFFIX
856OBJ_SUFFIX
857STATIC_LIBRARY
858SHARED_LIBRARY
859STATIC_LIBRARY_SUFFIX
860SHARED_LIBRARY_SUFFIX
861LIBRARY_PREFIX
862TOOLCHAIN_TYPE
863STATIC_BUILD
864IMPORT_MODULES_MAKE
865IMPORT_MODULES_SRC
866IMPORT_MODULES_MAN
867IMPORT_MODULES_LEGAL
868IMPORT_MODULES_CONF
869IMPORT_MODULES_LIBS
870IMPORT_MODULES_CMDS
871IMPORT_MODULES_CLASSES
872BUILD_OUTPUT
873JDK_TOPDIR
874NASHORN_TOPDIR
875HOTSPOT_TOPDIR
876JAXWS_TOPDIR
877JAXP_TOPDIR
878CORBA_TOPDIR
879LANGTOOLS_TOPDIR
880EXTERNAL_BUILDJDK
881BUILD_JDK
882CREATE_BUILDJDK
883JLINK
884JMOD
885JAVAC_FLAGS
886BOOT_JDK_MODULAR
887BOOT_JDK_SOURCETARGET
888JARSIGNER
889JAR
890JAVAH
891JAVAC
892JAVA
893BOOT_JDK
894JAVA_CHECK
895JAVAC_CHECK
896VERSION_IS_GA
897VERSION_SHORT
898VERSION_STRING
899VERSION_NUMBER_FOUR_POSITIONS
900VERSION_NUMBER
901VERSION_OPT
902VERSION_BUILD
903VERSION_PRE
904VERSION_PATCH
905VERSION_SECURITY
906VERSION_MINOR
907VERSION_MAJOR
908MACOSX_BUNDLE_ID_BASE
909MACOSX_BUNDLE_NAME_BASE
910HOTSPOT_VM_DISTRO
911COMPANY_NAME
912JDK_RC_PLATFORM_NAME
913PRODUCT_SUFFIX
914PRODUCT_NAME
915LAUNCHER_NAME
916JLINK_KEEP_PACKAGED_MODULES
917COPYRIGHT_YEAR
918COMPRESS_JARS
919INCLUDE_SA
920UNLIMITED_CRYPTO
921CACERTS_FILE
922ENABLE_FULL_DOCS
923ENABLE_HEADLESS_ONLY
924DEFAULT_MAKE_TARGET
925OS_VERSION_MICRO
926OS_VERSION_MINOR
927OS_VERSION_MAJOR
928PKG_CONFIG
929BASH_ARGS
930SETFILE
931CODESIGN
932XATTR
933DSYMUTIL
934IS_GNU_TIME
935PATCH
936DTRACE
937FLOCK
938TIME
939STAT
940HG
941DOT
942READELF
943OTOOL
944LDD
945ZIPEXE
946UNZIP
947TAR_SUPPORTS_TRANSFORM
948TAR_INCLUDE_PARAM
949TAR_CREATE_EXTRA_PARAM
950TAR_TYPE
951FIND_DELETE
952OUTPUT_SYNC
953OUTPUT_SYNC_SUPPORTED
954CHECK_TOOLSDIR_MAKE
955CHECK_TOOLSDIR_GMAKE
956CHECK_MAKE
957CHECK_GMAKE
958MAKE
959PKGHANDLER
960CONFIGURESUPPORT_OUTPUTDIR
961OUTPUT_ROOT
962CONF_NAME
963SPEC
964SDKROOT
965XCODEBUILD
966JVM_VARIANT_MAIN
967VALID_JVM_VARIANTS
968JVM_VARIANTS
969DEBUG_LEVEL
970HOTSPOT_DEBUG_LEVEL
971JDK_VARIANT
972USERNAME
973CANONICAL_TOPDIR
974ORIGINAL_TOPDIR
975TOPDIR
976PATH_SEP
977HOTSPOT_BUILD_CPU_DEFINE
978HOTSPOT_BUILD_CPU_ARCH
979HOTSPOT_BUILD_CPU
980HOTSPOT_BUILD_OS_TYPE
981HOTSPOT_BUILD_OS
982OPENJDK_BUILD_BUNDLE_PLATFORM
983OPENJDK_BUILD_OS_EXPORT_DIR
984OPENJDK_BUILD_CPU_OSARCH
985OPENJDK_BUILD_CPU_ISADIR
986OPENJDK_BUILD_CPU_LEGACY_LIB
987OPENJDK_BUILD_CPU_LEGACY
988HOTSPOT_TARGET_CPU_DEFINE
989HOTSPOT_TARGET_CPU_ARCH
990HOTSPOT_TARGET_CPU
991HOTSPOT_TARGET_OS_TYPE
992HOTSPOT_TARGET_OS
993DEFINE_CROSS_COMPILE_ARCH
994OPENJDK_TARGET_BUNDLE_PLATFORM
995OPENJDK_TARGET_OS_EXPORT_DIR
996OPENJDK_TARGET_CPU_OSARCH
997OPENJDK_TARGET_CPU_ISADIR
998OPENJDK_TARGET_CPU_LEGACY_LIB
999OPENJDK_TARGET_CPU_LEGACY
1000RELEASE_FILE_OS_ARCH
1001RELEASE_FILE_OS_NAME
1002OPENJDK_MODULE_TARGET_PLATFORM
1003COMPILE_TYPE
1004OPENJDK_TARGET_CPU_ENDIAN
1005OPENJDK_TARGET_CPU_BITS
1006OPENJDK_TARGET_CPU_ARCH
1007OPENJDK_TARGET_CPU
1008OPENJDK_TARGET_OS_ENV
1009OPENJDK_TARGET_OS_TYPE
1010OPENJDK_TARGET_OS
1011OPENJDK_BUILD_CPU_ENDIAN
1012OPENJDK_BUILD_CPU_BITS
1013OPENJDK_BUILD_CPU_ARCH
1014OPENJDK_BUILD_CPU
1015OPENJDK_BUILD_OS_ENV
1016OPENJDK_BUILD_OS_TYPE
1017OPENJDK_BUILD_OS
1018OPENJDK_BUILD_AUTOCONF_NAME
1019OPENJDK_TARGET_AUTOCONF_NAME
1020target_os
1021target_vendor
1022target_cpu
1023target
1024host_os
1025host_vendor
1026host_cpu
1027host
1028build_os
1029build_vendor
1030build_cpu
1031build
1032PANDOC
1033NICE
1034CPIO
1035DF
1036READLINK
1037CYGPATH
1038SED
1039FGREP
1040EGREP
1041GREP
1042AWK
1043XARGS
1044WHICH
1045WC
1046UNIQ
1047UNAME
1048TR
1049TOUCH
1050TEE
1051TAR
1052TAIL
1053SORT
1054SH
1055RMDIR
1056RM
1057PRINTF
1058NAWK
1059MV
1060MKTEMP
1061MKDIR
1062LS
1063LN
1064GZIP
1065GUNZIP
1066HEAD
1067FIND
1068FILE
1069EXPR
1070ECHO
1071DIRNAME
1072DIFF
1073DATE
1074CUT
1075CP
1076COMM
1077CMP
1078CHMOD
1079CAT
1080BASH
1081BASENAME
1082DATE_WHEN_CONFIGURED
1083ORIGINAL_PATH
1084CONFIGURE_COMMAND_LINE
1085target_alias
1086host_alias
1087build_alias
1088LIBS
1089ECHO_T
1090ECHO_N
1091ECHO_C
1092DEFS
1093mandir
1094localedir
1095libdir
1096psdir
1097pdfdir
1098dvidir
1099htmldir
1100infodir
1101docdir
1102oldincludedir
1103includedir
1104localstatedir
1105sharedstatedir
1106sysconfdir
1107datadir
1108datarootdir
1109libexecdir
1110sbindir
1111bindir
1112program_transform_name
1113prefix
1114exec_prefix
1115PACKAGE_URL
1116PACKAGE_BUGREPORT
1117PACKAGE_STRING
1118PACKAGE_VERSION
1119PACKAGE_TARNAME
1120PACKAGE_NAME
1121PATH_SEPARATOR
1122SHELL'
1123ac_subst_files=''
1124ac_user_opts='
1125enable_option_checking
1126with_target_bits
1127enable_openjdk_only
1128with_custom_make_dir
1129with_jdk_variant
1130enable_debug
1131with_debug_level
1132with_jvm_variants
1133with_cpu_port
1134with_devkit
1135with_sys_root
1136with_sysroot
1137with_tools_dir
1138with_toolchain_path
1139with_extra_path
1140with_sdk_name
1141with_conf_name
1142with_output_sync
1143with_default_make_target
1144enable_headless_only
1145enable_full_docs
1146with_cacerts_file
1147enable_unlimited_crypto
1148with_copyright_year
1149enable_keep_packaged_modules
1150with_milestone
1151with_update_version
1152with_user_release_suffix
1153with_build_number
1154with_version_string
1155with_version_pre
1156with_version_opt
1157with_version_build
1158with_version_major
1159with_version_minor
1160with_version_security
1161with_version_patch
1162with_boot_jdk
1163with_build_jdk
1164with_add_source_root
1165with_override_source_root
1166with_adds_and_overrides
1167with_override_langtools
1168with_override_corba
1169with_override_jaxp
1170with_override_jaxws
1171with_override_hotspot
1172with_override_nashorn
1173with_override_jdk
1174with_import_hotspot
1175with_import_modules
1176enable_static_build
1177with_toolchain_type
1178with_extra_cflags
1179with_extra_cxxflags
1180with_extra_ldflags
1181with_toolchain_version
1182with_build_devkit
1183with_jtreg
1184with_jib
1185with_abi_profile
1186with_macosx_version_max
1187enable_warnings_as_errors
1188with_native_debug_symbols
1189enable_debug_symbols
1190enable_zip_debug_info
1191enable_native_coverage
1192enable_dtrace
1193enable_aot
1194enable_hotspot_gtest
1195with_stdc__lib
1196with_msvcr_dll
1197with_msvcp_dll
1198with_x
1199with_cups
1200with_cups_include
1201with_freetype
1202with_freetype_include
1203with_freetype_lib
1204with_freetype_src
1205enable_freetype_bundling
1206with_freetype_license
1207with_alsa
1208with_alsa_include
1209with_alsa_lib
1210with_libffi
1211with_libffi_include
1212with_libffi_lib
1213enable_libffi_bundling
1214with_libjpeg
1215with_giflib
1216with_libpng
1217with_zlib
1218with_lcms
1219with_dxsdk
1220with_dxsdk_lib
1221with_dxsdk_include
1222with_jvm_features
1223with_jvm_interpreter
1224enable_jtreg_failure_handler
1225enable_generate_classlist
1226with_num_cores
1227with_memory_size
1228with_jobs
1229with_test_jobs
1230with_boot_jdk_jvmargs
1231with_sjavac_server_java
1232enable_sjavac
1233enable_javac_server
1234enable_icecc
1235enable_precompiled_headers
1236enable_ccache
1237with_ccache_dir
1238'
1239      ac_precious_vars='build_alias
1240host_alias
1241target_alias
1242BASENAME
1243BASH
1244CAT
1245CHMOD
1246CMP
1247COMM
1248CP
1249CUT
1250DATE
1251DIFF
1252DIRNAME
1253ECHO
1254EXPR
1255FILE
1256FIND
1257HEAD
1258GUNZIP
1259GZIP
1260LN
1261LS
1262MKDIR
1263MKTEMP
1264MV
1265NAWK
1266PRINTF
1267RM
1268RMDIR
1269SH
1270SORT
1271TAIL
1272TAR
1273TEE
1274TOUCH
1275TR
1276UNAME
1277UNIQ
1278WC
1279WHICH
1280XARGS
1281AWK
1282GREP
1283EGREP
1284FGREP
1285SED
1286CYGPATH
1287READLINK
1288DF
1289CPIO
1290NICE
1291PANDOC
1292MAKE
1293UNZIP
1294ZIPEXE
1295LDD
1296OTOOL
1297READELF
1298DOT
1299HG
1300STAT
1301TIME
1302FLOCK
1303DTRACE
1304PATCH
1305DSYMUTIL
1306XATTR
1307CODESIGN
1308SETFILE
1309PKG_CONFIG
1310JAVA
1311JAVAC
1312JAVAH
1313JAR
1314JARSIGNER
1315CC
1316CFLAGS
1317LDFLAGS
1318LIBS
1319CPPFLAGS
1320CXX
1321CXXFLAGS
1322CCC
1323CPP
1324CXXCPP
1325AS
1326AR
1327LIPO
1328STRIP
1329NM
1330GNM
1331OBJCOPY
1332OBJDUMP
1333BUILD_CC
1334BUILD_CXX
1335BUILD_NM
1336BUILD_AR
1337BUILD_OBJCOPY
1338BUILD_STRIP
1339JTREGEXE
1340XMKMF
1341FREETYPE_CFLAGS
1342FREETYPE_LIBS
1343ALSA_CFLAGS
1344ALSA_LIBS
1345LIBFFI_CFLAGS
1346LIBFFI_LIBS
1347PNG_CFLAGS
1348PNG_LIBS
1349LCMS_CFLAGS
1350LCMS_LIBS
1351ICECC_CMD
1352ICECC_CREATE_ENV
1353ICECC_WRAPPER
1354CCACHE'
1355
1356
1357# Initialize some variables set by options.
1358ac_init_help=
1359ac_init_version=false
1360ac_unrecognized_opts=
1361ac_unrecognized_sep=
1362# The variables have the same names as the options, with
1363# dashes changed to underlines.
1364cache_file=/dev/null
1365exec_prefix=NONE
1366no_create=
1367no_recursion=
1368prefix=NONE
1369program_prefix=NONE
1370program_suffix=NONE
1371program_transform_name=s,x,x,
1372silent=
1373site=
1374srcdir=
1375verbose=
1376x_includes=NONE
1377x_libraries=NONE
1378
1379# Installation directory options.
1380# These are left unexpanded so users can "make install exec_prefix=/foo"
1381# and all the variables that are supposed to be based on exec_prefix
1382# by default will actually change.
1383# Use braces instead of parens because sh, perl, etc. also accept them.
1384# (The list follows the same order as the GNU Coding Standards.)
1385bindir='${exec_prefix}/bin'
1386sbindir='${exec_prefix}/sbin'
1387libexecdir='${exec_prefix}/libexec'
1388datarootdir='${prefix}/share'
1389datadir='${datarootdir}'
1390sysconfdir='${prefix}/etc'
1391sharedstatedir='${prefix}/com'
1392localstatedir='${prefix}/var'
1393includedir='${prefix}/include'
1394oldincludedir='/usr/include'
1395docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1396infodir='${datarootdir}/info'
1397htmldir='${docdir}'
1398dvidir='${docdir}'
1399pdfdir='${docdir}'
1400psdir='${docdir}'
1401libdir='${exec_prefix}/lib'
1402localedir='${datarootdir}/locale'
1403mandir='${datarootdir}/man'
1404
1405ac_prev=
1406ac_dashdash=
1407for ac_option
1408do
1409  # If the previous option needs an argument, assign it.
1410  if test -n "$ac_prev"; then
1411    eval $ac_prev=\$ac_option
1412    ac_prev=
1413    continue
1414  fi
1415
1416  case $ac_option in
1417  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1418  *=)   ac_optarg= ;;
1419  *)    ac_optarg=yes ;;
1420  esac
1421
1422  # Accept the important Cygnus configure options, so we can diagnose typos.
1423
1424  case $ac_dashdash$ac_option in
1425  --)
1426    ac_dashdash=yes ;;
1427
1428  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1429    ac_prev=bindir ;;
1430  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1431    bindir=$ac_optarg ;;
1432
1433  -build | --build | --buil | --bui | --bu)
1434    ac_prev=build_alias ;;
1435  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1436    build_alias=$ac_optarg ;;
1437
1438  -cache-file | --cache-file | --cache-fil | --cache-fi \
1439  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1440    ac_prev=cache_file ;;
1441  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1442  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1443    cache_file=$ac_optarg ;;
1444
1445  --config-cache | -C)
1446    cache_file=config.cache ;;
1447
1448  -datadir | --datadir | --datadi | --datad)
1449    ac_prev=datadir ;;
1450  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1451    datadir=$ac_optarg ;;
1452
1453  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1454  | --dataroo | --dataro | --datar)
1455    ac_prev=datarootdir ;;
1456  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1457  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1458    datarootdir=$ac_optarg ;;
1459
1460  -disable-* | --disable-*)
1461    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1462    # Reject names that are not valid shell variable names.
1463    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1464      as_fn_error $? "invalid feature name: $ac_useropt"
1465    ac_useropt_orig=$ac_useropt
1466    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1467    case $ac_user_opts in
1468      *"
1469"enable_$ac_useropt"
1470"*) ;;
1471      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1472	 ac_unrecognized_sep=', ';;
1473    esac
1474    eval enable_$ac_useropt=no ;;
1475
1476  -docdir | --docdir | --docdi | --doc | --do)
1477    ac_prev=docdir ;;
1478  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1479    docdir=$ac_optarg ;;
1480
1481  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1482    ac_prev=dvidir ;;
1483  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1484    dvidir=$ac_optarg ;;
1485
1486  -enable-* | --enable-*)
1487    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1488    # Reject names that are not valid shell variable names.
1489    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1490      as_fn_error $? "invalid feature name: $ac_useropt"
1491    ac_useropt_orig=$ac_useropt
1492    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1493    case $ac_user_opts in
1494      *"
1495"enable_$ac_useropt"
1496"*) ;;
1497      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1498	 ac_unrecognized_sep=', ';;
1499    esac
1500    eval enable_$ac_useropt=\$ac_optarg ;;
1501
1502  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1503  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1504  | --exec | --exe | --ex)
1505    ac_prev=exec_prefix ;;
1506  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1507  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1508  | --exec=* | --exe=* | --ex=*)
1509    exec_prefix=$ac_optarg ;;
1510
1511  -gas | --gas | --ga | --g)
1512    # Obsolete; use --with-gas.
1513    with_gas=yes ;;
1514
1515  -help | --help | --hel | --he | -h)
1516    ac_init_help=long ;;
1517  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1518    ac_init_help=recursive ;;
1519  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1520    ac_init_help=short ;;
1521
1522  -host | --host | --hos | --ho)
1523    ac_prev=host_alias ;;
1524  -host=* | --host=* | --hos=* | --ho=*)
1525    host_alias=$ac_optarg ;;
1526
1527  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1528    ac_prev=htmldir ;;
1529  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1530  | --ht=*)
1531    htmldir=$ac_optarg ;;
1532
1533  -includedir | --includedir | --includedi | --included | --include \
1534  | --includ | --inclu | --incl | --inc)
1535    ac_prev=includedir ;;
1536  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1537  | --includ=* | --inclu=* | --incl=* | --inc=*)
1538    includedir=$ac_optarg ;;
1539
1540  -infodir | --infodir | --infodi | --infod | --info | --inf)
1541    ac_prev=infodir ;;
1542  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1543    infodir=$ac_optarg ;;
1544
1545  -libdir | --libdir | --libdi | --libd)
1546    ac_prev=libdir ;;
1547  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1548    libdir=$ac_optarg ;;
1549
1550  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1551  | --libexe | --libex | --libe)
1552    ac_prev=libexecdir ;;
1553  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1554  | --libexe=* | --libex=* | --libe=*)
1555    libexecdir=$ac_optarg ;;
1556
1557  -localedir | --localedir | --localedi | --localed | --locale)
1558    ac_prev=localedir ;;
1559  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1560    localedir=$ac_optarg ;;
1561
1562  -localstatedir | --localstatedir | --localstatedi | --localstated \
1563  | --localstate | --localstat | --localsta | --localst | --locals)
1564    ac_prev=localstatedir ;;
1565  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1566  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1567    localstatedir=$ac_optarg ;;
1568
1569  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1570    ac_prev=mandir ;;
1571  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1572    mandir=$ac_optarg ;;
1573
1574  -nfp | --nfp | --nf)
1575    # Obsolete; use --without-fp.
1576    with_fp=no ;;
1577
1578  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1579  | --no-cr | --no-c | -n)
1580    no_create=yes ;;
1581
1582  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1583  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1584    no_recursion=yes ;;
1585
1586  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1587  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1588  | --oldin | --oldi | --old | --ol | --o)
1589    ac_prev=oldincludedir ;;
1590  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1591  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1592  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1593    oldincludedir=$ac_optarg ;;
1594
1595  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1596    ac_prev=prefix ;;
1597  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1598    prefix=$ac_optarg ;;
1599
1600  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1601  | --program-pre | --program-pr | --program-p)
1602    ac_prev=program_prefix ;;
1603  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1604  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1605    program_prefix=$ac_optarg ;;
1606
1607  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1608  | --program-suf | --program-su | --program-s)
1609    ac_prev=program_suffix ;;
1610  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1611  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1612    program_suffix=$ac_optarg ;;
1613
1614  -program-transform-name | --program-transform-name \
1615  | --program-transform-nam | --program-transform-na \
1616  | --program-transform-n | --program-transform- \
1617  | --program-transform | --program-transfor \
1618  | --program-transfo | --program-transf \
1619  | --program-trans | --program-tran \
1620  | --progr-tra | --program-tr | --program-t)
1621    ac_prev=program_transform_name ;;
1622  -program-transform-name=* | --program-transform-name=* \
1623  | --program-transform-nam=* | --program-transform-na=* \
1624  | --program-transform-n=* | --program-transform-=* \
1625  | --program-transform=* | --program-transfor=* \
1626  | --program-transfo=* | --program-transf=* \
1627  | --program-trans=* | --program-tran=* \
1628  | --progr-tra=* | --program-tr=* | --program-t=*)
1629    program_transform_name=$ac_optarg ;;
1630
1631  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1632    ac_prev=pdfdir ;;
1633  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1634    pdfdir=$ac_optarg ;;
1635
1636  -psdir | --psdir | --psdi | --psd | --ps)
1637    ac_prev=psdir ;;
1638  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1639    psdir=$ac_optarg ;;
1640
1641  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1642  | -silent | --silent | --silen | --sile | --sil)
1643    silent=yes ;;
1644
1645  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1646    ac_prev=sbindir ;;
1647  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1648  | --sbi=* | --sb=*)
1649    sbindir=$ac_optarg ;;
1650
1651  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1652  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1653  | --sharedst | --shareds | --shared | --share | --shar \
1654  | --sha | --sh)
1655    ac_prev=sharedstatedir ;;
1656  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1657  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1658  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1659  | --sha=* | --sh=*)
1660    sharedstatedir=$ac_optarg ;;
1661
1662  -site | --site | --sit)
1663    ac_prev=site ;;
1664  -site=* | --site=* | --sit=*)
1665    site=$ac_optarg ;;
1666
1667  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1668    ac_prev=srcdir ;;
1669  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1670    srcdir=$ac_optarg ;;
1671
1672  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1673  | --syscon | --sysco | --sysc | --sys | --sy)
1674    ac_prev=sysconfdir ;;
1675  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1676  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1677    sysconfdir=$ac_optarg ;;
1678
1679  -target | --target | --targe | --targ | --tar | --ta | --t)
1680    ac_prev=target_alias ;;
1681  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1682    target_alias=$ac_optarg ;;
1683
1684  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1685    verbose=yes ;;
1686
1687  -version | --version | --versio | --versi | --vers | -V)
1688    ac_init_version=: ;;
1689
1690  -with-* | --with-*)
1691    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1692    # Reject names that are not valid shell variable names.
1693    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1694      as_fn_error $? "invalid package name: $ac_useropt"
1695    ac_useropt_orig=$ac_useropt
1696    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1697    case $ac_user_opts in
1698      *"
1699"with_$ac_useropt"
1700"*) ;;
1701      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1702	 ac_unrecognized_sep=', ';;
1703    esac
1704    eval with_$ac_useropt=\$ac_optarg ;;
1705
1706  -without-* | --without-*)
1707    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1708    # Reject names that are not valid shell variable names.
1709    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1710      as_fn_error $? "invalid package name: $ac_useropt"
1711    ac_useropt_orig=$ac_useropt
1712    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1713    case $ac_user_opts in
1714      *"
1715"with_$ac_useropt"
1716"*) ;;
1717      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1718	 ac_unrecognized_sep=', ';;
1719    esac
1720    eval with_$ac_useropt=no ;;
1721
1722  --x)
1723    # Obsolete; use --with-x.
1724    with_x=yes ;;
1725
1726  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1727  | --x-incl | --x-inc | --x-in | --x-i)
1728    ac_prev=x_includes ;;
1729  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1730  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1731    x_includes=$ac_optarg ;;
1732
1733  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1734  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1735    ac_prev=x_libraries ;;
1736  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1737  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1738    x_libraries=$ac_optarg ;;
1739
1740  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1741Try \`$0 --help' for more information"
1742    ;;
1743
1744  *=*)
1745    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1746    # Reject names that are not valid shell variable names.
1747    case $ac_envvar in #(
1748      '' | [0-9]* | *[!_$as_cr_alnum]* )
1749      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1750    esac
1751    eval $ac_envvar=\$ac_optarg
1752    export $ac_envvar ;;
1753
1754  *)
1755    # FIXME: should be removed in autoconf 3.0.
1756    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1757    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1758      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1759    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1760    ;;
1761
1762  esac
1763done
1764
1765if test -n "$ac_prev"; then
1766  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1767  as_fn_error $? "missing argument to $ac_option"
1768fi
1769
1770if test -n "$ac_unrecognized_opts"; then
1771  case $enable_option_checking in
1772    no) ;;
1773    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1774    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1775  esac
1776fi
1777
1778# Check all directory arguments for consistency.
1779for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1780		datadir sysconfdir sharedstatedir localstatedir includedir \
1781		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1782		libdir localedir mandir
1783do
1784  eval ac_val=\$$ac_var
1785  # Remove trailing slashes.
1786  case $ac_val in
1787    */ )
1788      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1789      eval $ac_var=\$ac_val;;
1790  esac
1791  # Be sure to have absolute directory names.
1792  case $ac_val in
1793    [\\/$]* | ?:[\\/]* )  continue;;
1794    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1795  esac
1796  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1797done
1798
1799# There might be people who depend on the old broken behavior: `$host'
1800# used to hold the argument of --host etc.
1801# FIXME: To remove some day.
1802build=$build_alias
1803host=$host_alias
1804target=$target_alias
1805
1806# FIXME: To remove some day.
1807if test "x$host_alias" != x; then
1808  if test "x$build_alias" = x; then
1809    cross_compiling=maybe
1810  elif test "x$build_alias" != "x$host_alias"; then
1811    cross_compiling=yes
1812  fi
1813fi
1814
1815ac_tool_prefix=
1816test -n "$host_alias" && ac_tool_prefix=$host_alias-
1817
1818test "$silent" = yes && exec 6>/dev/null
1819
1820
1821ac_pwd=`pwd` && test -n "$ac_pwd" &&
1822ac_ls_di=`ls -di .` &&
1823ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1824  as_fn_error $? "working directory cannot be determined"
1825test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1826  as_fn_error $? "pwd does not report name of working directory"
1827
1828
1829# Find the source files, if location was not specified.
1830if test -z "$srcdir"; then
1831  ac_srcdir_defaulted=yes
1832  # Try the directory containing this script, then the parent directory.
1833  ac_confdir=`$as_dirname -- "$as_myself" ||
1834$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1835	 X"$as_myself" : 'X\(//\)[^/]' \| \
1836	 X"$as_myself" : 'X\(//\)$' \| \
1837	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1838$as_echo X"$as_myself" |
1839    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1840	    s//\1/
1841	    q
1842	  }
1843	  /^X\(\/\/\)[^/].*/{
1844	    s//\1/
1845	    q
1846	  }
1847	  /^X\(\/\/\)$/{
1848	    s//\1/
1849	    q
1850	  }
1851	  /^X\(\/\).*/{
1852	    s//\1/
1853	    q
1854	  }
1855	  s/.*/./; q'`
1856  srcdir=$ac_confdir
1857  if test ! -r "$srcdir/$ac_unique_file"; then
1858    srcdir=..
1859  fi
1860else
1861  ac_srcdir_defaulted=no
1862fi
1863if test ! -r "$srcdir/$ac_unique_file"; then
1864  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1865  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1866fi
1867ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1868ac_abs_confdir=`(
1869	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1870	pwd)`
1871# When building in place, set srcdir=.
1872if test "$ac_abs_confdir" = "$ac_pwd"; then
1873  srcdir=.
1874fi
1875# Remove unnecessary trailing slashes from srcdir.
1876# Double slashes in file names in object file debugging info
1877# mess up M-x gdb in Emacs.
1878case $srcdir in
1879*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1880esac
1881for ac_var in $ac_precious_vars; do
1882  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1883  eval ac_env_${ac_var}_value=\$${ac_var}
1884  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1885  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1886done
1887
1888#
1889# Report the --help message.
1890#
1891if test "$ac_init_help" = "long"; then
1892  # Omit some internal or obsolete options to make the list less imposing.
1893  # This message is too long to be a string in the A/UX 3.1 sh.
1894  cat <<_ACEOF
1895\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1896
1897Usage: $0 [OPTION]... [VAR=VALUE]...
1898
1899To assign environment variables (e.g., CC, CFLAGS...), specify them as
1900VAR=VALUE.  See below for descriptions of some of the useful variables.
1901
1902Defaults for the options are specified in brackets.
1903
1904Configuration:
1905  -h, --help              display this help and exit
1906      --help=short        display options specific to this package
1907      --help=recursive    display the short help of all the included packages
1908  -V, --version           display version information and exit
1909  -q, --quiet, --silent   do not print \`checking ...' messages
1910      --cache-file=FILE   cache test results in FILE [disabled]
1911  -C, --config-cache      alias for \`--cache-file=config.cache'
1912  -n, --no-create         do not create output files
1913      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1914
1915Installation directories:
1916  --prefix=PREFIX         install architecture-independent files in PREFIX
1917                          [$ac_default_prefix]
1918  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1919                          [PREFIX]
1920
1921By default, \`make install' will install all the files in
1922\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1923an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1924for instance \`--prefix=\$HOME'.
1925
1926For better control, use the options below.
1927
1928Fine tuning of the installation directories:
1929  --bindir=DIR            user executables [EPREFIX/bin]
1930  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1931  --libexecdir=DIR        program executables [EPREFIX/libexec]
1932  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1933  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1934  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1935  --libdir=DIR            object code libraries [EPREFIX/lib]
1936  --includedir=DIR        C header files [PREFIX/include]
1937  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1938  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1939  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1940  --infodir=DIR           info documentation [DATAROOTDIR/info]
1941  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1942  --mandir=DIR            man documentation [DATAROOTDIR/man]
1943  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1944  --htmldir=DIR           html documentation [DOCDIR]
1945  --dvidir=DIR            dvi documentation [DOCDIR]
1946  --pdfdir=DIR            pdf documentation [DOCDIR]
1947  --psdir=DIR             ps documentation [DOCDIR]
1948_ACEOF
1949
1950  cat <<\_ACEOF
1951
1952X features:
1953  --x-includes=DIR    X include files are in DIR
1954  --x-libraries=DIR   X library files are in DIR
1955
1956System types:
1957  --build=BUILD     configure for building on BUILD [guessed]
1958  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1959  --target=TARGET   configure for building compilers for TARGET [HOST]
1960_ACEOF
1961fi
1962
1963if test -n "$ac_init_help"; then
1964  case $ac_init_help in
1965     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1966   esac
1967  cat <<\_ACEOF
1968
1969Optional Features:
1970  --disable-option-checking  ignore unrecognized --enable/--with options
1971  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1972  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1973  --enable-openjdk-only   suppress building custom source even if present
1974                          [disabled]
1975  --enable-debug          set the debug level to fastdebug (shorthand for
1976                          --with-debug-level=fastdebug) [disabled]
1977  --enable-headless-only  only build headless (no GUI) support [disabled]
1978  --enable-full-docs      build complete documentation [enabled if all tools
1979                          found]
1980  --disable-unlimited-crypto
1981                          Disable unlimited crypto policy [enabled]
1982  --disable-keep-packaged-modules
1983                          Do not keep packaged modules in jdk image [enable]
1984  --enable-static-build   enable static library build [disabled]
1985  --disable-warnings-as-errors
1986                          do not consider native warnings to be an error
1987                          [enabled]
1988  --enable-debug-symbols  Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --enable-zip-debug-info Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --enable-native-coverage
1993                          enable native compilation with code coverage
1994                          data[disabled]
1995  --enable-dtrace[=yes/no/auto]
1996                          enable dtrace. Default is auto, where dtrace is
1997                          enabled if all dependencies are present.
1998  --enable-aot[=yes/no/auto]
1999                          enable ahead of time compilation feature. Default is
2000                          auto, where aot is enabled if all dependencies are
2001                          present.
2002  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2003  --disable-freetype-bundling
2004                          disable bundling of the freetype library with the
2005                          build result [enabled on Windows or when using
2006                          --with-freetype, disabled otherwise]
2007  --enable-libffi-bundling
2008                          enable bundling of libffi.so to make the built JDK
2009                          runnable on more systems
2010  --enable-jtreg-failure-handler
2011                          forces build of the jtreg failure handler to be
2012                          enabled, missing dependencies become fatal errors.
2013                          Default is auto, where the failure handler is built
2014                          if all dependencies are present and otherwise just
2015                          disabled.
2016  --disable-generate-classlist
2017                          forces enabling or disabling of the generation of a
2018                          CDS classlist at build time. Default is to generate
2019                          it when either the server or client JVMs are built.
2020  --enable-sjavac         use sjavac to do fast incremental compiles
2021                          [disabled]
2022  --disable-javac-server  disable javac server [enabled]
2023  --enable-icecc          enable distribted compilation of native code using
2024                          icecc/icecream [disabled]
2025  --disable-precompiled-headers
2026                          disable using precompiled headers when compiling C++
2027                          [enabled]
2028  --enable-ccache         enable using ccache to speed up recompilations
2029                          [disabled]
2030
2031Optional Packages:
2032  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2033  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2034  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2035                          support it), e.g. --with-target-bits=32 [guessed]
2036  --with-custom-make-dir  Deprecated. Option is kept for backwards
2037                          compatibility and is ignored
2038  --with-jdk-variant      JDK variant to build (normal) [normal]
2039  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2040                          optimized) [release]
2041  --with-jvm-variants     JVM variants (separated by commas) to build
2042                          (server,client,minimal,core,zero,zeroshark,custom)
2043                          [server]
2044  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2045                          (arm64,aarch64) [aarch64]
2046  --with-devkit           use this devkit for compilers, tools and resources
2047  --with-sys-root         alias for --with-sysroot for backwards compatability
2048  --with-sysroot          use this directory as sysroot
2049  --with-tools-dir        alias for --with-toolchain-path for backwards
2050                          compatibility
2051  --with-toolchain-path   prepend these directories when searching for
2052                          toolchain binaries (compilers etc)
2053  --with-extra-path       prepend these directories to the default path
2054  --with-sdk-name         use the platform SDK of the given name. [macosx]
2055  --with-conf-name        use this as the name of the configuration [generated
2056                          from important configuration options]
2057  --with-output-sync      set make output sync type if supported by make.
2058                          [recurse]
2059  --with-default-make-target
2060                          set the default make target [exploded-image]
2061  --with-cacerts-file     specify alternative cacerts file
2062  --with-copyright-year   Set copyright year value for build [current year]
2063  --with-milestone        Deprecated. Option is kept for backwards
2064                          compatibility and is ignored
2065  --with-update-version   Deprecated. Option is kept for backwards
2066                          compatibility and is ignored
2067  --with-user-release-suffix
2068                          Deprecated. Option is kept for backwards
2069                          compatibility and is ignored
2070  --with-build-number     Deprecated. Option is kept for backwards
2071                          compatibility and is ignored
2072  --with-version-string   Set version string [calculated]
2073  --with-version-pre      Set the base part of the version 'PRE' field
2074                          (pre-release identifier) ['internal']
2075  --with-version-opt      Set version 'OPT' field (build metadata)
2076                          [<timestamp>.<user>.<dirname>]
2077  --with-version-build    Set version 'BUILD' field (build number) [not
2078                          specified]
2079  --with-version-major    Set version 'MAJOR' field (first number) [current
2080                          source value]
2081  --with-version-minor    Set version 'MINOR' field (second number) [current
2082                          source value]
2083  --with-version-security Set version 'SECURITY' field (third number) [current
2084                          source value]
2085  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2086                          specified]
2087  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2088  --with-build-jdk        path to JDK of same version as is being built[the
2089                          newly built JDK]
2090  --with-add-source-root  Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-source-root
2093                          Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-adds-and-overrides
2096                          Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-override-langtools
2099                          Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-corba   Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-jaxp    Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-override-jaxws   Deprecated. Option is kept for backwards
2106                          compatibility and is ignored
2107  --with-override-hotspot Deprecated. Option is kept for backwards
2108                          compatibility and is ignored
2109  --with-override-nashorn Deprecated. Option is kept for backwards
2110                          compatibility and is ignored
2111  --with-override-jdk     Deprecated. Option is kept for backwards
2112                          compatibility and is ignored
2113  --with-import_hotspot   Deprecated. Option is kept for backwards
2114                          compatibility and is ignored
2115  --with-import-modules   import a set of prebuilt modules either as a zip
2116                          file or an exploded directory
2117  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2118                          to show possible values [platform dependent]
2119  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2120  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2121  --with-extra-ldflags    extra flags to be used when linking jdk
2122  --with-toolchain-version
2123                          the version of the toolchain to look for, use
2124                          '--help' to show possible values [platform
2125                          dependent]
2126  --with-build-devkit     Devkit to use for the build platform toolchain
2127  --with-jtreg            Regression Test Harness [probed]
2128  --with-jib              Jib dependency management tool [not used]
2129  --with-abi-profile      specify ABI profile for ARM builds
2130                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2131                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2132                          [toolchain dependent]
2133  --with-macosx-version-max
2134                          error on use of newer functionality. [macosx]
2135  --with-native-debug-symbols
2136                          set the native debug symbol configuration (none,
2137                          internal, external, zipped) [varying]
2138  --with-stdc++lib=<static>,<dynamic>,<default>
2139                          force linking of the C++ runtime on Linux to either
2140                          static or dynamic, default is static with dynamic as
2141                          fallback
2142  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2143                          (Windows only) [probed]
2144  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2145                          (Windows only) [probed]
2146  --with-x                use the X Window System
2147  --with-cups             specify prefix directory for the cups package
2148                          (expecting the headers under PATH/include)
2149  --with-cups-include     specify directory for the cups include files
2150  --with-freetype         specify prefix directory for the freetype package
2151                          (expecting the libraries under PATH/lib and the
2152                          headers under PATH/include)
2153  --with-freetype-include specify directory for the freetype include files
2154  --with-freetype-lib     specify directory for the freetype library
2155  --with-freetype-src     specify directory with freetype sources to
2156                          automatically build the library (experimental,
2157                          Windows-only)
2158  --with-freetype-license if bundling freetype, also bundle this license file
2159  --with-alsa             specify prefix directory for the alsa package
2160                          (expecting the libraries under PATH/lib and the
2161                          headers under PATH/include)
2162  --with-alsa-include     specify directory for the alsa include files
2163  --with-alsa-lib         specify directory for the alsa library
2164  --with-libffi           specify prefix directory for the libffi package
2165                          (expecting the libraries under PATH/lib and the
2166                          headers under PATH/include)
2167  --with-libffi-include   specify directory for the libffi include files
2168  --with-libffi-lib       specify directory for the libffi library
2169  --with-libjpeg          use libjpeg from build system or OpenJDK source
2170                          (system, bundled) [bundled]
2171  --with-giflib           use giflib from build system or OpenJDK source
2172                          (system, bundled) [bundled]
2173  --with-libpng           use libpng from build system or OpenJDK source
2174                          (system, bundled) [bundled]
2175  --with-zlib             use zlib from build system or OpenJDK source
2176                          (system, bundled) [bundled]
2177  --with-lcms             use lcms2 from build system or OpenJDK source
2178                          (system, bundled) [bundled]
2179  --with-dxsdk            Deprecated. Option is kept for backwards
2180                          compatibility and is ignored
2181  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2182                          compatibility and is ignored
2183  --with-dxsdk-include    Deprecated. Option is kept for backwards
2184                          compatibility and is ignored
2185  --with-jvm-features     additional JVM features to enable (separated by
2186                          comma), use '--help' to show possible values [none]
2187  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2188                          compatibility and is ignored
2189  --with-num-cores        number of cores in the build system, e.g.
2190                          --with-num-cores=8 [probed]
2191  --with-memory-size      memory (in MB) available in the build system, e.g.
2192                          --with-memory-size=1024 [probed]
2193  --with-jobs             number of parallel jobs to let make run [calculated
2194                          based on cores and memory]
2195  --with-test-jobs        number of parallel tests jobs to run [based on build
2196                          jobs]
2197  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2198                          invocations of boot JDK, overriding the default
2199                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2200                          -enableassertions"
2201  --with-sjavac-server-java
2202                          use this java binary for running the sjavac
2203                          background server [Boot JDK java]
2204  --with-ccache-dir       where to store ccache files [~/.ccache]
2205
2206Some influential environment variables:
2207  BASENAME    Override default value for BASENAME
2208  BASH        Override default value for BASH
2209  CAT         Override default value for CAT
2210  CHMOD       Override default value for CHMOD
2211  CMP         Override default value for CMP
2212  COMM        Override default value for COMM
2213  CP          Override default value for CP
2214  CUT         Override default value for CUT
2215  DATE        Override default value for DATE
2216  DIFF        Override default value for DIFF
2217  DIRNAME     Override default value for DIRNAME
2218  ECHO        Override default value for ECHO
2219  EXPR        Override default value for EXPR
2220  FILE        Override default value for FILE
2221  FIND        Override default value for FIND
2222  HEAD        Override default value for HEAD
2223  GUNZIP      Override default value for GUNZIP
2224  GZIP        Override default value for GZIP
2225  LN          Override default value for LN
2226  LS          Override default value for LS
2227  MKDIR       Override default value for MKDIR
2228  MKTEMP      Override default value for MKTEMP
2229  MV          Override default value for MV
2230  NAWK        Override default value for NAWK
2231  PRINTF      Override default value for PRINTF
2232  RM          Override default value for RM
2233  RMDIR       Override default value for RMDIR
2234  SH          Override default value for SH
2235  SORT        Override default value for SORT
2236  TAIL        Override default value for TAIL
2237  TAR         Override default value for TAR
2238  TEE         Override default value for TEE
2239  TOUCH       Override default value for TOUCH
2240  TR          Override default value for TR
2241  UNAME       Override default value for UNAME
2242  UNIQ        Override default value for UNIQ
2243  WC          Override default value for WC
2244  WHICH       Override default value for WHICH
2245  XARGS       Override default value for XARGS
2246  AWK         Override default value for AWK
2247  GREP        Override default value for GREP
2248  EGREP       Override default value for EGREP
2249  FGREP       Override default value for FGREP
2250  SED         Override default value for SED
2251  CYGPATH     Override default value for CYGPATH
2252  READLINK    Override default value for READLINK
2253  DF          Override default value for DF
2254  CPIO        Override default value for CPIO
2255  NICE        Override default value for NICE
2256  PANDOC      Override default value for PANDOC
2257  MAKE        Override default value for MAKE
2258  UNZIP       Override default value for UNZIP
2259  ZIPEXE      Override default value for ZIPEXE
2260  LDD         Override default value for LDD
2261  OTOOL       Override default value for OTOOL
2262  READELF     Override default value for READELF
2263  DOT         Override default value for DOT
2264  HG          Override default value for HG
2265  STAT        Override default value for STAT
2266  TIME        Override default value for TIME
2267  FLOCK       Override default value for FLOCK
2268  DTRACE      Override default value for DTRACE
2269  PATCH       Override default value for PATCH
2270  DSYMUTIL    Override default value for DSYMUTIL
2271  XATTR       Override default value for XATTR
2272  CODESIGN    Override default value for CODESIGN
2273  SETFILE     Override default value for SETFILE
2274  PKG_CONFIG  path to pkg-config utility
2275  JAVA        Override default value for JAVA
2276  JAVAC       Override default value for JAVAC
2277  JAVAH       Override default value for JAVAH
2278  JAR         Override default value for JAR
2279  JARSIGNER   Override default value for JARSIGNER
2280  CC          C compiler command
2281  CFLAGS      C compiler flags
2282  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2283              nonstandard directory <lib dir>
2284  LIBS        libraries to pass to the linker, e.g. -l<library>
2285  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2286              you have headers in a nonstandard directory <include dir>
2287  CXX         C++ compiler command
2288  CXXFLAGS    C++ compiler flags
2289  CPP         C preprocessor
2290  CXXCPP      C++ preprocessor
2291  AS          Override default value for AS
2292  AR          Override default value for AR
2293  LIPO        Override default value for LIPO
2294  STRIP       Override default value for STRIP
2295  NM          Override default value for NM
2296  GNM         Override default value for GNM
2297  OBJCOPY     Override default value for OBJCOPY
2298  OBJDUMP     Override default value for OBJDUMP
2299  BUILD_CC    Override default value for BUILD_CC
2300  BUILD_CXX   Override default value for BUILD_CXX
2301  BUILD_NM    Override default value for BUILD_NM
2302  BUILD_AR    Override default value for BUILD_AR
2303  BUILD_OBJCOPY
2304              Override default value for BUILD_OBJCOPY
2305  BUILD_STRIP Override default value for BUILD_STRIP
2306  JTREGEXE    Override default value for JTREGEXE
2307  XMKMF       Path to xmkmf, Makefile generator for X Window System
2308  FREETYPE_CFLAGS
2309              C compiler flags for FREETYPE, overriding pkg-config
2310  FREETYPE_LIBS
2311              linker flags for FREETYPE, overriding pkg-config
2312  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2313  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2314  LIBFFI_CFLAGS
2315              C compiler flags for LIBFFI, overriding pkg-config
2316  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2317  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2318  PNG_LIBS    linker flags for PNG, overriding pkg-config
2319  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2320  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2321  ICECC_CMD   Override default value for ICECC_CMD
2322  ICECC_CREATE_ENV
2323              Override default value for ICECC_CREATE_ENV
2324  ICECC_WRAPPER
2325              Override default value for ICECC_WRAPPER
2326  CCACHE      Override default value for CCACHE
2327
2328Use these variables to override the choices made by `configure' or to help
2329it to find libraries and programs with nonstandard names/locations.
2330
2331Report bugs to <build-dev@openjdk.java.net>.
2332OpenJDK home page: <http://openjdk.java.net>.
2333_ACEOF
2334ac_status=$?
2335fi
2336
2337if test "$ac_init_help" = "recursive"; then
2338  # If there are subdirs, report their specific --help.
2339  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2340    test -d "$ac_dir" ||
2341      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2342      continue
2343    ac_builddir=.
2344
2345case "$ac_dir" in
2346.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2347*)
2348  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2349  # A ".." for each directory in $ac_dir_suffix.
2350  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2351  case $ac_top_builddir_sub in
2352  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2353  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2354  esac ;;
2355esac
2356ac_abs_top_builddir=$ac_pwd
2357ac_abs_builddir=$ac_pwd$ac_dir_suffix
2358# for backward compatibility:
2359ac_top_builddir=$ac_top_build_prefix
2360
2361case $srcdir in
2362  .)  # We are building in place.
2363    ac_srcdir=.
2364    ac_top_srcdir=$ac_top_builddir_sub
2365    ac_abs_top_srcdir=$ac_pwd ;;
2366  [\\/]* | ?:[\\/]* )  # Absolute name.
2367    ac_srcdir=$srcdir$ac_dir_suffix;
2368    ac_top_srcdir=$srcdir
2369    ac_abs_top_srcdir=$srcdir ;;
2370  *) # Relative name.
2371    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2372    ac_top_srcdir=$ac_top_build_prefix$srcdir
2373    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2374esac
2375ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2376
2377    cd "$ac_dir" || { ac_status=$?; continue; }
2378    # Check for guested configure.
2379    if test -f "$ac_srcdir/configure.gnu"; then
2380      echo &&
2381      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2382    elif test -f "$ac_srcdir/configure"; then
2383      echo &&
2384      $SHELL "$ac_srcdir/configure" --help=recursive
2385    else
2386      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2387    fi || ac_status=$?
2388    cd "$ac_pwd" || { ac_status=$?; break; }
2389  done
2390fi
2391
2392test -n "$ac_init_help" && exit $ac_status
2393if $ac_init_version; then
2394  cat <<\_ACEOF
2395OpenJDK configure jdk9
2396generated by GNU Autoconf 2.69
2397
2398Copyright (C) 2012 Free Software Foundation, Inc.
2399This configure script is free software; the Free Software Foundation
2400gives unlimited permission to copy, distribute and modify it.
2401_ACEOF
2402  exit
2403fi
2404
2405## ------------------------ ##
2406## Autoconf initialization. ##
2407## ------------------------ ##
2408
2409# ac_fn_c_try_compile LINENO
2410# --------------------------
2411# Try to compile conftest.$ac_ext, and return whether this succeeded.
2412ac_fn_c_try_compile ()
2413{
2414  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2415  rm -f conftest.$ac_objext
2416  if { { ac_try="$ac_compile"
2417case "(($ac_try" in
2418  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2419  *) ac_try_echo=$ac_try;;
2420esac
2421eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2422$as_echo "$ac_try_echo"; } >&5
2423  (eval "$ac_compile") 2>conftest.err
2424  ac_status=$?
2425  if test -s conftest.err; then
2426    grep -v '^ *+' conftest.err >conftest.er1
2427    cat conftest.er1 >&5
2428    mv -f conftest.er1 conftest.err
2429  fi
2430  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2431  test $ac_status = 0; } && {
2432	 test -z "$ac_c_werror_flag" ||
2433	 test ! -s conftest.err
2434       } && test -s conftest.$ac_objext; then :
2435  ac_retval=0
2436else
2437  $as_echo "$as_me: failed program was:" >&5
2438sed 's/^/| /' conftest.$ac_ext >&5
2439
2440	ac_retval=1
2441fi
2442  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2443  as_fn_set_status $ac_retval
2444
2445} # ac_fn_c_try_compile
2446
2447# ac_fn_cxx_try_compile LINENO
2448# ----------------------------
2449# Try to compile conftest.$ac_ext, and return whether this succeeded.
2450ac_fn_cxx_try_compile ()
2451{
2452  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2453  rm -f conftest.$ac_objext
2454  if { { ac_try="$ac_compile"
2455case "(($ac_try" in
2456  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2457  *) ac_try_echo=$ac_try;;
2458esac
2459eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2460$as_echo "$ac_try_echo"; } >&5
2461  (eval "$ac_compile") 2>conftest.err
2462  ac_status=$?
2463  if test -s conftest.err; then
2464    grep -v '^ *+' conftest.err >conftest.er1
2465    cat conftest.er1 >&5
2466    mv -f conftest.er1 conftest.err
2467  fi
2468  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2469  test $ac_status = 0; } && {
2470	 test -z "$ac_cxx_werror_flag" ||
2471	 test ! -s conftest.err
2472       } && test -s conftest.$ac_objext; then :
2473  ac_retval=0
2474else
2475  $as_echo "$as_me: failed program was:" >&5
2476sed 's/^/| /' conftest.$ac_ext >&5
2477
2478	ac_retval=1
2479fi
2480  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2481  as_fn_set_status $ac_retval
2482
2483} # ac_fn_cxx_try_compile
2484
2485# ac_fn_c_try_cpp LINENO
2486# ----------------------
2487# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2488ac_fn_c_try_cpp ()
2489{
2490  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2491  if { { ac_try="$ac_cpp conftest.$ac_ext"
2492case "(($ac_try" in
2493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2494  *) ac_try_echo=$ac_try;;
2495esac
2496eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2497$as_echo "$ac_try_echo"; } >&5
2498  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2499  ac_status=$?
2500  if test -s conftest.err; then
2501    grep -v '^ *+' conftest.err >conftest.er1
2502    cat conftest.er1 >&5
2503    mv -f conftest.er1 conftest.err
2504  fi
2505  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2506  test $ac_status = 0; } > conftest.i && {
2507	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2508	 test ! -s conftest.err
2509       }; then :
2510  ac_retval=0
2511else
2512  $as_echo "$as_me: failed program was:" >&5
2513sed 's/^/| /' conftest.$ac_ext >&5
2514
2515    ac_retval=1
2516fi
2517  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2518  as_fn_set_status $ac_retval
2519
2520} # ac_fn_c_try_cpp
2521
2522# ac_fn_cxx_try_cpp LINENO
2523# ------------------------
2524# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2525ac_fn_cxx_try_cpp ()
2526{
2527  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528  if { { ac_try="$ac_cpp conftest.$ac_ext"
2529case "(($ac_try" in
2530  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2531  *) ac_try_echo=$ac_try;;
2532esac
2533eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2534$as_echo "$ac_try_echo"; } >&5
2535  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2536  ac_status=$?
2537  if test -s conftest.err; then
2538    grep -v '^ *+' conftest.err >conftest.er1
2539    cat conftest.er1 >&5
2540    mv -f conftest.er1 conftest.err
2541  fi
2542  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2543  test $ac_status = 0; } > conftest.i && {
2544	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2545	 test ! -s conftest.err
2546       }; then :
2547  ac_retval=0
2548else
2549  $as_echo "$as_me: failed program was:" >&5
2550sed 's/^/| /' conftest.$ac_ext >&5
2551
2552    ac_retval=1
2553fi
2554  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2555  as_fn_set_status $ac_retval
2556
2557} # ac_fn_cxx_try_cpp
2558
2559# ac_fn_c_try_link LINENO
2560# -----------------------
2561# Try to link conftest.$ac_ext, and return whether this succeeded.
2562ac_fn_c_try_link ()
2563{
2564  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2565  rm -f conftest.$ac_objext conftest$ac_exeext
2566  if { { ac_try="$ac_link"
2567case "(($ac_try" in
2568  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2569  *) ac_try_echo=$ac_try;;
2570esac
2571eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2572$as_echo "$ac_try_echo"; } >&5
2573  (eval "$ac_link") 2>conftest.err
2574  ac_status=$?
2575  if test -s conftest.err; then
2576    grep -v '^ *+' conftest.err >conftest.er1
2577    cat conftest.er1 >&5
2578    mv -f conftest.er1 conftest.err
2579  fi
2580  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2581  test $ac_status = 0; } && {
2582	 test -z "$ac_c_werror_flag" ||
2583	 test ! -s conftest.err
2584       } && test -s conftest$ac_exeext && {
2585	 test "$cross_compiling" = yes ||
2586	 test -x conftest$ac_exeext
2587       }; then :
2588  ac_retval=0
2589else
2590  $as_echo "$as_me: failed program was:" >&5
2591sed 's/^/| /' conftest.$ac_ext >&5
2592
2593	ac_retval=1
2594fi
2595  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2596  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2597  # interfere with the next link command; also delete a directory that is
2598  # left behind by Apple's compiler.  We do this before executing the actions.
2599  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2600  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2601  as_fn_set_status $ac_retval
2602
2603} # ac_fn_c_try_link
2604
2605# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2606# ---------------------------------------------------------
2607# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2608# the include files in INCLUDES and setting the cache variable VAR
2609# accordingly.
2610ac_fn_cxx_check_header_mongrel ()
2611{
2612  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2613  if eval \${$3+:} false; then :
2614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2615$as_echo_n "checking for $2... " >&6; }
2616if eval \${$3+:} false; then :
2617  $as_echo_n "(cached) " >&6
2618fi
2619eval ac_res=\$$3
2620	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2621$as_echo "$ac_res" >&6; }
2622else
2623  # Is the header compilable?
2624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2625$as_echo_n "checking $2 usability... " >&6; }
2626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2627/* end confdefs.h.  */
2628$4
2629#include <$2>
2630_ACEOF
2631if ac_fn_cxx_try_compile "$LINENO"; then :
2632  ac_header_compiler=yes
2633else
2634  ac_header_compiler=no
2635fi
2636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2638$as_echo "$ac_header_compiler" >&6; }
2639
2640# Is the header present?
2641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2642$as_echo_n "checking $2 presence... " >&6; }
2643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2644/* end confdefs.h.  */
2645#include <$2>
2646_ACEOF
2647if ac_fn_cxx_try_cpp "$LINENO"; then :
2648  ac_header_preproc=yes
2649else
2650  ac_header_preproc=no
2651fi
2652rm -f conftest.err conftest.i conftest.$ac_ext
2653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2654$as_echo "$ac_header_preproc" >&6; }
2655
2656# So?  What about this header?
2657case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2658  yes:no: )
2659    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2660$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2661    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2662$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2663    ;;
2664  no:yes:* )
2665    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2666$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2667    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2668$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2669    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2670$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2671    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2672$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2673    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2674$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2675( $as_echo "## ----------------------------------------- ##
2676## Report this to build-dev@openjdk.java.net ##
2677## ----------------------------------------- ##"
2678     ) | sed "s/^/$as_me: WARNING:     /" >&2
2679    ;;
2680esac
2681  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2682$as_echo_n "checking for $2... " >&6; }
2683if eval \${$3+:} false; then :
2684  $as_echo_n "(cached) " >&6
2685else
2686  eval "$3=\$ac_header_compiler"
2687fi
2688eval ac_res=\$$3
2689	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2690$as_echo "$ac_res" >&6; }
2691fi
2692  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2693
2694} # ac_fn_cxx_check_header_mongrel
2695
2696# ac_fn_cxx_try_run LINENO
2697# ------------------------
2698# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2699# that executables *can* be run.
2700ac_fn_cxx_try_run ()
2701{
2702  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2703  if { { ac_try="$ac_link"
2704case "(($ac_try" in
2705  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2706  *) ac_try_echo=$ac_try;;
2707esac
2708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2709$as_echo "$ac_try_echo"; } >&5
2710  (eval "$ac_link") 2>&5
2711  ac_status=$?
2712  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2713  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2714  { { case "(($ac_try" in
2715  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2716  *) ac_try_echo=$ac_try;;
2717esac
2718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2719$as_echo "$ac_try_echo"; } >&5
2720  (eval "$ac_try") 2>&5
2721  ac_status=$?
2722  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2723  test $ac_status = 0; }; }; then :
2724  ac_retval=0
2725else
2726  $as_echo "$as_me: program exited with status $ac_status" >&5
2727       $as_echo "$as_me: failed program was:" >&5
2728sed 's/^/| /' conftest.$ac_ext >&5
2729
2730       ac_retval=$ac_status
2731fi
2732  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2733  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2734  as_fn_set_status $ac_retval
2735
2736} # ac_fn_cxx_try_run
2737
2738# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2739# ---------------------------------------------------------
2740# Tests whether HEADER exists and can be compiled using the include files in
2741# INCLUDES, setting the cache variable VAR accordingly.
2742ac_fn_cxx_check_header_compile ()
2743{
2744  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2746$as_echo_n "checking for $2... " >&6; }
2747if eval \${$3+:} false; then :
2748  $as_echo_n "(cached) " >&6
2749else
2750  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2751/* end confdefs.h.  */
2752$4
2753#include <$2>
2754_ACEOF
2755if ac_fn_cxx_try_compile "$LINENO"; then :
2756  eval "$3=yes"
2757else
2758  eval "$3=no"
2759fi
2760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2761fi
2762eval ac_res=\$$3
2763	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2764$as_echo "$ac_res" >&6; }
2765  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2766
2767} # ac_fn_cxx_check_header_compile
2768
2769# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2770# ----------------------------------------------
2771# Tries to find the compile-time value of EXPR in a program that includes
2772# INCLUDES, setting VAR accordingly. Returns whether the value could be
2773# computed
2774ac_fn_cxx_compute_int ()
2775{
2776  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2777  if test "$cross_compiling" = yes; then
2778    # Depending upon the size, compute the lo and hi bounds.
2779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2780/* end confdefs.h.  */
2781$4
2782int
2783main ()
2784{
2785static int test_array [1 - 2 * !(($2) >= 0)];
2786test_array [0] = 0;
2787return test_array [0];
2788
2789  ;
2790  return 0;
2791}
2792_ACEOF
2793if ac_fn_cxx_try_compile "$LINENO"; then :
2794  ac_lo=0 ac_mid=0
2795  while :; do
2796    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2797/* end confdefs.h.  */
2798$4
2799int
2800main ()
2801{
2802static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2803test_array [0] = 0;
2804return test_array [0];
2805
2806  ;
2807  return 0;
2808}
2809_ACEOF
2810if ac_fn_cxx_try_compile "$LINENO"; then :
2811  ac_hi=$ac_mid; break
2812else
2813  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2814			if test $ac_lo -le $ac_mid; then
2815			  ac_lo= ac_hi=
2816			  break
2817			fi
2818			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2819fi
2820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2821  done
2822else
2823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2824/* end confdefs.h.  */
2825$4
2826int
2827main ()
2828{
2829static int test_array [1 - 2 * !(($2) < 0)];
2830test_array [0] = 0;
2831return test_array [0];
2832
2833  ;
2834  return 0;
2835}
2836_ACEOF
2837if ac_fn_cxx_try_compile "$LINENO"; then :
2838  ac_hi=-1 ac_mid=-1
2839  while :; do
2840    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2841/* end confdefs.h.  */
2842$4
2843int
2844main ()
2845{
2846static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2847test_array [0] = 0;
2848return test_array [0];
2849
2850  ;
2851  return 0;
2852}
2853_ACEOF
2854if ac_fn_cxx_try_compile "$LINENO"; then :
2855  ac_lo=$ac_mid; break
2856else
2857  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2858			if test $ac_mid -le $ac_hi; then
2859			  ac_lo= ac_hi=
2860			  break
2861			fi
2862			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2863fi
2864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2865  done
2866else
2867  ac_lo= ac_hi=
2868fi
2869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2870fi
2871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2872# Binary search between lo and hi bounds.
2873while test "x$ac_lo" != "x$ac_hi"; do
2874  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2875  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2876/* end confdefs.h.  */
2877$4
2878int
2879main ()
2880{
2881static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2882test_array [0] = 0;
2883return test_array [0];
2884
2885  ;
2886  return 0;
2887}
2888_ACEOF
2889if ac_fn_cxx_try_compile "$LINENO"; then :
2890  ac_hi=$ac_mid
2891else
2892  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2893fi
2894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2895done
2896case $ac_lo in #((
2897?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2898'') ac_retval=1 ;;
2899esac
2900  else
2901    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2902/* end confdefs.h.  */
2903$4
2904static long int longval () { return $2; }
2905static unsigned long int ulongval () { return $2; }
2906#include <stdio.h>
2907#include <stdlib.h>
2908int
2909main ()
2910{
2911
2912  FILE *f = fopen ("conftest.val", "w");
2913  if (! f)
2914    return 1;
2915  if (($2) < 0)
2916    {
2917      long int i = longval ();
2918      if (i != ($2))
2919	return 1;
2920      fprintf (f, "%ld", i);
2921    }
2922  else
2923    {
2924      unsigned long int i = ulongval ();
2925      if (i != ($2))
2926	return 1;
2927      fprintf (f, "%lu", i);
2928    }
2929  /* Do not output a trailing newline, as this causes \r\n confusion
2930     on some platforms.  */
2931  return ferror (f) || fclose (f) != 0;
2932
2933  ;
2934  return 0;
2935}
2936_ACEOF
2937if ac_fn_cxx_try_run "$LINENO"; then :
2938  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2939else
2940  ac_retval=1
2941fi
2942rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2943  conftest.$ac_objext conftest.beam conftest.$ac_ext
2944rm -f conftest.val
2945
2946  fi
2947  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2948  as_fn_set_status $ac_retval
2949
2950} # ac_fn_cxx_compute_int
2951
2952# ac_fn_cxx_try_link LINENO
2953# -------------------------
2954# Try to link conftest.$ac_ext, and return whether this succeeded.
2955ac_fn_cxx_try_link ()
2956{
2957  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2958  rm -f conftest.$ac_objext conftest$ac_exeext
2959  if { { ac_try="$ac_link"
2960case "(($ac_try" in
2961  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2962  *) ac_try_echo=$ac_try;;
2963esac
2964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2965$as_echo "$ac_try_echo"; } >&5
2966  (eval "$ac_link") 2>conftest.err
2967  ac_status=$?
2968  if test -s conftest.err; then
2969    grep -v '^ *+' conftest.err >conftest.er1
2970    cat conftest.er1 >&5
2971    mv -f conftest.er1 conftest.err
2972  fi
2973  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2974  test $ac_status = 0; } && {
2975	 test -z "$ac_cxx_werror_flag" ||
2976	 test ! -s conftest.err
2977       } && test -s conftest$ac_exeext && {
2978	 test "$cross_compiling" = yes ||
2979	 test -x conftest$ac_exeext
2980       }; then :
2981  ac_retval=0
2982else
2983  $as_echo "$as_me: failed program was:" >&5
2984sed 's/^/| /' conftest.$ac_ext >&5
2985
2986	ac_retval=1
2987fi
2988  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2989  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2990  # interfere with the next link command; also delete a directory that is
2991  # left behind by Apple's compiler.  We do this before executing the actions.
2992  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2993  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2994  as_fn_set_status $ac_retval
2995
2996} # ac_fn_cxx_try_link
2997
2998# ac_fn_cxx_check_func LINENO FUNC VAR
2999# ------------------------------------
3000# Tests whether FUNC exists, setting the cache variable VAR accordingly
3001ac_fn_cxx_check_func ()
3002{
3003  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3005$as_echo_n "checking for $2... " >&6; }
3006if eval \${$3+:} false; then :
3007  $as_echo_n "(cached) " >&6
3008else
3009  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3010/* end confdefs.h.  */
3011/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3012   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3013#define $2 innocuous_$2
3014
3015/* System header to define __stub macros and hopefully few prototypes,
3016    which can conflict with char $2 (); below.
3017    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3018    <limits.h> exists even on freestanding compilers.  */
3019
3020#ifdef __STDC__
3021# include <limits.h>
3022#else
3023# include <assert.h>
3024#endif
3025
3026#undef $2
3027
3028/* Override any GCC internal prototype to avoid an error.
3029   Use char because int might match the return type of a GCC
3030   builtin and then its argument prototype would still apply.  */
3031#ifdef __cplusplus
3032extern "C"
3033#endif
3034char $2 ();
3035/* The GNU C library defines this for functions which it implements
3036    to always fail with ENOSYS.  Some functions are actually named
3037    something starting with __ and the normal name is an alias.  */
3038#if defined __stub_$2 || defined __stub___$2
3039choke me
3040#endif
3041
3042int
3043main ()
3044{
3045return $2 ();
3046  ;
3047  return 0;
3048}
3049_ACEOF
3050if ac_fn_cxx_try_link "$LINENO"; then :
3051  eval "$3=yes"
3052else
3053  eval "$3=no"
3054fi
3055rm -f core conftest.err conftest.$ac_objext \
3056    conftest$ac_exeext conftest.$ac_ext
3057fi
3058eval ac_res=\$$3
3059	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3060$as_echo "$ac_res" >&6; }
3061  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3062
3063} # ac_fn_cxx_check_func
3064
3065# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3066# -------------------------------------------------------
3067# Tests whether HEADER exists and can be compiled using the include files in
3068# INCLUDES, setting the cache variable VAR accordingly.
3069ac_fn_c_check_header_compile ()
3070{
3071  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3073$as_echo_n "checking for $2... " >&6; }
3074if eval \${$3+:} false; then :
3075  $as_echo_n "(cached) " >&6
3076else
3077  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3078/* end confdefs.h.  */
3079$4
3080#include <$2>
3081_ACEOF
3082if ac_fn_c_try_compile "$LINENO"; then :
3083  eval "$3=yes"
3084else
3085  eval "$3=no"
3086fi
3087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3088fi
3089eval ac_res=\$$3
3090	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3091$as_echo "$ac_res" >&6; }
3092  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3093
3094} # ac_fn_c_check_header_compile
3095cat >config.log <<_ACEOF
3096This file contains any messages produced by compilers while
3097running configure, to aid debugging if configure makes a mistake.
3098
3099It was created by OpenJDK $as_me jdk9, which was
3100generated by GNU Autoconf 2.69.  Invocation command line was
3101
3102  $ $0 $@
3103
3104_ACEOF
3105exec 5>>config.log
3106{
3107cat <<_ASUNAME
3108## --------- ##
3109## Platform. ##
3110## --------- ##
3111
3112hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3113uname -m = `(uname -m) 2>/dev/null || echo unknown`
3114uname -r = `(uname -r) 2>/dev/null || echo unknown`
3115uname -s = `(uname -s) 2>/dev/null || echo unknown`
3116uname -v = `(uname -v) 2>/dev/null || echo unknown`
3117
3118/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3119/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3120
3121/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3122/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3123/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3124/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3125/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3126/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3127/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3128
3129_ASUNAME
3130
3131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3132for as_dir in $PATH
3133do
3134  IFS=$as_save_IFS
3135  test -z "$as_dir" && as_dir=.
3136    $as_echo "PATH: $as_dir"
3137  done
3138IFS=$as_save_IFS
3139
3140} >&5
3141
3142cat >&5 <<_ACEOF
3143
3144
3145## ----------- ##
3146## Core tests. ##
3147## ----------- ##
3148
3149_ACEOF
3150
3151
3152# Keep a trace of the command line.
3153# Strip out --no-create and --no-recursion so they do not pile up.
3154# Strip out --silent because we don't want to record it for future runs.
3155# Also quote any args containing shell meta-characters.
3156# Make two passes to allow for proper duplicate-argument suppression.
3157ac_configure_args=
3158ac_configure_args0=
3159ac_configure_args1=
3160ac_must_keep_next=false
3161for ac_pass in 1 2
3162do
3163  for ac_arg
3164  do
3165    case $ac_arg in
3166    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3167    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3168    | -silent | --silent | --silen | --sile | --sil)
3169      continue ;;
3170    *\'*)
3171      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3172    esac
3173    case $ac_pass in
3174    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3175    2)
3176      as_fn_append ac_configure_args1 " '$ac_arg'"
3177      if test $ac_must_keep_next = true; then
3178	ac_must_keep_next=false # Got value, back to normal.
3179      else
3180	case $ac_arg in
3181	  *=* | --config-cache | -C | -disable-* | --disable-* \
3182	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3183	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3184	  | -with-* | --with-* | -without-* | --without-* | --x)
3185	    case "$ac_configure_args0 " in
3186	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3187	    esac
3188	    ;;
3189	  -* ) ac_must_keep_next=true ;;
3190	esac
3191      fi
3192      as_fn_append ac_configure_args " '$ac_arg'"
3193      ;;
3194    esac
3195  done
3196done
3197{ ac_configure_args0=; unset ac_configure_args0;}
3198{ ac_configure_args1=; unset ac_configure_args1;}
3199
3200# When interrupted or exit'd, cleanup temporary files, and complete
3201# config.log.  We remove comments because anyway the quotes in there
3202# would cause problems or look ugly.
3203# WARNING: Use '\'' to represent an apostrophe within the trap.
3204# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3205trap 'exit_status=$?
3206  # Save into config.log some information that might help in debugging.
3207  {
3208    echo
3209
3210    $as_echo "## ---------------- ##
3211## Cache variables. ##
3212## ---------------- ##"
3213    echo
3214    # The following way of writing the cache mishandles newlines in values,
3215(
3216  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3217    eval ac_val=\$$ac_var
3218    case $ac_val in #(
3219    *${as_nl}*)
3220      case $ac_var in #(
3221      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3222$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3223      esac
3224      case $ac_var in #(
3225      _ | IFS | as_nl) ;; #(
3226      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3227      *) { eval $ac_var=; unset $ac_var;} ;;
3228      esac ;;
3229    esac
3230  done
3231  (set) 2>&1 |
3232    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3233    *${as_nl}ac_space=\ *)
3234      sed -n \
3235	"s/'\''/'\''\\\\'\'''\''/g;
3236	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3237      ;; #(
3238    *)
3239      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3240      ;;
3241    esac |
3242    sort
3243)
3244    echo
3245
3246    $as_echo "## ----------------- ##
3247## Output variables. ##
3248## ----------------- ##"
3249    echo
3250    for ac_var in $ac_subst_vars
3251    do
3252      eval ac_val=\$$ac_var
3253      case $ac_val in
3254      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3255      esac
3256      $as_echo "$ac_var='\''$ac_val'\''"
3257    done | sort
3258    echo
3259
3260    if test -n "$ac_subst_files"; then
3261      $as_echo "## ------------------- ##
3262## File substitutions. ##
3263## ------------------- ##"
3264      echo
3265      for ac_var in $ac_subst_files
3266      do
3267	eval ac_val=\$$ac_var
3268	case $ac_val in
3269	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3270	esac
3271	$as_echo "$ac_var='\''$ac_val'\''"
3272      done | sort
3273      echo
3274    fi
3275
3276    if test -s confdefs.h; then
3277      $as_echo "## ----------- ##
3278## confdefs.h. ##
3279## ----------- ##"
3280      echo
3281      cat confdefs.h
3282      echo
3283    fi
3284    test "$ac_signal" != 0 &&
3285      $as_echo "$as_me: caught signal $ac_signal"
3286    $as_echo "$as_me: exit $exit_status"
3287  } >&5
3288  rm -f core *.core core.conftest.* &&
3289    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3290    exit $exit_status
3291' 0
3292for ac_signal in 1 2 13 15; do
3293  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3294done
3295ac_signal=0
3296
3297# confdefs.h avoids OS command line length limits that DEFS can exceed.
3298rm -f -r conftest* confdefs.h
3299
3300$as_echo "/* confdefs.h */" > confdefs.h
3301
3302# Predefined preprocessor variables.
3303
3304cat >>confdefs.h <<_ACEOF
3305#define PACKAGE_NAME "$PACKAGE_NAME"
3306_ACEOF
3307
3308cat >>confdefs.h <<_ACEOF
3309#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3310_ACEOF
3311
3312cat >>confdefs.h <<_ACEOF
3313#define PACKAGE_VERSION "$PACKAGE_VERSION"
3314_ACEOF
3315
3316cat >>confdefs.h <<_ACEOF
3317#define PACKAGE_STRING "$PACKAGE_STRING"
3318_ACEOF
3319
3320cat >>confdefs.h <<_ACEOF
3321#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3322_ACEOF
3323
3324cat >>confdefs.h <<_ACEOF
3325#define PACKAGE_URL "$PACKAGE_URL"
3326_ACEOF
3327
3328
3329# Let the site file select an alternate cache file if it wants to.
3330# Prefer an explicitly selected file to automatically selected ones.
3331ac_site_file1=NONE
3332ac_site_file2=NONE
3333if test -n "$CONFIG_SITE"; then
3334  # We do not want a PATH search for config.site.
3335  case $CONFIG_SITE in #((
3336    -*)  ac_site_file1=./$CONFIG_SITE;;
3337    */*) ac_site_file1=$CONFIG_SITE;;
3338    *)   ac_site_file1=./$CONFIG_SITE;;
3339  esac
3340elif test "x$prefix" != xNONE; then
3341  ac_site_file1=$prefix/share/config.site
3342  ac_site_file2=$prefix/etc/config.site
3343else
3344  ac_site_file1=$ac_default_prefix/share/config.site
3345  ac_site_file2=$ac_default_prefix/etc/config.site
3346fi
3347for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3348do
3349  test "x$ac_site_file" = xNONE && continue
3350  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3351    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3352$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3353    sed 's/^/| /' "$ac_site_file" >&5
3354    . "$ac_site_file" \
3355      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3356$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3357as_fn_error $? "failed to load site script $ac_site_file
3358See \`config.log' for more details" "$LINENO" 5; }
3359  fi
3360done
3361
3362if test -r "$cache_file"; then
3363  # Some versions of bash will fail to source /dev/null (special files
3364  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3365  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3366    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3367$as_echo "$as_me: loading cache $cache_file" >&6;}
3368    case $cache_file in
3369      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3370      *)                      . "./$cache_file";;
3371    esac
3372  fi
3373else
3374  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3375$as_echo "$as_me: creating cache $cache_file" >&6;}
3376  >$cache_file
3377fi
3378
3379# Check that the precious variables saved in the cache have kept the same
3380# value.
3381ac_cache_corrupted=false
3382for ac_var in $ac_precious_vars; do
3383  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3384  eval ac_new_set=\$ac_env_${ac_var}_set
3385  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3386  eval ac_new_val=\$ac_env_${ac_var}_value
3387  case $ac_old_set,$ac_new_set in
3388    set,)
3389      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3390$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3391      ac_cache_corrupted=: ;;
3392    ,set)
3393      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3394$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3395      ac_cache_corrupted=: ;;
3396    ,);;
3397    *)
3398      if test "x$ac_old_val" != "x$ac_new_val"; then
3399	# differences in whitespace do not lead to failure.
3400	ac_old_val_w=`echo x $ac_old_val`
3401	ac_new_val_w=`echo x $ac_new_val`
3402	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3403	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3404$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3405	  ac_cache_corrupted=:
3406	else
3407	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3408$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3409	  eval $ac_var=\$ac_old_val
3410	fi
3411	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3412$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3413	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3414$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3415      fi;;
3416  esac
3417  # Pass precious variables to config.status.
3418  if test "$ac_new_set" = set; then
3419    case $ac_new_val in
3420    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3421    *) ac_arg=$ac_var=$ac_new_val ;;
3422    esac
3423    case " $ac_configure_args " in
3424      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3425      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3426    esac
3427  fi
3428done
3429if $ac_cache_corrupted; then
3430  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3432  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3433$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3434  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3435fi
3436## -------------------- ##
3437## Main body of script. ##
3438## -------------------- ##
3439
3440ac_ext=c
3441ac_cpp='$CPP $CPPFLAGS'
3442ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3443ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3444ac_compiler_gnu=$ac_cv_c_compiler_gnu
3445
3446
3447
3448ac_aux_dir=
3449for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3450  if test -f "$ac_dir/install-sh"; then
3451    ac_aux_dir=$ac_dir
3452    ac_install_sh="$ac_aux_dir/install-sh -c"
3453    break
3454  elif test -f "$ac_dir/install.sh"; then
3455    ac_aux_dir=$ac_dir
3456    ac_install_sh="$ac_aux_dir/install.sh -c"
3457    break
3458  elif test -f "$ac_dir/shtool"; then
3459    ac_aux_dir=$ac_dir
3460    ac_install_sh="$ac_aux_dir/shtool install -c"
3461    break
3462  fi
3463done
3464if test -z "$ac_aux_dir"; then
3465  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3466fi
3467
3468# These three variables are undocumented and unsupported,
3469# and are intended to be withdrawn in a future Autoconf release.
3470# They can cause serious problems if a builder's source tree is in a directory
3471# whose full name contains unusual characters.
3472ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3473ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3474ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3475
3476
3477# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3478
3479#
3480# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3481# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3482#
3483# This code is free software; you can redistribute it and/or modify it
3484# under the terms of the GNU General Public License version 2 only, as
3485# published by the Free Software Foundation.  Oracle designates this
3486# particular file as subject to the "Classpath" exception as provided
3487# by Oracle in the LICENSE file that accompanied this code.
3488#
3489# This code is distributed in the hope that it will be useful, but WITHOUT
3490# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3491# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3492# version 2 for more details (a copy is included in the LICENSE file that
3493# accompanied this code).
3494#
3495# You should have received a copy of the GNU General Public License version
3496# 2 along with this work; if not, write to the Free Software Foundation,
3497# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3498#
3499# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3500# or visit www.oracle.com if you need additional information or have any
3501# questions.
3502#
3503
3504#
3505# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3506#
3507# This program is free software; you can redistribute it and/or modify
3508# it under the terms of the GNU General Public License as published by
3509# the Free Software Foundation; either version 2 of the License, or
3510# (at your option) any later version.
3511#
3512# This program is distributed in the hope that it will be useful, but
3513# WITHOUT ANY WARRANTY; without even the implied warranty of
3514# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3515# General Public License for more details.
3516#
3517# You should have received a copy of the GNU General Public License
3518# along with this program; if not, write to the Free Software
3519# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3520#
3521# As a special exception to the GNU General Public License, if you
3522# distribute this file as part of a program that contains a
3523# configuration script generated by Autoconf, you may include it under
3524# the same distribution terms that you use for the rest of that program.
3525
3526# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3527# ----------------------------------
3528# PKG_PROG_PKG_CONFIG
3529
3530# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3531#
3532# Check to see whether a particular set of modules exists.  Similar
3533# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3534#
3535#
3536# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3537# this or PKG_CHECK_MODULES is called, or make sure to call
3538# PKG_CHECK_EXISTS manually
3539# --------------------------------------------------------------
3540
3541
3542
3543# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3544# ---------------------------------------------
3545# _PKG_CONFIG
3546
3547# _PKG_SHORT_ERRORS_SUPPORTED
3548# -----------------------------
3549# _PKG_SHORT_ERRORS_SUPPORTED
3550
3551
3552# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3553# [ACTION-IF-NOT-FOUND])
3554#
3555#
3556# Note that if there is a possibility the first call to
3557# PKG_CHECK_MODULES might not happen, you should be sure to include an
3558# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3559#
3560#
3561# --------------------------------------------------------------
3562# PKG_CHECK_MODULES
3563
3564
3565# Include these first...
3566#
3567# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3568# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3569#
3570# This code is free software; you can redistribute it and/or modify it
3571# under the terms of the GNU General Public License version 2 only, as
3572# published by the Free Software Foundation.  Oracle designates this
3573# particular file as subject to the "Classpath" exception as provided
3574# by Oracle in the LICENSE file that accompanied this code.
3575#
3576# This code is distributed in the hope that it will be useful, but WITHOUT
3577# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3578# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3579# version 2 for more details (a copy is included in the LICENSE file that
3580# accompanied this code).
3581#
3582# You should have received a copy of the GNU General Public License version
3583# 2 along with this work; if not, write to the Free Software Foundation,
3584# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3585#
3586# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3587# or visit www.oracle.com if you need additional information or have any
3588# questions.
3589#
3590
3591# Create a function/macro that takes a series of named arguments. The call is
3592# similar to AC_DEFUN, but the setup of the function looks like this:
3593# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3594# ... do something
3595#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3596# ])
3597# A star (*) in front of a named argument means that it is required and it's
3598# presence will be verified. To pass e.g. the first value as a normal indexed
3599# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3600# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3601# "ARG_FOO".
3602#
3603# The generated function can be called like this:
3604# MYFUNC(FOO: [foo-val],
3605#     BAR: [
3606#         $ECHO hello world
3607#     ])
3608# Note that the argument value must start on the same line as the argument name.
3609#
3610# Argument 1: Name of the function to define
3611# Argument 2: List of legal named arguments, with a * prefix for required arguments
3612# Argument 3: Argument array to treat as named, typically $@
3613# Argument 4: The main function body
3614
3615
3616# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3617# If so, then append $1 to $2 \
3618# Also set JVM_ARG_OK to true/false depending on outcome.
3619
3620
3621# Appends a string to a path variable, only adding the : when needed.
3622
3623
3624# Prepends a string to a path variable, only adding the : when needed.
3625
3626
3627# This will make sure the given variable points to a full and proper
3628# path. This means:
3629# 1) There will be no spaces in the path. On unix platforms,
3630#    spaces in the path will result in an error. On Windows,
3631#    the path will be rewritten using short-style to be space-free.
3632# 2) The path will be absolute, and it will be in unix-style (on
3633#     cygwin).
3634# $1: The name of the variable to fix
3635
3636
3637# This will make sure the given variable points to a executable
3638# with a full and proper path. This means:
3639# 1) There will be no spaces in the path. On unix platforms,
3640#    spaces in the path will result in an error. On Windows,
3641#    the path will be rewritten using short-style to be space-free.
3642# 2) The path will be absolute, and it will be in unix-style (on
3643#     cygwin).
3644# Any arguments given to the executable is preserved.
3645# If the input variable does not have a directory specification, then
3646# it need to be in the PATH.
3647# $1: The name of the variable to fix
3648
3649
3650
3651
3652# Register a --with argument but mark it as deprecated
3653# $1: The name of the with argument to deprecate, not including --with-
3654
3655
3656# Register a --enable argument but mark it as deprecated
3657# $1: The name of the with argument to deprecate, not including --enable-
3658# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3659# $3: Messages to user.
3660
3661
3662
3663
3664# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3665# $1: variable to check
3666
3667
3668# Check that there are no unprocessed overridden variables left.
3669# If so, they are an incorrect argument and we will exit with an error.
3670
3671
3672# Setup a tool for the given variable. If correctly specified by the user,
3673# use that value, otherwise search for the tool using the supplied code snippet.
3674# $1: variable to set
3675# $2: code snippet to call to look for the tool
3676# $3: code snippet to call if variable was used to find tool
3677
3678
3679# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3680# $1: variable to set
3681# $2: executable name (or list of names) to look for
3682# $3: [path]
3683
3684
3685# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3686# $1: variable to set
3687# $2: executable name (or list of names) to look for
3688
3689
3690# Like BASIC_PATH_PROGS but fails if no tool was found.
3691# $1: variable to set
3692# $2: executable name (or list of names) to look for
3693# $3: [path]
3694
3695
3696# Like BASIC_SETUP_TOOL but fails if no tool was found.
3697# $1: variable to set
3698# $2: autoconf macro to call to look for the special tool
3699
3700
3701# Setup the most fundamental tools that relies on not much else to set up,
3702# but is used by much of the early bootstrap code.
3703
3704
3705# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3706
3707
3708# Evaluates platform specific overrides for devkit variables.
3709# $1: Name of variable
3710
3711
3712
3713
3714
3715
3716#%%% Simple tools %%%
3717
3718# Check if we have found a usable version of make
3719# $1: the path to a potential make binary (or empty)
3720# $2: the description on how we found this
3721
3722
3723
3724
3725# Goes looking for a usable version of GNU make.
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736# Check if build directory is on local disk. If not possible to determine,
3737# we prefer to claim it's local.
3738# Argument 1: directory to test
3739# Argument 2: what to do if it is on local disk
3740# Argument 3: what to do otherwise (remote disk or failure)
3741
3742
3743# Check that source files have basic read permissions set. This might
3744# not be the case in cygwin in certain conditions.
3745
3746
3747
3748
3749# Check for support for specific options in bash
3750
3751
3752################################################################################
3753#
3754# Default make target
3755#
3756
3757
3758# Code to run after AC_OUTPUT
3759
3760
3761#
3762# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3763# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3764#
3765# This code is free software; you can redistribute it and/or modify it
3766# under the terms of the GNU General Public License version 2 only, as
3767# published by the Free Software Foundation.  Oracle designates this
3768# particular file as subject to the "Classpath" exception as provided
3769# by Oracle in the LICENSE file that accompanied this code.
3770#
3771# This code is distributed in the hope that it will be useful, but WITHOUT
3772# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3773# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3774# version 2 for more details (a copy is included in the LICENSE file that
3775# accompanied this code).
3776#
3777# You should have received a copy of the GNU General Public License version
3778# 2 along with this work; if not, write to the Free Software Foundation,
3779# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3780#
3781# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3782# or visit www.oracle.com if you need additional information or have any
3783# questions.
3784#
3785
3786
3787
3788
3789
3790# Helper function which possibly converts a path using DOS-style short mode.
3791# If so, the updated path is stored in $new_path.
3792# $1: The path to check
3793
3794
3795# Helper function which possibly converts a path using DOS-style short mode.
3796# If so, the updated path is stored in $new_path.
3797# $1: The path to check
3798
3799
3800# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3801# and could probably be heavily simplified. However, all changes in this
3802# area tend to need lot of testing in different scenarios, and in lack of
3803# proper unit testing, cleaning this up has not been deemed worth the effort
3804# at the moment.
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3815
3816
3817
3818
3819# ... then the rest
3820#
3821# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3822# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3823#
3824# This code is free software; you can redistribute it and/or modify it
3825# under the terms of the GNU General Public License version 2 only, as
3826# published by the Free Software Foundation.  Oracle designates this
3827# particular file as subject to the "Classpath" exception as provided
3828# by Oracle in the LICENSE file that accompanied this code.
3829#
3830# This code is distributed in the hope that it will be useful, but WITHOUT
3831# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3832# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3833# version 2 for more details (a copy is included in the LICENSE file that
3834# accompanied this code).
3835#
3836# You should have received a copy of the GNU General Public License version
3837# 2 along with this work; if not, write to the Free Software Foundation,
3838# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3839#
3840# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3841# or visit www.oracle.com if you need additional information or have any
3842# questions.
3843#
3844
3845########################################################################
3846# This file handles detection of the Boot JDK. The Boot JDK detection
3847# process has been developed as a response to solve a complex real-world
3848# problem. Initially, it was simple, but it has grown as platform after
3849# platform, idiosyncracy after idiosyncracy has been supported.
3850#
3851# The basic idea is this:
3852# 1) You need an acceptable *) JDK to use as a Boot JDK
3853# 2) There are several ways to locate a JDK, that are mostly platform
3854#    dependent **)
3855# 3) You can have multiple JDKs installed
3856# 4) If possible, configure should try to dig out an acceptable JDK
3857#    automatically, without having to resort to command-line options
3858#
3859# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3860#     javac) and not a JRE, etc.
3861#
3862# **) On Windows we typically use a well-known path.
3863#     On MacOSX we typically use the tool java_home.
3864#     On Linux we typically find javac in the $PATH, and then follow a
3865#     chain of symlinks that often ends up in a real JDK.
3866#
3867# This leads to the code where we check in different ways to locate a
3868# JDK, and if one is found, check if it is acceptable. If not, we print
3869# our reasons for rejecting it (useful when debugging non-working
3870# configure situations) and continue checking the next one.
3871########################################################################
3872
3873# Execute the check given as argument, and verify the result
3874# If the Boot JDK was previously found, do nothing
3875# $1 A command line (typically autoconf macro) to execute
3876
3877
3878# Test: Is bootjdk explicitly set by command line arguments?
3879
3880
3881# Test: Is $JAVA_HOME set?
3882
3883
3884# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3885
3886
3887# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3888# $1: Argument to the java_home binary (optional)
3889
3890
3891# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3892
3893
3894# Look for a jdk in the given path. If there are multiple, try to select the newest.
3895# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3896# $1 = Path to directory containing jdk installations.
3897# $2 = String to append to the found JDK directory to get the proper JDK home
3898
3899
3900# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3901# environmental variable as base for where to look.
3902# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3903
3904
3905# Test: Is there a JDK installed in default, well-known locations?
3906
3907
3908# Check that a command-line tool in the Boot JDK is correct
3909# $1 = name of variable to assign
3910# $2 = name of binary
3911
3912
3913###############################################################################
3914#
3915# We need a Boot JDK to bootstrap the build.
3916#
3917
3918
3919
3920
3921
3922# BUILD_JDK: the location of the latest JDK that can run
3923#   on the host system and supports the target class file version
3924#   generated in this JDK build.  This variable should only be
3925#   used after the launchers are built.
3926#
3927
3928# Execute the check given as argument, and verify the result.
3929# If the JDK was previously found, do nothing.
3930# $1 A command line (typically autoconf macro) to execute
3931
3932
3933# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3934# is different than the host system doing the build (e.g. cross-compilation),
3935# a special BUILD_JDK is built as part of the build process.  An external
3936# prebuilt BUILD_JDK can also be supplied.
3937
3938
3939#
3940# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3941# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3942#
3943# This code is free software; you can redistribute it and/or modify it
3944# under the terms of the GNU General Public License version 2 only, as
3945# published by the Free Software Foundation.  Oracle designates this
3946# particular file as subject to the "Classpath" exception as provided
3947# by Oracle in the LICENSE file that accompanied this code.
3948#
3949# This code is distributed in the hope that it will be useful, but WITHOUT
3950# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3951# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3952# version 2 for more details (a copy is included in the LICENSE file that
3953# accompanied this code).
3954#
3955# You should have received a copy of the GNU General Public License version
3956# 2 along with this work; if not, write to the Free Software Foundation,
3957# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3958#
3959# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3960# or visit www.oracle.com if you need additional information or have any
3961# questions.
3962#
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980################################################################################
3981#
3982# Runs icecc-create-env once and prints the error if it fails
3983#
3984# $1: arguments to icecc-create-env
3985# $2: log file
3986#
3987
3988
3989################################################################################
3990#
3991# Optionally enable distributed compilation of native code using icecc/icecream
3992#
3993
3994
3995
3996
3997
3998
3999
4000#
4001# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4002# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4003#
4004# This code is free software; you can redistribute it and/or modify it
4005# under the terms of the GNU General Public License version 2 only, as
4006# published by the Free Software Foundation.  Oracle designates this
4007# particular file as subject to the "Classpath" exception as provided
4008# by Oracle in the LICENSE file that accompanied this code.
4009#
4010# This code is distributed in the hope that it will be useful, but WITHOUT
4011# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4012# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4013# version 2 for more details (a copy is included in the LICENSE file that
4014# accompanied this code).
4015#
4016# You should have received a copy of the GNU General Public License version
4017# 2 along with this work; if not, write to the Free Software Foundation,
4018# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4019#
4020# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4021# or visit www.oracle.com if you need additional information or have any
4022# questions.
4023#
4024
4025################################################################################
4026#
4027# Setup ABI profile (for arm)
4028#
4029
4030
4031# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4032# corresponding configure arguments instead
4033
4034
4035# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4036# that configure can use them while detecting compilers.
4037# TOOLCHAIN_TYPE is available here.
4038# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4039
4040
4041
4042
4043
4044
4045# Documentation on common flags used for solstudio in HIGHEST.
4046#
4047# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4048#          done with care, there are some assumptions below that need to
4049#          be understood about the use of pointers, and IEEE behavior.
4050#
4051# -fns: Use non-standard floating point mode (not IEEE 754)
4052# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4053# -fsingle: Use single precision floating point with 'float'
4054# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4055#   (Source with excessing pointer casting and data access with mixed
4056#    pointer types are not recommended)
4057# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4058#   (If you expect perfect errno behavior, do not use this)
4059# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4060# -xrestrict: Pointer parameters to functions do not overlap
4061#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4062#    If you pass in multiple pointers to the same data, do not use this)
4063# -xlibmil: Inline some library routines
4064#   (If you expect perfect errno behavior, do not use this)
4065# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4066#   (If you expect perfect errno behavior, do not use this)
4067#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4068
4069    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4070    # Bug?
4071    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4072    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4073    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4074    #fi
4075
4076
4077
4078
4079
4080
4081################################################################################
4082# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4083#      conditionals against.
4084# $2 - Optional prefix for each variable defined.
4085
4086
4087# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4088#                                  IF_FALSE: [RUN-IF-FALSE])
4089# ------------------------------------------------------------
4090# Check that the C compiler supports an argument
4091
4092
4093
4094
4095# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4096#                                    IF_FALSE: [RUN-IF-FALSE])
4097# ------------------------------------------------------------
4098# Check that the C++ compiler supports an argument
4099
4100
4101
4102
4103# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4104#                                IF_FALSE: [RUN-IF-FALSE])
4105# ------------------------------------------------------------
4106# Check that the C and C++ compilers support an argument
4107
4108
4109
4110
4111# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4112#                                   IF_FALSE: [RUN-IF-FALSE])
4113# ------------------------------------------------------------
4114# Check that the linker support an argument
4115
4116
4117
4118
4119
4120
4121# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4122# Arguments:
4123# $1 - Optional prefix for each variable defined.
4124
4125
4126#
4127# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4128# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4129#
4130# This code is free software; you can redistribute it and/or modify it
4131# under the terms of the GNU General Public License version 2 only, as
4132# published by the Free Software Foundation.  Oracle designates this
4133# particular file as subject to the "Classpath" exception as provided
4134# by Oracle in the LICENSE file that accompanied this code.
4135#
4136# This code is distributed in the hope that it will be useful, but WITHOUT
4137# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4138# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4139# version 2 for more details (a copy is included in the LICENSE file that
4140# accompanied this code).
4141#
4142# You should have received a copy of the GNU General Public License version
4143# 2 along with this work; if not, write to the Free Software Foundation,
4144# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4145#
4146# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4147# or visit www.oracle.com if you need additional information or have any
4148# questions.
4149#
4150
4151
4152
4153
4154
4155cygwin_help() {
4156  case $1 in
4157    unzip)
4158      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4159      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4160      ;;
4161    zip)
4162      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4163      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4164      ;;
4165    make)
4166      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4167      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4168      ;;
4169    freetype)
4170      HELP_MSG="
4171The freetype library can now be build during the configure process.
4172Download the freetype sources and unpack them into an arbitrary directory:
4173
4174wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4175tar -xzf freetype-2.5.3.tar.gz
4176
4177Then run configure with '--with-freetype-src=<freetype_src>'. This will
4178automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4179builds or into '<freetype_src>/lib32' for 32-bit builds.
4180Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4181and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4182
4183Alternatively you can unpack the sources like this to use the default directory:
4184
4185tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4186      ;;
4187  esac
4188}
4189
4190msys_help() {
4191  PKGHANDLER_COMMAND=""
4192}
4193
4194apt_help() {
4195  case $1 in
4196    reduced)
4197      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4198    devkit)
4199      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4200    openjdk)
4201      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4202    alsa)
4203      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4204    cups)
4205      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4206    freetype)
4207      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4208    ffi)
4209      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4210    x11)
4211      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4212    ccache)
4213      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4214    dtrace)
4215      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4216    elf)
4217      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4218  esac
4219}
4220
4221yum_help() {
4222  case $1 in
4223    devkit)
4224      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4225    openjdk)
4226      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4227    alsa)
4228      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4229    cups)
4230      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4231    freetype)
4232      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4233    x11)
4234      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4235    ccache)
4236      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4237    elf)
4238      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4239  esac
4240}
4241
4242brew_help() {
4243  case $1 in
4244    openjdk)
4245      PKGHANDLER_COMMAND="brew cask install java" ;;
4246    freetype)
4247      PKGHANDLER_COMMAND="brew install freetype" ;;
4248    ccache)
4249      PKGHANDLER_COMMAND="brew install ccache" ;;
4250  esac
4251}
4252
4253port_help() {
4254  PKGHANDLER_COMMAND=""
4255}
4256
4257pkgutil_help() {
4258  PKGHANDLER_COMMAND=""
4259}
4260
4261pkgadd_help() {
4262  PKGHANDLER_COMMAND=""
4263}
4264
4265# This function will check if we're called from the "configure" wrapper while
4266# printing --help. If so, we will print out additional information that can
4267# only be extracted within the autoconf script, and then exit. This must be
4268# called at the very beginning in configure.ac.
4269
4270
4271
4272
4273
4274
4275#
4276# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4277# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4278#
4279# This code is free software; you can redistribute it and/or modify it
4280# under the terms of the GNU General Public License version 2 only, as
4281# published by the Free Software Foundation.  Oracle designates this
4282# particular file as subject to the "Classpath" exception as provided
4283# by Oracle in the LICENSE file that accompanied this code.
4284#
4285# This code is distributed in the hope that it will be useful, but WITHOUT
4286# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4287# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4288# version 2 for more details (a copy is included in the LICENSE file that
4289# accompanied this code).
4290#
4291# You should have received a copy of the GNU General Public License version
4292# 2 along with this work; if not, write to the Free Software Foundation,
4293# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4294#
4295# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4296# or visit www.oracle.com if you need additional information or have any
4297# questions.
4298#
4299
4300# All valid JVM features, regardless of platform
4301VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4302    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4303    static-build link-time-opt aot"
4304
4305# All valid JVM variants
4306VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4307
4308###############################################################################
4309# Check if the specified JVM variant should be built. To be used in shell if
4310# constructs, like this:
4311# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4312#
4313# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4314
4315# Definition kept in one line to allow inlining in if statements.
4316# Additional [] needed to keep m4 from mangling shell constructs.
4317
4318
4319###############################################################################
4320# Check if the specified JVM features are explicitly enabled. To be used in
4321# shell if constructs, like this:
4322# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4323#
4324# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4325
4326# Definition kept in one line to allow inlining in if statements.
4327# Additional [] needed to keep m4 from mangling shell constructs.
4328
4329
4330###############################################################################
4331# Check which variants of the JVM that we want to build. Available variants are:
4332#   server: normal interpreter, and a tiered C1/C2 compiler
4333#   client: normal interpreter, and C1 (no C2 compiler)
4334#   minimal: reduced form of client with optional features stripped out
4335#   core: normal interpreter only, no compiler
4336#   zero: C++ based interpreter only, no compiler
4337#   zeroshark: C++ based interpreter, and a llvm-based compiler
4338#   custom: baseline JVM with no default features
4339#
4340
4341
4342###############################################################################
4343# Check if dtrace should be enabled and has all prerequisites present.
4344#
4345
4346
4347################################################################################
4348# Check if AOT should be enabled
4349#
4350
4351
4352###############################################################################
4353# Set up all JVM features for each JVM variant.
4354#
4355
4356
4357###############################################################################
4358# Validate JVM features once all setup is complete, including custom setup.
4359#
4360
4361
4362################################################################################
4363#
4364# Specify which sources will be used to build the 64-bit ARM port
4365#
4366# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4367# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4368#
4369
4370
4371
4372################################################################################
4373# Check if gtest should be built
4374#
4375
4376
4377#
4378# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4379# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4380#
4381# This code is free software; you can redistribute it and/or modify it
4382# under the terms of the GNU General Public License version 2 only, as
4383# published by the Free Software Foundation.  Oracle designates this
4384# particular file as subject to the "Classpath" exception as provided
4385# by Oracle in the LICENSE file that accompanied this code.
4386#
4387# This code is distributed in the hope that it will be useful, but WITHOUT
4388# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4389# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4390# version 2 for more details (a copy is included in the LICENSE file that
4391# accompanied this code).
4392#
4393# You should have received a copy of the GNU General Public License version
4394# 2 along with this work; if not, write to the Free Software Foundation,
4395# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4396#
4397# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4398# or visit www.oracle.com if you need additional information or have any
4399# questions.
4400#
4401
4402###############################################################################
4403# Check which variant of the JDK that we want to build.
4404# Currently we have:
4405#    normal:   standard edition
4406# but the custom make system may add other variants
4407#
4408# Effectively the JDK variant gives a name to a specific set of
4409# modules to compile into the JDK.
4410
4411
4412###############################################################################
4413# Set the debug level
4414#    release: no debug information, all optimizations, no asserts.
4415#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4416#    fastdebug: debug information (-g), all optimizations, all asserts
4417#    slowdebug: debug information (-g), no optimizations, all asserts
4418
4419
4420###############################################################################
4421#
4422# Should we build only OpenJDK even if closed sources are present?
4423#
4424
4425
4426
4427
4428###############################################################################
4429#
4430# Enable or disable the elliptic curve crypto implementation
4431#
4432
4433
4434
4435
4436################################################################################
4437#
4438# Gcov coverage data for hotspot
4439#
4440
4441
4442################################################################################
4443#
4444# Static build support.  When enabled will generate static
4445# libraries instead of shared libraries for all JDK libs.
4446#
4447
4448
4449################################################################################
4450#
4451# jlink options.
4452# We always keep packaged modules in JDK image.
4453#
4454
4455
4456################################################################################
4457#
4458# Check if building of the jtreg failure handler should be enabled.
4459#
4460
4461
4462################################################################################
4463#
4464# Enable or disable generation of the classlist at build time
4465#
4466
4467
4468#
4469# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4470# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4471#
4472# This code is free software; you can redistribute it and/or modify it
4473# under the terms of the GNU General Public License version 2 only, as
4474# published by the Free Software Foundation.  Oracle designates this
4475# particular file as subject to the "Classpath" exception as provided
4476# by Oracle in the LICENSE file that accompanied this code.
4477#
4478# This code is distributed in the hope that it will be useful, but WITHOUT
4479# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4480# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4481# version 2 for more details (a copy is included in the LICENSE file that
4482# accompanied this code).
4483#
4484# You should have received a copy of the GNU General Public License version
4485# 2 along with this work; if not, write to the Free Software Foundation,
4486# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4487#
4488# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4489# or visit www.oracle.com if you need additional information or have any
4490# questions.
4491#
4492
4493###############################################################################
4494#
4495# Setup version numbers
4496#
4497
4498# Verify that a given string represents a valid version number, and assign it
4499# to a variable.
4500
4501# Argument 1: the variable to assign to
4502# Argument 2: the value given by the user
4503
4504
4505
4506
4507#
4508# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4509# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4510#
4511# This code is free software; you can redistribute it and/or modify it
4512# under the terms of the GNU General Public License version 2 only, as
4513# published by the Free Software Foundation.  Oracle designates this
4514# particular file as subject to the "Classpath" exception as provided
4515# by Oracle in the LICENSE file that accompanied this code.
4516#
4517# This code is distributed in the hope that it will be useful, but WITHOUT
4518# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4519# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4520# version 2 for more details (a copy is included in the LICENSE file that
4521# accompanied this code).
4522#
4523# You should have received a copy of the GNU General Public License version
4524# 2 along with this work; if not, write to the Free Software Foundation,
4525# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4526#
4527# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4528# or visit www.oracle.com if you need additional information or have any
4529# questions.
4530#
4531
4532# Major library component reside in separate files.
4533#
4534# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4535# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4536#
4537# This code is free software; you can redistribute it and/or modify it
4538# under the terms of the GNU General Public License version 2 only, as
4539# published by the Free Software Foundation.  Oracle designates this
4540# particular file as subject to the "Classpath" exception as provided
4541# by Oracle in the LICENSE file that accompanied this code.
4542#
4543# This code is distributed in the hope that it will be useful, but WITHOUT
4544# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4545# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4546# version 2 for more details (a copy is included in the LICENSE file that
4547# accompanied this code).
4548#
4549# You should have received a copy of the GNU General Public License version
4550# 2 along with this work; if not, write to the Free Software Foundation,
4551# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4552#
4553# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4554# or visit www.oracle.com if you need additional information or have any
4555# questions.
4556#
4557
4558################################################################################
4559# Setup alsa (Advanced Linux Sound Architecture)
4560################################################################################
4561
4562
4563#
4564# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4565# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4566#
4567# This code is free software; you can redistribute it and/or modify it
4568# under the terms of the GNU General Public License version 2 only, as
4569# published by the Free Software Foundation.  Oracle designates this
4570# particular file as subject to the "Classpath" exception as provided
4571# by Oracle in the LICENSE file that accompanied this code.
4572#
4573# This code is distributed in the hope that it will be useful, but WITHOUT
4574# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4575# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4576# version 2 for more details (a copy is included in the LICENSE file that
4577# accompanied this code).
4578#
4579# You should have received a copy of the GNU General Public License version
4580# 2 along with this work; if not, write to the Free Software Foundation,
4581# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4582#
4583# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4584# or visit www.oracle.com if you need additional information or have any
4585# questions.
4586#
4587
4588################################################################################
4589# Setup bundled libraries.
4590#
4591# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4592# OpenJDK repository. Default is to use these libraries as bundled, but they
4593# might be replaced by en external version by the user.
4594################################################################################
4595
4596
4597################################################################################
4598# Setup libjpeg
4599################################################################################
4600
4601
4602################################################################################
4603# Setup giflib
4604################################################################################
4605
4606
4607################################################################################
4608# Setup libpng
4609################################################################################
4610
4611
4612################################################################################
4613# Setup zlib
4614################################################################################
4615
4616
4617################################################################################
4618# Setup lcms (Little CMS)
4619################################################################################
4620
4621
4622#
4623# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4624# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4625#
4626# This code is free software; you can redistribute it and/or modify it
4627# under the terms of the GNU General Public License version 2 only, as
4628# published by the Free Software Foundation.  Oracle designates this
4629# particular file as subject to the "Classpath" exception as provided
4630# by Oracle in the LICENSE file that accompanied this code.
4631#
4632# This code is distributed in the hope that it will be useful, but WITHOUT
4633# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4634# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4635# version 2 for more details (a copy is included in the LICENSE file that
4636# accompanied this code).
4637#
4638# You should have received a copy of the GNU General Public License version
4639# 2 along with this work; if not, write to the Free Software Foundation,
4640# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4641#
4642# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4643# or visit www.oracle.com if you need additional information or have any
4644# questions.
4645#
4646
4647################################################################################
4648# Setup cups (Common Unix Printing System)
4649################################################################################
4650
4651
4652#
4653# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4654# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4655#
4656# This code is free software; you can redistribute it and/or modify it
4657# under the terms of the GNU General Public License version 2 only, as
4658# published by the Free Software Foundation.  Oracle designates this
4659# particular file as subject to the "Classpath" exception as provided
4660# by Oracle in the LICENSE file that accompanied this code.
4661#
4662# This code is distributed in the hope that it will be useful, but WITHOUT
4663# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4664# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4665# version 2 for more details (a copy is included in the LICENSE file that
4666# accompanied this code).
4667#
4668# You should have received a copy of the GNU General Public License version
4669# 2 along with this work; if not, write to the Free Software Foundation,
4670# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4671#
4672# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4673# or visit www.oracle.com if you need additional information or have any
4674# questions.
4675#
4676
4677################################################################################
4678# Setup libffi (Foreign Function Interface)
4679################################################################################
4680
4681
4682#
4683# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4684# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4685#
4686# This code is free software; you can redistribute it and/or modify it
4687# under the terms of the GNU General Public License version 2 only, as
4688# published by the Free Software Foundation.  Oracle designates this
4689# particular file as subject to the "Classpath" exception as provided
4690# by Oracle in the LICENSE file that accompanied this code.
4691#
4692# This code is distributed in the hope that it will be useful, but WITHOUT
4693# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4694# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4695# version 2 for more details (a copy is included in the LICENSE file that
4696# accompanied this code).
4697#
4698# You should have received a copy of the GNU General Public License version
4699# 2 along with this work; if not, write to the Free Software Foundation,
4700# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4701#
4702# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4703# or visit www.oracle.com if you need additional information or have any
4704# questions.
4705#
4706
4707################################################################################
4708# Build the freetype lib from source
4709################################################################################
4710
4711
4712################################################################################
4713# Check if a potential freeype library match is correct and usable
4714################################################################################
4715
4716
4717################################################################################
4718# Setup freetype (The FreeType2 font rendering library)
4719################################################################################
4720
4721
4722#
4723# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4724# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4725#
4726# This code is free software; you can redistribute it and/or modify it
4727# under the terms of the GNU General Public License version 2 only, as
4728# published by the Free Software Foundation.  Oracle designates this
4729# particular file as subject to the "Classpath" exception as provided
4730# by Oracle in the LICENSE file that accompanied this code.
4731#
4732# This code is distributed in the hope that it will be useful, but WITHOUT
4733# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4734# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4735# version 2 for more details (a copy is included in the LICENSE file that
4736# accompanied this code).
4737#
4738# You should have received a copy of the GNU General Public License version
4739# 2 along with this work; if not, write to the Free Software Foundation,
4740# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4741#
4742# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4743# or visit www.oracle.com if you need additional information or have any
4744# questions.
4745#
4746
4747################################################################################
4748# Setup the standard C/C++ runtime libraries.
4749#
4750# Most importantly, determine if stdc++ should be linked statically or
4751# dynamically.
4752################################################################################
4753
4754
4755#
4756# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4757# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4758#
4759# This code is free software; you can redistribute it and/or modify it
4760# under the terms of the GNU General Public License version 2 only, as
4761# published by the Free Software Foundation.  Oracle designates this
4762# particular file as subject to the "Classpath" exception as provided
4763# by Oracle in the LICENSE file that accompanied this code.
4764#
4765# This code is distributed in the hope that it will be useful, but WITHOUT
4766# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4767# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4768# version 2 for more details (a copy is included in the LICENSE file that
4769# accompanied this code).
4770#
4771# You should have received a copy of the GNU General Public License version
4772# 2 along with this work; if not, write to the Free Software Foundation,
4773# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4774#
4775# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4776# or visit www.oracle.com if you need additional information or have any
4777# questions.
4778#
4779
4780################################################################################
4781# Setup X11 Windows system
4782################################################################################
4783
4784
4785
4786################################################################################
4787# Determine which libraries are needed for this configuration
4788################################################################################
4789
4790
4791################################################################################
4792# Parse library options, and setup needed libraries
4793################################################################################
4794
4795
4796################################################################################
4797# Setup llvm (Low-Level VM)
4798################################################################################
4799
4800
4801################################################################################
4802# Setup various libraries, typically small system libraries
4803################################################################################
4804
4805
4806################################################################################
4807# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4808# redistribute it in the test image.
4809################################################################################
4810
4811
4812
4813#
4814# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4815# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4816#
4817# This code is free software; you can redistribute it and/or modify it
4818# under the terms of the GNU General Public License version 2 only, as
4819# published by the Free Software Foundation.  Oracle designates this
4820# particular file as subject to the "Classpath" exception as provided
4821# by Oracle in the LICENSE file that accompanied this code.
4822#
4823# This code is distributed in the hope that it will be useful, but WITHOUT
4824# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4825# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4826# version 2 for more details (a copy is included in the LICENSE file that
4827# accompanied this code).
4828#
4829# You should have received a copy of the GNU General Public License version
4830# 2 along with this work; if not, write to the Free Software Foundation,
4831# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4832#
4833# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4834# or visit www.oracle.com if you need additional information or have any
4835# questions.
4836#
4837
4838# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4839# Converts autoconf style CPU name to OpenJDK style, into
4840# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4841
4842
4843# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4844# Converts autoconf style OS name to OpenJDK style, into
4845# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4846
4847
4848# Expects $host_os $host_cpu $build_os and $build_cpu
4849# and $with_target_bits to have been setup!
4850#
4851# Translate the standard triplet(quadruplet) definition
4852# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4853# OPENJDK_BUILD_OS, etc.
4854
4855
4856# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4857# accordingly. Must be done after setting up build and target system, but before
4858# doing anything else with these values.
4859
4860
4861# Setup the legacy variables, for controlling the old makefiles.
4862#
4863
4864
4865# $1 - Either TARGET or BUILD to setup the variables for.
4866
4867
4868
4869
4870
4871
4872#%%% Build and target systems %%%
4873
4874
4875
4876
4877# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4878# Add -mX to various FLAGS variables.
4879
4880
4881
4882
4883
4884
4885#
4886# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4887# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4888#
4889# This code is free software; you can redistribute it and/or modify it
4890# under the terms of the GNU General Public License version 2 only, as
4891# published by the Free Software Foundation.  Oracle designates this
4892# particular file as subject to the "Classpath" exception as provided
4893# by Oracle in the LICENSE file that accompanied this code.
4894#
4895# This code is distributed in the hope that it will be useful, but WITHOUT
4896# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4897# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4898# version 2 for more details (a copy is included in the LICENSE file that
4899# accompanied this code).
4900#
4901# You should have received a copy of the GNU General Public License version
4902# 2 along with this work; if not, write to the Free Software Foundation,
4903# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4904#
4905# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4906# or visit www.oracle.com if you need additional information or have any
4907# questions.
4908#
4909
4910
4911
4912
4913
4914
4915
4916################################################################################
4917# Define a mechanism for importing extra prebuilt modules
4918#
4919
4920
4921
4922#
4923# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4924# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4925#
4926# This code is free software; you can redistribute it and/or modify it
4927# under the terms of the GNU General Public License version 2 only, as
4928# published by the Free Software Foundation.  Oracle designates this
4929# particular file as subject to the "Classpath" exception as provided
4930# by Oracle in the LICENSE file that accompanied this code.
4931#
4932# This code is distributed in the hope that it will be useful, but WITHOUT
4933# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4934# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4935# version 2 for more details (a copy is included in the LICENSE file that
4936# accompanied this code).
4937#
4938# You should have received a copy of the GNU General Public License version
4939# 2 along with this work; if not, write to the Free Software Foundation,
4940# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4941#
4942# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4943# or visit www.oracle.com if you need additional information or have any
4944# questions.
4945#
4946
4947########################################################################
4948# This file is responsible for detecting, verifying and setting up the
4949# toolchain, i.e. the compiler, linker and related utilities. It will setup
4950# proper paths to the binaries, but it will not setup any flags.
4951#
4952# The binaries used is determined by the toolchain type, which is the family of
4953# compilers and related tools that are used.
4954########################################################################
4955
4956
4957# All valid toolchains, regardless of platform (used by help.m4)
4958VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4959
4960# These toolchains are valid on different platforms
4961VALID_TOOLCHAINS_linux="gcc clang"
4962VALID_TOOLCHAINS_solaris="solstudio"
4963VALID_TOOLCHAINS_macosx="gcc clang"
4964VALID_TOOLCHAINS_aix="xlc"
4965VALID_TOOLCHAINS_windows="microsoft"
4966
4967# Toolchain descriptions
4968TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4969TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4970TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4971TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4972TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4973
4974# Minimum supported versions, empty means unspecified
4975TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4976TOOLCHAIN_MINIMUM_VERSION_gcc="4.7"
4977TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4978TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4979TOOLCHAIN_MINIMUM_VERSION_xlc=""
4980
4981# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4982# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4983# $1 - optional variable prefix for compiler and version variables (BUILD_)
4984# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4985
4986
4987# Check if the configured compiler (C and C++) is of a specific version or
4988# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4989#
4990# Arguments:
4991#   VERSION:   The version string to check against the found version
4992#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4993#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4994#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4995
4996
4997
4998
4999# Setup a number of variables describing how native output files are
5000# named on this platform/toolchain.
5001
5002
5003# Determine which toolchain type to use, and make sure it is valid for this
5004# platform. Setup various information about the selected toolchain.
5005
5006
5007# Before we start detecting the toolchain executables, we might need some
5008# special setup, e.g. additional paths etc.
5009
5010
5011# Restore path, etc
5012
5013
5014# Check if a compiler is of the toolchain type we expect, and save the version
5015# information from it. If the compiler does not match the expected type,
5016# this function will abort using AC_MSG_ERROR. If it matches, the version will
5017# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5018# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5019#
5020# $1 = compiler to test (CC or CXX)
5021# $2 = human readable name of compiler (C or C++)
5022
5023
5024# Try to locate the given C or C++ compiler in the path, or otherwise.
5025#
5026# $1 = compiler to test (CC or CXX)
5027# $2 = human readable name of compiler (C or C++)
5028# $3 = compiler name to search for
5029
5030
5031# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5032# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5033# archiver (AR). Verify that the compilers are correct according to the
5034# toolchain type.
5035
5036
5037# Setup additional tools that is considered a part of the toolchain, but not the
5038# core part. Many of these are highly platform-specific and do not exist,
5039# and/or are not needed on all platforms.
5040
5041
5042# Setup the build tools (i.e, the compiler and linker used to build programs
5043# that should be run on the build platform, not the target platform, as a build
5044# helper). Since the non-cross-compile case uses the normal, target compilers
5045# for this, we can only do this after these have been setup.
5046
5047
5048# Do some additional checks on the detected tools.
5049
5050
5051# Setup the JTReg Regression Test Harness.
5052
5053
5054# Setup the JIB dependency resolver
5055
5056
5057#
5058# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5059# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5060#
5061# This code is free software; you can redistribute it and/or modify it
5062# under the terms of the GNU General Public License version 2 only, as
5063# published by the Free Software Foundation.  Oracle designates this
5064# particular file as subject to the "Classpath" exception as provided
5065# by Oracle in the LICENSE file that accompanied this code.
5066#
5067# This code is distributed in the hope that it will be useful, but WITHOUT
5068# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5069# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5070# version 2 for more details (a copy is included in the LICENSE file that
5071# accompanied this code).
5072#
5073# You should have received a copy of the GNU General Public License version
5074# 2 along with this work; if not, write to the Free Software Foundation,
5075# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5076#
5077# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5078# or visit www.oracle.com if you need additional information or have any
5079# questions.
5080#
5081
5082################################################################################
5083# The order of these defines the priority by which we try to find them.
5084VALID_VS_VERSIONS="2013 2012 2010"
5085
5086VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5087VS_VERSION_INTERNAL_2010=100
5088VS_MSVCR_2010=msvcr100.dll
5089# We don't use msvcp on Visual Studio 2010
5090#VS_MSVCP_2010=msvcp100.dll
5091VS_ENVVAR_2010="VS100COMNTOOLS"
5092VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5093VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5094VS_VS_PLATFORM_NAME_2010="v100"
5095VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5096
5097VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5098VS_VERSION_INTERNAL_2012=110
5099VS_MSVCR_2012=msvcr110.dll
5100VS_MSVCP_2012=msvcp110.dll
5101VS_ENVVAR_2012="VS110COMNTOOLS"
5102VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5103VS_SDK_INSTALLDIR_2012=
5104VS_VS_PLATFORM_NAME_2012="v110"
5105VS_SDK_PLATFORM_NAME_2012=
5106
5107VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5108VS_VERSION_INTERNAL_2013=120
5109VS_MSVCR_2013=msvcr120.dll
5110VS_MSVCP_2013=msvcp120.dll
5111VS_ENVVAR_2013="VS120COMNTOOLS"
5112VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5113VS_SDK_INSTALLDIR_2013=
5114VS_VS_PLATFORM_NAME_2013="v120"
5115VS_SDK_PLATFORM_NAME_2013=
5116
5117################################################################################
5118
5119
5120
5121################################################################################
5122
5123
5124
5125################################################################################
5126# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5127# build environment and assigns it to VS_ENV_CMD
5128
5129
5130################################################################################
5131
5132
5133
5134################################################################################
5135# Check if the VS env variables were setup prior to running configure.
5136# If not, then find vcvarsall.bat and run it automatically, and integrate
5137# the set env variables into the spec file.
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152# This line needs to be here, verbatim, after all includes and the dummy hook
5153# definitions. It is replaced with custom functionality when building
5154# custom sources.
5155#CUSTOM_AUTOCONF_INCLUDE
5156
5157# Do not change or remove the following line, it is needed for consistency checks:
5158DATE_WHEN_GENERATED=1502219751
5159
5160###############################################################################
5161#
5162# Initialization / Boot-strapping
5163#
5164# The bootstrapping process needs to solve the "chicken or the egg" problem,
5165# thus it jumps back and forth, each time gaining something needed later on.
5166#
5167###############################################################################
5168
5169# If we are requested to print additional help, do that and then exit.
5170# This must be the very first call.
5171
5172  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5173
5174    # Print available toolchains
5175    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5176    $PRINTF "Which are valid to use depends on the build platform.\n"
5177    for toolchain in $VALID_TOOLCHAINS_all; do
5178      # Use indirect variable referencing
5179      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5180      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5181      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5182    done
5183    $PRINTF "\n"
5184
5185    # Print available jvm features
5186    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5187    $PRINTF "Which are valid to use depends on the target platform.\n  "
5188    $PRINTF "%s " $VALID_JVM_FEATURES
5189    $PRINTF "\n"
5190
5191    # And now exit directly
5192    exit 0
5193  fi
5194
5195
5196# Basic initialization that must happen first of all in the normal process.
5197
5198  # Save the original command line. This is passed to us by the wrapper configure script.
5199
5200  # Save the path variable before it gets changed
5201  ORIGINAL_PATH="$PATH"
5202
5203  DATE_WHEN_CONFIGURED=`LANG=C date`
5204
5205  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5206$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5207  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5208$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5209
5210
5211  # Start with tools that do not need have cross compilation support
5212  # and can be expected to be found in the default PATH. These tools are
5213  # used by configure.
5214
5215  # First are all the simple required tools.
5216
5217
5218
5219  # Publish this variable in the help.
5220
5221
5222  if [ -z "${BASENAME+x}" ]; then
5223    # The variable is not set by user, try to locate tool using the code snippet
5224    for ac_prog in basename
5225do
5226  # Extract the first word of "$ac_prog", so it can be a program name with args.
5227set dummy $ac_prog; ac_word=$2
5228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5229$as_echo_n "checking for $ac_word... " >&6; }
5230if ${ac_cv_path_BASENAME+:} false; then :
5231  $as_echo_n "(cached) " >&6
5232else
5233  case $BASENAME in
5234  [\\/]* | ?:[\\/]*)
5235  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5236  ;;
5237  *)
5238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5239for as_dir in $PATH
5240do
5241  IFS=$as_save_IFS
5242  test -z "$as_dir" && as_dir=.
5243    for ac_exec_ext in '' $ac_executable_extensions; do
5244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5245    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5247    break 2
5248  fi
5249done
5250  done
5251IFS=$as_save_IFS
5252
5253  ;;
5254esac
5255fi
5256BASENAME=$ac_cv_path_BASENAME
5257if test -n "$BASENAME"; then
5258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5259$as_echo "$BASENAME" >&6; }
5260else
5261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5262$as_echo "no" >&6; }
5263fi
5264
5265
5266  test -n "$BASENAME" && break
5267done
5268
5269  else
5270    # The variable is set, but is it from the command line or the environment?
5271
5272    # Try to remove the string !BASENAME! from our list.
5273    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5274    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5275      # If it failed, the variable was not from the command line. Ignore it,
5276      # but warn the user (except for BASH, which is always set by the calling BASH).
5277      if test "xBASENAME" != xBASH; then
5278        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5279$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5280      fi
5281      # Try to locate tool using the code snippet
5282      for ac_prog in basename
5283do
5284  # Extract the first word of "$ac_prog", so it can be a program name with args.
5285set dummy $ac_prog; ac_word=$2
5286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5287$as_echo_n "checking for $ac_word... " >&6; }
5288if ${ac_cv_path_BASENAME+:} false; then :
5289  $as_echo_n "(cached) " >&6
5290else
5291  case $BASENAME in
5292  [\\/]* | ?:[\\/]*)
5293  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5294  ;;
5295  *)
5296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5297for as_dir in $PATH
5298do
5299  IFS=$as_save_IFS
5300  test -z "$as_dir" && as_dir=.
5301    for ac_exec_ext in '' $ac_executable_extensions; do
5302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5303    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5305    break 2
5306  fi
5307done
5308  done
5309IFS=$as_save_IFS
5310
5311  ;;
5312esac
5313fi
5314BASENAME=$ac_cv_path_BASENAME
5315if test -n "$BASENAME"; then
5316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5317$as_echo "$BASENAME" >&6; }
5318else
5319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5320$as_echo "no" >&6; }
5321fi
5322
5323
5324  test -n "$BASENAME" && break
5325done
5326
5327    else
5328      # If it succeeded, then it was overridden by the user. We will use it
5329      # for the tool.
5330
5331      # First remove it from the list of overridden variables, so we can test
5332      # for unknown variables in the end.
5333      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5334
5335      # Check if we try to supply an empty value
5336      if test "x$BASENAME" = x; then
5337        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5338$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5339        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5340$as_echo_n "checking for BASENAME... " >&6; }
5341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5342$as_echo "disabled" >&6; }
5343      else
5344        # Check if the provided tool contains a complete path.
5345        tool_specified="$BASENAME"
5346        tool_basename="${tool_specified##*/}"
5347        if test "x$tool_basename" = "x$tool_specified"; then
5348          # A command without a complete path is provided, search $PATH.
5349          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5350$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5351          # Extract the first word of "$tool_basename", so it can be a program name with args.
5352set dummy $tool_basename; ac_word=$2
5353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5354$as_echo_n "checking for $ac_word... " >&6; }
5355if ${ac_cv_path_BASENAME+:} false; then :
5356  $as_echo_n "(cached) " >&6
5357else
5358  case $BASENAME in
5359  [\\/]* | ?:[\\/]*)
5360  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5361  ;;
5362  *)
5363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5364for as_dir in $PATH
5365do
5366  IFS=$as_save_IFS
5367  test -z "$as_dir" && as_dir=.
5368    for ac_exec_ext in '' $ac_executable_extensions; do
5369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5370    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5372    break 2
5373  fi
5374done
5375  done
5376IFS=$as_save_IFS
5377
5378  ;;
5379esac
5380fi
5381BASENAME=$ac_cv_path_BASENAME
5382if test -n "$BASENAME"; then
5383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5384$as_echo "$BASENAME" >&6; }
5385else
5386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5387$as_echo "no" >&6; }
5388fi
5389
5390
5391          if test "x$BASENAME" = x; then
5392            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5393          fi
5394        else
5395          # Otherwise we believe it is a complete path. Use it as it is.
5396          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5397$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5398          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5399$as_echo_n "checking for BASENAME... " >&6; }
5400          if test ! -x "$tool_specified"; then
5401            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5402$as_echo "not found" >&6; }
5403            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5404          fi
5405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5406$as_echo "$tool_specified" >&6; }
5407        fi
5408      fi
5409    fi
5410
5411  fi
5412
5413
5414
5415  if test "x$BASENAME" = x; then
5416    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5417  fi
5418
5419
5420
5421
5422
5423  # Publish this variable in the help.
5424
5425
5426  if [ -z "${BASH+x}" ]; then
5427    # The variable is not set by user, try to locate tool using the code snippet
5428    for ac_prog in bash
5429do
5430  # Extract the first word of "$ac_prog", so it can be a program name with args.
5431set dummy $ac_prog; ac_word=$2
5432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5433$as_echo_n "checking for $ac_word... " >&6; }
5434if ${ac_cv_path_BASH+:} false; then :
5435  $as_echo_n "(cached) " >&6
5436else
5437  case $BASH in
5438  [\\/]* | ?:[\\/]*)
5439  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5440  ;;
5441  *)
5442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5443for as_dir in $PATH
5444do
5445  IFS=$as_save_IFS
5446  test -z "$as_dir" && as_dir=.
5447    for ac_exec_ext in '' $ac_executable_extensions; do
5448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5449    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5451    break 2
5452  fi
5453done
5454  done
5455IFS=$as_save_IFS
5456
5457  ;;
5458esac
5459fi
5460BASH=$ac_cv_path_BASH
5461if test -n "$BASH"; then
5462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5463$as_echo "$BASH" >&6; }
5464else
5465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5466$as_echo "no" >&6; }
5467fi
5468
5469
5470  test -n "$BASH" && break
5471done
5472
5473  else
5474    # The variable is set, but is it from the command line or the environment?
5475
5476    # Try to remove the string !BASH! from our list.
5477    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5478    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5479      # If it failed, the variable was not from the command line. Ignore it,
5480      # but warn the user (except for BASH, which is always set by the calling BASH).
5481      if test "xBASH" != xBASH; then
5482        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5483$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5484      fi
5485      # Try to locate tool using the code snippet
5486      for ac_prog in bash
5487do
5488  # Extract the first word of "$ac_prog", so it can be a program name with args.
5489set dummy $ac_prog; ac_word=$2
5490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5491$as_echo_n "checking for $ac_word... " >&6; }
5492if ${ac_cv_path_BASH+:} false; then :
5493  $as_echo_n "(cached) " >&6
5494else
5495  case $BASH in
5496  [\\/]* | ?:[\\/]*)
5497  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5498  ;;
5499  *)
5500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5501for as_dir in $PATH
5502do
5503  IFS=$as_save_IFS
5504  test -z "$as_dir" && as_dir=.
5505    for ac_exec_ext in '' $ac_executable_extensions; do
5506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5507    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5509    break 2
5510  fi
5511done
5512  done
5513IFS=$as_save_IFS
5514
5515  ;;
5516esac
5517fi
5518BASH=$ac_cv_path_BASH
5519if test -n "$BASH"; then
5520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5521$as_echo "$BASH" >&6; }
5522else
5523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5524$as_echo "no" >&6; }
5525fi
5526
5527
5528  test -n "$BASH" && break
5529done
5530
5531    else
5532      # If it succeeded, then it was overridden by the user. We will use it
5533      # for the tool.
5534
5535      # First remove it from the list of overridden variables, so we can test
5536      # for unknown variables in the end.
5537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5538
5539      # Check if we try to supply an empty value
5540      if test "x$BASH" = x; then
5541        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5542$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5543        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5544$as_echo_n "checking for BASH... " >&6; }
5545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5546$as_echo "disabled" >&6; }
5547      else
5548        # Check if the provided tool contains a complete path.
5549        tool_specified="$BASH"
5550        tool_basename="${tool_specified##*/}"
5551        if test "x$tool_basename" = "x$tool_specified"; then
5552          # A command without a complete path is provided, search $PATH.
5553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5554$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5555          # Extract the first word of "$tool_basename", so it can be a program name with args.
5556set dummy $tool_basename; ac_word=$2
5557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5558$as_echo_n "checking for $ac_word... " >&6; }
5559if ${ac_cv_path_BASH+:} false; then :
5560  $as_echo_n "(cached) " >&6
5561else
5562  case $BASH in
5563  [\\/]* | ?:[\\/]*)
5564  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5565  ;;
5566  *)
5567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5568for as_dir in $PATH
5569do
5570  IFS=$as_save_IFS
5571  test -z "$as_dir" && as_dir=.
5572    for ac_exec_ext in '' $ac_executable_extensions; do
5573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5574    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5576    break 2
5577  fi
5578done
5579  done
5580IFS=$as_save_IFS
5581
5582  ;;
5583esac
5584fi
5585BASH=$ac_cv_path_BASH
5586if test -n "$BASH"; then
5587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5588$as_echo "$BASH" >&6; }
5589else
5590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5591$as_echo "no" >&6; }
5592fi
5593
5594
5595          if test "x$BASH" = x; then
5596            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5597          fi
5598        else
5599          # Otherwise we believe it is a complete path. Use it as it is.
5600          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5601$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5602          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5603$as_echo_n "checking for BASH... " >&6; }
5604          if test ! -x "$tool_specified"; then
5605            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5606$as_echo "not found" >&6; }
5607            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5608          fi
5609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5610$as_echo "$tool_specified" >&6; }
5611        fi
5612      fi
5613    fi
5614
5615  fi
5616
5617
5618
5619  if test "x$BASH" = x; then
5620    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5621  fi
5622
5623
5624
5625
5626
5627  # Publish this variable in the help.
5628
5629
5630  if [ -z "${CAT+x}" ]; then
5631    # The variable is not set by user, try to locate tool using the code snippet
5632    for ac_prog in cat
5633do
5634  # Extract the first word of "$ac_prog", so it can be a program name with args.
5635set dummy $ac_prog; ac_word=$2
5636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5637$as_echo_n "checking for $ac_word... " >&6; }
5638if ${ac_cv_path_CAT+:} false; then :
5639  $as_echo_n "(cached) " >&6
5640else
5641  case $CAT in
5642  [\\/]* | ?:[\\/]*)
5643  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5644  ;;
5645  *)
5646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5647for as_dir in $PATH
5648do
5649  IFS=$as_save_IFS
5650  test -z "$as_dir" && as_dir=.
5651    for ac_exec_ext in '' $ac_executable_extensions; do
5652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5653    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5655    break 2
5656  fi
5657done
5658  done
5659IFS=$as_save_IFS
5660
5661  ;;
5662esac
5663fi
5664CAT=$ac_cv_path_CAT
5665if test -n "$CAT"; then
5666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5667$as_echo "$CAT" >&6; }
5668else
5669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5670$as_echo "no" >&6; }
5671fi
5672
5673
5674  test -n "$CAT" && break
5675done
5676
5677  else
5678    # The variable is set, but is it from the command line or the environment?
5679
5680    # Try to remove the string !CAT! from our list.
5681    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5682    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5683      # If it failed, the variable was not from the command line. Ignore it,
5684      # but warn the user (except for BASH, which is always set by the calling BASH).
5685      if test "xCAT" != xBASH; then
5686        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5687$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5688      fi
5689      # Try to locate tool using the code snippet
5690      for ac_prog in cat
5691do
5692  # Extract the first word of "$ac_prog", so it can be a program name with args.
5693set dummy $ac_prog; ac_word=$2
5694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5695$as_echo_n "checking for $ac_word... " >&6; }
5696if ${ac_cv_path_CAT+:} false; then :
5697  $as_echo_n "(cached) " >&6
5698else
5699  case $CAT in
5700  [\\/]* | ?:[\\/]*)
5701  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5702  ;;
5703  *)
5704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5705for as_dir in $PATH
5706do
5707  IFS=$as_save_IFS
5708  test -z "$as_dir" && as_dir=.
5709    for ac_exec_ext in '' $ac_executable_extensions; do
5710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5711    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5713    break 2
5714  fi
5715done
5716  done
5717IFS=$as_save_IFS
5718
5719  ;;
5720esac
5721fi
5722CAT=$ac_cv_path_CAT
5723if test -n "$CAT"; then
5724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5725$as_echo "$CAT" >&6; }
5726else
5727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5728$as_echo "no" >&6; }
5729fi
5730
5731
5732  test -n "$CAT" && break
5733done
5734
5735    else
5736      # If it succeeded, then it was overridden by the user. We will use it
5737      # for the tool.
5738
5739      # First remove it from the list of overridden variables, so we can test
5740      # for unknown variables in the end.
5741      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5742
5743      # Check if we try to supply an empty value
5744      if test "x$CAT" = x; then
5745        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5746$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5747        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5748$as_echo_n "checking for CAT... " >&6; }
5749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5750$as_echo "disabled" >&6; }
5751      else
5752        # Check if the provided tool contains a complete path.
5753        tool_specified="$CAT"
5754        tool_basename="${tool_specified##*/}"
5755        if test "x$tool_basename" = "x$tool_specified"; then
5756          # A command without a complete path is provided, search $PATH.
5757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5758$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5759          # Extract the first word of "$tool_basename", so it can be a program name with args.
5760set dummy $tool_basename; ac_word=$2
5761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5762$as_echo_n "checking for $ac_word... " >&6; }
5763if ${ac_cv_path_CAT+:} false; then :
5764  $as_echo_n "(cached) " >&6
5765else
5766  case $CAT in
5767  [\\/]* | ?:[\\/]*)
5768  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5769  ;;
5770  *)
5771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5772for as_dir in $PATH
5773do
5774  IFS=$as_save_IFS
5775  test -z "$as_dir" && as_dir=.
5776    for ac_exec_ext in '' $ac_executable_extensions; do
5777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5778    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5780    break 2
5781  fi
5782done
5783  done
5784IFS=$as_save_IFS
5785
5786  ;;
5787esac
5788fi
5789CAT=$ac_cv_path_CAT
5790if test -n "$CAT"; then
5791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5792$as_echo "$CAT" >&6; }
5793else
5794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5795$as_echo "no" >&6; }
5796fi
5797
5798
5799          if test "x$CAT" = x; then
5800            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5801          fi
5802        else
5803          # Otherwise we believe it is a complete path. Use it as it is.
5804          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5805$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5806          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5807$as_echo_n "checking for CAT... " >&6; }
5808          if test ! -x "$tool_specified"; then
5809            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5810$as_echo "not found" >&6; }
5811            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5812          fi
5813          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5814$as_echo "$tool_specified" >&6; }
5815        fi
5816      fi
5817    fi
5818
5819  fi
5820
5821
5822
5823  if test "x$CAT" = x; then
5824    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5825  fi
5826
5827
5828
5829
5830
5831  # Publish this variable in the help.
5832
5833
5834  if [ -z "${CHMOD+x}" ]; then
5835    # The variable is not set by user, try to locate tool using the code snippet
5836    for ac_prog in chmod
5837do
5838  # Extract the first word of "$ac_prog", so it can be a program name with args.
5839set dummy $ac_prog; ac_word=$2
5840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5841$as_echo_n "checking for $ac_word... " >&6; }
5842if ${ac_cv_path_CHMOD+:} false; then :
5843  $as_echo_n "(cached) " >&6
5844else
5845  case $CHMOD in
5846  [\\/]* | ?:[\\/]*)
5847  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5848  ;;
5849  *)
5850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5851for as_dir in $PATH
5852do
5853  IFS=$as_save_IFS
5854  test -z "$as_dir" && as_dir=.
5855    for ac_exec_ext in '' $ac_executable_extensions; do
5856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5857    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5859    break 2
5860  fi
5861done
5862  done
5863IFS=$as_save_IFS
5864
5865  ;;
5866esac
5867fi
5868CHMOD=$ac_cv_path_CHMOD
5869if test -n "$CHMOD"; then
5870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5871$as_echo "$CHMOD" >&6; }
5872else
5873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5874$as_echo "no" >&6; }
5875fi
5876
5877
5878  test -n "$CHMOD" && break
5879done
5880
5881  else
5882    # The variable is set, but is it from the command line or the environment?
5883
5884    # Try to remove the string !CHMOD! from our list.
5885    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5886    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5887      # If it failed, the variable was not from the command line. Ignore it,
5888      # but warn the user (except for BASH, which is always set by the calling BASH).
5889      if test "xCHMOD" != xBASH; then
5890        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5891$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5892      fi
5893      # Try to locate tool using the code snippet
5894      for ac_prog in chmod
5895do
5896  # Extract the first word of "$ac_prog", so it can be a program name with args.
5897set dummy $ac_prog; ac_word=$2
5898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5899$as_echo_n "checking for $ac_word... " >&6; }
5900if ${ac_cv_path_CHMOD+:} false; then :
5901  $as_echo_n "(cached) " >&6
5902else
5903  case $CHMOD in
5904  [\\/]* | ?:[\\/]*)
5905  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5906  ;;
5907  *)
5908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909for as_dir in $PATH
5910do
5911  IFS=$as_save_IFS
5912  test -z "$as_dir" && as_dir=.
5913    for ac_exec_ext in '' $ac_executable_extensions; do
5914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5915    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5917    break 2
5918  fi
5919done
5920  done
5921IFS=$as_save_IFS
5922
5923  ;;
5924esac
5925fi
5926CHMOD=$ac_cv_path_CHMOD
5927if test -n "$CHMOD"; then
5928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5929$as_echo "$CHMOD" >&6; }
5930else
5931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932$as_echo "no" >&6; }
5933fi
5934
5935
5936  test -n "$CHMOD" && break
5937done
5938
5939    else
5940      # If it succeeded, then it was overridden by the user. We will use it
5941      # for the tool.
5942
5943      # First remove it from the list of overridden variables, so we can test
5944      # for unknown variables in the end.
5945      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5946
5947      # Check if we try to supply an empty value
5948      if test "x$CHMOD" = x; then
5949        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5950$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5951        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5952$as_echo_n "checking for CHMOD... " >&6; }
5953        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5954$as_echo "disabled" >&6; }
5955      else
5956        # Check if the provided tool contains a complete path.
5957        tool_specified="$CHMOD"
5958        tool_basename="${tool_specified##*/}"
5959        if test "x$tool_basename" = "x$tool_specified"; then
5960          # A command without a complete path is provided, search $PATH.
5961          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5962$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5963          # Extract the first word of "$tool_basename", so it can be a program name with args.
5964set dummy $tool_basename; ac_word=$2
5965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5966$as_echo_n "checking for $ac_word... " >&6; }
5967if ${ac_cv_path_CHMOD+:} false; then :
5968  $as_echo_n "(cached) " >&6
5969else
5970  case $CHMOD in
5971  [\\/]* | ?:[\\/]*)
5972  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5973  ;;
5974  *)
5975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5976for as_dir in $PATH
5977do
5978  IFS=$as_save_IFS
5979  test -z "$as_dir" && as_dir=.
5980    for ac_exec_ext in '' $ac_executable_extensions; do
5981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5982    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5984    break 2
5985  fi
5986done
5987  done
5988IFS=$as_save_IFS
5989
5990  ;;
5991esac
5992fi
5993CHMOD=$ac_cv_path_CHMOD
5994if test -n "$CHMOD"; then
5995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5996$as_echo "$CHMOD" >&6; }
5997else
5998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5999$as_echo "no" >&6; }
6000fi
6001
6002
6003          if test "x$CHMOD" = x; then
6004            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6005          fi
6006        else
6007          # Otherwise we believe it is a complete path. Use it as it is.
6008          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6009$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6010          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6011$as_echo_n "checking for CHMOD... " >&6; }
6012          if test ! -x "$tool_specified"; then
6013            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6014$as_echo "not found" >&6; }
6015            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6016          fi
6017          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6018$as_echo "$tool_specified" >&6; }
6019        fi
6020      fi
6021    fi
6022
6023  fi
6024
6025
6026
6027  if test "x$CHMOD" = x; then
6028    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6029  fi
6030
6031
6032
6033
6034
6035  # Publish this variable in the help.
6036
6037
6038  if [ -z "${CMP+x}" ]; then
6039    # The variable is not set by user, try to locate tool using the code snippet
6040    for ac_prog in cmp
6041do
6042  # Extract the first word of "$ac_prog", so it can be a program name with args.
6043set dummy $ac_prog; ac_word=$2
6044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6045$as_echo_n "checking for $ac_word... " >&6; }
6046if ${ac_cv_path_CMP+:} false; then :
6047  $as_echo_n "(cached) " >&6
6048else
6049  case $CMP in
6050  [\\/]* | ?:[\\/]*)
6051  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6052  ;;
6053  *)
6054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6055for as_dir in $PATH
6056do
6057  IFS=$as_save_IFS
6058  test -z "$as_dir" && as_dir=.
6059    for ac_exec_ext in '' $ac_executable_extensions; do
6060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6061    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6063    break 2
6064  fi
6065done
6066  done
6067IFS=$as_save_IFS
6068
6069  ;;
6070esac
6071fi
6072CMP=$ac_cv_path_CMP
6073if test -n "$CMP"; then
6074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6075$as_echo "$CMP" >&6; }
6076else
6077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6078$as_echo "no" >&6; }
6079fi
6080
6081
6082  test -n "$CMP" && break
6083done
6084
6085  else
6086    # The variable is set, but is it from the command line or the environment?
6087
6088    # Try to remove the string !CMP! from our list.
6089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6091      # If it failed, the variable was not from the command line. Ignore it,
6092      # but warn the user (except for BASH, which is always set by the calling BASH).
6093      if test "xCMP" != xBASH; then
6094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6095$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6096      fi
6097      # Try to locate tool using the code snippet
6098      for ac_prog in cmp
6099do
6100  # Extract the first word of "$ac_prog", so it can be a program name with args.
6101set dummy $ac_prog; ac_word=$2
6102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6103$as_echo_n "checking for $ac_word... " >&6; }
6104if ${ac_cv_path_CMP+:} false; then :
6105  $as_echo_n "(cached) " >&6
6106else
6107  case $CMP in
6108  [\\/]* | ?:[\\/]*)
6109  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6110  ;;
6111  *)
6112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6113for as_dir in $PATH
6114do
6115  IFS=$as_save_IFS
6116  test -z "$as_dir" && as_dir=.
6117    for ac_exec_ext in '' $ac_executable_extensions; do
6118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6119    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6121    break 2
6122  fi
6123done
6124  done
6125IFS=$as_save_IFS
6126
6127  ;;
6128esac
6129fi
6130CMP=$ac_cv_path_CMP
6131if test -n "$CMP"; then
6132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6133$as_echo "$CMP" >&6; }
6134else
6135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6136$as_echo "no" >&6; }
6137fi
6138
6139
6140  test -n "$CMP" && break
6141done
6142
6143    else
6144      # If it succeeded, then it was overridden by the user. We will use it
6145      # for the tool.
6146
6147      # First remove it from the list of overridden variables, so we can test
6148      # for unknown variables in the end.
6149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6150
6151      # Check if we try to supply an empty value
6152      if test "x$CMP" = x; then
6153        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6154$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6156$as_echo_n "checking for CMP... " >&6; }
6157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6158$as_echo "disabled" >&6; }
6159      else
6160        # Check if the provided tool contains a complete path.
6161        tool_specified="$CMP"
6162        tool_basename="${tool_specified##*/}"
6163        if test "x$tool_basename" = "x$tool_specified"; then
6164          # A command without a complete path is provided, search $PATH.
6165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6166$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6167          # Extract the first word of "$tool_basename", so it can be a program name with args.
6168set dummy $tool_basename; ac_word=$2
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6170$as_echo_n "checking for $ac_word... " >&6; }
6171if ${ac_cv_path_CMP+:} false; then :
6172  $as_echo_n "(cached) " >&6
6173else
6174  case $CMP in
6175  [\\/]* | ?:[\\/]*)
6176  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6177  ;;
6178  *)
6179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6180for as_dir in $PATH
6181do
6182  IFS=$as_save_IFS
6183  test -z "$as_dir" && as_dir=.
6184    for ac_exec_ext in '' $ac_executable_extensions; do
6185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6186    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6188    break 2
6189  fi
6190done
6191  done
6192IFS=$as_save_IFS
6193
6194  ;;
6195esac
6196fi
6197CMP=$ac_cv_path_CMP
6198if test -n "$CMP"; then
6199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6200$as_echo "$CMP" >&6; }
6201else
6202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6203$as_echo "no" >&6; }
6204fi
6205
6206
6207          if test "x$CMP" = x; then
6208            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6209          fi
6210        else
6211          # Otherwise we believe it is a complete path. Use it as it is.
6212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6213$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6214          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6215$as_echo_n "checking for CMP... " >&6; }
6216          if test ! -x "$tool_specified"; then
6217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6218$as_echo "not found" >&6; }
6219            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6220          fi
6221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6222$as_echo "$tool_specified" >&6; }
6223        fi
6224      fi
6225    fi
6226
6227  fi
6228
6229
6230
6231  if test "x$CMP" = x; then
6232    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6233  fi
6234
6235
6236
6237
6238
6239  # Publish this variable in the help.
6240
6241
6242  if [ -z "${COMM+x}" ]; then
6243    # The variable is not set by user, try to locate tool using the code snippet
6244    for ac_prog in comm
6245do
6246  # Extract the first word of "$ac_prog", so it can be a program name with args.
6247set dummy $ac_prog; ac_word=$2
6248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6249$as_echo_n "checking for $ac_word... " >&6; }
6250if ${ac_cv_path_COMM+:} false; then :
6251  $as_echo_n "(cached) " >&6
6252else
6253  case $COMM in
6254  [\\/]* | ?:[\\/]*)
6255  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6256  ;;
6257  *)
6258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6259for as_dir in $PATH
6260do
6261  IFS=$as_save_IFS
6262  test -z "$as_dir" && as_dir=.
6263    for ac_exec_ext in '' $ac_executable_extensions; do
6264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6265    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6267    break 2
6268  fi
6269done
6270  done
6271IFS=$as_save_IFS
6272
6273  ;;
6274esac
6275fi
6276COMM=$ac_cv_path_COMM
6277if test -n "$COMM"; then
6278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6279$as_echo "$COMM" >&6; }
6280else
6281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6282$as_echo "no" >&6; }
6283fi
6284
6285
6286  test -n "$COMM" && break
6287done
6288
6289  else
6290    # The variable is set, but is it from the command line or the environment?
6291
6292    # Try to remove the string !COMM! from our list.
6293    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6294    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6295      # If it failed, the variable was not from the command line. Ignore it,
6296      # but warn the user (except for BASH, which is always set by the calling BASH).
6297      if test "xCOMM" != xBASH; then
6298        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6299$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6300      fi
6301      # Try to locate tool using the code snippet
6302      for ac_prog in comm
6303do
6304  # Extract the first word of "$ac_prog", so it can be a program name with args.
6305set dummy $ac_prog; ac_word=$2
6306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6307$as_echo_n "checking for $ac_word... " >&6; }
6308if ${ac_cv_path_COMM+:} false; then :
6309  $as_echo_n "(cached) " >&6
6310else
6311  case $COMM in
6312  [\\/]* | ?:[\\/]*)
6313  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6314  ;;
6315  *)
6316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6317for as_dir in $PATH
6318do
6319  IFS=$as_save_IFS
6320  test -z "$as_dir" && as_dir=.
6321    for ac_exec_ext in '' $ac_executable_extensions; do
6322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6323    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6325    break 2
6326  fi
6327done
6328  done
6329IFS=$as_save_IFS
6330
6331  ;;
6332esac
6333fi
6334COMM=$ac_cv_path_COMM
6335if test -n "$COMM"; then
6336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6337$as_echo "$COMM" >&6; }
6338else
6339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6340$as_echo "no" >&6; }
6341fi
6342
6343
6344  test -n "$COMM" && break
6345done
6346
6347    else
6348      # If it succeeded, then it was overridden by the user. We will use it
6349      # for the tool.
6350
6351      # First remove it from the list of overridden variables, so we can test
6352      # for unknown variables in the end.
6353      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6354
6355      # Check if we try to supply an empty value
6356      if test "x$COMM" = x; then
6357        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6358$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6359        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6360$as_echo_n "checking for COMM... " >&6; }
6361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6362$as_echo "disabled" >&6; }
6363      else
6364        # Check if the provided tool contains a complete path.
6365        tool_specified="$COMM"
6366        tool_basename="${tool_specified##*/}"
6367        if test "x$tool_basename" = "x$tool_specified"; then
6368          # A command without a complete path is provided, search $PATH.
6369          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6370$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6371          # Extract the first word of "$tool_basename", so it can be a program name with args.
6372set dummy $tool_basename; ac_word=$2
6373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6374$as_echo_n "checking for $ac_word... " >&6; }
6375if ${ac_cv_path_COMM+:} false; then :
6376  $as_echo_n "(cached) " >&6
6377else
6378  case $COMM in
6379  [\\/]* | ?:[\\/]*)
6380  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6381  ;;
6382  *)
6383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6384for as_dir in $PATH
6385do
6386  IFS=$as_save_IFS
6387  test -z "$as_dir" && as_dir=.
6388    for ac_exec_ext in '' $ac_executable_extensions; do
6389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6390    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6392    break 2
6393  fi
6394done
6395  done
6396IFS=$as_save_IFS
6397
6398  ;;
6399esac
6400fi
6401COMM=$ac_cv_path_COMM
6402if test -n "$COMM"; then
6403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6404$as_echo "$COMM" >&6; }
6405else
6406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6407$as_echo "no" >&6; }
6408fi
6409
6410
6411          if test "x$COMM" = x; then
6412            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6413          fi
6414        else
6415          # Otherwise we believe it is a complete path. Use it as it is.
6416          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6417$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6418          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6419$as_echo_n "checking for COMM... " >&6; }
6420          if test ! -x "$tool_specified"; then
6421            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6422$as_echo "not found" >&6; }
6423            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6424          fi
6425          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6426$as_echo "$tool_specified" >&6; }
6427        fi
6428      fi
6429    fi
6430
6431  fi
6432
6433
6434
6435  if test "x$COMM" = x; then
6436    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6437  fi
6438
6439
6440
6441
6442
6443  # Publish this variable in the help.
6444
6445
6446  if [ -z "${CP+x}" ]; then
6447    # The variable is not set by user, try to locate tool using the code snippet
6448    for ac_prog in cp
6449do
6450  # Extract the first word of "$ac_prog", so it can be a program name with args.
6451set dummy $ac_prog; ac_word=$2
6452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6453$as_echo_n "checking for $ac_word... " >&6; }
6454if ${ac_cv_path_CP+:} false; then :
6455  $as_echo_n "(cached) " >&6
6456else
6457  case $CP in
6458  [\\/]* | ?:[\\/]*)
6459  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6460  ;;
6461  *)
6462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6463for as_dir in $PATH
6464do
6465  IFS=$as_save_IFS
6466  test -z "$as_dir" && as_dir=.
6467    for ac_exec_ext in '' $ac_executable_extensions; do
6468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6469    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6471    break 2
6472  fi
6473done
6474  done
6475IFS=$as_save_IFS
6476
6477  ;;
6478esac
6479fi
6480CP=$ac_cv_path_CP
6481if test -n "$CP"; then
6482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6483$as_echo "$CP" >&6; }
6484else
6485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6486$as_echo "no" >&6; }
6487fi
6488
6489
6490  test -n "$CP" && break
6491done
6492
6493  else
6494    # The variable is set, but is it from the command line or the environment?
6495
6496    # Try to remove the string !CP! from our list.
6497    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6498    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6499      # If it failed, the variable was not from the command line. Ignore it,
6500      # but warn the user (except for BASH, which is always set by the calling BASH).
6501      if test "xCP" != xBASH; then
6502        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6503$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6504      fi
6505      # Try to locate tool using the code snippet
6506      for ac_prog in cp
6507do
6508  # Extract the first word of "$ac_prog", so it can be a program name with args.
6509set dummy $ac_prog; ac_word=$2
6510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6511$as_echo_n "checking for $ac_word... " >&6; }
6512if ${ac_cv_path_CP+:} false; then :
6513  $as_echo_n "(cached) " >&6
6514else
6515  case $CP in
6516  [\\/]* | ?:[\\/]*)
6517  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6518  ;;
6519  *)
6520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6521for as_dir in $PATH
6522do
6523  IFS=$as_save_IFS
6524  test -z "$as_dir" && as_dir=.
6525    for ac_exec_ext in '' $ac_executable_extensions; do
6526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6527    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6529    break 2
6530  fi
6531done
6532  done
6533IFS=$as_save_IFS
6534
6535  ;;
6536esac
6537fi
6538CP=$ac_cv_path_CP
6539if test -n "$CP"; then
6540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6541$as_echo "$CP" >&6; }
6542else
6543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6544$as_echo "no" >&6; }
6545fi
6546
6547
6548  test -n "$CP" && break
6549done
6550
6551    else
6552      # If it succeeded, then it was overridden by the user. We will use it
6553      # for the tool.
6554
6555      # First remove it from the list of overridden variables, so we can test
6556      # for unknown variables in the end.
6557      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6558
6559      # Check if we try to supply an empty value
6560      if test "x$CP" = x; then
6561        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6562$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6563        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6564$as_echo_n "checking for CP... " >&6; }
6565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6566$as_echo "disabled" >&6; }
6567      else
6568        # Check if the provided tool contains a complete path.
6569        tool_specified="$CP"
6570        tool_basename="${tool_specified##*/}"
6571        if test "x$tool_basename" = "x$tool_specified"; then
6572          # A command without a complete path is provided, search $PATH.
6573          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6574$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6575          # Extract the first word of "$tool_basename", so it can be a program name with args.
6576set dummy $tool_basename; ac_word=$2
6577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6578$as_echo_n "checking for $ac_word... " >&6; }
6579if ${ac_cv_path_CP+:} false; then :
6580  $as_echo_n "(cached) " >&6
6581else
6582  case $CP in
6583  [\\/]* | ?:[\\/]*)
6584  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6585  ;;
6586  *)
6587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6588for as_dir in $PATH
6589do
6590  IFS=$as_save_IFS
6591  test -z "$as_dir" && as_dir=.
6592    for ac_exec_ext in '' $ac_executable_extensions; do
6593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6594    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6596    break 2
6597  fi
6598done
6599  done
6600IFS=$as_save_IFS
6601
6602  ;;
6603esac
6604fi
6605CP=$ac_cv_path_CP
6606if test -n "$CP"; then
6607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6608$as_echo "$CP" >&6; }
6609else
6610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6611$as_echo "no" >&6; }
6612fi
6613
6614
6615          if test "x$CP" = x; then
6616            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6617          fi
6618        else
6619          # Otherwise we believe it is a complete path. Use it as it is.
6620          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6621$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6622          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6623$as_echo_n "checking for CP... " >&6; }
6624          if test ! -x "$tool_specified"; then
6625            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6626$as_echo "not found" >&6; }
6627            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6628          fi
6629          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6630$as_echo "$tool_specified" >&6; }
6631        fi
6632      fi
6633    fi
6634
6635  fi
6636
6637
6638
6639  if test "x$CP" = x; then
6640    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6641  fi
6642
6643
6644
6645
6646
6647  # Publish this variable in the help.
6648
6649
6650  if [ -z "${CUT+x}" ]; then
6651    # The variable is not set by user, try to locate tool using the code snippet
6652    for ac_prog in cut
6653do
6654  # Extract the first word of "$ac_prog", so it can be a program name with args.
6655set dummy $ac_prog; ac_word=$2
6656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6657$as_echo_n "checking for $ac_word... " >&6; }
6658if ${ac_cv_path_CUT+:} false; then :
6659  $as_echo_n "(cached) " >&6
6660else
6661  case $CUT in
6662  [\\/]* | ?:[\\/]*)
6663  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6664  ;;
6665  *)
6666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6667for as_dir in $PATH
6668do
6669  IFS=$as_save_IFS
6670  test -z "$as_dir" && as_dir=.
6671    for ac_exec_ext in '' $ac_executable_extensions; do
6672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6673    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6675    break 2
6676  fi
6677done
6678  done
6679IFS=$as_save_IFS
6680
6681  ;;
6682esac
6683fi
6684CUT=$ac_cv_path_CUT
6685if test -n "$CUT"; then
6686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6687$as_echo "$CUT" >&6; }
6688else
6689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6690$as_echo "no" >&6; }
6691fi
6692
6693
6694  test -n "$CUT" && break
6695done
6696
6697  else
6698    # The variable is set, but is it from the command line or the environment?
6699
6700    # Try to remove the string !CUT! from our list.
6701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6703      # If it failed, the variable was not from the command line. Ignore it,
6704      # but warn the user (except for BASH, which is always set by the calling BASH).
6705      if test "xCUT" != xBASH; then
6706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6707$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6708      fi
6709      # Try to locate tool using the code snippet
6710      for ac_prog in cut
6711do
6712  # Extract the first word of "$ac_prog", so it can be a program name with args.
6713set dummy $ac_prog; ac_word=$2
6714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6715$as_echo_n "checking for $ac_word... " >&6; }
6716if ${ac_cv_path_CUT+:} false; then :
6717  $as_echo_n "(cached) " >&6
6718else
6719  case $CUT in
6720  [\\/]* | ?:[\\/]*)
6721  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6722  ;;
6723  *)
6724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6725for as_dir in $PATH
6726do
6727  IFS=$as_save_IFS
6728  test -z "$as_dir" && as_dir=.
6729    for ac_exec_ext in '' $ac_executable_extensions; do
6730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6731    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6733    break 2
6734  fi
6735done
6736  done
6737IFS=$as_save_IFS
6738
6739  ;;
6740esac
6741fi
6742CUT=$ac_cv_path_CUT
6743if test -n "$CUT"; then
6744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6745$as_echo "$CUT" >&6; }
6746else
6747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6748$as_echo "no" >&6; }
6749fi
6750
6751
6752  test -n "$CUT" && break
6753done
6754
6755    else
6756      # If it succeeded, then it was overridden by the user. We will use it
6757      # for the tool.
6758
6759      # First remove it from the list of overridden variables, so we can test
6760      # for unknown variables in the end.
6761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6762
6763      # Check if we try to supply an empty value
6764      if test "x$CUT" = x; then
6765        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6766$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6767        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6768$as_echo_n "checking for CUT... " >&6; }
6769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6770$as_echo "disabled" >&6; }
6771      else
6772        # Check if the provided tool contains a complete path.
6773        tool_specified="$CUT"
6774        tool_basename="${tool_specified##*/}"
6775        if test "x$tool_basename" = "x$tool_specified"; then
6776          # A command without a complete path is provided, search $PATH.
6777          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6778$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6779          # Extract the first word of "$tool_basename", so it can be a program name with args.
6780set dummy $tool_basename; ac_word=$2
6781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6782$as_echo_n "checking for $ac_word... " >&6; }
6783if ${ac_cv_path_CUT+:} false; then :
6784  $as_echo_n "(cached) " >&6
6785else
6786  case $CUT in
6787  [\\/]* | ?:[\\/]*)
6788  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6789  ;;
6790  *)
6791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6792for as_dir in $PATH
6793do
6794  IFS=$as_save_IFS
6795  test -z "$as_dir" && as_dir=.
6796    for ac_exec_ext in '' $ac_executable_extensions; do
6797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6798    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6800    break 2
6801  fi
6802done
6803  done
6804IFS=$as_save_IFS
6805
6806  ;;
6807esac
6808fi
6809CUT=$ac_cv_path_CUT
6810if test -n "$CUT"; then
6811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6812$as_echo "$CUT" >&6; }
6813else
6814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6815$as_echo "no" >&6; }
6816fi
6817
6818
6819          if test "x$CUT" = x; then
6820            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6821          fi
6822        else
6823          # Otherwise we believe it is a complete path. Use it as it is.
6824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6825$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6826          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6827$as_echo_n "checking for CUT... " >&6; }
6828          if test ! -x "$tool_specified"; then
6829            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6830$as_echo "not found" >&6; }
6831            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6832          fi
6833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6834$as_echo "$tool_specified" >&6; }
6835        fi
6836      fi
6837    fi
6838
6839  fi
6840
6841
6842
6843  if test "x$CUT" = x; then
6844    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6845  fi
6846
6847
6848
6849
6850
6851  # Publish this variable in the help.
6852
6853
6854  if [ -z "${DATE+x}" ]; then
6855    # The variable is not set by user, try to locate tool using the code snippet
6856    for ac_prog in date
6857do
6858  # Extract the first word of "$ac_prog", so it can be a program name with args.
6859set dummy $ac_prog; ac_word=$2
6860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6861$as_echo_n "checking for $ac_word... " >&6; }
6862if ${ac_cv_path_DATE+:} false; then :
6863  $as_echo_n "(cached) " >&6
6864else
6865  case $DATE in
6866  [\\/]* | ?:[\\/]*)
6867  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6868  ;;
6869  *)
6870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6871for as_dir in $PATH
6872do
6873  IFS=$as_save_IFS
6874  test -z "$as_dir" && as_dir=.
6875    for ac_exec_ext in '' $ac_executable_extensions; do
6876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6877    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6879    break 2
6880  fi
6881done
6882  done
6883IFS=$as_save_IFS
6884
6885  ;;
6886esac
6887fi
6888DATE=$ac_cv_path_DATE
6889if test -n "$DATE"; then
6890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6891$as_echo "$DATE" >&6; }
6892else
6893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6894$as_echo "no" >&6; }
6895fi
6896
6897
6898  test -n "$DATE" && break
6899done
6900
6901  else
6902    # The variable is set, but is it from the command line or the environment?
6903
6904    # Try to remove the string !DATE! from our list.
6905    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6906    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6907      # If it failed, the variable was not from the command line. Ignore it,
6908      # but warn the user (except for BASH, which is always set by the calling BASH).
6909      if test "xDATE" != xBASH; then
6910        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6911$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6912      fi
6913      # Try to locate tool using the code snippet
6914      for ac_prog in date
6915do
6916  # Extract the first word of "$ac_prog", so it can be a program name with args.
6917set dummy $ac_prog; ac_word=$2
6918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6919$as_echo_n "checking for $ac_word... " >&6; }
6920if ${ac_cv_path_DATE+:} false; then :
6921  $as_echo_n "(cached) " >&6
6922else
6923  case $DATE in
6924  [\\/]* | ?:[\\/]*)
6925  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6926  ;;
6927  *)
6928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6929for as_dir in $PATH
6930do
6931  IFS=$as_save_IFS
6932  test -z "$as_dir" && as_dir=.
6933    for ac_exec_ext in '' $ac_executable_extensions; do
6934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6935    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6937    break 2
6938  fi
6939done
6940  done
6941IFS=$as_save_IFS
6942
6943  ;;
6944esac
6945fi
6946DATE=$ac_cv_path_DATE
6947if test -n "$DATE"; then
6948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6949$as_echo "$DATE" >&6; }
6950else
6951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6952$as_echo "no" >&6; }
6953fi
6954
6955
6956  test -n "$DATE" && break
6957done
6958
6959    else
6960      # If it succeeded, then it was overridden by the user. We will use it
6961      # for the tool.
6962
6963      # First remove it from the list of overridden variables, so we can test
6964      # for unknown variables in the end.
6965      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6966
6967      # Check if we try to supply an empty value
6968      if test "x$DATE" = x; then
6969        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6970$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6972$as_echo_n "checking for DATE... " >&6; }
6973        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6974$as_echo "disabled" >&6; }
6975      else
6976        # Check if the provided tool contains a complete path.
6977        tool_specified="$DATE"
6978        tool_basename="${tool_specified##*/}"
6979        if test "x$tool_basename" = "x$tool_specified"; then
6980          # A command without a complete path is provided, search $PATH.
6981          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6982$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6983          # Extract the first word of "$tool_basename", so it can be a program name with args.
6984set dummy $tool_basename; ac_word=$2
6985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6986$as_echo_n "checking for $ac_word... " >&6; }
6987if ${ac_cv_path_DATE+:} false; then :
6988  $as_echo_n "(cached) " >&6
6989else
6990  case $DATE in
6991  [\\/]* | ?:[\\/]*)
6992  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6993  ;;
6994  *)
6995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6996for as_dir in $PATH
6997do
6998  IFS=$as_save_IFS
6999  test -z "$as_dir" && as_dir=.
7000    for ac_exec_ext in '' $ac_executable_extensions; do
7001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7002    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7004    break 2
7005  fi
7006done
7007  done
7008IFS=$as_save_IFS
7009
7010  ;;
7011esac
7012fi
7013DATE=$ac_cv_path_DATE
7014if test -n "$DATE"; then
7015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7016$as_echo "$DATE" >&6; }
7017else
7018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7019$as_echo "no" >&6; }
7020fi
7021
7022
7023          if test "x$DATE" = x; then
7024            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7025          fi
7026        else
7027          # Otherwise we believe it is a complete path. Use it as it is.
7028          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7029$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7030          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7031$as_echo_n "checking for DATE... " >&6; }
7032          if test ! -x "$tool_specified"; then
7033            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7034$as_echo "not found" >&6; }
7035            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7036          fi
7037          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7038$as_echo "$tool_specified" >&6; }
7039        fi
7040      fi
7041    fi
7042
7043  fi
7044
7045
7046
7047  if test "x$DATE" = x; then
7048    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7049  fi
7050
7051
7052
7053
7054
7055  # Publish this variable in the help.
7056
7057
7058  if [ -z "${DIFF+x}" ]; then
7059    # The variable is not set by user, try to locate tool using the code snippet
7060    for ac_prog in gdiff diff
7061do
7062  # Extract the first word of "$ac_prog", so it can be a program name with args.
7063set dummy $ac_prog; ac_word=$2
7064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7065$as_echo_n "checking for $ac_word... " >&6; }
7066if ${ac_cv_path_DIFF+:} false; then :
7067  $as_echo_n "(cached) " >&6
7068else
7069  case $DIFF in
7070  [\\/]* | ?:[\\/]*)
7071  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7072  ;;
7073  *)
7074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7075for as_dir in $PATH
7076do
7077  IFS=$as_save_IFS
7078  test -z "$as_dir" && as_dir=.
7079    for ac_exec_ext in '' $ac_executable_extensions; do
7080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7081    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7083    break 2
7084  fi
7085done
7086  done
7087IFS=$as_save_IFS
7088
7089  ;;
7090esac
7091fi
7092DIFF=$ac_cv_path_DIFF
7093if test -n "$DIFF"; then
7094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7095$as_echo "$DIFF" >&6; }
7096else
7097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7098$as_echo "no" >&6; }
7099fi
7100
7101
7102  test -n "$DIFF" && break
7103done
7104
7105  else
7106    # The variable is set, but is it from the command line or the environment?
7107
7108    # Try to remove the string !DIFF! from our list.
7109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7111      # If it failed, the variable was not from the command line. Ignore it,
7112      # but warn the user (except for BASH, which is always set by the calling BASH).
7113      if test "xDIFF" != xBASH; then
7114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7115$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7116      fi
7117      # Try to locate tool using the code snippet
7118      for ac_prog in gdiff diff
7119do
7120  # Extract the first word of "$ac_prog", so it can be a program name with args.
7121set dummy $ac_prog; ac_word=$2
7122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7123$as_echo_n "checking for $ac_word... " >&6; }
7124if ${ac_cv_path_DIFF+:} false; then :
7125  $as_echo_n "(cached) " >&6
7126else
7127  case $DIFF in
7128  [\\/]* | ?:[\\/]*)
7129  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7130  ;;
7131  *)
7132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7133for as_dir in $PATH
7134do
7135  IFS=$as_save_IFS
7136  test -z "$as_dir" && as_dir=.
7137    for ac_exec_ext in '' $ac_executable_extensions; do
7138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7139    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7141    break 2
7142  fi
7143done
7144  done
7145IFS=$as_save_IFS
7146
7147  ;;
7148esac
7149fi
7150DIFF=$ac_cv_path_DIFF
7151if test -n "$DIFF"; then
7152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7153$as_echo "$DIFF" >&6; }
7154else
7155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7156$as_echo "no" >&6; }
7157fi
7158
7159
7160  test -n "$DIFF" && break
7161done
7162
7163    else
7164      # If it succeeded, then it was overridden by the user. We will use it
7165      # for the tool.
7166
7167      # First remove it from the list of overridden variables, so we can test
7168      # for unknown variables in the end.
7169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7170
7171      # Check if we try to supply an empty value
7172      if test "x$DIFF" = x; then
7173        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7174$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7176$as_echo_n "checking for DIFF... " >&6; }
7177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7178$as_echo "disabled" >&6; }
7179      else
7180        # Check if the provided tool contains a complete path.
7181        tool_specified="$DIFF"
7182        tool_basename="${tool_specified##*/}"
7183        if test "x$tool_basename" = "x$tool_specified"; then
7184          # A command without a complete path is provided, search $PATH.
7185          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7186$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7187          # Extract the first word of "$tool_basename", so it can be a program name with args.
7188set dummy $tool_basename; ac_word=$2
7189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7190$as_echo_n "checking for $ac_word... " >&6; }
7191if ${ac_cv_path_DIFF+:} false; then :
7192  $as_echo_n "(cached) " >&6
7193else
7194  case $DIFF in
7195  [\\/]* | ?:[\\/]*)
7196  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7197  ;;
7198  *)
7199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7200for as_dir in $PATH
7201do
7202  IFS=$as_save_IFS
7203  test -z "$as_dir" && as_dir=.
7204    for ac_exec_ext in '' $ac_executable_extensions; do
7205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7206    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7208    break 2
7209  fi
7210done
7211  done
7212IFS=$as_save_IFS
7213
7214  ;;
7215esac
7216fi
7217DIFF=$ac_cv_path_DIFF
7218if test -n "$DIFF"; then
7219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7220$as_echo "$DIFF" >&6; }
7221else
7222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7223$as_echo "no" >&6; }
7224fi
7225
7226
7227          if test "x$DIFF" = x; then
7228            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7229          fi
7230        else
7231          # Otherwise we believe it is a complete path. Use it as it is.
7232          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7233$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7234          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7235$as_echo_n "checking for DIFF... " >&6; }
7236          if test ! -x "$tool_specified"; then
7237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7238$as_echo "not found" >&6; }
7239            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7240          fi
7241          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7242$as_echo "$tool_specified" >&6; }
7243        fi
7244      fi
7245    fi
7246
7247  fi
7248
7249
7250
7251  if test "x$DIFF" = x; then
7252    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7253  fi
7254
7255
7256
7257
7258
7259  # Publish this variable in the help.
7260
7261
7262  if [ -z "${DIRNAME+x}" ]; then
7263    # The variable is not set by user, try to locate tool using the code snippet
7264    for ac_prog in dirname
7265do
7266  # Extract the first word of "$ac_prog", so it can be a program name with args.
7267set dummy $ac_prog; ac_word=$2
7268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7269$as_echo_n "checking for $ac_word... " >&6; }
7270if ${ac_cv_path_DIRNAME+:} false; then :
7271  $as_echo_n "(cached) " >&6
7272else
7273  case $DIRNAME in
7274  [\\/]* | ?:[\\/]*)
7275  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7276  ;;
7277  *)
7278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7279for as_dir in $PATH
7280do
7281  IFS=$as_save_IFS
7282  test -z "$as_dir" && as_dir=.
7283    for ac_exec_ext in '' $ac_executable_extensions; do
7284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7285    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7287    break 2
7288  fi
7289done
7290  done
7291IFS=$as_save_IFS
7292
7293  ;;
7294esac
7295fi
7296DIRNAME=$ac_cv_path_DIRNAME
7297if test -n "$DIRNAME"; then
7298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7299$as_echo "$DIRNAME" >&6; }
7300else
7301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7302$as_echo "no" >&6; }
7303fi
7304
7305
7306  test -n "$DIRNAME" && break
7307done
7308
7309  else
7310    # The variable is set, but is it from the command line or the environment?
7311
7312    # Try to remove the string !DIRNAME! from our list.
7313    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7314    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7315      # If it failed, the variable was not from the command line. Ignore it,
7316      # but warn the user (except for BASH, which is always set by the calling BASH).
7317      if test "xDIRNAME" != xBASH; then
7318        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7319$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7320      fi
7321      # Try to locate tool using the code snippet
7322      for ac_prog in dirname
7323do
7324  # Extract the first word of "$ac_prog", so it can be a program name with args.
7325set dummy $ac_prog; ac_word=$2
7326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7327$as_echo_n "checking for $ac_word... " >&6; }
7328if ${ac_cv_path_DIRNAME+:} false; then :
7329  $as_echo_n "(cached) " >&6
7330else
7331  case $DIRNAME in
7332  [\\/]* | ?:[\\/]*)
7333  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7334  ;;
7335  *)
7336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7337for as_dir in $PATH
7338do
7339  IFS=$as_save_IFS
7340  test -z "$as_dir" && as_dir=.
7341    for ac_exec_ext in '' $ac_executable_extensions; do
7342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7343    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7345    break 2
7346  fi
7347done
7348  done
7349IFS=$as_save_IFS
7350
7351  ;;
7352esac
7353fi
7354DIRNAME=$ac_cv_path_DIRNAME
7355if test -n "$DIRNAME"; then
7356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7357$as_echo "$DIRNAME" >&6; }
7358else
7359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7360$as_echo "no" >&6; }
7361fi
7362
7363
7364  test -n "$DIRNAME" && break
7365done
7366
7367    else
7368      # If it succeeded, then it was overridden by the user. We will use it
7369      # for the tool.
7370
7371      # First remove it from the list of overridden variables, so we can test
7372      # for unknown variables in the end.
7373      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7374
7375      # Check if we try to supply an empty value
7376      if test "x$DIRNAME" = x; then
7377        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7378$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7380$as_echo_n "checking for DIRNAME... " >&6; }
7381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7382$as_echo "disabled" >&6; }
7383      else
7384        # Check if the provided tool contains a complete path.
7385        tool_specified="$DIRNAME"
7386        tool_basename="${tool_specified##*/}"
7387        if test "x$tool_basename" = "x$tool_specified"; then
7388          # A command without a complete path is provided, search $PATH.
7389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7390$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7391          # Extract the first word of "$tool_basename", so it can be a program name with args.
7392set dummy $tool_basename; ac_word=$2
7393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7394$as_echo_n "checking for $ac_word... " >&6; }
7395if ${ac_cv_path_DIRNAME+:} false; then :
7396  $as_echo_n "(cached) " >&6
7397else
7398  case $DIRNAME in
7399  [\\/]* | ?:[\\/]*)
7400  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7401  ;;
7402  *)
7403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7404for as_dir in $PATH
7405do
7406  IFS=$as_save_IFS
7407  test -z "$as_dir" && as_dir=.
7408    for ac_exec_ext in '' $ac_executable_extensions; do
7409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7410    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7412    break 2
7413  fi
7414done
7415  done
7416IFS=$as_save_IFS
7417
7418  ;;
7419esac
7420fi
7421DIRNAME=$ac_cv_path_DIRNAME
7422if test -n "$DIRNAME"; then
7423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7424$as_echo "$DIRNAME" >&6; }
7425else
7426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7427$as_echo "no" >&6; }
7428fi
7429
7430
7431          if test "x$DIRNAME" = x; then
7432            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7433          fi
7434        else
7435          # Otherwise we believe it is a complete path. Use it as it is.
7436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7437$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7438          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7439$as_echo_n "checking for DIRNAME... " >&6; }
7440          if test ! -x "$tool_specified"; then
7441            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7442$as_echo "not found" >&6; }
7443            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7444          fi
7445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7446$as_echo "$tool_specified" >&6; }
7447        fi
7448      fi
7449    fi
7450
7451  fi
7452
7453
7454
7455  if test "x$DIRNAME" = x; then
7456    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7457  fi
7458
7459
7460
7461
7462
7463  # Publish this variable in the help.
7464
7465
7466  if [ -z "${ECHO+x}" ]; then
7467    # The variable is not set by user, try to locate tool using the code snippet
7468    for ac_prog in echo
7469do
7470  # Extract the first word of "$ac_prog", so it can be a program name with args.
7471set dummy $ac_prog; ac_word=$2
7472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7473$as_echo_n "checking for $ac_word... " >&6; }
7474if ${ac_cv_path_ECHO+:} false; then :
7475  $as_echo_n "(cached) " >&6
7476else
7477  case $ECHO in
7478  [\\/]* | ?:[\\/]*)
7479  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7480  ;;
7481  *)
7482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7483for as_dir in $PATH
7484do
7485  IFS=$as_save_IFS
7486  test -z "$as_dir" && as_dir=.
7487    for ac_exec_ext in '' $ac_executable_extensions; do
7488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7489    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7491    break 2
7492  fi
7493done
7494  done
7495IFS=$as_save_IFS
7496
7497  ;;
7498esac
7499fi
7500ECHO=$ac_cv_path_ECHO
7501if test -n "$ECHO"; then
7502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7503$as_echo "$ECHO" >&6; }
7504else
7505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7506$as_echo "no" >&6; }
7507fi
7508
7509
7510  test -n "$ECHO" && break
7511done
7512
7513  else
7514    # The variable is set, but is it from the command line or the environment?
7515
7516    # Try to remove the string !ECHO! from our list.
7517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7519      # If it failed, the variable was not from the command line. Ignore it,
7520      # but warn the user (except for BASH, which is always set by the calling BASH).
7521      if test "xECHO" != xBASH; then
7522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7523$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7524      fi
7525      # Try to locate tool using the code snippet
7526      for ac_prog in echo
7527do
7528  # Extract the first word of "$ac_prog", so it can be a program name with args.
7529set dummy $ac_prog; ac_word=$2
7530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7531$as_echo_n "checking for $ac_word... " >&6; }
7532if ${ac_cv_path_ECHO+:} false; then :
7533  $as_echo_n "(cached) " >&6
7534else
7535  case $ECHO in
7536  [\\/]* | ?:[\\/]*)
7537  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7538  ;;
7539  *)
7540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7541for as_dir in $PATH
7542do
7543  IFS=$as_save_IFS
7544  test -z "$as_dir" && as_dir=.
7545    for ac_exec_ext in '' $ac_executable_extensions; do
7546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7547    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7549    break 2
7550  fi
7551done
7552  done
7553IFS=$as_save_IFS
7554
7555  ;;
7556esac
7557fi
7558ECHO=$ac_cv_path_ECHO
7559if test -n "$ECHO"; then
7560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7561$as_echo "$ECHO" >&6; }
7562else
7563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7564$as_echo "no" >&6; }
7565fi
7566
7567
7568  test -n "$ECHO" && break
7569done
7570
7571    else
7572      # If it succeeded, then it was overridden by the user. We will use it
7573      # for the tool.
7574
7575      # First remove it from the list of overridden variables, so we can test
7576      # for unknown variables in the end.
7577      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7578
7579      # Check if we try to supply an empty value
7580      if test "x$ECHO" = x; then
7581        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7582$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7583        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7584$as_echo_n "checking for ECHO... " >&6; }
7585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7586$as_echo "disabled" >&6; }
7587      else
7588        # Check if the provided tool contains a complete path.
7589        tool_specified="$ECHO"
7590        tool_basename="${tool_specified##*/}"
7591        if test "x$tool_basename" = "x$tool_specified"; then
7592          # A command without a complete path is provided, search $PATH.
7593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7594$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7595          # Extract the first word of "$tool_basename", so it can be a program name with args.
7596set dummy $tool_basename; ac_word=$2
7597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7598$as_echo_n "checking for $ac_word... " >&6; }
7599if ${ac_cv_path_ECHO+:} false; then :
7600  $as_echo_n "(cached) " >&6
7601else
7602  case $ECHO in
7603  [\\/]* | ?:[\\/]*)
7604  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7605  ;;
7606  *)
7607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7608for as_dir in $PATH
7609do
7610  IFS=$as_save_IFS
7611  test -z "$as_dir" && as_dir=.
7612    for ac_exec_ext in '' $ac_executable_extensions; do
7613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7614    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7616    break 2
7617  fi
7618done
7619  done
7620IFS=$as_save_IFS
7621
7622  ;;
7623esac
7624fi
7625ECHO=$ac_cv_path_ECHO
7626if test -n "$ECHO"; then
7627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7628$as_echo "$ECHO" >&6; }
7629else
7630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7631$as_echo "no" >&6; }
7632fi
7633
7634
7635          if test "x$ECHO" = x; then
7636            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7637          fi
7638        else
7639          # Otherwise we believe it is a complete path. Use it as it is.
7640          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7641$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7642          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7643$as_echo_n "checking for ECHO... " >&6; }
7644          if test ! -x "$tool_specified"; then
7645            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7646$as_echo "not found" >&6; }
7647            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7648          fi
7649          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7650$as_echo "$tool_specified" >&6; }
7651        fi
7652      fi
7653    fi
7654
7655  fi
7656
7657
7658
7659  if test "x$ECHO" = x; then
7660    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7661  fi
7662
7663
7664
7665
7666
7667  # Publish this variable in the help.
7668
7669
7670  if [ -z "${EXPR+x}" ]; then
7671    # The variable is not set by user, try to locate tool using the code snippet
7672    for ac_prog in expr
7673do
7674  # Extract the first word of "$ac_prog", so it can be a program name with args.
7675set dummy $ac_prog; ac_word=$2
7676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7677$as_echo_n "checking for $ac_word... " >&6; }
7678if ${ac_cv_path_EXPR+:} false; then :
7679  $as_echo_n "(cached) " >&6
7680else
7681  case $EXPR in
7682  [\\/]* | ?:[\\/]*)
7683  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7684  ;;
7685  *)
7686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7687for as_dir in $PATH
7688do
7689  IFS=$as_save_IFS
7690  test -z "$as_dir" && as_dir=.
7691    for ac_exec_ext in '' $ac_executable_extensions; do
7692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7693    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7695    break 2
7696  fi
7697done
7698  done
7699IFS=$as_save_IFS
7700
7701  ;;
7702esac
7703fi
7704EXPR=$ac_cv_path_EXPR
7705if test -n "$EXPR"; then
7706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7707$as_echo "$EXPR" >&6; }
7708else
7709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7710$as_echo "no" >&6; }
7711fi
7712
7713
7714  test -n "$EXPR" && break
7715done
7716
7717  else
7718    # The variable is set, but is it from the command line or the environment?
7719
7720    # Try to remove the string !EXPR! from our list.
7721    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7722    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7723      # If it failed, the variable was not from the command line. Ignore it,
7724      # but warn the user (except for BASH, which is always set by the calling BASH).
7725      if test "xEXPR" != xBASH; then
7726        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7727$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7728      fi
7729      # Try to locate tool using the code snippet
7730      for ac_prog in expr
7731do
7732  # Extract the first word of "$ac_prog", so it can be a program name with args.
7733set dummy $ac_prog; ac_word=$2
7734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7735$as_echo_n "checking for $ac_word... " >&6; }
7736if ${ac_cv_path_EXPR+:} false; then :
7737  $as_echo_n "(cached) " >&6
7738else
7739  case $EXPR in
7740  [\\/]* | ?:[\\/]*)
7741  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7742  ;;
7743  *)
7744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7745for as_dir in $PATH
7746do
7747  IFS=$as_save_IFS
7748  test -z "$as_dir" && as_dir=.
7749    for ac_exec_ext in '' $ac_executable_extensions; do
7750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7751    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7753    break 2
7754  fi
7755done
7756  done
7757IFS=$as_save_IFS
7758
7759  ;;
7760esac
7761fi
7762EXPR=$ac_cv_path_EXPR
7763if test -n "$EXPR"; then
7764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7765$as_echo "$EXPR" >&6; }
7766else
7767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7768$as_echo "no" >&6; }
7769fi
7770
7771
7772  test -n "$EXPR" && break
7773done
7774
7775    else
7776      # If it succeeded, then it was overridden by the user. We will use it
7777      # for the tool.
7778
7779      # First remove it from the list of overridden variables, so we can test
7780      # for unknown variables in the end.
7781      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7782
7783      # Check if we try to supply an empty value
7784      if test "x$EXPR" = x; then
7785        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7786$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7787        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7788$as_echo_n "checking for EXPR... " >&6; }
7789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7790$as_echo "disabled" >&6; }
7791      else
7792        # Check if the provided tool contains a complete path.
7793        tool_specified="$EXPR"
7794        tool_basename="${tool_specified##*/}"
7795        if test "x$tool_basename" = "x$tool_specified"; then
7796          # A command without a complete path is provided, search $PATH.
7797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7798$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7799          # Extract the first word of "$tool_basename", so it can be a program name with args.
7800set dummy $tool_basename; ac_word=$2
7801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7802$as_echo_n "checking for $ac_word... " >&6; }
7803if ${ac_cv_path_EXPR+:} false; then :
7804  $as_echo_n "(cached) " >&6
7805else
7806  case $EXPR in
7807  [\\/]* | ?:[\\/]*)
7808  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7809  ;;
7810  *)
7811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7812for as_dir in $PATH
7813do
7814  IFS=$as_save_IFS
7815  test -z "$as_dir" && as_dir=.
7816    for ac_exec_ext in '' $ac_executable_extensions; do
7817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7818    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7820    break 2
7821  fi
7822done
7823  done
7824IFS=$as_save_IFS
7825
7826  ;;
7827esac
7828fi
7829EXPR=$ac_cv_path_EXPR
7830if test -n "$EXPR"; then
7831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7832$as_echo "$EXPR" >&6; }
7833else
7834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7835$as_echo "no" >&6; }
7836fi
7837
7838
7839          if test "x$EXPR" = x; then
7840            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7841          fi
7842        else
7843          # Otherwise we believe it is a complete path. Use it as it is.
7844          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7845$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7846          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7847$as_echo_n "checking for EXPR... " >&6; }
7848          if test ! -x "$tool_specified"; then
7849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7850$as_echo "not found" >&6; }
7851            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7852          fi
7853          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7854$as_echo "$tool_specified" >&6; }
7855        fi
7856      fi
7857    fi
7858
7859  fi
7860
7861
7862
7863  if test "x$EXPR" = x; then
7864    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7865  fi
7866
7867
7868
7869
7870
7871  # Publish this variable in the help.
7872
7873
7874  if [ -z "${FILE+x}" ]; then
7875    # The variable is not set by user, try to locate tool using the code snippet
7876    for ac_prog in file
7877do
7878  # Extract the first word of "$ac_prog", so it can be a program name with args.
7879set dummy $ac_prog; ac_word=$2
7880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7881$as_echo_n "checking for $ac_word... " >&6; }
7882if ${ac_cv_path_FILE+:} false; then :
7883  $as_echo_n "(cached) " >&6
7884else
7885  case $FILE in
7886  [\\/]* | ?:[\\/]*)
7887  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7888  ;;
7889  *)
7890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7891for as_dir in $PATH
7892do
7893  IFS=$as_save_IFS
7894  test -z "$as_dir" && as_dir=.
7895    for ac_exec_ext in '' $ac_executable_extensions; do
7896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7897    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7899    break 2
7900  fi
7901done
7902  done
7903IFS=$as_save_IFS
7904
7905  ;;
7906esac
7907fi
7908FILE=$ac_cv_path_FILE
7909if test -n "$FILE"; then
7910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7911$as_echo "$FILE" >&6; }
7912else
7913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7914$as_echo "no" >&6; }
7915fi
7916
7917
7918  test -n "$FILE" && break
7919done
7920
7921  else
7922    # The variable is set, but is it from the command line or the environment?
7923
7924    # Try to remove the string !FILE! from our list.
7925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7927      # If it failed, the variable was not from the command line. Ignore it,
7928      # but warn the user (except for BASH, which is always set by the calling BASH).
7929      if test "xFILE" != xBASH; then
7930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7931$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7932      fi
7933      # Try to locate tool using the code snippet
7934      for ac_prog in file
7935do
7936  # Extract the first word of "$ac_prog", so it can be a program name with args.
7937set dummy $ac_prog; ac_word=$2
7938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7939$as_echo_n "checking for $ac_word... " >&6; }
7940if ${ac_cv_path_FILE+:} false; then :
7941  $as_echo_n "(cached) " >&6
7942else
7943  case $FILE in
7944  [\\/]* | ?:[\\/]*)
7945  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7946  ;;
7947  *)
7948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7949for as_dir in $PATH
7950do
7951  IFS=$as_save_IFS
7952  test -z "$as_dir" && as_dir=.
7953    for ac_exec_ext in '' $ac_executable_extensions; do
7954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7955    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7957    break 2
7958  fi
7959done
7960  done
7961IFS=$as_save_IFS
7962
7963  ;;
7964esac
7965fi
7966FILE=$ac_cv_path_FILE
7967if test -n "$FILE"; then
7968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7969$as_echo "$FILE" >&6; }
7970else
7971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7972$as_echo "no" >&6; }
7973fi
7974
7975
7976  test -n "$FILE" && break
7977done
7978
7979    else
7980      # If it succeeded, then it was overridden by the user. We will use it
7981      # for the tool.
7982
7983      # First remove it from the list of overridden variables, so we can test
7984      # for unknown variables in the end.
7985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7986
7987      # Check if we try to supply an empty value
7988      if test "x$FILE" = x; then
7989        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7990$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7991        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7992$as_echo_n "checking for FILE... " >&6; }
7993        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7994$as_echo "disabled" >&6; }
7995      else
7996        # Check if the provided tool contains a complete path.
7997        tool_specified="$FILE"
7998        tool_basename="${tool_specified##*/}"
7999        if test "x$tool_basename" = "x$tool_specified"; then
8000          # A command without a complete path is provided, search $PATH.
8001          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8002$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8003          # Extract the first word of "$tool_basename", so it can be a program name with args.
8004set dummy $tool_basename; ac_word=$2
8005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8006$as_echo_n "checking for $ac_word... " >&6; }
8007if ${ac_cv_path_FILE+:} false; then :
8008  $as_echo_n "(cached) " >&6
8009else
8010  case $FILE in
8011  [\\/]* | ?:[\\/]*)
8012  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8013  ;;
8014  *)
8015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8016for as_dir in $PATH
8017do
8018  IFS=$as_save_IFS
8019  test -z "$as_dir" && as_dir=.
8020    for ac_exec_ext in '' $ac_executable_extensions; do
8021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8022    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8024    break 2
8025  fi
8026done
8027  done
8028IFS=$as_save_IFS
8029
8030  ;;
8031esac
8032fi
8033FILE=$ac_cv_path_FILE
8034if test -n "$FILE"; then
8035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8036$as_echo "$FILE" >&6; }
8037else
8038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8039$as_echo "no" >&6; }
8040fi
8041
8042
8043          if test "x$FILE" = x; then
8044            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8045          fi
8046        else
8047          # Otherwise we believe it is a complete path. Use it as it is.
8048          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8049$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8050          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8051$as_echo_n "checking for FILE... " >&6; }
8052          if test ! -x "$tool_specified"; then
8053            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8054$as_echo "not found" >&6; }
8055            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8056          fi
8057          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8058$as_echo "$tool_specified" >&6; }
8059        fi
8060      fi
8061    fi
8062
8063  fi
8064
8065
8066
8067  if test "x$FILE" = x; then
8068    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8069  fi
8070
8071
8072
8073
8074
8075  # Publish this variable in the help.
8076
8077
8078  if [ -z "${FIND+x}" ]; then
8079    # The variable is not set by user, try to locate tool using the code snippet
8080    for ac_prog in find
8081do
8082  # Extract the first word of "$ac_prog", so it can be a program name with args.
8083set dummy $ac_prog; ac_word=$2
8084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8085$as_echo_n "checking for $ac_word... " >&6; }
8086if ${ac_cv_path_FIND+:} false; then :
8087  $as_echo_n "(cached) " >&6
8088else
8089  case $FIND in
8090  [\\/]* | ?:[\\/]*)
8091  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8092  ;;
8093  *)
8094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8095for as_dir in $PATH
8096do
8097  IFS=$as_save_IFS
8098  test -z "$as_dir" && as_dir=.
8099    for ac_exec_ext in '' $ac_executable_extensions; do
8100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8101    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8103    break 2
8104  fi
8105done
8106  done
8107IFS=$as_save_IFS
8108
8109  ;;
8110esac
8111fi
8112FIND=$ac_cv_path_FIND
8113if test -n "$FIND"; then
8114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8115$as_echo "$FIND" >&6; }
8116else
8117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8118$as_echo "no" >&6; }
8119fi
8120
8121
8122  test -n "$FIND" && break
8123done
8124
8125  else
8126    # The variable is set, but is it from the command line or the environment?
8127
8128    # Try to remove the string !FIND! from our list.
8129    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8130    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8131      # If it failed, the variable was not from the command line. Ignore it,
8132      # but warn the user (except for BASH, which is always set by the calling BASH).
8133      if test "xFIND" != xBASH; then
8134        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8135$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8136      fi
8137      # Try to locate tool using the code snippet
8138      for ac_prog in find
8139do
8140  # Extract the first word of "$ac_prog", so it can be a program name with args.
8141set dummy $ac_prog; ac_word=$2
8142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8143$as_echo_n "checking for $ac_word... " >&6; }
8144if ${ac_cv_path_FIND+:} false; then :
8145  $as_echo_n "(cached) " >&6
8146else
8147  case $FIND in
8148  [\\/]* | ?:[\\/]*)
8149  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8150  ;;
8151  *)
8152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8153for as_dir in $PATH
8154do
8155  IFS=$as_save_IFS
8156  test -z "$as_dir" && as_dir=.
8157    for ac_exec_ext in '' $ac_executable_extensions; do
8158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8159    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8161    break 2
8162  fi
8163done
8164  done
8165IFS=$as_save_IFS
8166
8167  ;;
8168esac
8169fi
8170FIND=$ac_cv_path_FIND
8171if test -n "$FIND"; then
8172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8173$as_echo "$FIND" >&6; }
8174else
8175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8176$as_echo "no" >&6; }
8177fi
8178
8179
8180  test -n "$FIND" && break
8181done
8182
8183    else
8184      # If it succeeded, then it was overridden by the user. We will use it
8185      # for the tool.
8186
8187      # First remove it from the list of overridden variables, so we can test
8188      # for unknown variables in the end.
8189      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8190
8191      # Check if we try to supply an empty value
8192      if test "x$FIND" = x; then
8193        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8194$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8195        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8196$as_echo_n "checking for FIND... " >&6; }
8197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8198$as_echo "disabled" >&6; }
8199      else
8200        # Check if the provided tool contains a complete path.
8201        tool_specified="$FIND"
8202        tool_basename="${tool_specified##*/}"
8203        if test "x$tool_basename" = "x$tool_specified"; then
8204          # A command without a complete path is provided, search $PATH.
8205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8206$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8207          # Extract the first word of "$tool_basename", so it can be a program name with args.
8208set dummy $tool_basename; ac_word=$2
8209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8210$as_echo_n "checking for $ac_word... " >&6; }
8211if ${ac_cv_path_FIND+:} false; then :
8212  $as_echo_n "(cached) " >&6
8213else
8214  case $FIND in
8215  [\\/]* | ?:[\\/]*)
8216  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8217  ;;
8218  *)
8219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8220for as_dir in $PATH
8221do
8222  IFS=$as_save_IFS
8223  test -z "$as_dir" && as_dir=.
8224    for ac_exec_ext in '' $ac_executable_extensions; do
8225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8226    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8228    break 2
8229  fi
8230done
8231  done
8232IFS=$as_save_IFS
8233
8234  ;;
8235esac
8236fi
8237FIND=$ac_cv_path_FIND
8238if test -n "$FIND"; then
8239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8240$as_echo "$FIND" >&6; }
8241else
8242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8243$as_echo "no" >&6; }
8244fi
8245
8246
8247          if test "x$FIND" = x; then
8248            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8249          fi
8250        else
8251          # Otherwise we believe it is a complete path. Use it as it is.
8252          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8253$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8254          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8255$as_echo_n "checking for FIND... " >&6; }
8256          if test ! -x "$tool_specified"; then
8257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8258$as_echo "not found" >&6; }
8259            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8260          fi
8261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8262$as_echo "$tool_specified" >&6; }
8263        fi
8264      fi
8265    fi
8266
8267  fi
8268
8269
8270
8271  if test "x$FIND" = x; then
8272    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8273  fi
8274
8275
8276
8277
8278
8279  # Publish this variable in the help.
8280
8281
8282  if [ -z "${HEAD+x}" ]; then
8283    # The variable is not set by user, try to locate tool using the code snippet
8284    for ac_prog in head
8285do
8286  # Extract the first word of "$ac_prog", so it can be a program name with args.
8287set dummy $ac_prog; ac_word=$2
8288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8289$as_echo_n "checking for $ac_word... " >&6; }
8290if ${ac_cv_path_HEAD+:} false; then :
8291  $as_echo_n "(cached) " >&6
8292else
8293  case $HEAD in
8294  [\\/]* | ?:[\\/]*)
8295  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8296  ;;
8297  *)
8298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8299for as_dir in $PATH
8300do
8301  IFS=$as_save_IFS
8302  test -z "$as_dir" && as_dir=.
8303    for ac_exec_ext in '' $ac_executable_extensions; do
8304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8305    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8307    break 2
8308  fi
8309done
8310  done
8311IFS=$as_save_IFS
8312
8313  ;;
8314esac
8315fi
8316HEAD=$ac_cv_path_HEAD
8317if test -n "$HEAD"; then
8318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8319$as_echo "$HEAD" >&6; }
8320else
8321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8322$as_echo "no" >&6; }
8323fi
8324
8325
8326  test -n "$HEAD" && break
8327done
8328
8329  else
8330    # The variable is set, but is it from the command line or the environment?
8331
8332    # Try to remove the string !HEAD! from our list.
8333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8335      # If it failed, the variable was not from the command line. Ignore it,
8336      # but warn the user (except for BASH, which is always set by the calling BASH).
8337      if test "xHEAD" != xBASH; then
8338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8339$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8340      fi
8341      # Try to locate tool using the code snippet
8342      for ac_prog in head
8343do
8344  # Extract the first word of "$ac_prog", so it can be a program name with args.
8345set dummy $ac_prog; ac_word=$2
8346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8347$as_echo_n "checking for $ac_word... " >&6; }
8348if ${ac_cv_path_HEAD+:} false; then :
8349  $as_echo_n "(cached) " >&6
8350else
8351  case $HEAD in
8352  [\\/]* | ?:[\\/]*)
8353  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8354  ;;
8355  *)
8356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8357for as_dir in $PATH
8358do
8359  IFS=$as_save_IFS
8360  test -z "$as_dir" && as_dir=.
8361    for ac_exec_ext in '' $ac_executable_extensions; do
8362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8363    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8365    break 2
8366  fi
8367done
8368  done
8369IFS=$as_save_IFS
8370
8371  ;;
8372esac
8373fi
8374HEAD=$ac_cv_path_HEAD
8375if test -n "$HEAD"; then
8376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8377$as_echo "$HEAD" >&6; }
8378else
8379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8380$as_echo "no" >&6; }
8381fi
8382
8383
8384  test -n "$HEAD" && break
8385done
8386
8387    else
8388      # If it succeeded, then it was overridden by the user. We will use it
8389      # for the tool.
8390
8391      # First remove it from the list of overridden variables, so we can test
8392      # for unknown variables in the end.
8393      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8394
8395      # Check if we try to supply an empty value
8396      if test "x$HEAD" = x; then
8397        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8398$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8399        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8400$as_echo_n "checking for HEAD... " >&6; }
8401        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8402$as_echo "disabled" >&6; }
8403      else
8404        # Check if the provided tool contains a complete path.
8405        tool_specified="$HEAD"
8406        tool_basename="${tool_specified##*/}"
8407        if test "x$tool_basename" = "x$tool_specified"; then
8408          # A command without a complete path is provided, search $PATH.
8409          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8410$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8411          # Extract the first word of "$tool_basename", so it can be a program name with args.
8412set dummy $tool_basename; ac_word=$2
8413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8414$as_echo_n "checking for $ac_word... " >&6; }
8415if ${ac_cv_path_HEAD+:} false; then :
8416  $as_echo_n "(cached) " >&6
8417else
8418  case $HEAD in
8419  [\\/]* | ?:[\\/]*)
8420  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8421  ;;
8422  *)
8423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8424for as_dir in $PATH
8425do
8426  IFS=$as_save_IFS
8427  test -z "$as_dir" && as_dir=.
8428    for ac_exec_ext in '' $ac_executable_extensions; do
8429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8430    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8432    break 2
8433  fi
8434done
8435  done
8436IFS=$as_save_IFS
8437
8438  ;;
8439esac
8440fi
8441HEAD=$ac_cv_path_HEAD
8442if test -n "$HEAD"; then
8443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8444$as_echo "$HEAD" >&6; }
8445else
8446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8447$as_echo "no" >&6; }
8448fi
8449
8450
8451          if test "x$HEAD" = x; then
8452            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8453          fi
8454        else
8455          # Otherwise we believe it is a complete path. Use it as it is.
8456          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8457$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8458          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8459$as_echo_n "checking for HEAD... " >&6; }
8460          if test ! -x "$tool_specified"; then
8461            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8462$as_echo "not found" >&6; }
8463            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8464          fi
8465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8466$as_echo "$tool_specified" >&6; }
8467        fi
8468      fi
8469    fi
8470
8471  fi
8472
8473
8474
8475  if test "x$HEAD" = x; then
8476    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8477  fi
8478
8479
8480
8481
8482
8483  # Publish this variable in the help.
8484
8485
8486  if [ -z "${GUNZIP+x}" ]; then
8487    # The variable is not set by user, try to locate tool using the code snippet
8488    for ac_prog in gunzip
8489do
8490  # Extract the first word of "$ac_prog", so it can be a program name with args.
8491set dummy $ac_prog; ac_word=$2
8492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8493$as_echo_n "checking for $ac_word... " >&6; }
8494if ${ac_cv_path_GUNZIP+:} false; then :
8495  $as_echo_n "(cached) " >&6
8496else
8497  case $GUNZIP in
8498  [\\/]* | ?:[\\/]*)
8499  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8500  ;;
8501  *)
8502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8503for as_dir in $PATH
8504do
8505  IFS=$as_save_IFS
8506  test -z "$as_dir" && as_dir=.
8507    for ac_exec_ext in '' $ac_executable_extensions; do
8508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8509    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8511    break 2
8512  fi
8513done
8514  done
8515IFS=$as_save_IFS
8516
8517  ;;
8518esac
8519fi
8520GUNZIP=$ac_cv_path_GUNZIP
8521if test -n "$GUNZIP"; then
8522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8523$as_echo "$GUNZIP" >&6; }
8524else
8525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8526$as_echo "no" >&6; }
8527fi
8528
8529
8530  test -n "$GUNZIP" && break
8531done
8532
8533  else
8534    # The variable is set, but is it from the command line or the environment?
8535
8536    # Try to remove the string !GUNZIP! from our list.
8537    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8538    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8539      # If it failed, the variable was not from the command line. Ignore it,
8540      # but warn the user (except for BASH, which is always set by the calling BASH).
8541      if test "xGUNZIP" != xBASH; then
8542        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8543$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8544      fi
8545      # Try to locate tool using the code snippet
8546      for ac_prog in gunzip
8547do
8548  # Extract the first word of "$ac_prog", so it can be a program name with args.
8549set dummy $ac_prog; ac_word=$2
8550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8551$as_echo_n "checking for $ac_word... " >&6; }
8552if ${ac_cv_path_GUNZIP+:} false; then :
8553  $as_echo_n "(cached) " >&6
8554else
8555  case $GUNZIP in
8556  [\\/]* | ?:[\\/]*)
8557  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8558  ;;
8559  *)
8560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8561for as_dir in $PATH
8562do
8563  IFS=$as_save_IFS
8564  test -z "$as_dir" && as_dir=.
8565    for ac_exec_ext in '' $ac_executable_extensions; do
8566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8567    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8569    break 2
8570  fi
8571done
8572  done
8573IFS=$as_save_IFS
8574
8575  ;;
8576esac
8577fi
8578GUNZIP=$ac_cv_path_GUNZIP
8579if test -n "$GUNZIP"; then
8580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8581$as_echo "$GUNZIP" >&6; }
8582else
8583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8584$as_echo "no" >&6; }
8585fi
8586
8587
8588  test -n "$GUNZIP" && break
8589done
8590
8591    else
8592      # If it succeeded, then it was overridden by the user. We will use it
8593      # for the tool.
8594
8595      # First remove it from the list of overridden variables, so we can test
8596      # for unknown variables in the end.
8597      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8598
8599      # Check if we try to supply an empty value
8600      if test "x$GUNZIP" = x; then
8601        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8602$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8604$as_echo_n "checking for GUNZIP... " >&6; }
8605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8606$as_echo "disabled" >&6; }
8607      else
8608        # Check if the provided tool contains a complete path.
8609        tool_specified="$GUNZIP"
8610        tool_basename="${tool_specified##*/}"
8611        if test "x$tool_basename" = "x$tool_specified"; then
8612          # A command without a complete path is provided, search $PATH.
8613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8614$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8615          # Extract the first word of "$tool_basename", so it can be a program name with args.
8616set dummy $tool_basename; ac_word=$2
8617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8618$as_echo_n "checking for $ac_word... " >&6; }
8619if ${ac_cv_path_GUNZIP+:} false; then :
8620  $as_echo_n "(cached) " >&6
8621else
8622  case $GUNZIP in
8623  [\\/]* | ?:[\\/]*)
8624  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8625  ;;
8626  *)
8627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8628for as_dir in $PATH
8629do
8630  IFS=$as_save_IFS
8631  test -z "$as_dir" && as_dir=.
8632    for ac_exec_ext in '' $ac_executable_extensions; do
8633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8634    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8636    break 2
8637  fi
8638done
8639  done
8640IFS=$as_save_IFS
8641
8642  ;;
8643esac
8644fi
8645GUNZIP=$ac_cv_path_GUNZIP
8646if test -n "$GUNZIP"; then
8647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8648$as_echo "$GUNZIP" >&6; }
8649else
8650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8651$as_echo "no" >&6; }
8652fi
8653
8654
8655          if test "x$GUNZIP" = x; then
8656            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8657          fi
8658        else
8659          # Otherwise we believe it is a complete path. Use it as it is.
8660          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8661$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8662          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8663$as_echo_n "checking for GUNZIP... " >&6; }
8664          if test ! -x "$tool_specified"; then
8665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8666$as_echo "not found" >&6; }
8667            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8668          fi
8669          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8670$as_echo "$tool_specified" >&6; }
8671        fi
8672      fi
8673    fi
8674
8675  fi
8676
8677
8678
8679  if test "x$GUNZIP" = x; then
8680    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8681  fi
8682
8683
8684
8685
8686
8687  # Publish this variable in the help.
8688
8689
8690  if [ -z "${GZIP+x}" ]; then
8691    # The variable is not set by user, try to locate tool using the code snippet
8692    for ac_prog in pigz gzip
8693do
8694  # Extract the first word of "$ac_prog", so it can be a program name with args.
8695set dummy $ac_prog; ac_word=$2
8696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8697$as_echo_n "checking for $ac_word... " >&6; }
8698if ${ac_cv_path_GZIP+:} false; then :
8699  $as_echo_n "(cached) " >&6
8700else
8701  case $GZIP in
8702  [\\/]* | ?:[\\/]*)
8703  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8704  ;;
8705  *)
8706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8707for as_dir in $PATH
8708do
8709  IFS=$as_save_IFS
8710  test -z "$as_dir" && as_dir=.
8711    for ac_exec_ext in '' $ac_executable_extensions; do
8712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8713    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8715    break 2
8716  fi
8717done
8718  done
8719IFS=$as_save_IFS
8720
8721  ;;
8722esac
8723fi
8724GZIP=$ac_cv_path_GZIP
8725if test -n "$GZIP"; then
8726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8727$as_echo "$GZIP" >&6; }
8728else
8729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8730$as_echo "no" >&6; }
8731fi
8732
8733
8734  test -n "$GZIP" && break
8735done
8736
8737  else
8738    # The variable is set, but is it from the command line or the environment?
8739
8740    # Try to remove the string !GZIP! from our list.
8741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8743      # If it failed, the variable was not from the command line. Ignore it,
8744      # but warn the user (except for BASH, which is always set by the calling BASH).
8745      if test "xGZIP" != xBASH; then
8746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8747$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8748      fi
8749      # Try to locate tool using the code snippet
8750      for ac_prog in pigz gzip
8751do
8752  # Extract the first word of "$ac_prog", so it can be a program name with args.
8753set dummy $ac_prog; ac_word=$2
8754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8755$as_echo_n "checking for $ac_word... " >&6; }
8756if ${ac_cv_path_GZIP+:} false; then :
8757  $as_echo_n "(cached) " >&6
8758else
8759  case $GZIP in
8760  [\\/]* | ?:[\\/]*)
8761  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8762  ;;
8763  *)
8764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8765for as_dir in $PATH
8766do
8767  IFS=$as_save_IFS
8768  test -z "$as_dir" && as_dir=.
8769    for ac_exec_ext in '' $ac_executable_extensions; do
8770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8771    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8773    break 2
8774  fi
8775done
8776  done
8777IFS=$as_save_IFS
8778
8779  ;;
8780esac
8781fi
8782GZIP=$ac_cv_path_GZIP
8783if test -n "$GZIP"; then
8784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8785$as_echo "$GZIP" >&6; }
8786else
8787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8788$as_echo "no" >&6; }
8789fi
8790
8791
8792  test -n "$GZIP" && break
8793done
8794
8795    else
8796      # If it succeeded, then it was overridden by the user. We will use it
8797      # for the tool.
8798
8799      # First remove it from the list of overridden variables, so we can test
8800      # for unknown variables in the end.
8801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8802
8803      # Check if we try to supply an empty value
8804      if test "x$GZIP" = x; then
8805        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8806$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8807        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8808$as_echo_n "checking for GZIP... " >&6; }
8809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8810$as_echo "disabled" >&6; }
8811      else
8812        # Check if the provided tool contains a complete path.
8813        tool_specified="$GZIP"
8814        tool_basename="${tool_specified##*/}"
8815        if test "x$tool_basename" = "x$tool_specified"; then
8816          # A command without a complete path is provided, search $PATH.
8817          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8818$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8819          # Extract the first word of "$tool_basename", so it can be a program name with args.
8820set dummy $tool_basename; ac_word=$2
8821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8822$as_echo_n "checking for $ac_word... " >&6; }
8823if ${ac_cv_path_GZIP+:} false; then :
8824  $as_echo_n "(cached) " >&6
8825else
8826  case $GZIP in
8827  [\\/]* | ?:[\\/]*)
8828  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8829  ;;
8830  *)
8831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8832for as_dir in $PATH
8833do
8834  IFS=$as_save_IFS
8835  test -z "$as_dir" && as_dir=.
8836    for ac_exec_ext in '' $ac_executable_extensions; do
8837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8838    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8840    break 2
8841  fi
8842done
8843  done
8844IFS=$as_save_IFS
8845
8846  ;;
8847esac
8848fi
8849GZIP=$ac_cv_path_GZIP
8850if test -n "$GZIP"; then
8851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8852$as_echo "$GZIP" >&6; }
8853else
8854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8855$as_echo "no" >&6; }
8856fi
8857
8858
8859          if test "x$GZIP" = x; then
8860            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8861          fi
8862        else
8863          # Otherwise we believe it is a complete path. Use it as it is.
8864          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8865$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8866          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8867$as_echo_n "checking for GZIP... " >&6; }
8868          if test ! -x "$tool_specified"; then
8869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8870$as_echo "not found" >&6; }
8871            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8872          fi
8873          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8874$as_echo "$tool_specified" >&6; }
8875        fi
8876      fi
8877    fi
8878
8879  fi
8880
8881
8882
8883  if test "x$GZIP" = x; then
8884    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8885  fi
8886
8887
8888
8889
8890
8891  # Publish this variable in the help.
8892
8893
8894  if [ -z "${LN+x}" ]; then
8895    # The variable is not set by user, try to locate tool using the code snippet
8896    for ac_prog in ln
8897do
8898  # Extract the first word of "$ac_prog", so it can be a program name with args.
8899set dummy $ac_prog; ac_word=$2
8900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8901$as_echo_n "checking for $ac_word... " >&6; }
8902if ${ac_cv_path_LN+:} false; then :
8903  $as_echo_n "(cached) " >&6
8904else
8905  case $LN in
8906  [\\/]* | ?:[\\/]*)
8907  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8908  ;;
8909  *)
8910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8911for as_dir in $PATH
8912do
8913  IFS=$as_save_IFS
8914  test -z "$as_dir" && as_dir=.
8915    for ac_exec_ext in '' $ac_executable_extensions; do
8916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8917    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8919    break 2
8920  fi
8921done
8922  done
8923IFS=$as_save_IFS
8924
8925  ;;
8926esac
8927fi
8928LN=$ac_cv_path_LN
8929if test -n "$LN"; then
8930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8931$as_echo "$LN" >&6; }
8932else
8933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8934$as_echo "no" >&6; }
8935fi
8936
8937
8938  test -n "$LN" && break
8939done
8940
8941  else
8942    # The variable is set, but is it from the command line or the environment?
8943
8944    # Try to remove the string !LN! from our list.
8945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8947      # If it failed, the variable was not from the command line. Ignore it,
8948      # but warn the user (except for BASH, which is always set by the calling BASH).
8949      if test "xLN" != xBASH; then
8950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8951$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8952      fi
8953      # Try to locate tool using the code snippet
8954      for ac_prog in ln
8955do
8956  # Extract the first word of "$ac_prog", so it can be a program name with args.
8957set dummy $ac_prog; ac_word=$2
8958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8959$as_echo_n "checking for $ac_word... " >&6; }
8960if ${ac_cv_path_LN+:} false; then :
8961  $as_echo_n "(cached) " >&6
8962else
8963  case $LN in
8964  [\\/]* | ?:[\\/]*)
8965  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8966  ;;
8967  *)
8968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8969for as_dir in $PATH
8970do
8971  IFS=$as_save_IFS
8972  test -z "$as_dir" && as_dir=.
8973    for ac_exec_ext in '' $ac_executable_extensions; do
8974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8975    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8977    break 2
8978  fi
8979done
8980  done
8981IFS=$as_save_IFS
8982
8983  ;;
8984esac
8985fi
8986LN=$ac_cv_path_LN
8987if test -n "$LN"; then
8988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8989$as_echo "$LN" >&6; }
8990else
8991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8992$as_echo "no" >&6; }
8993fi
8994
8995
8996  test -n "$LN" && break
8997done
8998
8999    else
9000      # If it succeeded, then it was overridden by the user. We will use it
9001      # for the tool.
9002
9003      # First remove it from the list of overridden variables, so we can test
9004      # for unknown variables in the end.
9005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9006
9007      # Check if we try to supply an empty value
9008      if test "x$LN" = x; then
9009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9010$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9012$as_echo_n "checking for LN... " >&6; }
9013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9014$as_echo "disabled" >&6; }
9015      else
9016        # Check if the provided tool contains a complete path.
9017        tool_specified="$LN"
9018        tool_basename="${tool_specified##*/}"
9019        if test "x$tool_basename" = "x$tool_specified"; then
9020          # A command without a complete path is provided, search $PATH.
9021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9022$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9023          # Extract the first word of "$tool_basename", so it can be a program name with args.
9024set dummy $tool_basename; ac_word=$2
9025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9026$as_echo_n "checking for $ac_word... " >&6; }
9027if ${ac_cv_path_LN+:} false; then :
9028  $as_echo_n "(cached) " >&6
9029else
9030  case $LN in
9031  [\\/]* | ?:[\\/]*)
9032  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9033  ;;
9034  *)
9035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9036for as_dir in $PATH
9037do
9038  IFS=$as_save_IFS
9039  test -z "$as_dir" && as_dir=.
9040    for ac_exec_ext in '' $ac_executable_extensions; do
9041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9042    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9044    break 2
9045  fi
9046done
9047  done
9048IFS=$as_save_IFS
9049
9050  ;;
9051esac
9052fi
9053LN=$ac_cv_path_LN
9054if test -n "$LN"; then
9055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9056$as_echo "$LN" >&6; }
9057else
9058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9059$as_echo "no" >&6; }
9060fi
9061
9062
9063          if test "x$LN" = x; then
9064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9065          fi
9066        else
9067          # Otherwise we believe it is a complete path. Use it as it is.
9068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9069$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9071$as_echo_n "checking for LN... " >&6; }
9072          if test ! -x "$tool_specified"; then
9073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9074$as_echo "not found" >&6; }
9075            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9076          fi
9077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9078$as_echo "$tool_specified" >&6; }
9079        fi
9080      fi
9081    fi
9082
9083  fi
9084
9085
9086
9087  if test "x$LN" = x; then
9088    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9089  fi
9090
9091
9092
9093
9094
9095  # Publish this variable in the help.
9096
9097
9098  if [ -z "${LS+x}" ]; then
9099    # The variable is not set by user, try to locate tool using the code snippet
9100    for ac_prog in ls
9101do
9102  # Extract the first word of "$ac_prog", so it can be a program name with args.
9103set dummy $ac_prog; ac_word=$2
9104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9105$as_echo_n "checking for $ac_word... " >&6; }
9106if ${ac_cv_path_LS+:} false; then :
9107  $as_echo_n "(cached) " >&6
9108else
9109  case $LS in
9110  [\\/]* | ?:[\\/]*)
9111  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9112  ;;
9113  *)
9114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9115for as_dir in $PATH
9116do
9117  IFS=$as_save_IFS
9118  test -z "$as_dir" && as_dir=.
9119    for ac_exec_ext in '' $ac_executable_extensions; do
9120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9121    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9123    break 2
9124  fi
9125done
9126  done
9127IFS=$as_save_IFS
9128
9129  ;;
9130esac
9131fi
9132LS=$ac_cv_path_LS
9133if test -n "$LS"; then
9134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9135$as_echo "$LS" >&6; }
9136else
9137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9138$as_echo "no" >&6; }
9139fi
9140
9141
9142  test -n "$LS" && break
9143done
9144
9145  else
9146    # The variable is set, but is it from the command line or the environment?
9147
9148    # Try to remove the string !LS! from our list.
9149    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9150    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9151      # If it failed, the variable was not from the command line. Ignore it,
9152      # but warn the user (except for BASH, which is always set by the calling BASH).
9153      if test "xLS" != xBASH; then
9154        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9155$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9156      fi
9157      # Try to locate tool using the code snippet
9158      for ac_prog in ls
9159do
9160  # Extract the first word of "$ac_prog", so it can be a program name with args.
9161set dummy $ac_prog; ac_word=$2
9162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9163$as_echo_n "checking for $ac_word... " >&6; }
9164if ${ac_cv_path_LS+:} false; then :
9165  $as_echo_n "(cached) " >&6
9166else
9167  case $LS in
9168  [\\/]* | ?:[\\/]*)
9169  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9170  ;;
9171  *)
9172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9173for as_dir in $PATH
9174do
9175  IFS=$as_save_IFS
9176  test -z "$as_dir" && as_dir=.
9177    for ac_exec_ext in '' $ac_executable_extensions; do
9178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9179    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9181    break 2
9182  fi
9183done
9184  done
9185IFS=$as_save_IFS
9186
9187  ;;
9188esac
9189fi
9190LS=$ac_cv_path_LS
9191if test -n "$LS"; then
9192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9193$as_echo "$LS" >&6; }
9194else
9195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9196$as_echo "no" >&6; }
9197fi
9198
9199
9200  test -n "$LS" && break
9201done
9202
9203    else
9204      # If it succeeded, then it was overridden by the user. We will use it
9205      # for the tool.
9206
9207      # First remove it from the list of overridden variables, so we can test
9208      # for unknown variables in the end.
9209      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9210
9211      # Check if we try to supply an empty value
9212      if test "x$LS" = x; then
9213        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9214$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9216$as_echo_n "checking for LS... " >&6; }
9217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9218$as_echo "disabled" >&6; }
9219      else
9220        # Check if the provided tool contains a complete path.
9221        tool_specified="$LS"
9222        tool_basename="${tool_specified##*/}"
9223        if test "x$tool_basename" = "x$tool_specified"; then
9224          # A command without a complete path is provided, search $PATH.
9225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9226$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9227          # Extract the first word of "$tool_basename", so it can be a program name with args.
9228set dummy $tool_basename; ac_word=$2
9229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9230$as_echo_n "checking for $ac_word... " >&6; }
9231if ${ac_cv_path_LS+:} false; then :
9232  $as_echo_n "(cached) " >&6
9233else
9234  case $LS in
9235  [\\/]* | ?:[\\/]*)
9236  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9237  ;;
9238  *)
9239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9240for as_dir in $PATH
9241do
9242  IFS=$as_save_IFS
9243  test -z "$as_dir" && as_dir=.
9244    for ac_exec_ext in '' $ac_executable_extensions; do
9245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9246    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9248    break 2
9249  fi
9250done
9251  done
9252IFS=$as_save_IFS
9253
9254  ;;
9255esac
9256fi
9257LS=$ac_cv_path_LS
9258if test -n "$LS"; then
9259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9260$as_echo "$LS" >&6; }
9261else
9262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9263$as_echo "no" >&6; }
9264fi
9265
9266
9267          if test "x$LS" = x; then
9268            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9269          fi
9270        else
9271          # Otherwise we believe it is a complete path. Use it as it is.
9272          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9273$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9274          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9275$as_echo_n "checking for LS... " >&6; }
9276          if test ! -x "$tool_specified"; then
9277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9278$as_echo "not found" >&6; }
9279            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9280          fi
9281          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9282$as_echo "$tool_specified" >&6; }
9283        fi
9284      fi
9285    fi
9286
9287  fi
9288
9289
9290
9291  if test "x$LS" = x; then
9292    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9293  fi
9294
9295
9296
9297
9298
9299  # Publish this variable in the help.
9300
9301
9302  if [ -z "${MKDIR+x}" ]; then
9303    # The variable is not set by user, try to locate tool using the code snippet
9304    for ac_prog in mkdir
9305do
9306  # Extract the first word of "$ac_prog", so it can be a program name with args.
9307set dummy $ac_prog; ac_word=$2
9308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9309$as_echo_n "checking for $ac_word... " >&6; }
9310if ${ac_cv_path_MKDIR+:} false; then :
9311  $as_echo_n "(cached) " >&6
9312else
9313  case $MKDIR in
9314  [\\/]* | ?:[\\/]*)
9315  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9316  ;;
9317  *)
9318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9319for as_dir in $PATH
9320do
9321  IFS=$as_save_IFS
9322  test -z "$as_dir" && as_dir=.
9323    for ac_exec_ext in '' $ac_executable_extensions; do
9324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9325    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9327    break 2
9328  fi
9329done
9330  done
9331IFS=$as_save_IFS
9332
9333  ;;
9334esac
9335fi
9336MKDIR=$ac_cv_path_MKDIR
9337if test -n "$MKDIR"; then
9338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9339$as_echo "$MKDIR" >&6; }
9340else
9341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9342$as_echo "no" >&6; }
9343fi
9344
9345
9346  test -n "$MKDIR" && break
9347done
9348
9349  else
9350    # The variable is set, but is it from the command line or the environment?
9351
9352    # Try to remove the string !MKDIR! from our list.
9353    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9354    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9355      # If it failed, the variable was not from the command line. Ignore it,
9356      # but warn the user (except for BASH, which is always set by the calling BASH).
9357      if test "xMKDIR" != xBASH; then
9358        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9359$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9360      fi
9361      # Try to locate tool using the code snippet
9362      for ac_prog in mkdir
9363do
9364  # Extract the first word of "$ac_prog", so it can be a program name with args.
9365set dummy $ac_prog; ac_word=$2
9366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9367$as_echo_n "checking for $ac_word... " >&6; }
9368if ${ac_cv_path_MKDIR+:} false; then :
9369  $as_echo_n "(cached) " >&6
9370else
9371  case $MKDIR in
9372  [\\/]* | ?:[\\/]*)
9373  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9374  ;;
9375  *)
9376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9377for as_dir in $PATH
9378do
9379  IFS=$as_save_IFS
9380  test -z "$as_dir" && as_dir=.
9381    for ac_exec_ext in '' $ac_executable_extensions; do
9382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9383    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9385    break 2
9386  fi
9387done
9388  done
9389IFS=$as_save_IFS
9390
9391  ;;
9392esac
9393fi
9394MKDIR=$ac_cv_path_MKDIR
9395if test -n "$MKDIR"; then
9396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9397$as_echo "$MKDIR" >&6; }
9398else
9399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9400$as_echo "no" >&6; }
9401fi
9402
9403
9404  test -n "$MKDIR" && break
9405done
9406
9407    else
9408      # If it succeeded, then it was overridden by the user. We will use it
9409      # for the tool.
9410
9411      # First remove it from the list of overridden variables, so we can test
9412      # for unknown variables in the end.
9413      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9414
9415      # Check if we try to supply an empty value
9416      if test "x$MKDIR" = x; then
9417        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9418$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9420$as_echo_n "checking for MKDIR... " >&6; }
9421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9422$as_echo "disabled" >&6; }
9423      else
9424        # Check if the provided tool contains a complete path.
9425        tool_specified="$MKDIR"
9426        tool_basename="${tool_specified##*/}"
9427        if test "x$tool_basename" = "x$tool_specified"; then
9428          # A command without a complete path is provided, search $PATH.
9429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9430$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9431          # Extract the first word of "$tool_basename", so it can be a program name with args.
9432set dummy $tool_basename; ac_word=$2
9433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9434$as_echo_n "checking for $ac_word... " >&6; }
9435if ${ac_cv_path_MKDIR+:} false; then :
9436  $as_echo_n "(cached) " >&6
9437else
9438  case $MKDIR in
9439  [\\/]* | ?:[\\/]*)
9440  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9441  ;;
9442  *)
9443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9444for as_dir in $PATH
9445do
9446  IFS=$as_save_IFS
9447  test -z "$as_dir" && as_dir=.
9448    for ac_exec_ext in '' $ac_executable_extensions; do
9449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9450    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9452    break 2
9453  fi
9454done
9455  done
9456IFS=$as_save_IFS
9457
9458  ;;
9459esac
9460fi
9461MKDIR=$ac_cv_path_MKDIR
9462if test -n "$MKDIR"; then
9463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9464$as_echo "$MKDIR" >&6; }
9465else
9466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9467$as_echo "no" >&6; }
9468fi
9469
9470
9471          if test "x$MKDIR" = x; then
9472            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9473          fi
9474        else
9475          # Otherwise we believe it is a complete path. Use it as it is.
9476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9477$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9478          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9479$as_echo_n "checking for MKDIR... " >&6; }
9480          if test ! -x "$tool_specified"; then
9481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9482$as_echo "not found" >&6; }
9483            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9484          fi
9485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9486$as_echo "$tool_specified" >&6; }
9487        fi
9488      fi
9489    fi
9490
9491  fi
9492
9493
9494
9495  if test "x$MKDIR" = x; then
9496    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9497  fi
9498
9499
9500
9501
9502
9503  # Publish this variable in the help.
9504
9505
9506  if [ -z "${MKTEMP+x}" ]; then
9507    # The variable is not set by user, try to locate tool using the code snippet
9508    for ac_prog in mktemp
9509do
9510  # Extract the first word of "$ac_prog", so it can be a program name with args.
9511set dummy $ac_prog; ac_word=$2
9512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9513$as_echo_n "checking for $ac_word... " >&6; }
9514if ${ac_cv_path_MKTEMP+:} false; then :
9515  $as_echo_n "(cached) " >&6
9516else
9517  case $MKTEMP in
9518  [\\/]* | ?:[\\/]*)
9519  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9520  ;;
9521  *)
9522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9523for as_dir in $PATH
9524do
9525  IFS=$as_save_IFS
9526  test -z "$as_dir" && as_dir=.
9527    for ac_exec_ext in '' $ac_executable_extensions; do
9528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9529    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9531    break 2
9532  fi
9533done
9534  done
9535IFS=$as_save_IFS
9536
9537  ;;
9538esac
9539fi
9540MKTEMP=$ac_cv_path_MKTEMP
9541if test -n "$MKTEMP"; then
9542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9543$as_echo "$MKTEMP" >&6; }
9544else
9545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9546$as_echo "no" >&6; }
9547fi
9548
9549
9550  test -n "$MKTEMP" && break
9551done
9552
9553  else
9554    # The variable is set, but is it from the command line or the environment?
9555
9556    # Try to remove the string !MKTEMP! from our list.
9557    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9558    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9559      # If it failed, the variable was not from the command line. Ignore it,
9560      # but warn the user (except for BASH, which is always set by the calling BASH).
9561      if test "xMKTEMP" != xBASH; then
9562        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9563$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9564      fi
9565      # Try to locate tool using the code snippet
9566      for ac_prog in mktemp
9567do
9568  # Extract the first word of "$ac_prog", so it can be a program name with args.
9569set dummy $ac_prog; ac_word=$2
9570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9571$as_echo_n "checking for $ac_word... " >&6; }
9572if ${ac_cv_path_MKTEMP+:} false; then :
9573  $as_echo_n "(cached) " >&6
9574else
9575  case $MKTEMP in
9576  [\\/]* | ?:[\\/]*)
9577  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9578  ;;
9579  *)
9580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9581for as_dir in $PATH
9582do
9583  IFS=$as_save_IFS
9584  test -z "$as_dir" && as_dir=.
9585    for ac_exec_ext in '' $ac_executable_extensions; do
9586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9587    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9589    break 2
9590  fi
9591done
9592  done
9593IFS=$as_save_IFS
9594
9595  ;;
9596esac
9597fi
9598MKTEMP=$ac_cv_path_MKTEMP
9599if test -n "$MKTEMP"; then
9600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9601$as_echo "$MKTEMP" >&6; }
9602else
9603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9604$as_echo "no" >&6; }
9605fi
9606
9607
9608  test -n "$MKTEMP" && break
9609done
9610
9611    else
9612      # If it succeeded, then it was overridden by the user. We will use it
9613      # for the tool.
9614
9615      # First remove it from the list of overridden variables, so we can test
9616      # for unknown variables in the end.
9617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9618
9619      # Check if we try to supply an empty value
9620      if test "x$MKTEMP" = x; then
9621        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9622$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9624$as_echo_n "checking for MKTEMP... " >&6; }
9625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9626$as_echo "disabled" >&6; }
9627      else
9628        # Check if the provided tool contains a complete path.
9629        tool_specified="$MKTEMP"
9630        tool_basename="${tool_specified##*/}"
9631        if test "x$tool_basename" = "x$tool_specified"; then
9632          # A command without a complete path is provided, search $PATH.
9633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9634$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9635          # Extract the first word of "$tool_basename", so it can be a program name with args.
9636set dummy $tool_basename; ac_word=$2
9637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9638$as_echo_n "checking for $ac_word... " >&6; }
9639if ${ac_cv_path_MKTEMP+:} false; then :
9640  $as_echo_n "(cached) " >&6
9641else
9642  case $MKTEMP in
9643  [\\/]* | ?:[\\/]*)
9644  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9645  ;;
9646  *)
9647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9648for as_dir in $PATH
9649do
9650  IFS=$as_save_IFS
9651  test -z "$as_dir" && as_dir=.
9652    for ac_exec_ext in '' $ac_executable_extensions; do
9653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9654    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9656    break 2
9657  fi
9658done
9659  done
9660IFS=$as_save_IFS
9661
9662  ;;
9663esac
9664fi
9665MKTEMP=$ac_cv_path_MKTEMP
9666if test -n "$MKTEMP"; then
9667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9668$as_echo "$MKTEMP" >&6; }
9669else
9670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9671$as_echo "no" >&6; }
9672fi
9673
9674
9675          if test "x$MKTEMP" = x; then
9676            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9677          fi
9678        else
9679          # Otherwise we believe it is a complete path. Use it as it is.
9680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9681$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9682          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9683$as_echo_n "checking for MKTEMP... " >&6; }
9684          if test ! -x "$tool_specified"; then
9685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9686$as_echo "not found" >&6; }
9687            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9688          fi
9689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9690$as_echo "$tool_specified" >&6; }
9691        fi
9692      fi
9693    fi
9694
9695  fi
9696
9697
9698
9699  if test "x$MKTEMP" = x; then
9700    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9701  fi
9702
9703
9704
9705
9706
9707  # Publish this variable in the help.
9708
9709
9710  if [ -z "${MV+x}" ]; then
9711    # The variable is not set by user, try to locate tool using the code snippet
9712    for ac_prog in mv
9713do
9714  # Extract the first word of "$ac_prog", so it can be a program name with args.
9715set dummy $ac_prog; ac_word=$2
9716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9717$as_echo_n "checking for $ac_word... " >&6; }
9718if ${ac_cv_path_MV+:} false; then :
9719  $as_echo_n "(cached) " >&6
9720else
9721  case $MV in
9722  [\\/]* | ?:[\\/]*)
9723  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9724  ;;
9725  *)
9726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9727for as_dir in $PATH
9728do
9729  IFS=$as_save_IFS
9730  test -z "$as_dir" && as_dir=.
9731    for ac_exec_ext in '' $ac_executable_extensions; do
9732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9733    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9735    break 2
9736  fi
9737done
9738  done
9739IFS=$as_save_IFS
9740
9741  ;;
9742esac
9743fi
9744MV=$ac_cv_path_MV
9745if test -n "$MV"; then
9746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9747$as_echo "$MV" >&6; }
9748else
9749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9750$as_echo "no" >&6; }
9751fi
9752
9753
9754  test -n "$MV" && break
9755done
9756
9757  else
9758    # The variable is set, but is it from the command line or the environment?
9759
9760    # Try to remove the string !MV! from our list.
9761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9763      # If it failed, the variable was not from the command line. Ignore it,
9764      # but warn the user (except for BASH, which is always set by the calling BASH).
9765      if test "xMV" != xBASH; then
9766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9767$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9768      fi
9769      # Try to locate tool using the code snippet
9770      for ac_prog in mv
9771do
9772  # Extract the first word of "$ac_prog", so it can be a program name with args.
9773set dummy $ac_prog; ac_word=$2
9774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9775$as_echo_n "checking for $ac_word... " >&6; }
9776if ${ac_cv_path_MV+:} false; then :
9777  $as_echo_n "(cached) " >&6
9778else
9779  case $MV in
9780  [\\/]* | ?:[\\/]*)
9781  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9782  ;;
9783  *)
9784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9785for as_dir in $PATH
9786do
9787  IFS=$as_save_IFS
9788  test -z "$as_dir" && as_dir=.
9789    for ac_exec_ext in '' $ac_executable_extensions; do
9790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9791    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9793    break 2
9794  fi
9795done
9796  done
9797IFS=$as_save_IFS
9798
9799  ;;
9800esac
9801fi
9802MV=$ac_cv_path_MV
9803if test -n "$MV"; then
9804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9805$as_echo "$MV" >&6; }
9806else
9807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9808$as_echo "no" >&6; }
9809fi
9810
9811
9812  test -n "$MV" && break
9813done
9814
9815    else
9816      # If it succeeded, then it was overridden by the user. We will use it
9817      # for the tool.
9818
9819      # First remove it from the list of overridden variables, so we can test
9820      # for unknown variables in the end.
9821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9822
9823      # Check if we try to supply an empty value
9824      if test "x$MV" = x; then
9825        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9826$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9827        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9828$as_echo_n "checking for MV... " >&6; }
9829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9830$as_echo "disabled" >&6; }
9831      else
9832        # Check if the provided tool contains a complete path.
9833        tool_specified="$MV"
9834        tool_basename="${tool_specified##*/}"
9835        if test "x$tool_basename" = "x$tool_specified"; then
9836          # A command without a complete path is provided, search $PATH.
9837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9838$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9839          # Extract the first word of "$tool_basename", so it can be a program name with args.
9840set dummy $tool_basename; ac_word=$2
9841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9842$as_echo_n "checking for $ac_word... " >&6; }
9843if ${ac_cv_path_MV+:} false; then :
9844  $as_echo_n "(cached) " >&6
9845else
9846  case $MV in
9847  [\\/]* | ?:[\\/]*)
9848  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9849  ;;
9850  *)
9851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9852for as_dir in $PATH
9853do
9854  IFS=$as_save_IFS
9855  test -z "$as_dir" && as_dir=.
9856    for ac_exec_ext in '' $ac_executable_extensions; do
9857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9858    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9860    break 2
9861  fi
9862done
9863  done
9864IFS=$as_save_IFS
9865
9866  ;;
9867esac
9868fi
9869MV=$ac_cv_path_MV
9870if test -n "$MV"; then
9871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9872$as_echo "$MV" >&6; }
9873else
9874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9875$as_echo "no" >&6; }
9876fi
9877
9878
9879          if test "x$MV" = x; then
9880            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9881          fi
9882        else
9883          # Otherwise we believe it is a complete path. Use it as it is.
9884          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9885$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9886          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9887$as_echo_n "checking for MV... " >&6; }
9888          if test ! -x "$tool_specified"; then
9889            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9890$as_echo "not found" >&6; }
9891            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9892          fi
9893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9894$as_echo "$tool_specified" >&6; }
9895        fi
9896      fi
9897    fi
9898
9899  fi
9900
9901
9902
9903  if test "x$MV" = x; then
9904    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9905  fi
9906
9907
9908
9909
9910
9911  # Publish this variable in the help.
9912
9913
9914  if [ -z "${NAWK+x}" ]; then
9915    # The variable is not set by user, try to locate tool using the code snippet
9916    for ac_prog in nawk gawk awk
9917do
9918  # Extract the first word of "$ac_prog", so it can be a program name with args.
9919set dummy $ac_prog; ac_word=$2
9920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9921$as_echo_n "checking for $ac_word... " >&6; }
9922if ${ac_cv_path_NAWK+:} false; then :
9923  $as_echo_n "(cached) " >&6
9924else
9925  case $NAWK in
9926  [\\/]* | ?:[\\/]*)
9927  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9928  ;;
9929  *)
9930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9931for as_dir in $PATH
9932do
9933  IFS=$as_save_IFS
9934  test -z "$as_dir" && as_dir=.
9935    for ac_exec_ext in '' $ac_executable_extensions; do
9936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9937    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9939    break 2
9940  fi
9941done
9942  done
9943IFS=$as_save_IFS
9944
9945  ;;
9946esac
9947fi
9948NAWK=$ac_cv_path_NAWK
9949if test -n "$NAWK"; then
9950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9951$as_echo "$NAWK" >&6; }
9952else
9953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9954$as_echo "no" >&6; }
9955fi
9956
9957
9958  test -n "$NAWK" && break
9959done
9960
9961  else
9962    # The variable is set, but is it from the command line or the environment?
9963
9964    # Try to remove the string !NAWK! from our list.
9965    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9966    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9967      # If it failed, the variable was not from the command line. Ignore it,
9968      # but warn the user (except for BASH, which is always set by the calling BASH).
9969      if test "xNAWK" != xBASH; then
9970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9971$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9972      fi
9973      # Try to locate tool using the code snippet
9974      for ac_prog in nawk gawk awk
9975do
9976  # Extract the first word of "$ac_prog", so it can be a program name with args.
9977set dummy $ac_prog; ac_word=$2
9978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9979$as_echo_n "checking for $ac_word... " >&6; }
9980if ${ac_cv_path_NAWK+:} false; then :
9981  $as_echo_n "(cached) " >&6
9982else
9983  case $NAWK in
9984  [\\/]* | ?:[\\/]*)
9985  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9986  ;;
9987  *)
9988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9989for as_dir in $PATH
9990do
9991  IFS=$as_save_IFS
9992  test -z "$as_dir" && as_dir=.
9993    for ac_exec_ext in '' $ac_executable_extensions; do
9994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9995    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9997    break 2
9998  fi
9999done
10000  done
10001IFS=$as_save_IFS
10002
10003  ;;
10004esac
10005fi
10006NAWK=$ac_cv_path_NAWK
10007if test -n "$NAWK"; then
10008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10009$as_echo "$NAWK" >&6; }
10010else
10011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10012$as_echo "no" >&6; }
10013fi
10014
10015
10016  test -n "$NAWK" && break
10017done
10018
10019    else
10020      # If it succeeded, then it was overridden by the user. We will use it
10021      # for the tool.
10022
10023      # First remove it from the list of overridden variables, so we can test
10024      # for unknown variables in the end.
10025      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10026
10027      # Check if we try to supply an empty value
10028      if test "x$NAWK" = x; then
10029        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10030$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10032$as_echo_n "checking for NAWK... " >&6; }
10033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10034$as_echo "disabled" >&6; }
10035      else
10036        # Check if the provided tool contains a complete path.
10037        tool_specified="$NAWK"
10038        tool_basename="${tool_specified##*/}"
10039        if test "x$tool_basename" = "x$tool_specified"; then
10040          # A command without a complete path is provided, search $PATH.
10041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10042$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10043          # Extract the first word of "$tool_basename", so it can be a program name with args.
10044set dummy $tool_basename; ac_word=$2
10045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10046$as_echo_n "checking for $ac_word... " >&6; }
10047if ${ac_cv_path_NAWK+:} false; then :
10048  $as_echo_n "(cached) " >&6
10049else
10050  case $NAWK in
10051  [\\/]* | ?:[\\/]*)
10052  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10053  ;;
10054  *)
10055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10056for as_dir in $PATH
10057do
10058  IFS=$as_save_IFS
10059  test -z "$as_dir" && as_dir=.
10060    for ac_exec_ext in '' $ac_executable_extensions; do
10061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10062    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10064    break 2
10065  fi
10066done
10067  done
10068IFS=$as_save_IFS
10069
10070  ;;
10071esac
10072fi
10073NAWK=$ac_cv_path_NAWK
10074if test -n "$NAWK"; then
10075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10076$as_echo "$NAWK" >&6; }
10077else
10078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10079$as_echo "no" >&6; }
10080fi
10081
10082
10083          if test "x$NAWK" = x; then
10084            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10085          fi
10086        else
10087          # Otherwise we believe it is a complete path. Use it as it is.
10088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10089$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10090          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10091$as_echo_n "checking for NAWK... " >&6; }
10092          if test ! -x "$tool_specified"; then
10093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10094$as_echo "not found" >&6; }
10095            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10096          fi
10097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10098$as_echo "$tool_specified" >&6; }
10099        fi
10100      fi
10101    fi
10102
10103  fi
10104
10105
10106
10107  if test "x$NAWK" = x; then
10108    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10109  fi
10110
10111
10112
10113
10114
10115  # Publish this variable in the help.
10116
10117
10118  if [ -z "${PRINTF+x}" ]; then
10119    # The variable is not set by user, try to locate tool using the code snippet
10120    for ac_prog in printf
10121do
10122  # Extract the first word of "$ac_prog", so it can be a program name with args.
10123set dummy $ac_prog; ac_word=$2
10124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10125$as_echo_n "checking for $ac_word... " >&6; }
10126if ${ac_cv_path_PRINTF+:} false; then :
10127  $as_echo_n "(cached) " >&6
10128else
10129  case $PRINTF in
10130  [\\/]* | ?:[\\/]*)
10131  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10132  ;;
10133  *)
10134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10135for as_dir in $PATH
10136do
10137  IFS=$as_save_IFS
10138  test -z "$as_dir" && as_dir=.
10139    for ac_exec_ext in '' $ac_executable_extensions; do
10140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10141    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10143    break 2
10144  fi
10145done
10146  done
10147IFS=$as_save_IFS
10148
10149  ;;
10150esac
10151fi
10152PRINTF=$ac_cv_path_PRINTF
10153if test -n "$PRINTF"; then
10154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10155$as_echo "$PRINTF" >&6; }
10156else
10157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10158$as_echo "no" >&6; }
10159fi
10160
10161
10162  test -n "$PRINTF" && break
10163done
10164
10165  else
10166    # The variable is set, but is it from the command line or the environment?
10167
10168    # Try to remove the string !PRINTF! from our list.
10169    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10170    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10171      # If it failed, the variable was not from the command line. Ignore it,
10172      # but warn the user (except for BASH, which is always set by the calling BASH).
10173      if test "xPRINTF" != xBASH; then
10174        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10175$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10176      fi
10177      # Try to locate tool using the code snippet
10178      for ac_prog in printf
10179do
10180  # Extract the first word of "$ac_prog", so it can be a program name with args.
10181set dummy $ac_prog; ac_word=$2
10182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10183$as_echo_n "checking for $ac_word... " >&6; }
10184if ${ac_cv_path_PRINTF+:} false; then :
10185  $as_echo_n "(cached) " >&6
10186else
10187  case $PRINTF in
10188  [\\/]* | ?:[\\/]*)
10189  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10190  ;;
10191  *)
10192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10193for as_dir in $PATH
10194do
10195  IFS=$as_save_IFS
10196  test -z "$as_dir" && as_dir=.
10197    for ac_exec_ext in '' $ac_executable_extensions; do
10198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10199    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10201    break 2
10202  fi
10203done
10204  done
10205IFS=$as_save_IFS
10206
10207  ;;
10208esac
10209fi
10210PRINTF=$ac_cv_path_PRINTF
10211if test -n "$PRINTF"; then
10212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10213$as_echo "$PRINTF" >&6; }
10214else
10215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10216$as_echo "no" >&6; }
10217fi
10218
10219
10220  test -n "$PRINTF" && break
10221done
10222
10223    else
10224      # If it succeeded, then it was overridden by the user. We will use it
10225      # for the tool.
10226
10227      # First remove it from the list of overridden variables, so we can test
10228      # for unknown variables in the end.
10229      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10230
10231      # Check if we try to supply an empty value
10232      if test "x$PRINTF" = x; then
10233        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10234$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10235        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10236$as_echo_n "checking for PRINTF... " >&6; }
10237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10238$as_echo "disabled" >&6; }
10239      else
10240        # Check if the provided tool contains a complete path.
10241        tool_specified="$PRINTF"
10242        tool_basename="${tool_specified##*/}"
10243        if test "x$tool_basename" = "x$tool_specified"; then
10244          # A command without a complete path is provided, search $PATH.
10245          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10246$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10247          # Extract the first word of "$tool_basename", so it can be a program name with args.
10248set dummy $tool_basename; ac_word=$2
10249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10250$as_echo_n "checking for $ac_word... " >&6; }
10251if ${ac_cv_path_PRINTF+:} false; then :
10252  $as_echo_n "(cached) " >&6
10253else
10254  case $PRINTF in
10255  [\\/]* | ?:[\\/]*)
10256  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10257  ;;
10258  *)
10259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10260for as_dir in $PATH
10261do
10262  IFS=$as_save_IFS
10263  test -z "$as_dir" && as_dir=.
10264    for ac_exec_ext in '' $ac_executable_extensions; do
10265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10266    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10268    break 2
10269  fi
10270done
10271  done
10272IFS=$as_save_IFS
10273
10274  ;;
10275esac
10276fi
10277PRINTF=$ac_cv_path_PRINTF
10278if test -n "$PRINTF"; then
10279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10280$as_echo "$PRINTF" >&6; }
10281else
10282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10283$as_echo "no" >&6; }
10284fi
10285
10286
10287          if test "x$PRINTF" = x; then
10288            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10289          fi
10290        else
10291          # Otherwise we believe it is a complete path. Use it as it is.
10292          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10293$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10294          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10295$as_echo_n "checking for PRINTF... " >&6; }
10296          if test ! -x "$tool_specified"; then
10297            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10298$as_echo "not found" >&6; }
10299            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10300          fi
10301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10302$as_echo "$tool_specified" >&6; }
10303        fi
10304      fi
10305    fi
10306
10307  fi
10308
10309
10310
10311  if test "x$PRINTF" = x; then
10312    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10313  fi
10314
10315
10316
10317
10318
10319  # Publish this variable in the help.
10320
10321
10322  if [ -z "${RM+x}" ]; then
10323    # The variable is not set by user, try to locate tool using the code snippet
10324    for ac_prog in rm
10325do
10326  # Extract the first word of "$ac_prog", so it can be a program name with args.
10327set dummy $ac_prog; ac_word=$2
10328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10329$as_echo_n "checking for $ac_word... " >&6; }
10330if ${ac_cv_path_RM+:} false; then :
10331  $as_echo_n "(cached) " >&6
10332else
10333  case $RM in
10334  [\\/]* | ?:[\\/]*)
10335  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10336  ;;
10337  *)
10338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10339for as_dir in $PATH
10340do
10341  IFS=$as_save_IFS
10342  test -z "$as_dir" && as_dir=.
10343    for ac_exec_ext in '' $ac_executable_extensions; do
10344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10345    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10347    break 2
10348  fi
10349done
10350  done
10351IFS=$as_save_IFS
10352
10353  ;;
10354esac
10355fi
10356RM=$ac_cv_path_RM
10357if test -n "$RM"; then
10358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10359$as_echo "$RM" >&6; }
10360else
10361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10362$as_echo "no" >&6; }
10363fi
10364
10365
10366  test -n "$RM" && break
10367done
10368
10369  else
10370    # The variable is set, but is it from the command line or the environment?
10371
10372    # Try to remove the string !RM! from our list.
10373    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10374    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10375      # If it failed, the variable was not from the command line. Ignore it,
10376      # but warn the user (except for BASH, which is always set by the calling BASH).
10377      if test "xRM" != xBASH; then
10378        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10379$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10380      fi
10381      # Try to locate tool using the code snippet
10382      for ac_prog in rm
10383do
10384  # Extract the first word of "$ac_prog", so it can be a program name with args.
10385set dummy $ac_prog; ac_word=$2
10386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10387$as_echo_n "checking for $ac_word... " >&6; }
10388if ${ac_cv_path_RM+:} false; then :
10389  $as_echo_n "(cached) " >&6
10390else
10391  case $RM in
10392  [\\/]* | ?:[\\/]*)
10393  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10394  ;;
10395  *)
10396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10397for as_dir in $PATH
10398do
10399  IFS=$as_save_IFS
10400  test -z "$as_dir" && as_dir=.
10401    for ac_exec_ext in '' $ac_executable_extensions; do
10402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10403    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10405    break 2
10406  fi
10407done
10408  done
10409IFS=$as_save_IFS
10410
10411  ;;
10412esac
10413fi
10414RM=$ac_cv_path_RM
10415if test -n "$RM"; then
10416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10417$as_echo "$RM" >&6; }
10418else
10419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10420$as_echo "no" >&6; }
10421fi
10422
10423
10424  test -n "$RM" && break
10425done
10426
10427    else
10428      # If it succeeded, then it was overridden by the user. We will use it
10429      # for the tool.
10430
10431      # First remove it from the list of overridden variables, so we can test
10432      # for unknown variables in the end.
10433      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10434
10435      # Check if we try to supply an empty value
10436      if test "x$RM" = x; then
10437        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10438$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10439        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10440$as_echo_n "checking for RM... " >&6; }
10441        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10442$as_echo "disabled" >&6; }
10443      else
10444        # Check if the provided tool contains a complete path.
10445        tool_specified="$RM"
10446        tool_basename="${tool_specified##*/}"
10447        if test "x$tool_basename" = "x$tool_specified"; then
10448          # A command without a complete path is provided, search $PATH.
10449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10450$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10451          # Extract the first word of "$tool_basename", so it can be a program name with args.
10452set dummy $tool_basename; ac_word=$2
10453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10454$as_echo_n "checking for $ac_word... " >&6; }
10455if ${ac_cv_path_RM+:} false; then :
10456  $as_echo_n "(cached) " >&6
10457else
10458  case $RM in
10459  [\\/]* | ?:[\\/]*)
10460  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10461  ;;
10462  *)
10463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10464for as_dir in $PATH
10465do
10466  IFS=$as_save_IFS
10467  test -z "$as_dir" && as_dir=.
10468    for ac_exec_ext in '' $ac_executable_extensions; do
10469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10470    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10472    break 2
10473  fi
10474done
10475  done
10476IFS=$as_save_IFS
10477
10478  ;;
10479esac
10480fi
10481RM=$ac_cv_path_RM
10482if test -n "$RM"; then
10483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10484$as_echo "$RM" >&6; }
10485else
10486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10487$as_echo "no" >&6; }
10488fi
10489
10490
10491          if test "x$RM" = x; then
10492            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10493          fi
10494        else
10495          # Otherwise we believe it is a complete path. Use it as it is.
10496          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10497$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10498          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10499$as_echo_n "checking for RM... " >&6; }
10500          if test ! -x "$tool_specified"; then
10501            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10502$as_echo "not found" >&6; }
10503            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10504          fi
10505          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10506$as_echo "$tool_specified" >&6; }
10507        fi
10508      fi
10509    fi
10510
10511  fi
10512
10513
10514
10515  if test "x$RM" = x; then
10516    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10517  fi
10518
10519
10520
10521
10522
10523  # Publish this variable in the help.
10524
10525
10526  if [ -z "${RMDIR+x}" ]; then
10527    # The variable is not set by user, try to locate tool using the code snippet
10528    for ac_prog in rmdir
10529do
10530  # Extract the first word of "$ac_prog", so it can be a program name with args.
10531set dummy $ac_prog; ac_word=$2
10532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10533$as_echo_n "checking for $ac_word... " >&6; }
10534if ${ac_cv_path_RMDIR+:} false; then :
10535  $as_echo_n "(cached) " >&6
10536else
10537  case $RMDIR in
10538  [\\/]* | ?:[\\/]*)
10539  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10540  ;;
10541  *)
10542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10543for as_dir in $PATH
10544do
10545  IFS=$as_save_IFS
10546  test -z "$as_dir" && as_dir=.
10547    for ac_exec_ext in '' $ac_executable_extensions; do
10548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10549    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10551    break 2
10552  fi
10553done
10554  done
10555IFS=$as_save_IFS
10556
10557  ;;
10558esac
10559fi
10560RMDIR=$ac_cv_path_RMDIR
10561if test -n "$RMDIR"; then
10562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10563$as_echo "$RMDIR" >&6; }
10564else
10565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10566$as_echo "no" >&6; }
10567fi
10568
10569
10570  test -n "$RMDIR" && break
10571done
10572
10573  else
10574    # The variable is set, but is it from the command line or the environment?
10575
10576    # Try to remove the string !RMDIR! from our list.
10577    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10578    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10579      # If it failed, the variable was not from the command line. Ignore it,
10580      # but warn the user (except for BASH, which is always set by the calling BASH).
10581      if test "xRMDIR" != xBASH; then
10582        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10583$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10584      fi
10585      # Try to locate tool using the code snippet
10586      for ac_prog in rmdir
10587do
10588  # Extract the first word of "$ac_prog", so it can be a program name with args.
10589set dummy $ac_prog; ac_word=$2
10590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10591$as_echo_n "checking for $ac_word... " >&6; }
10592if ${ac_cv_path_RMDIR+:} false; then :
10593  $as_echo_n "(cached) " >&6
10594else
10595  case $RMDIR in
10596  [\\/]* | ?:[\\/]*)
10597  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10598  ;;
10599  *)
10600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10601for as_dir in $PATH
10602do
10603  IFS=$as_save_IFS
10604  test -z "$as_dir" && as_dir=.
10605    for ac_exec_ext in '' $ac_executable_extensions; do
10606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10607    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10609    break 2
10610  fi
10611done
10612  done
10613IFS=$as_save_IFS
10614
10615  ;;
10616esac
10617fi
10618RMDIR=$ac_cv_path_RMDIR
10619if test -n "$RMDIR"; then
10620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10621$as_echo "$RMDIR" >&6; }
10622else
10623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10624$as_echo "no" >&6; }
10625fi
10626
10627
10628  test -n "$RMDIR" && break
10629done
10630
10631    else
10632      # If it succeeded, then it was overridden by the user. We will use it
10633      # for the tool.
10634
10635      # First remove it from the list of overridden variables, so we can test
10636      # for unknown variables in the end.
10637      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10638
10639      # Check if we try to supply an empty value
10640      if test "x$RMDIR" = x; then
10641        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10642$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10643        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10644$as_echo_n "checking for RMDIR... " >&6; }
10645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10646$as_echo "disabled" >&6; }
10647      else
10648        # Check if the provided tool contains a complete path.
10649        tool_specified="$RMDIR"
10650        tool_basename="${tool_specified##*/}"
10651        if test "x$tool_basename" = "x$tool_specified"; then
10652          # A command without a complete path is provided, search $PATH.
10653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10654$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10655          # Extract the first word of "$tool_basename", so it can be a program name with args.
10656set dummy $tool_basename; ac_word=$2
10657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10658$as_echo_n "checking for $ac_word... " >&6; }
10659if ${ac_cv_path_RMDIR+:} false; then :
10660  $as_echo_n "(cached) " >&6
10661else
10662  case $RMDIR in
10663  [\\/]* | ?:[\\/]*)
10664  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10665  ;;
10666  *)
10667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10668for as_dir in $PATH
10669do
10670  IFS=$as_save_IFS
10671  test -z "$as_dir" && as_dir=.
10672    for ac_exec_ext in '' $ac_executable_extensions; do
10673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10674    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10676    break 2
10677  fi
10678done
10679  done
10680IFS=$as_save_IFS
10681
10682  ;;
10683esac
10684fi
10685RMDIR=$ac_cv_path_RMDIR
10686if test -n "$RMDIR"; then
10687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10688$as_echo "$RMDIR" >&6; }
10689else
10690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10691$as_echo "no" >&6; }
10692fi
10693
10694
10695          if test "x$RMDIR" = x; then
10696            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10697          fi
10698        else
10699          # Otherwise we believe it is a complete path. Use it as it is.
10700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10701$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10702          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10703$as_echo_n "checking for RMDIR... " >&6; }
10704          if test ! -x "$tool_specified"; then
10705            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10706$as_echo "not found" >&6; }
10707            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10708          fi
10709          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10710$as_echo "$tool_specified" >&6; }
10711        fi
10712      fi
10713    fi
10714
10715  fi
10716
10717
10718
10719  if test "x$RMDIR" = x; then
10720    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10721  fi
10722
10723
10724
10725
10726
10727  # Publish this variable in the help.
10728
10729
10730  if [ -z "${SH+x}" ]; then
10731    # The variable is not set by user, try to locate tool using the code snippet
10732    for ac_prog in sh
10733do
10734  # Extract the first word of "$ac_prog", so it can be a program name with args.
10735set dummy $ac_prog; ac_word=$2
10736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10737$as_echo_n "checking for $ac_word... " >&6; }
10738if ${ac_cv_path_SH+:} false; then :
10739  $as_echo_n "(cached) " >&6
10740else
10741  case $SH in
10742  [\\/]* | ?:[\\/]*)
10743  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10744  ;;
10745  *)
10746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10747for as_dir in $PATH
10748do
10749  IFS=$as_save_IFS
10750  test -z "$as_dir" && as_dir=.
10751    for ac_exec_ext in '' $ac_executable_extensions; do
10752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10753    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10755    break 2
10756  fi
10757done
10758  done
10759IFS=$as_save_IFS
10760
10761  ;;
10762esac
10763fi
10764SH=$ac_cv_path_SH
10765if test -n "$SH"; then
10766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10767$as_echo "$SH" >&6; }
10768else
10769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10770$as_echo "no" >&6; }
10771fi
10772
10773
10774  test -n "$SH" && break
10775done
10776
10777  else
10778    # The variable is set, but is it from the command line or the environment?
10779
10780    # Try to remove the string !SH! from our list.
10781    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10782    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10783      # If it failed, the variable was not from the command line. Ignore it,
10784      # but warn the user (except for BASH, which is always set by the calling BASH).
10785      if test "xSH" != xBASH; then
10786        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10787$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10788      fi
10789      # Try to locate tool using the code snippet
10790      for ac_prog in sh
10791do
10792  # Extract the first word of "$ac_prog", so it can be a program name with args.
10793set dummy $ac_prog; ac_word=$2
10794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10795$as_echo_n "checking for $ac_word... " >&6; }
10796if ${ac_cv_path_SH+:} false; then :
10797  $as_echo_n "(cached) " >&6
10798else
10799  case $SH in
10800  [\\/]* | ?:[\\/]*)
10801  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10802  ;;
10803  *)
10804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10805for as_dir in $PATH
10806do
10807  IFS=$as_save_IFS
10808  test -z "$as_dir" && as_dir=.
10809    for ac_exec_ext in '' $ac_executable_extensions; do
10810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10811    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10813    break 2
10814  fi
10815done
10816  done
10817IFS=$as_save_IFS
10818
10819  ;;
10820esac
10821fi
10822SH=$ac_cv_path_SH
10823if test -n "$SH"; then
10824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10825$as_echo "$SH" >&6; }
10826else
10827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10828$as_echo "no" >&6; }
10829fi
10830
10831
10832  test -n "$SH" && break
10833done
10834
10835    else
10836      # If it succeeded, then it was overridden by the user. We will use it
10837      # for the tool.
10838
10839      # First remove it from the list of overridden variables, so we can test
10840      # for unknown variables in the end.
10841      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10842
10843      # Check if we try to supply an empty value
10844      if test "x$SH" = x; then
10845        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10846$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10847        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10848$as_echo_n "checking for SH... " >&6; }
10849        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10850$as_echo "disabled" >&6; }
10851      else
10852        # Check if the provided tool contains a complete path.
10853        tool_specified="$SH"
10854        tool_basename="${tool_specified##*/}"
10855        if test "x$tool_basename" = "x$tool_specified"; then
10856          # A command without a complete path is provided, search $PATH.
10857          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10858$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10859          # Extract the first word of "$tool_basename", so it can be a program name with args.
10860set dummy $tool_basename; ac_word=$2
10861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10862$as_echo_n "checking for $ac_word... " >&6; }
10863if ${ac_cv_path_SH+:} false; then :
10864  $as_echo_n "(cached) " >&6
10865else
10866  case $SH in
10867  [\\/]* | ?:[\\/]*)
10868  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10869  ;;
10870  *)
10871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10872for as_dir in $PATH
10873do
10874  IFS=$as_save_IFS
10875  test -z "$as_dir" && as_dir=.
10876    for ac_exec_ext in '' $ac_executable_extensions; do
10877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10878    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10880    break 2
10881  fi
10882done
10883  done
10884IFS=$as_save_IFS
10885
10886  ;;
10887esac
10888fi
10889SH=$ac_cv_path_SH
10890if test -n "$SH"; then
10891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10892$as_echo "$SH" >&6; }
10893else
10894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10895$as_echo "no" >&6; }
10896fi
10897
10898
10899          if test "x$SH" = x; then
10900            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10901          fi
10902        else
10903          # Otherwise we believe it is a complete path. Use it as it is.
10904          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10905$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10906          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10907$as_echo_n "checking for SH... " >&6; }
10908          if test ! -x "$tool_specified"; then
10909            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10910$as_echo "not found" >&6; }
10911            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10912          fi
10913          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10914$as_echo "$tool_specified" >&6; }
10915        fi
10916      fi
10917    fi
10918
10919  fi
10920
10921
10922
10923  if test "x$SH" = x; then
10924    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10925  fi
10926
10927
10928
10929
10930
10931  # Publish this variable in the help.
10932
10933
10934  if [ -z "${SORT+x}" ]; then
10935    # The variable is not set by user, try to locate tool using the code snippet
10936    for ac_prog in sort
10937do
10938  # Extract the first word of "$ac_prog", so it can be a program name with args.
10939set dummy $ac_prog; ac_word=$2
10940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10941$as_echo_n "checking for $ac_word... " >&6; }
10942if ${ac_cv_path_SORT+:} false; then :
10943  $as_echo_n "(cached) " >&6
10944else
10945  case $SORT in
10946  [\\/]* | ?:[\\/]*)
10947  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10948  ;;
10949  *)
10950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10951for as_dir in $PATH
10952do
10953  IFS=$as_save_IFS
10954  test -z "$as_dir" && as_dir=.
10955    for ac_exec_ext in '' $ac_executable_extensions; do
10956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10957    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10959    break 2
10960  fi
10961done
10962  done
10963IFS=$as_save_IFS
10964
10965  ;;
10966esac
10967fi
10968SORT=$ac_cv_path_SORT
10969if test -n "$SORT"; then
10970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10971$as_echo "$SORT" >&6; }
10972else
10973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10974$as_echo "no" >&6; }
10975fi
10976
10977
10978  test -n "$SORT" && break
10979done
10980
10981  else
10982    # The variable is set, but is it from the command line or the environment?
10983
10984    # Try to remove the string !SORT! from our list.
10985    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10986    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10987      # If it failed, the variable was not from the command line. Ignore it,
10988      # but warn the user (except for BASH, which is always set by the calling BASH).
10989      if test "xSORT" != xBASH; then
10990        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10991$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10992      fi
10993      # Try to locate tool using the code snippet
10994      for ac_prog in sort
10995do
10996  # Extract the first word of "$ac_prog", so it can be a program name with args.
10997set dummy $ac_prog; ac_word=$2
10998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10999$as_echo_n "checking for $ac_word... " >&6; }
11000if ${ac_cv_path_SORT+:} false; then :
11001  $as_echo_n "(cached) " >&6
11002else
11003  case $SORT in
11004  [\\/]* | ?:[\\/]*)
11005  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11006  ;;
11007  *)
11008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11009for as_dir in $PATH
11010do
11011  IFS=$as_save_IFS
11012  test -z "$as_dir" && as_dir=.
11013    for ac_exec_ext in '' $ac_executable_extensions; do
11014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11015    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11017    break 2
11018  fi
11019done
11020  done
11021IFS=$as_save_IFS
11022
11023  ;;
11024esac
11025fi
11026SORT=$ac_cv_path_SORT
11027if test -n "$SORT"; then
11028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11029$as_echo "$SORT" >&6; }
11030else
11031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11032$as_echo "no" >&6; }
11033fi
11034
11035
11036  test -n "$SORT" && break
11037done
11038
11039    else
11040      # If it succeeded, then it was overridden by the user. We will use it
11041      # for the tool.
11042
11043      # First remove it from the list of overridden variables, so we can test
11044      # for unknown variables in the end.
11045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11046
11047      # Check if we try to supply an empty value
11048      if test "x$SORT" = x; then
11049        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11050$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11052$as_echo_n "checking for SORT... " >&6; }
11053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11054$as_echo "disabled" >&6; }
11055      else
11056        # Check if the provided tool contains a complete path.
11057        tool_specified="$SORT"
11058        tool_basename="${tool_specified##*/}"
11059        if test "x$tool_basename" = "x$tool_specified"; then
11060          # A command without a complete path is provided, search $PATH.
11061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11062$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11063          # Extract the first word of "$tool_basename", so it can be a program name with args.
11064set dummy $tool_basename; ac_word=$2
11065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11066$as_echo_n "checking for $ac_word... " >&6; }
11067if ${ac_cv_path_SORT+:} false; then :
11068  $as_echo_n "(cached) " >&6
11069else
11070  case $SORT in
11071  [\\/]* | ?:[\\/]*)
11072  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11073  ;;
11074  *)
11075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11076for as_dir in $PATH
11077do
11078  IFS=$as_save_IFS
11079  test -z "$as_dir" && as_dir=.
11080    for ac_exec_ext in '' $ac_executable_extensions; do
11081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11082    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11084    break 2
11085  fi
11086done
11087  done
11088IFS=$as_save_IFS
11089
11090  ;;
11091esac
11092fi
11093SORT=$ac_cv_path_SORT
11094if test -n "$SORT"; then
11095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11096$as_echo "$SORT" >&6; }
11097else
11098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11099$as_echo "no" >&6; }
11100fi
11101
11102
11103          if test "x$SORT" = x; then
11104            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11105          fi
11106        else
11107          # Otherwise we believe it is a complete path. Use it as it is.
11108          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11109$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11110          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11111$as_echo_n "checking for SORT... " >&6; }
11112          if test ! -x "$tool_specified"; then
11113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11114$as_echo "not found" >&6; }
11115            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11116          fi
11117          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11118$as_echo "$tool_specified" >&6; }
11119        fi
11120      fi
11121    fi
11122
11123  fi
11124
11125
11126
11127  if test "x$SORT" = x; then
11128    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11129  fi
11130
11131
11132
11133
11134
11135  # Publish this variable in the help.
11136
11137
11138  if [ -z "${TAIL+x}" ]; then
11139    # The variable is not set by user, try to locate tool using the code snippet
11140    for ac_prog in tail
11141do
11142  # Extract the first word of "$ac_prog", so it can be a program name with args.
11143set dummy $ac_prog; ac_word=$2
11144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11145$as_echo_n "checking for $ac_word... " >&6; }
11146if ${ac_cv_path_TAIL+:} false; then :
11147  $as_echo_n "(cached) " >&6
11148else
11149  case $TAIL in
11150  [\\/]* | ?:[\\/]*)
11151  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11152  ;;
11153  *)
11154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11155for as_dir in $PATH
11156do
11157  IFS=$as_save_IFS
11158  test -z "$as_dir" && as_dir=.
11159    for ac_exec_ext in '' $ac_executable_extensions; do
11160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11161    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11163    break 2
11164  fi
11165done
11166  done
11167IFS=$as_save_IFS
11168
11169  ;;
11170esac
11171fi
11172TAIL=$ac_cv_path_TAIL
11173if test -n "$TAIL"; then
11174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11175$as_echo "$TAIL" >&6; }
11176else
11177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11178$as_echo "no" >&6; }
11179fi
11180
11181
11182  test -n "$TAIL" && break
11183done
11184
11185  else
11186    # The variable is set, but is it from the command line or the environment?
11187
11188    # Try to remove the string !TAIL! from our list.
11189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11191      # If it failed, the variable was not from the command line. Ignore it,
11192      # but warn the user (except for BASH, which is always set by the calling BASH).
11193      if test "xTAIL" != xBASH; then
11194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11195$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11196      fi
11197      # Try to locate tool using the code snippet
11198      for ac_prog in tail
11199do
11200  # Extract the first word of "$ac_prog", so it can be a program name with args.
11201set dummy $ac_prog; ac_word=$2
11202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11203$as_echo_n "checking for $ac_word... " >&6; }
11204if ${ac_cv_path_TAIL+:} false; then :
11205  $as_echo_n "(cached) " >&6
11206else
11207  case $TAIL in
11208  [\\/]* | ?:[\\/]*)
11209  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11210  ;;
11211  *)
11212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11213for as_dir in $PATH
11214do
11215  IFS=$as_save_IFS
11216  test -z "$as_dir" && as_dir=.
11217    for ac_exec_ext in '' $ac_executable_extensions; do
11218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11219    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11221    break 2
11222  fi
11223done
11224  done
11225IFS=$as_save_IFS
11226
11227  ;;
11228esac
11229fi
11230TAIL=$ac_cv_path_TAIL
11231if test -n "$TAIL"; then
11232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11233$as_echo "$TAIL" >&6; }
11234else
11235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11236$as_echo "no" >&6; }
11237fi
11238
11239
11240  test -n "$TAIL" && break
11241done
11242
11243    else
11244      # If it succeeded, then it was overridden by the user. We will use it
11245      # for the tool.
11246
11247      # First remove it from the list of overridden variables, so we can test
11248      # for unknown variables in the end.
11249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11250
11251      # Check if we try to supply an empty value
11252      if test "x$TAIL" = x; then
11253        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11254$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11256$as_echo_n "checking for TAIL... " >&6; }
11257        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11258$as_echo "disabled" >&6; }
11259      else
11260        # Check if the provided tool contains a complete path.
11261        tool_specified="$TAIL"
11262        tool_basename="${tool_specified##*/}"
11263        if test "x$tool_basename" = "x$tool_specified"; then
11264          # A command without a complete path is provided, search $PATH.
11265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11266$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11267          # Extract the first word of "$tool_basename", so it can be a program name with args.
11268set dummy $tool_basename; ac_word=$2
11269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11270$as_echo_n "checking for $ac_word... " >&6; }
11271if ${ac_cv_path_TAIL+:} false; then :
11272  $as_echo_n "(cached) " >&6
11273else
11274  case $TAIL in
11275  [\\/]* | ?:[\\/]*)
11276  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11277  ;;
11278  *)
11279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11280for as_dir in $PATH
11281do
11282  IFS=$as_save_IFS
11283  test -z "$as_dir" && as_dir=.
11284    for ac_exec_ext in '' $ac_executable_extensions; do
11285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11286    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11288    break 2
11289  fi
11290done
11291  done
11292IFS=$as_save_IFS
11293
11294  ;;
11295esac
11296fi
11297TAIL=$ac_cv_path_TAIL
11298if test -n "$TAIL"; then
11299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11300$as_echo "$TAIL" >&6; }
11301else
11302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11303$as_echo "no" >&6; }
11304fi
11305
11306
11307          if test "x$TAIL" = x; then
11308            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11309          fi
11310        else
11311          # Otherwise we believe it is a complete path. Use it as it is.
11312          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11313$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11314          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11315$as_echo_n "checking for TAIL... " >&6; }
11316          if test ! -x "$tool_specified"; then
11317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11318$as_echo "not found" >&6; }
11319            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11320          fi
11321          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11322$as_echo "$tool_specified" >&6; }
11323        fi
11324      fi
11325    fi
11326
11327  fi
11328
11329
11330
11331  if test "x$TAIL" = x; then
11332    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11333  fi
11334
11335
11336
11337
11338
11339  # Publish this variable in the help.
11340
11341
11342  if [ -z "${TAR+x}" ]; then
11343    # The variable is not set by user, try to locate tool using the code snippet
11344    for ac_prog in gtar tar
11345do
11346  # Extract the first word of "$ac_prog", so it can be a program name with args.
11347set dummy $ac_prog; ac_word=$2
11348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11349$as_echo_n "checking for $ac_word... " >&6; }
11350if ${ac_cv_path_TAR+:} false; then :
11351  $as_echo_n "(cached) " >&6
11352else
11353  case $TAR in
11354  [\\/]* | ?:[\\/]*)
11355  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11356  ;;
11357  *)
11358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11359for as_dir in $PATH
11360do
11361  IFS=$as_save_IFS
11362  test -z "$as_dir" && as_dir=.
11363    for ac_exec_ext in '' $ac_executable_extensions; do
11364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11365    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11367    break 2
11368  fi
11369done
11370  done
11371IFS=$as_save_IFS
11372
11373  ;;
11374esac
11375fi
11376TAR=$ac_cv_path_TAR
11377if test -n "$TAR"; then
11378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11379$as_echo "$TAR" >&6; }
11380else
11381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11382$as_echo "no" >&6; }
11383fi
11384
11385
11386  test -n "$TAR" && break
11387done
11388
11389  else
11390    # The variable is set, but is it from the command line or the environment?
11391
11392    # Try to remove the string !TAR! from our list.
11393    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11394    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11395      # If it failed, the variable was not from the command line. Ignore it,
11396      # but warn the user (except for BASH, which is always set by the calling BASH).
11397      if test "xTAR" != xBASH; then
11398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11399$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11400      fi
11401      # Try to locate tool using the code snippet
11402      for ac_prog in gtar tar
11403do
11404  # Extract the first word of "$ac_prog", so it can be a program name with args.
11405set dummy $ac_prog; ac_word=$2
11406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11407$as_echo_n "checking for $ac_word... " >&6; }
11408if ${ac_cv_path_TAR+:} false; then :
11409  $as_echo_n "(cached) " >&6
11410else
11411  case $TAR in
11412  [\\/]* | ?:[\\/]*)
11413  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11414  ;;
11415  *)
11416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11417for as_dir in $PATH
11418do
11419  IFS=$as_save_IFS
11420  test -z "$as_dir" && as_dir=.
11421    for ac_exec_ext in '' $ac_executable_extensions; do
11422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11423    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11425    break 2
11426  fi
11427done
11428  done
11429IFS=$as_save_IFS
11430
11431  ;;
11432esac
11433fi
11434TAR=$ac_cv_path_TAR
11435if test -n "$TAR"; then
11436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11437$as_echo "$TAR" >&6; }
11438else
11439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11440$as_echo "no" >&6; }
11441fi
11442
11443
11444  test -n "$TAR" && break
11445done
11446
11447    else
11448      # If it succeeded, then it was overridden by the user. We will use it
11449      # for the tool.
11450
11451      # First remove it from the list of overridden variables, so we can test
11452      # for unknown variables in the end.
11453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11454
11455      # Check if we try to supply an empty value
11456      if test "x$TAR" = x; then
11457        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11458$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11460$as_echo_n "checking for TAR... " >&6; }
11461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11462$as_echo "disabled" >&6; }
11463      else
11464        # Check if the provided tool contains a complete path.
11465        tool_specified="$TAR"
11466        tool_basename="${tool_specified##*/}"
11467        if test "x$tool_basename" = "x$tool_specified"; then
11468          # A command without a complete path is provided, search $PATH.
11469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11470$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11471          # Extract the first word of "$tool_basename", so it can be a program name with args.
11472set dummy $tool_basename; ac_word=$2
11473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11474$as_echo_n "checking for $ac_word... " >&6; }
11475if ${ac_cv_path_TAR+:} false; then :
11476  $as_echo_n "(cached) " >&6
11477else
11478  case $TAR in
11479  [\\/]* | ?:[\\/]*)
11480  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11481  ;;
11482  *)
11483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11484for as_dir in $PATH
11485do
11486  IFS=$as_save_IFS
11487  test -z "$as_dir" && as_dir=.
11488    for ac_exec_ext in '' $ac_executable_extensions; do
11489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11490    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11492    break 2
11493  fi
11494done
11495  done
11496IFS=$as_save_IFS
11497
11498  ;;
11499esac
11500fi
11501TAR=$ac_cv_path_TAR
11502if test -n "$TAR"; then
11503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11504$as_echo "$TAR" >&6; }
11505else
11506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11507$as_echo "no" >&6; }
11508fi
11509
11510
11511          if test "x$TAR" = x; then
11512            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11513          fi
11514        else
11515          # Otherwise we believe it is a complete path. Use it as it is.
11516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11517$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11518          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11519$as_echo_n "checking for TAR... " >&6; }
11520          if test ! -x "$tool_specified"; then
11521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11522$as_echo "not found" >&6; }
11523            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11524          fi
11525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11526$as_echo "$tool_specified" >&6; }
11527        fi
11528      fi
11529    fi
11530
11531  fi
11532
11533
11534
11535  if test "x$TAR" = x; then
11536    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11537  fi
11538
11539
11540
11541
11542
11543  # Publish this variable in the help.
11544
11545
11546  if [ -z "${TEE+x}" ]; then
11547    # The variable is not set by user, try to locate tool using the code snippet
11548    for ac_prog in tee
11549do
11550  # Extract the first word of "$ac_prog", so it can be a program name with args.
11551set dummy $ac_prog; ac_word=$2
11552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11553$as_echo_n "checking for $ac_word... " >&6; }
11554if ${ac_cv_path_TEE+:} false; then :
11555  $as_echo_n "(cached) " >&6
11556else
11557  case $TEE in
11558  [\\/]* | ?:[\\/]*)
11559  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11560  ;;
11561  *)
11562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11563for as_dir in $PATH
11564do
11565  IFS=$as_save_IFS
11566  test -z "$as_dir" && as_dir=.
11567    for ac_exec_ext in '' $ac_executable_extensions; do
11568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11569    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11571    break 2
11572  fi
11573done
11574  done
11575IFS=$as_save_IFS
11576
11577  ;;
11578esac
11579fi
11580TEE=$ac_cv_path_TEE
11581if test -n "$TEE"; then
11582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11583$as_echo "$TEE" >&6; }
11584else
11585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11586$as_echo "no" >&6; }
11587fi
11588
11589
11590  test -n "$TEE" && break
11591done
11592
11593  else
11594    # The variable is set, but is it from the command line or the environment?
11595
11596    # Try to remove the string !TEE! from our list.
11597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11599      # If it failed, the variable was not from the command line. Ignore it,
11600      # but warn the user (except for BASH, which is always set by the calling BASH).
11601      if test "xTEE" != xBASH; then
11602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11603$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11604      fi
11605      # Try to locate tool using the code snippet
11606      for ac_prog in tee
11607do
11608  # Extract the first word of "$ac_prog", so it can be a program name with args.
11609set dummy $ac_prog; ac_word=$2
11610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11611$as_echo_n "checking for $ac_word... " >&6; }
11612if ${ac_cv_path_TEE+:} false; then :
11613  $as_echo_n "(cached) " >&6
11614else
11615  case $TEE in
11616  [\\/]* | ?:[\\/]*)
11617  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11618  ;;
11619  *)
11620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11621for as_dir in $PATH
11622do
11623  IFS=$as_save_IFS
11624  test -z "$as_dir" && as_dir=.
11625    for ac_exec_ext in '' $ac_executable_extensions; do
11626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11627    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11629    break 2
11630  fi
11631done
11632  done
11633IFS=$as_save_IFS
11634
11635  ;;
11636esac
11637fi
11638TEE=$ac_cv_path_TEE
11639if test -n "$TEE"; then
11640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11641$as_echo "$TEE" >&6; }
11642else
11643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11644$as_echo "no" >&6; }
11645fi
11646
11647
11648  test -n "$TEE" && break
11649done
11650
11651    else
11652      # If it succeeded, then it was overridden by the user. We will use it
11653      # for the tool.
11654
11655      # First remove it from the list of overridden variables, so we can test
11656      # for unknown variables in the end.
11657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11658
11659      # Check if we try to supply an empty value
11660      if test "x$TEE" = x; then
11661        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11662$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11663        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11664$as_echo_n "checking for TEE... " >&6; }
11665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11666$as_echo "disabled" >&6; }
11667      else
11668        # Check if the provided tool contains a complete path.
11669        tool_specified="$TEE"
11670        tool_basename="${tool_specified##*/}"
11671        if test "x$tool_basename" = "x$tool_specified"; then
11672          # A command without a complete path is provided, search $PATH.
11673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11674$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11675          # Extract the first word of "$tool_basename", so it can be a program name with args.
11676set dummy $tool_basename; ac_word=$2
11677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11678$as_echo_n "checking for $ac_word... " >&6; }
11679if ${ac_cv_path_TEE+:} false; then :
11680  $as_echo_n "(cached) " >&6
11681else
11682  case $TEE in
11683  [\\/]* | ?:[\\/]*)
11684  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11685  ;;
11686  *)
11687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11688for as_dir in $PATH
11689do
11690  IFS=$as_save_IFS
11691  test -z "$as_dir" && as_dir=.
11692    for ac_exec_ext in '' $ac_executable_extensions; do
11693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11694    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11696    break 2
11697  fi
11698done
11699  done
11700IFS=$as_save_IFS
11701
11702  ;;
11703esac
11704fi
11705TEE=$ac_cv_path_TEE
11706if test -n "$TEE"; then
11707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11708$as_echo "$TEE" >&6; }
11709else
11710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11711$as_echo "no" >&6; }
11712fi
11713
11714
11715          if test "x$TEE" = x; then
11716            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11717          fi
11718        else
11719          # Otherwise we believe it is a complete path. Use it as it is.
11720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11721$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11722          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11723$as_echo_n "checking for TEE... " >&6; }
11724          if test ! -x "$tool_specified"; then
11725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11726$as_echo "not found" >&6; }
11727            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11728          fi
11729          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11730$as_echo "$tool_specified" >&6; }
11731        fi
11732      fi
11733    fi
11734
11735  fi
11736
11737
11738
11739  if test "x$TEE" = x; then
11740    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11741  fi
11742
11743
11744
11745
11746
11747  # Publish this variable in the help.
11748
11749
11750  if [ -z "${TOUCH+x}" ]; then
11751    # The variable is not set by user, try to locate tool using the code snippet
11752    for ac_prog in touch
11753do
11754  # Extract the first word of "$ac_prog", so it can be a program name with args.
11755set dummy $ac_prog; ac_word=$2
11756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11757$as_echo_n "checking for $ac_word... " >&6; }
11758if ${ac_cv_path_TOUCH+:} false; then :
11759  $as_echo_n "(cached) " >&6
11760else
11761  case $TOUCH in
11762  [\\/]* | ?:[\\/]*)
11763  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11764  ;;
11765  *)
11766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11767for as_dir in $PATH
11768do
11769  IFS=$as_save_IFS
11770  test -z "$as_dir" && as_dir=.
11771    for ac_exec_ext in '' $ac_executable_extensions; do
11772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11773    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11775    break 2
11776  fi
11777done
11778  done
11779IFS=$as_save_IFS
11780
11781  ;;
11782esac
11783fi
11784TOUCH=$ac_cv_path_TOUCH
11785if test -n "$TOUCH"; then
11786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11787$as_echo "$TOUCH" >&6; }
11788else
11789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11790$as_echo "no" >&6; }
11791fi
11792
11793
11794  test -n "$TOUCH" && break
11795done
11796
11797  else
11798    # The variable is set, but is it from the command line or the environment?
11799
11800    # Try to remove the string !TOUCH! from our list.
11801    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11802    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11803      # If it failed, the variable was not from the command line. Ignore it,
11804      # but warn the user (except for BASH, which is always set by the calling BASH).
11805      if test "xTOUCH" != xBASH; then
11806        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11807$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11808      fi
11809      # Try to locate tool using the code snippet
11810      for ac_prog in touch
11811do
11812  # Extract the first word of "$ac_prog", so it can be a program name with args.
11813set dummy $ac_prog; ac_word=$2
11814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11815$as_echo_n "checking for $ac_word... " >&6; }
11816if ${ac_cv_path_TOUCH+:} false; then :
11817  $as_echo_n "(cached) " >&6
11818else
11819  case $TOUCH in
11820  [\\/]* | ?:[\\/]*)
11821  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11822  ;;
11823  *)
11824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11825for as_dir in $PATH
11826do
11827  IFS=$as_save_IFS
11828  test -z "$as_dir" && as_dir=.
11829    for ac_exec_ext in '' $ac_executable_extensions; do
11830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11831    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11833    break 2
11834  fi
11835done
11836  done
11837IFS=$as_save_IFS
11838
11839  ;;
11840esac
11841fi
11842TOUCH=$ac_cv_path_TOUCH
11843if test -n "$TOUCH"; then
11844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11845$as_echo "$TOUCH" >&6; }
11846else
11847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11848$as_echo "no" >&6; }
11849fi
11850
11851
11852  test -n "$TOUCH" && break
11853done
11854
11855    else
11856      # If it succeeded, then it was overridden by the user. We will use it
11857      # for the tool.
11858
11859      # First remove it from the list of overridden variables, so we can test
11860      # for unknown variables in the end.
11861      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11862
11863      # Check if we try to supply an empty value
11864      if test "x$TOUCH" = x; then
11865        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11866$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11867        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11868$as_echo_n "checking for TOUCH... " >&6; }
11869        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11870$as_echo "disabled" >&6; }
11871      else
11872        # Check if the provided tool contains a complete path.
11873        tool_specified="$TOUCH"
11874        tool_basename="${tool_specified##*/}"
11875        if test "x$tool_basename" = "x$tool_specified"; then
11876          # A command without a complete path is provided, search $PATH.
11877          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11878$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11879          # Extract the first word of "$tool_basename", so it can be a program name with args.
11880set dummy $tool_basename; ac_word=$2
11881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11882$as_echo_n "checking for $ac_word... " >&6; }
11883if ${ac_cv_path_TOUCH+:} false; then :
11884  $as_echo_n "(cached) " >&6
11885else
11886  case $TOUCH in
11887  [\\/]* | ?:[\\/]*)
11888  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11889  ;;
11890  *)
11891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11892for as_dir in $PATH
11893do
11894  IFS=$as_save_IFS
11895  test -z "$as_dir" && as_dir=.
11896    for ac_exec_ext in '' $ac_executable_extensions; do
11897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11898    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11900    break 2
11901  fi
11902done
11903  done
11904IFS=$as_save_IFS
11905
11906  ;;
11907esac
11908fi
11909TOUCH=$ac_cv_path_TOUCH
11910if test -n "$TOUCH"; then
11911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11912$as_echo "$TOUCH" >&6; }
11913else
11914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11915$as_echo "no" >&6; }
11916fi
11917
11918
11919          if test "x$TOUCH" = x; then
11920            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11921          fi
11922        else
11923          # Otherwise we believe it is a complete path. Use it as it is.
11924          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11925$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11926          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11927$as_echo_n "checking for TOUCH... " >&6; }
11928          if test ! -x "$tool_specified"; then
11929            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11930$as_echo "not found" >&6; }
11931            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11932          fi
11933          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11934$as_echo "$tool_specified" >&6; }
11935        fi
11936      fi
11937    fi
11938
11939  fi
11940
11941
11942
11943  if test "x$TOUCH" = x; then
11944    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11945  fi
11946
11947
11948
11949
11950
11951  # Publish this variable in the help.
11952
11953
11954  if [ -z "${TR+x}" ]; then
11955    # The variable is not set by user, try to locate tool using the code snippet
11956    for ac_prog in tr
11957do
11958  # Extract the first word of "$ac_prog", so it can be a program name with args.
11959set dummy $ac_prog; ac_word=$2
11960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11961$as_echo_n "checking for $ac_word... " >&6; }
11962if ${ac_cv_path_TR+:} false; then :
11963  $as_echo_n "(cached) " >&6
11964else
11965  case $TR in
11966  [\\/]* | ?:[\\/]*)
11967  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11968  ;;
11969  *)
11970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11971for as_dir in $PATH
11972do
11973  IFS=$as_save_IFS
11974  test -z "$as_dir" && as_dir=.
11975    for ac_exec_ext in '' $ac_executable_extensions; do
11976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11977    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11979    break 2
11980  fi
11981done
11982  done
11983IFS=$as_save_IFS
11984
11985  ;;
11986esac
11987fi
11988TR=$ac_cv_path_TR
11989if test -n "$TR"; then
11990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11991$as_echo "$TR" >&6; }
11992else
11993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11994$as_echo "no" >&6; }
11995fi
11996
11997
11998  test -n "$TR" && break
11999done
12000
12001  else
12002    # The variable is set, but is it from the command line or the environment?
12003
12004    # Try to remove the string !TR! from our list.
12005    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12006    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12007      # If it failed, the variable was not from the command line. Ignore it,
12008      # but warn the user (except for BASH, which is always set by the calling BASH).
12009      if test "xTR" != xBASH; then
12010        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12011$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12012      fi
12013      # Try to locate tool using the code snippet
12014      for ac_prog in tr
12015do
12016  # Extract the first word of "$ac_prog", so it can be a program name with args.
12017set dummy $ac_prog; ac_word=$2
12018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12019$as_echo_n "checking for $ac_word... " >&6; }
12020if ${ac_cv_path_TR+:} false; then :
12021  $as_echo_n "(cached) " >&6
12022else
12023  case $TR in
12024  [\\/]* | ?:[\\/]*)
12025  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12026  ;;
12027  *)
12028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12029for as_dir in $PATH
12030do
12031  IFS=$as_save_IFS
12032  test -z "$as_dir" && as_dir=.
12033    for ac_exec_ext in '' $ac_executable_extensions; do
12034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12035    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12037    break 2
12038  fi
12039done
12040  done
12041IFS=$as_save_IFS
12042
12043  ;;
12044esac
12045fi
12046TR=$ac_cv_path_TR
12047if test -n "$TR"; then
12048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12049$as_echo "$TR" >&6; }
12050else
12051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12052$as_echo "no" >&6; }
12053fi
12054
12055
12056  test -n "$TR" && break
12057done
12058
12059    else
12060      # If it succeeded, then it was overridden by the user. We will use it
12061      # for the tool.
12062
12063      # First remove it from the list of overridden variables, so we can test
12064      # for unknown variables in the end.
12065      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12066
12067      # Check if we try to supply an empty value
12068      if test "x$TR" = x; then
12069        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12070$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12071        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12072$as_echo_n "checking for TR... " >&6; }
12073        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12074$as_echo "disabled" >&6; }
12075      else
12076        # Check if the provided tool contains a complete path.
12077        tool_specified="$TR"
12078        tool_basename="${tool_specified##*/}"
12079        if test "x$tool_basename" = "x$tool_specified"; then
12080          # A command without a complete path is provided, search $PATH.
12081          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12082$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12083          # Extract the first word of "$tool_basename", so it can be a program name with args.
12084set dummy $tool_basename; ac_word=$2
12085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12086$as_echo_n "checking for $ac_word... " >&6; }
12087if ${ac_cv_path_TR+:} false; then :
12088  $as_echo_n "(cached) " >&6
12089else
12090  case $TR in
12091  [\\/]* | ?:[\\/]*)
12092  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12093  ;;
12094  *)
12095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12096for as_dir in $PATH
12097do
12098  IFS=$as_save_IFS
12099  test -z "$as_dir" && as_dir=.
12100    for ac_exec_ext in '' $ac_executable_extensions; do
12101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12102    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12104    break 2
12105  fi
12106done
12107  done
12108IFS=$as_save_IFS
12109
12110  ;;
12111esac
12112fi
12113TR=$ac_cv_path_TR
12114if test -n "$TR"; then
12115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12116$as_echo "$TR" >&6; }
12117else
12118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12119$as_echo "no" >&6; }
12120fi
12121
12122
12123          if test "x$TR" = x; then
12124            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12125          fi
12126        else
12127          # Otherwise we believe it is a complete path. Use it as it is.
12128          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12129$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12130          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12131$as_echo_n "checking for TR... " >&6; }
12132          if test ! -x "$tool_specified"; then
12133            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12134$as_echo "not found" >&6; }
12135            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12136          fi
12137          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12138$as_echo "$tool_specified" >&6; }
12139        fi
12140      fi
12141    fi
12142
12143  fi
12144
12145
12146
12147  if test "x$TR" = x; then
12148    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12149  fi
12150
12151
12152
12153
12154
12155  # Publish this variable in the help.
12156
12157
12158  if [ -z "${UNAME+x}" ]; then
12159    # The variable is not set by user, try to locate tool using the code snippet
12160    for ac_prog in uname
12161do
12162  # Extract the first word of "$ac_prog", so it can be a program name with args.
12163set dummy $ac_prog; ac_word=$2
12164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12165$as_echo_n "checking for $ac_word... " >&6; }
12166if ${ac_cv_path_UNAME+:} false; then :
12167  $as_echo_n "(cached) " >&6
12168else
12169  case $UNAME in
12170  [\\/]* | ?:[\\/]*)
12171  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12172  ;;
12173  *)
12174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12175for as_dir in $PATH
12176do
12177  IFS=$as_save_IFS
12178  test -z "$as_dir" && as_dir=.
12179    for ac_exec_ext in '' $ac_executable_extensions; do
12180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12181    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12183    break 2
12184  fi
12185done
12186  done
12187IFS=$as_save_IFS
12188
12189  ;;
12190esac
12191fi
12192UNAME=$ac_cv_path_UNAME
12193if test -n "$UNAME"; then
12194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12195$as_echo "$UNAME" >&6; }
12196else
12197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12198$as_echo "no" >&6; }
12199fi
12200
12201
12202  test -n "$UNAME" && break
12203done
12204
12205  else
12206    # The variable is set, but is it from the command line or the environment?
12207
12208    # Try to remove the string !UNAME! from our list.
12209    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12210    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12211      # If it failed, the variable was not from the command line. Ignore it,
12212      # but warn the user (except for BASH, which is always set by the calling BASH).
12213      if test "xUNAME" != xBASH; then
12214        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12215$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12216      fi
12217      # Try to locate tool using the code snippet
12218      for ac_prog in uname
12219do
12220  # Extract the first word of "$ac_prog", so it can be a program name with args.
12221set dummy $ac_prog; ac_word=$2
12222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12223$as_echo_n "checking for $ac_word... " >&6; }
12224if ${ac_cv_path_UNAME+:} false; then :
12225  $as_echo_n "(cached) " >&6
12226else
12227  case $UNAME in
12228  [\\/]* | ?:[\\/]*)
12229  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12230  ;;
12231  *)
12232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12233for as_dir in $PATH
12234do
12235  IFS=$as_save_IFS
12236  test -z "$as_dir" && as_dir=.
12237    for ac_exec_ext in '' $ac_executable_extensions; do
12238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12239    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12241    break 2
12242  fi
12243done
12244  done
12245IFS=$as_save_IFS
12246
12247  ;;
12248esac
12249fi
12250UNAME=$ac_cv_path_UNAME
12251if test -n "$UNAME"; then
12252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12253$as_echo "$UNAME" >&6; }
12254else
12255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12256$as_echo "no" >&6; }
12257fi
12258
12259
12260  test -n "$UNAME" && break
12261done
12262
12263    else
12264      # If it succeeded, then it was overridden by the user. We will use it
12265      # for the tool.
12266
12267      # First remove it from the list of overridden variables, so we can test
12268      # for unknown variables in the end.
12269      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12270
12271      # Check if we try to supply an empty value
12272      if test "x$UNAME" = x; then
12273        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12274$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12275        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12276$as_echo_n "checking for UNAME... " >&6; }
12277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12278$as_echo "disabled" >&6; }
12279      else
12280        # Check if the provided tool contains a complete path.
12281        tool_specified="$UNAME"
12282        tool_basename="${tool_specified##*/}"
12283        if test "x$tool_basename" = "x$tool_specified"; then
12284          # A command without a complete path is provided, search $PATH.
12285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12286$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12287          # Extract the first word of "$tool_basename", so it can be a program name with args.
12288set dummy $tool_basename; ac_word=$2
12289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12290$as_echo_n "checking for $ac_word... " >&6; }
12291if ${ac_cv_path_UNAME+:} false; then :
12292  $as_echo_n "(cached) " >&6
12293else
12294  case $UNAME in
12295  [\\/]* | ?:[\\/]*)
12296  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12297  ;;
12298  *)
12299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12300for as_dir in $PATH
12301do
12302  IFS=$as_save_IFS
12303  test -z "$as_dir" && as_dir=.
12304    for ac_exec_ext in '' $ac_executable_extensions; do
12305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12306    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12308    break 2
12309  fi
12310done
12311  done
12312IFS=$as_save_IFS
12313
12314  ;;
12315esac
12316fi
12317UNAME=$ac_cv_path_UNAME
12318if test -n "$UNAME"; then
12319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12320$as_echo "$UNAME" >&6; }
12321else
12322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12323$as_echo "no" >&6; }
12324fi
12325
12326
12327          if test "x$UNAME" = x; then
12328            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12329          fi
12330        else
12331          # Otherwise we believe it is a complete path. Use it as it is.
12332          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12333$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12334          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12335$as_echo_n "checking for UNAME... " >&6; }
12336          if test ! -x "$tool_specified"; then
12337            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12338$as_echo "not found" >&6; }
12339            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12340          fi
12341          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12342$as_echo "$tool_specified" >&6; }
12343        fi
12344      fi
12345    fi
12346
12347  fi
12348
12349
12350
12351  if test "x$UNAME" = x; then
12352    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12353  fi
12354
12355
12356
12357
12358
12359  # Publish this variable in the help.
12360
12361
12362  if [ -z "${UNIQ+x}" ]; then
12363    # The variable is not set by user, try to locate tool using the code snippet
12364    for ac_prog in uniq
12365do
12366  # Extract the first word of "$ac_prog", so it can be a program name with args.
12367set dummy $ac_prog; ac_word=$2
12368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12369$as_echo_n "checking for $ac_word... " >&6; }
12370if ${ac_cv_path_UNIQ+:} false; then :
12371  $as_echo_n "(cached) " >&6
12372else
12373  case $UNIQ in
12374  [\\/]* | ?:[\\/]*)
12375  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12376  ;;
12377  *)
12378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12379for as_dir in $PATH
12380do
12381  IFS=$as_save_IFS
12382  test -z "$as_dir" && as_dir=.
12383    for ac_exec_ext in '' $ac_executable_extensions; do
12384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12385    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12387    break 2
12388  fi
12389done
12390  done
12391IFS=$as_save_IFS
12392
12393  ;;
12394esac
12395fi
12396UNIQ=$ac_cv_path_UNIQ
12397if test -n "$UNIQ"; then
12398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12399$as_echo "$UNIQ" >&6; }
12400else
12401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12402$as_echo "no" >&6; }
12403fi
12404
12405
12406  test -n "$UNIQ" && break
12407done
12408
12409  else
12410    # The variable is set, but is it from the command line or the environment?
12411
12412    # Try to remove the string !UNIQ! from our list.
12413    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12414    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12415      # If it failed, the variable was not from the command line. Ignore it,
12416      # but warn the user (except for BASH, which is always set by the calling BASH).
12417      if test "xUNIQ" != xBASH; then
12418        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12419$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12420      fi
12421      # Try to locate tool using the code snippet
12422      for ac_prog in uniq
12423do
12424  # Extract the first word of "$ac_prog", so it can be a program name with args.
12425set dummy $ac_prog; ac_word=$2
12426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12427$as_echo_n "checking for $ac_word... " >&6; }
12428if ${ac_cv_path_UNIQ+:} false; then :
12429  $as_echo_n "(cached) " >&6
12430else
12431  case $UNIQ in
12432  [\\/]* | ?:[\\/]*)
12433  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12434  ;;
12435  *)
12436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12437for as_dir in $PATH
12438do
12439  IFS=$as_save_IFS
12440  test -z "$as_dir" && as_dir=.
12441    for ac_exec_ext in '' $ac_executable_extensions; do
12442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12443    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12445    break 2
12446  fi
12447done
12448  done
12449IFS=$as_save_IFS
12450
12451  ;;
12452esac
12453fi
12454UNIQ=$ac_cv_path_UNIQ
12455if test -n "$UNIQ"; then
12456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12457$as_echo "$UNIQ" >&6; }
12458else
12459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12460$as_echo "no" >&6; }
12461fi
12462
12463
12464  test -n "$UNIQ" && break
12465done
12466
12467    else
12468      # If it succeeded, then it was overridden by the user. We will use it
12469      # for the tool.
12470
12471      # First remove it from the list of overridden variables, so we can test
12472      # for unknown variables in the end.
12473      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12474
12475      # Check if we try to supply an empty value
12476      if test "x$UNIQ" = x; then
12477        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12478$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12479        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12480$as_echo_n "checking for UNIQ... " >&6; }
12481        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12482$as_echo "disabled" >&6; }
12483      else
12484        # Check if the provided tool contains a complete path.
12485        tool_specified="$UNIQ"
12486        tool_basename="${tool_specified##*/}"
12487        if test "x$tool_basename" = "x$tool_specified"; then
12488          # A command without a complete path is provided, search $PATH.
12489          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12490$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12491          # Extract the first word of "$tool_basename", so it can be a program name with args.
12492set dummy $tool_basename; ac_word=$2
12493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12494$as_echo_n "checking for $ac_word... " >&6; }
12495if ${ac_cv_path_UNIQ+:} false; then :
12496  $as_echo_n "(cached) " >&6
12497else
12498  case $UNIQ in
12499  [\\/]* | ?:[\\/]*)
12500  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12501  ;;
12502  *)
12503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12504for as_dir in $PATH
12505do
12506  IFS=$as_save_IFS
12507  test -z "$as_dir" && as_dir=.
12508    for ac_exec_ext in '' $ac_executable_extensions; do
12509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12510    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12512    break 2
12513  fi
12514done
12515  done
12516IFS=$as_save_IFS
12517
12518  ;;
12519esac
12520fi
12521UNIQ=$ac_cv_path_UNIQ
12522if test -n "$UNIQ"; then
12523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12524$as_echo "$UNIQ" >&6; }
12525else
12526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12527$as_echo "no" >&6; }
12528fi
12529
12530
12531          if test "x$UNIQ" = x; then
12532            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12533          fi
12534        else
12535          # Otherwise we believe it is a complete path. Use it as it is.
12536          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12537$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12538          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12539$as_echo_n "checking for UNIQ... " >&6; }
12540          if test ! -x "$tool_specified"; then
12541            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12542$as_echo "not found" >&6; }
12543            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12544          fi
12545          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12546$as_echo "$tool_specified" >&6; }
12547        fi
12548      fi
12549    fi
12550
12551  fi
12552
12553
12554
12555  if test "x$UNIQ" = x; then
12556    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12557  fi
12558
12559
12560
12561
12562
12563  # Publish this variable in the help.
12564
12565
12566  if [ -z "${WC+x}" ]; then
12567    # The variable is not set by user, try to locate tool using the code snippet
12568    for ac_prog in wc
12569do
12570  # Extract the first word of "$ac_prog", so it can be a program name with args.
12571set dummy $ac_prog; ac_word=$2
12572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12573$as_echo_n "checking for $ac_word... " >&6; }
12574if ${ac_cv_path_WC+:} false; then :
12575  $as_echo_n "(cached) " >&6
12576else
12577  case $WC in
12578  [\\/]* | ?:[\\/]*)
12579  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12580  ;;
12581  *)
12582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12583for as_dir in $PATH
12584do
12585  IFS=$as_save_IFS
12586  test -z "$as_dir" && as_dir=.
12587    for ac_exec_ext in '' $ac_executable_extensions; do
12588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12589    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12591    break 2
12592  fi
12593done
12594  done
12595IFS=$as_save_IFS
12596
12597  ;;
12598esac
12599fi
12600WC=$ac_cv_path_WC
12601if test -n "$WC"; then
12602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12603$as_echo "$WC" >&6; }
12604else
12605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12606$as_echo "no" >&6; }
12607fi
12608
12609
12610  test -n "$WC" && break
12611done
12612
12613  else
12614    # The variable is set, but is it from the command line or the environment?
12615
12616    # Try to remove the string !WC! from our list.
12617    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12618    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12619      # If it failed, the variable was not from the command line. Ignore it,
12620      # but warn the user (except for BASH, which is always set by the calling BASH).
12621      if test "xWC" != xBASH; then
12622        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12623$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12624      fi
12625      # Try to locate tool using the code snippet
12626      for ac_prog in wc
12627do
12628  # Extract the first word of "$ac_prog", so it can be a program name with args.
12629set dummy $ac_prog; ac_word=$2
12630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12631$as_echo_n "checking for $ac_word... " >&6; }
12632if ${ac_cv_path_WC+:} false; then :
12633  $as_echo_n "(cached) " >&6
12634else
12635  case $WC in
12636  [\\/]* | ?:[\\/]*)
12637  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12638  ;;
12639  *)
12640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12641for as_dir in $PATH
12642do
12643  IFS=$as_save_IFS
12644  test -z "$as_dir" && as_dir=.
12645    for ac_exec_ext in '' $ac_executable_extensions; do
12646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12647    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12649    break 2
12650  fi
12651done
12652  done
12653IFS=$as_save_IFS
12654
12655  ;;
12656esac
12657fi
12658WC=$ac_cv_path_WC
12659if test -n "$WC"; then
12660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12661$as_echo "$WC" >&6; }
12662else
12663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12664$as_echo "no" >&6; }
12665fi
12666
12667
12668  test -n "$WC" && break
12669done
12670
12671    else
12672      # If it succeeded, then it was overridden by the user. We will use it
12673      # for the tool.
12674
12675      # First remove it from the list of overridden variables, so we can test
12676      # for unknown variables in the end.
12677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12678
12679      # Check if we try to supply an empty value
12680      if test "x$WC" = x; then
12681        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12682$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12684$as_echo_n "checking for WC... " >&6; }
12685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12686$as_echo "disabled" >&6; }
12687      else
12688        # Check if the provided tool contains a complete path.
12689        tool_specified="$WC"
12690        tool_basename="${tool_specified##*/}"
12691        if test "x$tool_basename" = "x$tool_specified"; then
12692          # A command without a complete path is provided, search $PATH.
12693          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12694$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12695          # Extract the first word of "$tool_basename", so it can be a program name with args.
12696set dummy $tool_basename; ac_word=$2
12697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12698$as_echo_n "checking for $ac_word... " >&6; }
12699if ${ac_cv_path_WC+:} false; then :
12700  $as_echo_n "(cached) " >&6
12701else
12702  case $WC in
12703  [\\/]* | ?:[\\/]*)
12704  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12705  ;;
12706  *)
12707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12708for as_dir in $PATH
12709do
12710  IFS=$as_save_IFS
12711  test -z "$as_dir" && as_dir=.
12712    for ac_exec_ext in '' $ac_executable_extensions; do
12713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12714    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12716    break 2
12717  fi
12718done
12719  done
12720IFS=$as_save_IFS
12721
12722  ;;
12723esac
12724fi
12725WC=$ac_cv_path_WC
12726if test -n "$WC"; then
12727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12728$as_echo "$WC" >&6; }
12729else
12730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12731$as_echo "no" >&6; }
12732fi
12733
12734
12735          if test "x$WC" = x; then
12736            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12737          fi
12738        else
12739          # Otherwise we believe it is a complete path. Use it as it is.
12740          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12741$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12742          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12743$as_echo_n "checking for WC... " >&6; }
12744          if test ! -x "$tool_specified"; then
12745            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12746$as_echo "not found" >&6; }
12747            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12748          fi
12749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12750$as_echo "$tool_specified" >&6; }
12751        fi
12752      fi
12753    fi
12754
12755  fi
12756
12757
12758
12759  if test "x$WC" = x; then
12760    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12761  fi
12762
12763
12764
12765
12766
12767  # Publish this variable in the help.
12768
12769
12770  if [ -z "${WHICH+x}" ]; then
12771    # The variable is not set by user, try to locate tool using the code snippet
12772    for ac_prog in which
12773do
12774  # Extract the first word of "$ac_prog", so it can be a program name with args.
12775set dummy $ac_prog; ac_word=$2
12776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12777$as_echo_n "checking for $ac_word... " >&6; }
12778if ${ac_cv_path_WHICH+:} false; then :
12779  $as_echo_n "(cached) " >&6
12780else
12781  case $WHICH in
12782  [\\/]* | ?:[\\/]*)
12783  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12784  ;;
12785  *)
12786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12787for as_dir in $PATH
12788do
12789  IFS=$as_save_IFS
12790  test -z "$as_dir" && as_dir=.
12791    for ac_exec_ext in '' $ac_executable_extensions; do
12792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12793    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12795    break 2
12796  fi
12797done
12798  done
12799IFS=$as_save_IFS
12800
12801  ;;
12802esac
12803fi
12804WHICH=$ac_cv_path_WHICH
12805if test -n "$WHICH"; then
12806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12807$as_echo "$WHICH" >&6; }
12808else
12809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12810$as_echo "no" >&6; }
12811fi
12812
12813
12814  test -n "$WHICH" && break
12815done
12816
12817  else
12818    # The variable is set, but is it from the command line or the environment?
12819
12820    # Try to remove the string !WHICH! from our list.
12821    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12822    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12823      # If it failed, the variable was not from the command line. Ignore it,
12824      # but warn the user (except for BASH, which is always set by the calling BASH).
12825      if test "xWHICH" != xBASH; then
12826        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12827$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12828      fi
12829      # Try to locate tool using the code snippet
12830      for ac_prog in which
12831do
12832  # Extract the first word of "$ac_prog", so it can be a program name with args.
12833set dummy $ac_prog; ac_word=$2
12834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12835$as_echo_n "checking for $ac_word... " >&6; }
12836if ${ac_cv_path_WHICH+:} false; then :
12837  $as_echo_n "(cached) " >&6
12838else
12839  case $WHICH in
12840  [\\/]* | ?:[\\/]*)
12841  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12842  ;;
12843  *)
12844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12845for as_dir in $PATH
12846do
12847  IFS=$as_save_IFS
12848  test -z "$as_dir" && as_dir=.
12849    for ac_exec_ext in '' $ac_executable_extensions; do
12850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12851    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12853    break 2
12854  fi
12855done
12856  done
12857IFS=$as_save_IFS
12858
12859  ;;
12860esac
12861fi
12862WHICH=$ac_cv_path_WHICH
12863if test -n "$WHICH"; then
12864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12865$as_echo "$WHICH" >&6; }
12866else
12867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12868$as_echo "no" >&6; }
12869fi
12870
12871
12872  test -n "$WHICH" && break
12873done
12874
12875    else
12876      # If it succeeded, then it was overridden by the user. We will use it
12877      # for the tool.
12878
12879      # First remove it from the list of overridden variables, so we can test
12880      # for unknown variables in the end.
12881      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12882
12883      # Check if we try to supply an empty value
12884      if test "x$WHICH" = x; then
12885        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12886$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12887        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12888$as_echo_n "checking for WHICH... " >&6; }
12889        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12890$as_echo "disabled" >&6; }
12891      else
12892        # Check if the provided tool contains a complete path.
12893        tool_specified="$WHICH"
12894        tool_basename="${tool_specified##*/}"
12895        if test "x$tool_basename" = "x$tool_specified"; then
12896          # A command without a complete path is provided, search $PATH.
12897          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12898$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12899          # Extract the first word of "$tool_basename", so it can be a program name with args.
12900set dummy $tool_basename; ac_word=$2
12901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12902$as_echo_n "checking for $ac_word... " >&6; }
12903if ${ac_cv_path_WHICH+:} false; then :
12904  $as_echo_n "(cached) " >&6
12905else
12906  case $WHICH in
12907  [\\/]* | ?:[\\/]*)
12908  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12909  ;;
12910  *)
12911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12912for as_dir in $PATH
12913do
12914  IFS=$as_save_IFS
12915  test -z "$as_dir" && as_dir=.
12916    for ac_exec_ext in '' $ac_executable_extensions; do
12917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12918    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12920    break 2
12921  fi
12922done
12923  done
12924IFS=$as_save_IFS
12925
12926  ;;
12927esac
12928fi
12929WHICH=$ac_cv_path_WHICH
12930if test -n "$WHICH"; then
12931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12932$as_echo "$WHICH" >&6; }
12933else
12934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12935$as_echo "no" >&6; }
12936fi
12937
12938
12939          if test "x$WHICH" = x; then
12940            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12941          fi
12942        else
12943          # Otherwise we believe it is a complete path. Use it as it is.
12944          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12945$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12946          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12947$as_echo_n "checking for WHICH... " >&6; }
12948          if test ! -x "$tool_specified"; then
12949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12950$as_echo "not found" >&6; }
12951            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12952          fi
12953          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12954$as_echo "$tool_specified" >&6; }
12955        fi
12956      fi
12957    fi
12958
12959  fi
12960
12961
12962
12963  if test "x$WHICH" = x; then
12964    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12965  fi
12966
12967
12968
12969
12970
12971  # Publish this variable in the help.
12972
12973
12974  if [ -z "${XARGS+x}" ]; then
12975    # The variable is not set by user, try to locate tool using the code snippet
12976    for ac_prog in xargs
12977do
12978  # Extract the first word of "$ac_prog", so it can be a program name with args.
12979set dummy $ac_prog; ac_word=$2
12980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12981$as_echo_n "checking for $ac_word... " >&6; }
12982if ${ac_cv_path_XARGS+:} false; then :
12983  $as_echo_n "(cached) " >&6
12984else
12985  case $XARGS in
12986  [\\/]* | ?:[\\/]*)
12987  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12988  ;;
12989  *)
12990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12991for as_dir in $PATH
12992do
12993  IFS=$as_save_IFS
12994  test -z "$as_dir" && as_dir=.
12995    for ac_exec_ext in '' $ac_executable_extensions; do
12996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12997    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12999    break 2
13000  fi
13001done
13002  done
13003IFS=$as_save_IFS
13004
13005  ;;
13006esac
13007fi
13008XARGS=$ac_cv_path_XARGS
13009if test -n "$XARGS"; then
13010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13011$as_echo "$XARGS" >&6; }
13012else
13013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13014$as_echo "no" >&6; }
13015fi
13016
13017
13018  test -n "$XARGS" && break
13019done
13020
13021  else
13022    # The variable is set, but is it from the command line or the environment?
13023
13024    # Try to remove the string !XARGS! from our list.
13025    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13026    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13027      # If it failed, the variable was not from the command line. Ignore it,
13028      # but warn the user (except for BASH, which is always set by the calling BASH).
13029      if test "xXARGS" != xBASH; then
13030        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13031$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13032      fi
13033      # Try to locate tool using the code snippet
13034      for ac_prog in xargs
13035do
13036  # Extract the first word of "$ac_prog", so it can be a program name with args.
13037set dummy $ac_prog; ac_word=$2
13038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13039$as_echo_n "checking for $ac_word... " >&6; }
13040if ${ac_cv_path_XARGS+:} false; then :
13041  $as_echo_n "(cached) " >&6
13042else
13043  case $XARGS in
13044  [\\/]* | ?:[\\/]*)
13045  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13046  ;;
13047  *)
13048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13049for as_dir in $PATH
13050do
13051  IFS=$as_save_IFS
13052  test -z "$as_dir" && as_dir=.
13053    for ac_exec_ext in '' $ac_executable_extensions; do
13054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13055    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13057    break 2
13058  fi
13059done
13060  done
13061IFS=$as_save_IFS
13062
13063  ;;
13064esac
13065fi
13066XARGS=$ac_cv_path_XARGS
13067if test -n "$XARGS"; then
13068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13069$as_echo "$XARGS" >&6; }
13070else
13071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13072$as_echo "no" >&6; }
13073fi
13074
13075
13076  test -n "$XARGS" && break
13077done
13078
13079    else
13080      # If it succeeded, then it was overridden by the user. We will use it
13081      # for the tool.
13082
13083      # First remove it from the list of overridden variables, so we can test
13084      # for unknown variables in the end.
13085      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13086
13087      # Check if we try to supply an empty value
13088      if test "x$XARGS" = x; then
13089        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13090$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13091        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13092$as_echo_n "checking for XARGS... " >&6; }
13093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13094$as_echo "disabled" >&6; }
13095      else
13096        # Check if the provided tool contains a complete path.
13097        tool_specified="$XARGS"
13098        tool_basename="${tool_specified##*/}"
13099        if test "x$tool_basename" = "x$tool_specified"; then
13100          # A command without a complete path is provided, search $PATH.
13101          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13102$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13103          # Extract the first word of "$tool_basename", so it can be a program name with args.
13104set dummy $tool_basename; ac_word=$2
13105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13106$as_echo_n "checking for $ac_word... " >&6; }
13107if ${ac_cv_path_XARGS+:} false; then :
13108  $as_echo_n "(cached) " >&6
13109else
13110  case $XARGS in
13111  [\\/]* | ?:[\\/]*)
13112  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13113  ;;
13114  *)
13115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13116for as_dir in $PATH
13117do
13118  IFS=$as_save_IFS
13119  test -z "$as_dir" && as_dir=.
13120    for ac_exec_ext in '' $ac_executable_extensions; do
13121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13122    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13124    break 2
13125  fi
13126done
13127  done
13128IFS=$as_save_IFS
13129
13130  ;;
13131esac
13132fi
13133XARGS=$ac_cv_path_XARGS
13134if test -n "$XARGS"; then
13135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13136$as_echo "$XARGS" >&6; }
13137else
13138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13139$as_echo "no" >&6; }
13140fi
13141
13142
13143          if test "x$XARGS" = x; then
13144            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13145          fi
13146        else
13147          # Otherwise we believe it is a complete path. Use it as it is.
13148          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13149$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13150          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13151$as_echo_n "checking for XARGS... " >&6; }
13152          if test ! -x "$tool_specified"; then
13153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13154$as_echo "not found" >&6; }
13155            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13156          fi
13157          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13158$as_echo "$tool_specified" >&6; }
13159        fi
13160      fi
13161    fi
13162
13163  fi
13164
13165
13166
13167  if test "x$XARGS" = x; then
13168    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13169  fi
13170
13171
13172
13173  # Then required tools that require some special treatment.
13174
13175
13176  # Publish this variable in the help.
13177
13178
13179  if [ -z "${AWK+x}" ]; then
13180    # The variable is not set by user, try to locate tool using the code snippet
13181    for ac_prog in gawk mawk nawk awk
13182do
13183  # Extract the first word of "$ac_prog", so it can be a program name with args.
13184set dummy $ac_prog; ac_word=$2
13185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13186$as_echo_n "checking for $ac_word... " >&6; }
13187if ${ac_cv_prog_AWK+:} false; then :
13188  $as_echo_n "(cached) " >&6
13189else
13190  if test -n "$AWK"; then
13191  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13192else
13193as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13194for as_dir in $PATH
13195do
13196  IFS=$as_save_IFS
13197  test -z "$as_dir" && as_dir=.
13198    for ac_exec_ext in '' $ac_executable_extensions; do
13199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13200    ac_cv_prog_AWK="$ac_prog"
13201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13202    break 2
13203  fi
13204done
13205  done
13206IFS=$as_save_IFS
13207
13208fi
13209fi
13210AWK=$ac_cv_prog_AWK
13211if test -n "$AWK"; then
13212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13213$as_echo "$AWK" >&6; }
13214else
13215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13216$as_echo "no" >&6; }
13217fi
13218
13219
13220  test -n "$AWK" && break
13221done
13222
13223  else
13224    # The variable is set, but is it from the command line or the environment?
13225
13226    # Try to remove the string !AWK! from our list.
13227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13229      # If it failed, the variable was not from the command line. Ignore it,
13230      # but warn the user (except for BASH, which is always set by the calling BASH).
13231      if test "xAWK" != xBASH; then
13232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13233$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13234      fi
13235      # Try to locate tool using the code snippet
13236      for ac_prog in gawk mawk nawk awk
13237do
13238  # Extract the first word of "$ac_prog", so it can be a program name with args.
13239set dummy $ac_prog; ac_word=$2
13240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13241$as_echo_n "checking for $ac_word... " >&6; }
13242if ${ac_cv_prog_AWK+:} false; then :
13243  $as_echo_n "(cached) " >&6
13244else
13245  if test -n "$AWK"; then
13246  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13247else
13248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13249for as_dir in $PATH
13250do
13251  IFS=$as_save_IFS
13252  test -z "$as_dir" && as_dir=.
13253    for ac_exec_ext in '' $ac_executable_extensions; do
13254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13255    ac_cv_prog_AWK="$ac_prog"
13256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13257    break 2
13258  fi
13259done
13260  done
13261IFS=$as_save_IFS
13262
13263fi
13264fi
13265AWK=$ac_cv_prog_AWK
13266if test -n "$AWK"; then
13267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13268$as_echo "$AWK" >&6; }
13269else
13270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13271$as_echo "no" >&6; }
13272fi
13273
13274
13275  test -n "$AWK" && break
13276done
13277
13278    else
13279      # If it succeeded, then it was overridden by the user. We will use it
13280      # for the tool.
13281
13282      # First remove it from the list of overridden variables, so we can test
13283      # for unknown variables in the end.
13284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13285
13286      # Check if we try to supply an empty value
13287      if test "x$AWK" = x; then
13288        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13289$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13291$as_echo_n "checking for AWK... " >&6; }
13292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13293$as_echo "disabled" >&6; }
13294      else
13295        # Check if the provided tool contains a complete path.
13296        tool_specified="$AWK"
13297        tool_basename="${tool_specified##*/}"
13298        if test "x$tool_basename" = "x$tool_specified"; then
13299          # A command without a complete path is provided, search $PATH.
13300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13301$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13302          # Extract the first word of "$tool_basename", so it can be a program name with args.
13303set dummy $tool_basename; ac_word=$2
13304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13305$as_echo_n "checking for $ac_word... " >&6; }
13306if ${ac_cv_path_AWK+:} false; then :
13307  $as_echo_n "(cached) " >&6
13308else
13309  case $AWK in
13310  [\\/]* | ?:[\\/]*)
13311  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13312  ;;
13313  *)
13314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13315for as_dir in $PATH
13316do
13317  IFS=$as_save_IFS
13318  test -z "$as_dir" && as_dir=.
13319    for ac_exec_ext in '' $ac_executable_extensions; do
13320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13321    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13323    break 2
13324  fi
13325done
13326  done
13327IFS=$as_save_IFS
13328
13329  ;;
13330esac
13331fi
13332AWK=$ac_cv_path_AWK
13333if test -n "$AWK"; then
13334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13335$as_echo "$AWK" >&6; }
13336else
13337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13338$as_echo "no" >&6; }
13339fi
13340
13341
13342          if test "x$AWK" = x; then
13343            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13344          fi
13345        else
13346          # Otherwise we believe it is a complete path. Use it as it is.
13347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13348$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13349          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13350$as_echo_n "checking for AWK... " >&6; }
13351          if test ! -x "$tool_specified"; then
13352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13353$as_echo "not found" >&6; }
13354            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13355          fi
13356          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13357$as_echo "$tool_specified" >&6; }
13358        fi
13359      fi
13360    fi
13361
13362  fi
13363
13364
13365  if test "x$AWK" = x; then
13366    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13367  fi
13368
13369
13370
13371
13372  # Publish this variable in the help.
13373
13374
13375  if [ -z "${GREP+x}" ]; then
13376    # The variable is not set by user, try to locate tool using the code snippet
13377    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13378$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13379if ${ac_cv_path_GREP+:} false; then :
13380  $as_echo_n "(cached) " >&6
13381else
13382  if test -z "$GREP"; then
13383  ac_path_GREP_found=false
13384  # Loop through the user's path and test for each of PROGNAME-LIST
13385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13386for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13387do
13388  IFS=$as_save_IFS
13389  test -z "$as_dir" && as_dir=.
13390    for ac_prog in grep ggrep; do
13391    for ac_exec_ext in '' $ac_executable_extensions; do
13392      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13393      as_fn_executable_p "$ac_path_GREP" || continue
13394# Check for GNU ac_path_GREP and select it if it is found.
13395  # Check for GNU $ac_path_GREP
13396case `"$ac_path_GREP" --version 2>&1` in
13397*GNU*)
13398  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13399*)
13400  ac_count=0
13401  $as_echo_n 0123456789 >"conftest.in"
13402  while :
13403  do
13404    cat "conftest.in" "conftest.in" >"conftest.tmp"
13405    mv "conftest.tmp" "conftest.in"
13406    cp "conftest.in" "conftest.nl"
13407    $as_echo 'GREP' >> "conftest.nl"
13408    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13409    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13410    as_fn_arith $ac_count + 1 && ac_count=$as_val
13411    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13412      # Best one so far, save it but keep looking for a better one
13413      ac_cv_path_GREP="$ac_path_GREP"
13414      ac_path_GREP_max=$ac_count
13415    fi
13416    # 10*(2^10) chars as input seems more than enough
13417    test $ac_count -gt 10 && break
13418  done
13419  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13420esac
13421
13422      $ac_path_GREP_found && break 3
13423    done
13424  done
13425  done
13426IFS=$as_save_IFS
13427  if test -z "$ac_cv_path_GREP"; then
13428    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13429  fi
13430else
13431  ac_cv_path_GREP=$GREP
13432fi
13433
13434fi
13435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13436$as_echo "$ac_cv_path_GREP" >&6; }
13437 GREP="$ac_cv_path_GREP"
13438
13439
13440  else
13441    # The variable is set, but is it from the command line or the environment?
13442
13443    # Try to remove the string !GREP! from our list.
13444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13446      # If it failed, the variable was not from the command line. Ignore it,
13447      # but warn the user (except for BASH, which is always set by the calling BASH).
13448      if test "xGREP" != xBASH; then
13449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13450$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13451      fi
13452      # Try to locate tool using the code snippet
13453      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13454$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13455if ${ac_cv_path_GREP+:} false; then :
13456  $as_echo_n "(cached) " >&6
13457else
13458  if test -z "$GREP"; then
13459  ac_path_GREP_found=false
13460  # Loop through the user's path and test for each of PROGNAME-LIST
13461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13462for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13463do
13464  IFS=$as_save_IFS
13465  test -z "$as_dir" && as_dir=.
13466    for ac_prog in grep ggrep; do
13467    for ac_exec_ext in '' $ac_executable_extensions; do
13468      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13469      as_fn_executable_p "$ac_path_GREP" || continue
13470# Check for GNU ac_path_GREP and select it if it is found.
13471  # Check for GNU $ac_path_GREP
13472case `"$ac_path_GREP" --version 2>&1` in
13473*GNU*)
13474  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13475*)
13476  ac_count=0
13477  $as_echo_n 0123456789 >"conftest.in"
13478  while :
13479  do
13480    cat "conftest.in" "conftest.in" >"conftest.tmp"
13481    mv "conftest.tmp" "conftest.in"
13482    cp "conftest.in" "conftest.nl"
13483    $as_echo 'GREP' >> "conftest.nl"
13484    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13485    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13486    as_fn_arith $ac_count + 1 && ac_count=$as_val
13487    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13488      # Best one so far, save it but keep looking for a better one
13489      ac_cv_path_GREP="$ac_path_GREP"
13490      ac_path_GREP_max=$ac_count
13491    fi
13492    # 10*(2^10) chars as input seems more than enough
13493    test $ac_count -gt 10 && break
13494  done
13495  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13496esac
13497
13498      $ac_path_GREP_found && break 3
13499    done
13500  done
13501  done
13502IFS=$as_save_IFS
13503  if test -z "$ac_cv_path_GREP"; then
13504    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13505  fi
13506else
13507  ac_cv_path_GREP=$GREP
13508fi
13509
13510fi
13511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13512$as_echo "$ac_cv_path_GREP" >&6; }
13513 GREP="$ac_cv_path_GREP"
13514
13515
13516    else
13517      # If it succeeded, then it was overridden by the user. We will use it
13518      # for the tool.
13519
13520      # First remove it from the list of overridden variables, so we can test
13521      # for unknown variables in the end.
13522      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13523
13524      # Check if we try to supply an empty value
13525      if test "x$GREP" = x; then
13526        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13527$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13529$as_echo_n "checking for GREP... " >&6; }
13530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13531$as_echo "disabled" >&6; }
13532      else
13533        # Check if the provided tool contains a complete path.
13534        tool_specified="$GREP"
13535        tool_basename="${tool_specified##*/}"
13536        if test "x$tool_basename" = "x$tool_specified"; then
13537          # A command without a complete path is provided, search $PATH.
13538          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13539$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13540          # Extract the first word of "$tool_basename", so it can be a program name with args.
13541set dummy $tool_basename; ac_word=$2
13542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13543$as_echo_n "checking for $ac_word... " >&6; }
13544if ${ac_cv_path_GREP+:} false; then :
13545  $as_echo_n "(cached) " >&6
13546else
13547  case $GREP in
13548  [\\/]* | ?:[\\/]*)
13549  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13550  ;;
13551  *)
13552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13553for as_dir in $PATH
13554do
13555  IFS=$as_save_IFS
13556  test -z "$as_dir" && as_dir=.
13557    for ac_exec_ext in '' $ac_executable_extensions; do
13558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13559    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13561    break 2
13562  fi
13563done
13564  done
13565IFS=$as_save_IFS
13566
13567  ;;
13568esac
13569fi
13570GREP=$ac_cv_path_GREP
13571if test -n "$GREP"; then
13572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13573$as_echo "$GREP" >&6; }
13574else
13575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13576$as_echo "no" >&6; }
13577fi
13578
13579
13580          if test "x$GREP" = x; then
13581            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13582          fi
13583        else
13584          # Otherwise we believe it is a complete path. Use it as it is.
13585          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13586$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13587          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13588$as_echo_n "checking for GREP... " >&6; }
13589          if test ! -x "$tool_specified"; then
13590            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13591$as_echo "not found" >&6; }
13592            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13593          fi
13594          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13595$as_echo "$tool_specified" >&6; }
13596        fi
13597      fi
13598    fi
13599
13600  fi
13601
13602
13603  if test "x$GREP" = x; then
13604    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13605  fi
13606
13607
13608
13609
13610  # Publish this variable in the help.
13611
13612
13613  if [ -z "${EGREP+x}" ]; then
13614    # The variable is not set by user, try to locate tool using the code snippet
13615    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13616$as_echo_n "checking for egrep... " >&6; }
13617if ${ac_cv_path_EGREP+:} false; then :
13618  $as_echo_n "(cached) " >&6
13619else
13620  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13621   then ac_cv_path_EGREP="$GREP -E"
13622   else
13623     if test -z "$EGREP"; then
13624  ac_path_EGREP_found=false
13625  # Loop through the user's path and test for each of PROGNAME-LIST
13626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13627for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13628do
13629  IFS=$as_save_IFS
13630  test -z "$as_dir" && as_dir=.
13631    for ac_prog in egrep; do
13632    for ac_exec_ext in '' $ac_executable_extensions; do
13633      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13634      as_fn_executable_p "$ac_path_EGREP" || continue
13635# Check for GNU ac_path_EGREP and select it if it is found.
13636  # Check for GNU $ac_path_EGREP
13637case `"$ac_path_EGREP" --version 2>&1` in
13638*GNU*)
13639  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13640*)
13641  ac_count=0
13642  $as_echo_n 0123456789 >"conftest.in"
13643  while :
13644  do
13645    cat "conftest.in" "conftest.in" >"conftest.tmp"
13646    mv "conftest.tmp" "conftest.in"
13647    cp "conftest.in" "conftest.nl"
13648    $as_echo 'EGREP' >> "conftest.nl"
13649    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13650    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13651    as_fn_arith $ac_count + 1 && ac_count=$as_val
13652    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13653      # Best one so far, save it but keep looking for a better one
13654      ac_cv_path_EGREP="$ac_path_EGREP"
13655      ac_path_EGREP_max=$ac_count
13656    fi
13657    # 10*(2^10) chars as input seems more than enough
13658    test $ac_count -gt 10 && break
13659  done
13660  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13661esac
13662
13663      $ac_path_EGREP_found && break 3
13664    done
13665  done
13666  done
13667IFS=$as_save_IFS
13668  if test -z "$ac_cv_path_EGREP"; then
13669    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13670  fi
13671else
13672  ac_cv_path_EGREP=$EGREP
13673fi
13674
13675   fi
13676fi
13677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13678$as_echo "$ac_cv_path_EGREP" >&6; }
13679 EGREP="$ac_cv_path_EGREP"
13680
13681
13682  else
13683    # The variable is set, but is it from the command line or the environment?
13684
13685    # Try to remove the string !EGREP! from our list.
13686    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13687    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13688      # If it failed, the variable was not from the command line. Ignore it,
13689      # but warn the user (except for BASH, which is always set by the calling BASH).
13690      if test "xEGREP" != xBASH; then
13691        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13692$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13693      fi
13694      # Try to locate tool using the code snippet
13695      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13696$as_echo_n "checking for egrep... " >&6; }
13697if ${ac_cv_path_EGREP+:} false; then :
13698  $as_echo_n "(cached) " >&6
13699else
13700  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13701   then ac_cv_path_EGREP="$GREP -E"
13702   else
13703     if test -z "$EGREP"; then
13704  ac_path_EGREP_found=false
13705  # Loop through the user's path and test for each of PROGNAME-LIST
13706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13707for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13708do
13709  IFS=$as_save_IFS
13710  test -z "$as_dir" && as_dir=.
13711    for ac_prog in egrep; do
13712    for ac_exec_ext in '' $ac_executable_extensions; do
13713      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13714      as_fn_executable_p "$ac_path_EGREP" || continue
13715# Check for GNU ac_path_EGREP and select it if it is found.
13716  # Check for GNU $ac_path_EGREP
13717case `"$ac_path_EGREP" --version 2>&1` in
13718*GNU*)
13719  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13720*)
13721  ac_count=0
13722  $as_echo_n 0123456789 >"conftest.in"
13723  while :
13724  do
13725    cat "conftest.in" "conftest.in" >"conftest.tmp"
13726    mv "conftest.tmp" "conftest.in"
13727    cp "conftest.in" "conftest.nl"
13728    $as_echo 'EGREP' >> "conftest.nl"
13729    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13730    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13731    as_fn_arith $ac_count + 1 && ac_count=$as_val
13732    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13733      # Best one so far, save it but keep looking for a better one
13734      ac_cv_path_EGREP="$ac_path_EGREP"
13735      ac_path_EGREP_max=$ac_count
13736    fi
13737    # 10*(2^10) chars as input seems more than enough
13738    test $ac_count -gt 10 && break
13739  done
13740  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13741esac
13742
13743      $ac_path_EGREP_found && break 3
13744    done
13745  done
13746  done
13747IFS=$as_save_IFS
13748  if test -z "$ac_cv_path_EGREP"; then
13749    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13750  fi
13751else
13752  ac_cv_path_EGREP=$EGREP
13753fi
13754
13755   fi
13756fi
13757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13758$as_echo "$ac_cv_path_EGREP" >&6; }
13759 EGREP="$ac_cv_path_EGREP"
13760
13761
13762    else
13763      # If it succeeded, then it was overridden by the user. We will use it
13764      # for the tool.
13765
13766      # First remove it from the list of overridden variables, so we can test
13767      # for unknown variables in the end.
13768      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13769
13770      # Check if we try to supply an empty value
13771      if test "x$EGREP" = x; then
13772        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13773$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13774        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13775$as_echo_n "checking for EGREP... " >&6; }
13776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13777$as_echo "disabled" >&6; }
13778      else
13779        # Check if the provided tool contains a complete path.
13780        tool_specified="$EGREP"
13781        tool_basename="${tool_specified##*/}"
13782        if test "x$tool_basename" = "x$tool_specified"; then
13783          # A command without a complete path is provided, search $PATH.
13784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13785$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13786          # Extract the first word of "$tool_basename", so it can be a program name with args.
13787set dummy $tool_basename; ac_word=$2
13788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13789$as_echo_n "checking for $ac_word... " >&6; }
13790if ${ac_cv_path_EGREP+:} false; then :
13791  $as_echo_n "(cached) " >&6
13792else
13793  case $EGREP in
13794  [\\/]* | ?:[\\/]*)
13795  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13796  ;;
13797  *)
13798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13799for as_dir in $PATH
13800do
13801  IFS=$as_save_IFS
13802  test -z "$as_dir" && as_dir=.
13803    for ac_exec_ext in '' $ac_executable_extensions; do
13804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13805    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13807    break 2
13808  fi
13809done
13810  done
13811IFS=$as_save_IFS
13812
13813  ;;
13814esac
13815fi
13816EGREP=$ac_cv_path_EGREP
13817if test -n "$EGREP"; then
13818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13819$as_echo "$EGREP" >&6; }
13820else
13821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13822$as_echo "no" >&6; }
13823fi
13824
13825
13826          if test "x$EGREP" = x; then
13827            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13828          fi
13829        else
13830          # Otherwise we believe it is a complete path. Use it as it is.
13831          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13832$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13833          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13834$as_echo_n "checking for EGREP... " >&6; }
13835          if test ! -x "$tool_specified"; then
13836            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13837$as_echo "not found" >&6; }
13838            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13839          fi
13840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13841$as_echo "$tool_specified" >&6; }
13842        fi
13843      fi
13844    fi
13845
13846  fi
13847
13848
13849  if test "x$EGREP" = x; then
13850    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13851  fi
13852
13853
13854
13855
13856  # Publish this variable in the help.
13857
13858
13859  if [ -z "${FGREP+x}" ]; then
13860    # The variable is not set by user, try to locate tool using the code snippet
13861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13862$as_echo_n "checking for fgrep... " >&6; }
13863if ${ac_cv_path_FGREP+:} false; then :
13864  $as_echo_n "(cached) " >&6
13865else
13866  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13867   then ac_cv_path_FGREP="$GREP -F"
13868   else
13869     if test -z "$FGREP"; then
13870  ac_path_FGREP_found=false
13871  # Loop through the user's path and test for each of PROGNAME-LIST
13872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13873for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13874do
13875  IFS=$as_save_IFS
13876  test -z "$as_dir" && as_dir=.
13877    for ac_prog in fgrep; do
13878    for ac_exec_ext in '' $ac_executable_extensions; do
13879      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13880      as_fn_executable_p "$ac_path_FGREP" || continue
13881# Check for GNU ac_path_FGREP and select it if it is found.
13882  # Check for GNU $ac_path_FGREP
13883case `"$ac_path_FGREP" --version 2>&1` in
13884*GNU*)
13885  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13886*)
13887  ac_count=0
13888  $as_echo_n 0123456789 >"conftest.in"
13889  while :
13890  do
13891    cat "conftest.in" "conftest.in" >"conftest.tmp"
13892    mv "conftest.tmp" "conftest.in"
13893    cp "conftest.in" "conftest.nl"
13894    $as_echo 'FGREP' >> "conftest.nl"
13895    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13896    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13897    as_fn_arith $ac_count + 1 && ac_count=$as_val
13898    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13899      # Best one so far, save it but keep looking for a better one
13900      ac_cv_path_FGREP="$ac_path_FGREP"
13901      ac_path_FGREP_max=$ac_count
13902    fi
13903    # 10*(2^10) chars as input seems more than enough
13904    test $ac_count -gt 10 && break
13905  done
13906  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13907esac
13908
13909      $ac_path_FGREP_found && break 3
13910    done
13911  done
13912  done
13913IFS=$as_save_IFS
13914  if test -z "$ac_cv_path_FGREP"; then
13915    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13916  fi
13917else
13918  ac_cv_path_FGREP=$FGREP
13919fi
13920
13921   fi
13922fi
13923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13924$as_echo "$ac_cv_path_FGREP" >&6; }
13925 FGREP="$ac_cv_path_FGREP"
13926
13927
13928  else
13929    # The variable is set, but is it from the command line or the environment?
13930
13931    # Try to remove the string !FGREP! from our list.
13932    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13933    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13934      # If it failed, the variable was not from the command line. Ignore it,
13935      # but warn the user (except for BASH, which is always set by the calling BASH).
13936      if test "xFGREP" != xBASH; then
13937        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13938$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13939      fi
13940      # Try to locate tool using the code snippet
13941      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13942$as_echo_n "checking for fgrep... " >&6; }
13943if ${ac_cv_path_FGREP+:} false; then :
13944  $as_echo_n "(cached) " >&6
13945else
13946  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13947   then ac_cv_path_FGREP="$GREP -F"
13948   else
13949     if test -z "$FGREP"; then
13950  ac_path_FGREP_found=false
13951  # Loop through the user's path and test for each of PROGNAME-LIST
13952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13953for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13954do
13955  IFS=$as_save_IFS
13956  test -z "$as_dir" && as_dir=.
13957    for ac_prog in fgrep; do
13958    for ac_exec_ext in '' $ac_executable_extensions; do
13959      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13960      as_fn_executable_p "$ac_path_FGREP" || continue
13961# Check for GNU ac_path_FGREP and select it if it is found.
13962  # Check for GNU $ac_path_FGREP
13963case `"$ac_path_FGREP" --version 2>&1` in
13964*GNU*)
13965  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13966*)
13967  ac_count=0
13968  $as_echo_n 0123456789 >"conftest.in"
13969  while :
13970  do
13971    cat "conftest.in" "conftest.in" >"conftest.tmp"
13972    mv "conftest.tmp" "conftest.in"
13973    cp "conftest.in" "conftest.nl"
13974    $as_echo 'FGREP' >> "conftest.nl"
13975    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13976    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13977    as_fn_arith $ac_count + 1 && ac_count=$as_val
13978    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13979      # Best one so far, save it but keep looking for a better one
13980      ac_cv_path_FGREP="$ac_path_FGREP"
13981      ac_path_FGREP_max=$ac_count
13982    fi
13983    # 10*(2^10) chars as input seems more than enough
13984    test $ac_count -gt 10 && break
13985  done
13986  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13987esac
13988
13989      $ac_path_FGREP_found && break 3
13990    done
13991  done
13992  done
13993IFS=$as_save_IFS
13994  if test -z "$ac_cv_path_FGREP"; then
13995    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13996  fi
13997else
13998  ac_cv_path_FGREP=$FGREP
13999fi
14000
14001   fi
14002fi
14003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14004$as_echo "$ac_cv_path_FGREP" >&6; }
14005 FGREP="$ac_cv_path_FGREP"
14006
14007
14008    else
14009      # If it succeeded, then it was overridden by the user. We will use it
14010      # for the tool.
14011
14012      # First remove it from the list of overridden variables, so we can test
14013      # for unknown variables in the end.
14014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14015
14016      # Check if we try to supply an empty value
14017      if test "x$FGREP" = x; then
14018        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14019$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14020        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14021$as_echo_n "checking for FGREP... " >&6; }
14022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14023$as_echo "disabled" >&6; }
14024      else
14025        # Check if the provided tool contains a complete path.
14026        tool_specified="$FGREP"
14027        tool_basename="${tool_specified##*/}"
14028        if test "x$tool_basename" = "x$tool_specified"; then
14029          # A command without a complete path is provided, search $PATH.
14030          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14031$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14032          # Extract the first word of "$tool_basename", so it can be a program name with args.
14033set dummy $tool_basename; ac_word=$2
14034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14035$as_echo_n "checking for $ac_word... " >&6; }
14036if ${ac_cv_path_FGREP+:} false; then :
14037  $as_echo_n "(cached) " >&6
14038else
14039  case $FGREP in
14040  [\\/]* | ?:[\\/]*)
14041  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14042  ;;
14043  *)
14044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14045for as_dir in $PATH
14046do
14047  IFS=$as_save_IFS
14048  test -z "$as_dir" && as_dir=.
14049    for ac_exec_ext in '' $ac_executable_extensions; do
14050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14051    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14053    break 2
14054  fi
14055done
14056  done
14057IFS=$as_save_IFS
14058
14059  ;;
14060esac
14061fi
14062FGREP=$ac_cv_path_FGREP
14063if test -n "$FGREP"; then
14064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14065$as_echo "$FGREP" >&6; }
14066else
14067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14068$as_echo "no" >&6; }
14069fi
14070
14071
14072          if test "x$FGREP" = x; then
14073            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14074          fi
14075        else
14076          # Otherwise we believe it is a complete path. Use it as it is.
14077          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14078$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14079          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14080$as_echo_n "checking for FGREP... " >&6; }
14081          if test ! -x "$tool_specified"; then
14082            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14083$as_echo "not found" >&6; }
14084            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14085          fi
14086          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14087$as_echo "$tool_specified" >&6; }
14088        fi
14089      fi
14090    fi
14091
14092  fi
14093
14094
14095  if test "x$FGREP" = x; then
14096    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14097  fi
14098
14099
14100
14101
14102  # Publish this variable in the help.
14103
14104
14105  if [ -z "${SED+x}" ]; then
14106    # The variable is not set by user, try to locate tool using the code snippet
14107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14108$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14109if ${ac_cv_path_SED+:} false; then :
14110  $as_echo_n "(cached) " >&6
14111else
14112            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14113     for ac_i in 1 2 3 4 5 6 7; do
14114       ac_script="$ac_script$as_nl$ac_script"
14115     done
14116     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14117     { ac_script=; unset ac_script;}
14118     if test -z "$SED"; then
14119  ac_path_SED_found=false
14120  # Loop through the user's path and test for each of PROGNAME-LIST
14121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14122for as_dir in $PATH
14123do
14124  IFS=$as_save_IFS
14125  test -z "$as_dir" && as_dir=.
14126    for ac_prog in sed gsed; do
14127    for ac_exec_ext in '' $ac_executable_extensions; do
14128      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14129      as_fn_executable_p "$ac_path_SED" || continue
14130# Check for GNU ac_path_SED and select it if it is found.
14131  # Check for GNU $ac_path_SED
14132case `"$ac_path_SED" --version 2>&1` in
14133*GNU*)
14134  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14135*)
14136  ac_count=0
14137  $as_echo_n 0123456789 >"conftest.in"
14138  while :
14139  do
14140    cat "conftest.in" "conftest.in" >"conftest.tmp"
14141    mv "conftest.tmp" "conftest.in"
14142    cp "conftest.in" "conftest.nl"
14143    $as_echo '' >> "conftest.nl"
14144    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14145    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14146    as_fn_arith $ac_count + 1 && ac_count=$as_val
14147    if test $ac_count -gt ${ac_path_SED_max-0}; then
14148      # Best one so far, save it but keep looking for a better one
14149      ac_cv_path_SED="$ac_path_SED"
14150      ac_path_SED_max=$ac_count
14151    fi
14152    # 10*(2^10) chars as input seems more than enough
14153    test $ac_count -gt 10 && break
14154  done
14155  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14156esac
14157
14158      $ac_path_SED_found && break 3
14159    done
14160  done
14161  done
14162IFS=$as_save_IFS
14163  if test -z "$ac_cv_path_SED"; then
14164    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14165  fi
14166else
14167  ac_cv_path_SED=$SED
14168fi
14169
14170fi
14171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14172$as_echo "$ac_cv_path_SED" >&6; }
14173 SED="$ac_cv_path_SED"
14174  rm -f conftest.sed
14175
14176  else
14177    # The variable is set, but is it from the command line or the environment?
14178
14179    # Try to remove the string !SED! from our list.
14180    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14181    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14182      # If it failed, the variable was not from the command line. Ignore it,
14183      # but warn the user (except for BASH, which is always set by the calling BASH).
14184      if test "xSED" != xBASH; then
14185        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14186$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14187      fi
14188      # Try to locate tool using the code snippet
14189      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14190$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14191if ${ac_cv_path_SED+:} false; then :
14192  $as_echo_n "(cached) " >&6
14193else
14194            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14195     for ac_i in 1 2 3 4 5 6 7; do
14196       ac_script="$ac_script$as_nl$ac_script"
14197     done
14198     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14199     { ac_script=; unset ac_script;}
14200     if test -z "$SED"; then
14201  ac_path_SED_found=false
14202  # Loop through the user's path and test for each of PROGNAME-LIST
14203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14204for as_dir in $PATH
14205do
14206  IFS=$as_save_IFS
14207  test -z "$as_dir" && as_dir=.
14208    for ac_prog in sed gsed; do
14209    for ac_exec_ext in '' $ac_executable_extensions; do
14210      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14211      as_fn_executable_p "$ac_path_SED" || continue
14212# Check for GNU ac_path_SED and select it if it is found.
14213  # Check for GNU $ac_path_SED
14214case `"$ac_path_SED" --version 2>&1` in
14215*GNU*)
14216  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14217*)
14218  ac_count=0
14219  $as_echo_n 0123456789 >"conftest.in"
14220  while :
14221  do
14222    cat "conftest.in" "conftest.in" >"conftest.tmp"
14223    mv "conftest.tmp" "conftest.in"
14224    cp "conftest.in" "conftest.nl"
14225    $as_echo '' >> "conftest.nl"
14226    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14227    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14228    as_fn_arith $ac_count + 1 && ac_count=$as_val
14229    if test $ac_count -gt ${ac_path_SED_max-0}; then
14230      # Best one so far, save it but keep looking for a better one
14231      ac_cv_path_SED="$ac_path_SED"
14232      ac_path_SED_max=$ac_count
14233    fi
14234    # 10*(2^10) chars as input seems more than enough
14235    test $ac_count -gt 10 && break
14236  done
14237  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14238esac
14239
14240      $ac_path_SED_found && break 3
14241    done
14242  done
14243  done
14244IFS=$as_save_IFS
14245  if test -z "$ac_cv_path_SED"; then
14246    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14247  fi
14248else
14249  ac_cv_path_SED=$SED
14250fi
14251
14252fi
14253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14254$as_echo "$ac_cv_path_SED" >&6; }
14255 SED="$ac_cv_path_SED"
14256  rm -f conftest.sed
14257
14258    else
14259      # If it succeeded, then it was overridden by the user. We will use it
14260      # for the tool.
14261
14262      # First remove it from the list of overridden variables, so we can test
14263      # for unknown variables in the end.
14264      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14265
14266      # Check if we try to supply an empty value
14267      if test "x$SED" = x; then
14268        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14269$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14270        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14271$as_echo_n "checking for SED... " >&6; }
14272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14273$as_echo "disabled" >&6; }
14274      else
14275        # Check if the provided tool contains a complete path.
14276        tool_specified="$SED"
14277        tool_basename="${tool_specified##*/}"
14278        if test "x$tool_basename" = "x$tool_specified"; then
14279          # A command without a complete path is provided, search $PATH.
14280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14281$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14282          # Extract the first word of "$tool_basename", so it can be a program name with args.
14283set dummy $tool_basename; ac_word=$2
14284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14285$as_echo_n "checking for $ac_word... " >&6; }
14286if ${ac_cv_path_SED+:} false; then :
14287  $as_echo_n "(cached) " >&6
14288else
14289  case $SED in
14290  [\\/]* | ?:[\\/]*)
14291  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14292  ;;
14293  *)
14294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14295for as_dir in $PATH
14296do
14297  IFS=$as_save_IFS
14298  test -z "$as_dir" && as_dir=.
14299    for ac_exec_ext in '' $ac_executable_extensions; do
14300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14301    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14303    break 2
14304  fi
14305done
14306  done
14307IFS=$as_save_IFS
14308
14309  ;;
14310esac
14311fi
14312SED=$ac_cv_path_SED
14313if test -n "$SED"; then
14314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14315$as_echo "$SED" >&6; }
14316else
14317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14318$as_echo "no" >&6; }
14319fi
14320
14321
14322          if test "x$SED" = x; then
14323            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14324          fi
14325        else
14326          # Otherwise we believe it is a complete path. Use it as it is.
14327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14328$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14329          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14330$as_echo_n "checking for SED... " >&6; }
14331          if test ! -x "$tool_specified"; then
14332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14333$as_echo "not found" >&6; }
14334            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14335          fi
14336          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14337$as_echo "$tool_specified" >&6; }
14338        fi
14339      fi
14340    fi
14341
14342  fi
14343
14344
14345  if test "x$SED" = x; then
14346    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14347  fi
14348
14349
14350
14351  # Always force rm.
14352  RM="$RM -f"
14353
14354  # pwd behaves differently on various platforms and some don't support the -L flag.
14355  # Always use the bash builtin pwd to get uniform behavior.
14356  THEPWDCMD=pwd
14357
14358  # These are not required on all platforms
14359
14360
14361  # Publish this variable in the help.
14362
14363
14364  if [ -z "${CYGPATH+x}" ]; then
14365    # The variable is not set by user, try to locate tool using the code snippet
14366    for ac_prog in cygpath
14367do
14368  # Extract the first word of "$ac_prog", so it can be a program name with args.
14369set dummy $ac_prog; ac_word=$2
14370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14371$as_echo_n "checking for $ac_word... " >&6; }
14372if ${ac_cv_path_CYGPATH+:} false; then :
14373  $as_echo_n "(cached) " >&6
14374else
14375  case $CYGPATH in
14376  [\\/]* | ?:[\\/]*)
14377  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14378  ;;
14379  *)
14380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14381for as_dir in $PATH
14382do
14383  IFS=$as_save_IFS
14384  test -z "$as_dir" && as_dir=.
14385    for ac_exec_ext in '' $ac_executable_extensions; do
14386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14387    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14389    break 2
14390  fi
14391done
14392  done
14393IFS=$as_save_IFS
14394
14395  ;;
14396esac
14397fi
14398CYGPATH=$ac_cv_path_CYGPATH
14399if test -n "$CYGPATH"; then
14400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14401$as_echo "$CYGPATH" >&6; }
14402else
14403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14404$as_echo "no" >&6; }
14405fi
14406
14407
14408  test -n "$CYGPATH" && break
14409done
14410
14411  else
14412    # The variable is set, but is it from the command line or the environment?
14413
14414    # Try to remove the string !CYGPATH! from our list.
14415    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14416    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14417      # If it failed, the variable was not from the command line. Ignore it,
14418      # but warn the user (except for BASH, which is always set by the calling BASH).
14419      if test "xCYGPATH" != xBASH; then
14420        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14421$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14422      fi
14423      # Try to locate tool using the code snippet
14424      for ac_prog in cygpath
14425do
14426  # Extract the first word of "$ac_prog", so it can be a program name with args.
14427set dummy $ac_prog; ac_word=$2
14428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14429$as_echo_n "checking for $ac_word... " >&6; }
14430if ${ac_cv_path_CYGPATH+:} false; then :
14431  $as_echo_n "(cached) " >&6
14432else
14433  case $CYGPATH in
14434  [\\/]* | ?:[\\/]*)
14435  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14436  ;;
14437  *)
14438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14439for as_dir in $PATH
14440do
14441  IFS=$as_save_IFS
14442  test -z "$as_dir" && as_dir=.
14443    for ac_exec_ext in '' $ac_executable_extensions; do
14444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14445    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14447    break 2
14448  fi
14449done
14450  done
14451IFS=$as_save_IFS
14452
14453  ;;
14454esac
14455fi
14456CYGPATH=$ac_cv_path_CYGPATH
14457if test -n "$CYGPATH"; then
14458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14459$as_echo "$CYGPATH" >&6; }
14460else
14461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14462$as_echo "no" >&6; }
14463fi
14464
14465
14466  test -n "$CYGPATH" && break
14467done
14468
14469    else
14470      # If it succeeded, then it was overridden by the user. We will use it
14471      # for the tool.
14472
14473      # First remove it from the list of overridden variables, so we can test
14474      # for unknown variables in the end.
14475      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14476
14477      # Check if we try to supply an empty value
14478      if test "x$CYGPATH" = x; then
14479        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14480$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14482$as_echo_n "checking for CYGPATH... " >&6; }
14483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14484$as_echo "disabled" >&6; }
14485      else
14486        # Check if the provided tool contains a complete path.
14487        tool_specified="$CYGPATH"
14488        tool_basename="${tool_specified##*/}"
14489        if test "x$tool_basename" = "x$tool_specified"; then
14490          # A command without a complete path is provided, search $PATH.
14491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14492$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14493          # Extract the first word of "$tool_basename", so it can be a program name with args.
14494set dummy $tool_basename; ac_word=$2
14495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14496$as_echo_n "checking for $ac_word... " >&6; }
14497if ${ac_cv_path_CYGPATH+:} false; then :
14498  $as_echo_n "(cached) " >&6
14499else
14500  case $CYGPATH in
14501  [\\/]* | ?:[\\/]*)
14502  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14503  ;;
14504  *)
14505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14506for as_dir in $PATH
14507do
14508  IFS=$as_save_IFS
14509  test -z "$as_dir" && as_dir=.
14510    for ac_exec_ext in '' $ac_executable_extensions; do
14511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14512    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14514    break 2
14515  fi
14516done
14517  done
14518IFS=$as_save_IFS
14519
14520  ;;
14521esac
14522fi
14523CYGPATH=$ac_cv_path_CYGPATH
14524if test -n "$CYGPATH"; then
14525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14526$as_echo "$CYGPATH" >&6; }
14527else
14528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14529$as_echo "no" >&6; }
14530fi
14531
14532
14533          if test "x$CYGPATH" = x; then
14534            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14535          fi
14536        else
14537          # Otherwise we believe it is a complete path. Use it as it is.
14538          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14539$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14540          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14541$as_echo_n "checking for CYGPATH... " >&6; }
14542          if test ! -x "$tool_specified"; then
14543            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14544$as_echo "not found" >&6; }
14545            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14546          fi
14547          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14548$as_echo "$tool_specified" >&6; }
14549        fi
14550      fi
14551    fi
14552
14553  fi
14554
14555
14556
14557
14558  # Publish this variable in the help.
14559
14560
14561  if [ -z "${READLINK+x}" ]; then
14562    # The variable is not set by user, try to locate tool using the code snippet
14563    for ac_prog in greadlink readlink
14564do
14565  # Extract the first word of "$ac_prog", so it can be a program name with args.
14566set dummy $ac_prog; ac_word=$2
14567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14568$as_echo_n "checking for $ac_word... " >&6; }
14569if ${ac_cv_path_READLINK+:} false; then :
14570  $as_echo_n "(cached) " >&6
14571else
14572  case $READLINK in
14573  [\\/]* | ?:[\\/]*)
14574  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14575  ;;
14576  *)
14577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14578for as_dir in $PATH
14579do
14580  IFS=$as_save_IFS
14581  test -z "$as_dir" && as_dir=.
14582    for ac_exec_ext in '' $ac_executable_extensions; do
14583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14584    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14586    break 2
14587  fi
14588done
14589  done
14590IFS=$as_save_IFS
14591
14592  ;;
14593esac
14594fi
14595READLINK=$ac_cv_path_READLINK
14596if test -n "$READLINK"; then
14597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14598$as_echo "$READLINK" >&6; }
14599else
14600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14601$as_echo "no" >&6; }
14602fi
14603
14604
14605  test -n "$READLINK" && break
14606done
14607
14608  else
14609    # The variable is set, but is it from the command line or the environment?
14610
14611    # Try to remove the string !READLINK! from our list.
14612    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14613    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14614      # If it failed, the variable was not from the command line. Ignore it,
14615      # but warn the user (except for BASH, which is always set by the calling BASH).
14616      if test "xREADLINK" != xBASH; then
14617        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14618$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14619      fi
14620      # Try to locate tool using the code snippet
14621      for ac_prog in greadlink readlink
14622do
14623  # Extract the first word of "$ac_prog", so it can be a program name with args.
14624set dummy $ac_prog; ac_word=$2
14625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14626$as_echo_n "checking for $ac_word... " >&6; }
14627if ${ac_cv_path_READLINK+:} false; then :
14628  $as_echo_n "(cached) " >&6
14629else
14630  case $READLINK in
14631  [\\/]* | ?:[\\/]*)
14632  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14633  ;;
14634  *)
14635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14636for as_dir in $PATH
14637do
14638  IFS=$as_save_IFS
14639  test -z "$as_dir" && as_dir=.
14640    for ac_exec_ext in '' $ac_executable_extensions; do
14641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14642    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14644    break 2
14645  fi
14646done
14647  done
14648IFS=$as_save_IFS
14649
14650  ;;
14651esac
14652fi
14653READLINK=$ac_cv_path_READLINK
14654if test -n "$READLINK"; then
14655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14656$as_echo "$READLINK" >&6; }
14657else
14658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14659$as_echo "no" >&6; }
14660fi
14661
14662
14663  test -n "$READLINK" && break
14664done
14665
14666    else
14667      # If it succeeded, then it was overridden by the user. We will use it
14668      # for the tool.
14669
14670      # First remove it from the list of overridden variables, so we can test
14671      # for unknown variables in the end.
14672      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14673
14674      # Check if we try to supply an empty value
14675      if test "x$READLINK" = x; then
14676        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14677$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14679$as_echo_n "checking for READLINK... " >&6; }
14680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14681$as_echo "disabled" >&6; }
14682      else
14683        # Check if the provided tool contains a complete path.
14684        tool_specified="$READLINK"
14685        tool_basename="${tool_specified##*/}"
14686        if test "x$tool_basename" = "x$tool_specified"; then
14687          # A command without a complete path is provided, search $PATH.
14688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14689$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14690          # Extract the first word of "$tool_basename", so it can be a program name with args.
14691set dummy $tool_basename; ac_word=$2
14692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14693$as_echo_n "checking for $ac_word... " >&6; }
14694if ${ac_cv_path_READLINK+:} false; then :
14695  $as_echo_n "(cached) " >&6
14696else
14697  case $READLINK in
14698  [\\/]* | ?:[\\/]*)
14699  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14700  ;;
14701  *)
14702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14703for as_dir in $PATH
14704do
14705  IFS=$as_save_IFS
14706  test -z "$as_dir" && as_dir=.
14707    for ac_exec_ext in '' $ac_executable_extensions; do
14708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14709    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14711    break 2
14712  fi
14713done
14714  done
14715IFS=$as_save_IFS
14716
14717  ;;
14718esac
14719fi
14720READLINK=$ac_cv_path_READLINK
14721if test -n "$READLINK"; then
14722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14723$as_echo "$READLINK" >&6; }
14724else
14725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14726$as_echo "no" >&6; }
14727fi
14728
14729
14730          if test "x$READLINK" = x; then
14731            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14732          fi
14733        else
14734          # Otherwise we believe it is a complete path. Use it as it is.
14735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14736$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14737          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14738$as_echo_n "checking for READLINK... " >&6; }
14739          if test ! -x "$tool_specified"; then
14740            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14741$as_echo "not found" >&6; }
14742            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14743          fi
14744          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14745$as_echo "$tool_specified" >&6; }
14746        fi
14747      fi
14748    fi
14749
14750  fi
14751
14752
14753
14754
14755  # Publish this variable in the help.
14756
14757
14758  if [ -z "${DF+x}" ]; then
14759    # The variable is not set by user, try to locate tool using the code snippet
14760    for ac_prog in df
14761do
14762  # Extract the first word of "$ac_prog", so it can be a program name with args.
14763set dummy $ac_prog; ac_word=$2
14764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14765$as_echo_n "checking for $ac_word... " >&6; }
14766if ${ac_cv_path_DF+:} false; then :
14767  $as_echo_n "(cached) " >&6
14768else
14769  case $DF in
14770  [\\/]* | ?:[\\/]*)
14771  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14772  ;;
14773  *)
14774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14775for as_dir in $PATH
14776do
14777  IFS=$as_save_IFS
14778  test -z "$as_dir" && as_dir=.
14779    for ac_exec_ext in '' $ac_executable_extensions; do
14780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14781    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14783    break 2
14784  fi
14785done
14786  done
14787IFS=$as_save_IFS
14788
14789  ;;
14790esac
14791fi
14792DF=$ac_cv_path_DF
14793if test -n "$DF"; then
14794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14795$as_echo "$DF" >&6; }
14796else
14797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14798$as_echo "no" >&6; }
14799fi
14800
14801
14802  test -n "$DF" && break
14803done
14804
14805  else
14806    # The variable is set, but is it from the command line or the environment?
14807
14808    # Try to remove the string !DF! from our list.
14809    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14810    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14811      # If it failed, the variable was not from the command line. Ignore it,
14812      # but warn the user (except for BASH, which is always set by the calling BASH).
14813      if test "xDF" != xBASH; then
14814        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14815$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14816      fi
14817      # Try to locate tool using the code snippet
14818      for ac_prog in df
14819do
14820  # Extract the first word of "$ac_prog", so it can be a program name with args.
14821set dummy $ac_prog; ac_word=$2
14822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14823$as_echo_n "checking for $ac_word... " >&6; }
14824if ${ac_cv_path_DF+:} false; then :
14825  $as_echo_n "(cached) " >&6
14826else
14827  case $DF in
14828  [\\/]* | ?:[\\/]*)
14829  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14830  ;;
14831  *)
14832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14833for as_dir in $PATH
14834do
14835  IFS=$as_save_IFS
14836  test -z "$as_dir" && as_dir=.
14837    for ac_exec_ext in '' $ac_executable_extensions; do
14838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14839    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14841    break 2
14842  fi
14843done
14844  done
14845IFS=$as_save_IFS
14846
14847  ;;
14848esac
14849fi
14850DF=$ac_cv_path_DF
14851if test -n "$DF"; then
14852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14853$as_echo "$DF" >&6; }
14854else
14855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14856$as_echo "no" >&6; }
14857fi
14858
14859
14860  test -n "$DF" && break
14861done
14862
14863    else
14864      # If it succeeded, then it was overridden by the user. We will use it
14865      # for the tool.
14866
14867      # First remove it from the list of overridden variables, so we can test
14868      # for unknown variables in the end.
14869      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14870
14871      # Check if we try to supply an empty value
14872      if test "x$DF" = x; then
14873        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14874$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14875        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14876$as_echo_n "checking for DF... " >&6; }
14877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14878$as_echo "disabled" >&6; }
14879      else
14880        # Check if the provided tool contains a complete path.
14881        tool_specified="$DF"
14882        tool_basename="${tool_specified##*/}"
14883        if test "x$tool_basename" = "x$tool_specified"; then
14884          # A command without a complete path is provided, search $PATH.
14885          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14886$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14887          # Extract the first word of "$tool_basename", so it can be a program name with args.
14888set dummy $tool_basename; ac_word=$2
14889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14890$as_echo_n "checking for $ac_word... " >&6; }
14891if ${ac_cv_path_DF+:} false; then :
14892  $as_echo_n "(cached) " >&6
14893else
14894  case $DF in
14895  [\\/]* | ?:[\\/]*)
14896  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14897  ;;
14898  *)
14899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14900for as_dir in $PATH
14901do
14902  IFS=$as_save_IFS
14903  test -z "$as_dir" && as_dir=.
14904    for ac_exec_ext in '' $ac_executable_extensions; do
14905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14906    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14908    break 2
14909  fi
14910done
14911  done
14912IFS=$as_save_IFS
14913
14914  ;;
14915esac
14916fi
14917DF=$ac_cv_path_DF
14918if test -n "$DF"; then
14919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14920$as_echo "$DF" >&6; }
14921else
14922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14923$as_echo "no" >&6; }
14924fi
14925
14926
14927          if test "x$DF" = x; then
14928            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14929          fi
14930        else
14931          # Otherwise we believe it is a complete path. Use it as it is.
14932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14933$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14934          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14935$as_echo_n "checking for DF... " >&6; }
14936          if test ! -x "$tool_specified"; then
14937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14938$as_echo "not found" >&6; }
14939            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14940          fi
14941          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14942$as_echo "$tool_specified" >&6; }
14943        fi
14944      fi
14945    fi
14946
14947  fi
14948
14949
14950
14951
14952  # Publish this variable in the help.
14953
14954
14955  if [ -z "${CPIO+x}" ]; then
14956    # The variable is not set by user, try to locate tool using the code snippet
14957    for ac_prog in cpio bsdcpio
14958do
14959  # Extract the first word of "$ac_prog", so it can be a program name with args.
14960set dummy $ac_prog; ac_word=$2
14961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14962$as_echo_n "checking for $ac_word... " >&6; }
14963if ${ac_cv_path_CPIO+:} false; then :
14964  $as_echo_n "(cached) " >&6
14965else
14966  case $CPIO in
14967  [\\/]* | ?:[\\/]*)
14968  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14969  ;;
14970  *)
14971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14972for as_dir in $PATH
14973do
14974  IFS=$as_save_IFS
14975  test -z "$as_dir" && as_dir=.
14976    for ac_exec_ext in '' $ac_executable_extensions; do
14977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14978    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14980    break 2
14981  fi
14982done
14983  done
14984IFS=$as_save_IFS
14985
14986  ;;
14987esac
14988fi
14989CPIO=$ac_cv_path_CPIO
14990if test -n "$CPIO"; then
14991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14992$as_echo "$CPIO" >&6; }
14993else
14994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14995$as_echo "no" >&6; }
14996fi
14997
14998
14999  test -n "$CPIO" && break
15000done
15001
15002  else
15003    # The variable is set, but is it from the command line or the environment?
15004
15005    # Try to remove the string !CPIO! from our list.
15006    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15007    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15008      # If it failed, the variable was not from the command line. Ignore it,
15009      # but warn the user (except for BASH, which is always set by the calling BASH).
15010      if test "xCPIO" != xBASH; then
15011        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15012$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15013      fi
15014      # Try to locate tool using the code snippet
15015      for ac_prog in cpio bsdcpio
15016do
15017  # Extract the first word of "$ac_prog", so it can be a program name with args.
15018set dummy $ac_prog; ac_word=$2
15019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15020$as_echo_n "checking for $ac_word... " >&6; }
15021if ${ac_cv_path_CPIO+:} false; then :
15022  $as_echo_n "(cached) " >&6
15023else
15024  case $CPIO in
15025  [\\/]* | ?:[\\/]*)
15026  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15027  ;;
15028  *)
15029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15030for as_dir in $PATH
15031do
15032  IFS=$as_save_IFS
15033  test -z "$as_dir" && as_dir=.
15034    for ac_exec_ext in '' $ac_executable_extensions; do
15035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15036    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15038    break 2
15039  fi
15040done
15041  done
15042IFS=$as_save_IFS
15043
15044  ;;
15045esac
15046fi
15047CPIO=$ac_cv_path_CPIO
15048if test -n "$CPIO"; then
15049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15050$as_echo "$CPIO" >&6; }
15051else
15052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15053$as_echo "no" >&6; }
15054fi
15055
15056
15057  test -n "$CPIO" && break
15058done
15059
15060    else
15061      # If it succeeded, then it was overridden by the user. We will use it
15062      # for the tool.
15063
15064      # First remove it from the list of overridden variables, so we can test
15065      # for unknown variables in the end.
15066      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15067
15068      # Check if we try to supply an empty value
15069      if test "x$CPIO" = x; then
15070        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15071$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15072        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15073$as_echo_n "checking for CPIO... " >&6; }
15074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15075$as_echo "disabled" >&6; }
15076      else
15077        # Check if the provided tool contains a complete path.
15078        tool_specified="$CPIO"
15079        tool_basename="${tool_specified##*/}"
15080        if test "x$tool_basename" = "x$tool_specified"; then
15081          # A command without a complete path is provided, search $PATH.
15082          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15083$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15084          # Extract the first word of "$tool_basename", so it can be a program name with args.
15085set dummy $tool_basename; ac_word=$2
15086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15087$as_echo_n "checking for $ac_word... " >&6; }
15088if ${ac_cv_path_CPIO+:} false; then :
15089  $as_echo_n "(cached) " >&6
15090else
15091  case $CPIO in
15092  [\\/]* | ?:[\\/]*)
15093  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15094  ;;
15095  *)
15096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15097for as_dir in $PATH
15098do
15099  IFS=$as_save_IFS
15100  test -z "$as_dir" && as_dir=.
15101    for ac_exec_ext in '' $ac_executable_extensions; do
15102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15103    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15105    break 2
15106  fi
15107done
15108  done
15109IFS=$as_save_IFS
15110
15111  ;;
15112esac
15113fi
15114CPIO=$ac_cv_path_CPIO
15115if test -n "$CPIO"; then
15116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15117$as_echo "$CPIO" >&6; }
15118else
15119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15120$as_echo "no" >&6; }
15121fi
15122
15123
15124          if test "x$CPIO" = x; then
15125            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15126          fi
15127        else
15128          # Otherwise we believe it is a complete path. Use it as it is.
15129          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15130$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15131          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15132$as_echo_n "checking for CPIO... " >&6; }
15133          if test ! -x "$tool_specified"; then
15134            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15135$as_echo "not found" >&6; }
15136            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15137          fi
15138          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15139$as_echo "$tool_specified" >&6; }
15140        fi
15141      fi
15142    fi
15143
15144  fi
15145
15146
15147
15148
15149  # Publish this variable in the help.
15150
15151
15152  if [ -z "${NICE+x}" ]; then
15153    # The variable is not set by user, try to locate tool using the code snippet
15154    for ac_prog in nice
15155do
15156  # Extract the first word of "$ac_prog", so it can be a program name with args.
15157set dummy $ac_prog; ac_word=$2
15158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15159$as_echo_n "checking for $ac_word... " >&6; }
15160if ${ac_cv_path_NICE+:} false; then :
15161  $as_echo_n "(cached) " >&6
15162else
15163  case $NICE in
15164  [\\/]* | ?:[\\/]*)
15165  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15166  ;;
15167  *)
15168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15169for as_dir in $PATH
15170do
15171  IFS=$as_save_IFS
15172  test -z "$as_dir" && as_dir=.
15173    for ac_exec_ext in '' $ac_executable_extensions; do
15174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15175    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15177    break 2
15178  fi
15179done
15180  done
15181IFS=$as_save_IFS
15182
15183  ;;
15184esac
15185fi
15186NICE=$ac_cv_path_NICE
15187if test -n "$NICE"; then
15188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15189$as_echo "$NICE" >&6; }
15190else
15191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15192$as_echo "no" >&6; }
15193fi
15194
15195
15196  test -n "$NICE" && break
15197done
15198
15199  else
15200    # The variable is set, but is it from the command line or the environment?
15201
15202    # Try to remove the string !NICE! from our list.
15203    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15204    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15205      # If it failed, the variable was not from the command line. Ignore it,
15206      # but warn the user (except for BASH, which is always set by the calling BASH).
15207      if test "xNICE" != xBASH; then
15208        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15209$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15210      fi
15211      # Try to locate tool using the code snippet
15212      for ac_prog in nice
15213do
15214  # Extract the first word of "$ac_prog", so it can be a program name with args.
15215set dummy $ac_prog; ac_word=$2
15216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15217$as_echo_n "checking for $ac_word... " >&6; }
15218if ${ac_cv_path_NICE+:} false; then :
15219  $as_echo_n "(cached) " >&6
15220else
15221  case $NICE in
15222  [\\/]* | ?:[\\/]*)
15223  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15224  ;;
15225  *)
15226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15227for as_dir in $PATH
15228do
15229  IFS=$as_save_IFS
15230  test -z "$as_dir" && as_dir=.
15231    for ac_exec_ext in '' $ac_executable_extensions; do
15232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15233    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15235    break 2
15236  fi
15237done
15238  done
15239IFS=$as_save_IFS
15240
15241  ;;
15242esac
15243fi
15244NICE=$ac_cv_path_NICE
15245if test -n "$NICE"; then
15246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15247$as_echo "$NICE" >&6; }
15248else
15249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15250$as_echo "no" >&6; }
15251fi
15252
15253
15254  test -n "$NICE" && break
15255done
15256
15257    else
15258      # If it succeeded, then it was overridden by the user. We will use it
15259      # for the tool.
15260
15261      # First remove it from the list of overridden variables, so we can test
15262      # for unknown variables in the end.
15263      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15264
15265      # Check if we try to supply an empty value
15266      if test "x$NICE" = x; then
15267        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15268$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15269        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15270$as_echo_n "checking for NICE... " >&6; }
15271        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15272$as_echo "disabled" >&6; }
15273      else
15274        # Check if the provided tool contains a complete path.
15275        tool_specified="$NICE"
15276        tool_basename="${tool_specified##*/}"
15277        if test "x$tool_basename" = "x$tool_specified"; then
15278          # A command without a complete path is provided, search $PATH.
15279          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15280$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15281          # Extract the first word of "$tool_basename", so it can be a program name with args.
15282set dummy $tool_basename; ac_word=$2
15283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15284$as_echo_n "checking for $ac_word... " >&6; }
15285if ${ac_cv_path_NICE+:} false; then :
15286  $as_echo_n "(cached) " >&6
15287else
15288  case $NICE in
15289  [\\/]* | ?:[\\/]*)
15290  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15291  ;;
15292  *)
15293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15294for as_dir in $PATH
15295do
15296  IFS=$as_save_IFS
15297  test -z "$as_dir" && as_dir=.
15298    for ac_exec_ext in '' $ac_executable_extensions; do
15299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15300    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15302    break 2
15303  fi
15304done
15305  done
15306IFS=$as_save_IFS
15307
15308  ;;
15309esac
15310fi
15311NICE=$ac_cv_path_NICE
15312if test -n "$NICE"; then
15313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15314$as_echo "$NICE" >&6; }
15315else
15316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15317$as_echo "no" >&6; }
15318fi
15319
15320
15321          if test "x$NICE" = x; then
15322            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15323          fi
15324        else
15325          # Otherwise we believe it is a complete path. Use it as it is.
15326          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15327$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15328          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15329$as_echo_n "checking for NICE... " >&6; }
15330          if test ! -x "$tool_specified"; then
15331            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15332$as_echo "not found" >&6; }
15333            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15334          fi
15335          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15336$as_echo "$tool_specified" >&6; }
15337        fi
15338      fi
15339    fi
15340
15341  fi
15342
15343
15344
15345
15346  # Publish this variable in the help.
15347
15348
15349  if [ -z "${PANDOC+x}" ]; then
15350    # The variable is not set by user, try to locate tool using the code snippet
15351    for ac_prog in pandoc
15352do
15353  # Extract the first word of "$ac_prog", so it can be a program name with args.
15354set dummy $ac_prog; ac_word=$2
15355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15356$as_echo_n "checking for $ac_word... " >&6; }
15357if ${ac_cv_path_PANDOC+:} false; then :
15358  $as_echo_n "(cached) " >&6
15359else
15360  case $PANDOC in
15361  [\\/]* | ?:[\\/]*)
15362  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15363  ;;
15364  *)
15365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15366for as_dir in $PATH
15367do
15368  IFS=$as_save_IFS
15369  test -z "$as_dir" && as_dir=.
15370    for ac_exec_ext in '' $ac_executable_extensions; do
15371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15372    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15374    break 2
15375  fi
15376done
15377  done
15378IFS=$as_save_IFS
15379
15380  ;;
15381esac
15382fi
15383PANDOC=$ac_cv_path_PANDOC
15384if test -n "$PANDOC"; then
15385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15386$as_echo "$PANDOC" >&6; }
15387else
15388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15389$as_echo "no" >&6; }
15390fi
15391
15392
15393  test -n "$PANDOC" && break
15394done
15395
15396  else
15397    # The variable is set, but is it from the command line or the environment?
15398
15399    # Try to remove the string !PANDOC! from our list.
15400    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15401    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15402      # If it failed, the variable was not from the command line. Ignore it,
15403      # but warn the user (except for BASH, which is always set by the calling BASH).
15404      if test "xPANDOC" != xBASH; then
15405        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15406$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15407      fi
15408      # Try to locate tool using the code snippet
15409      for ac_prog in pandoc
15410do
15411  # Extract the first word of "$ac_prog", so it can be a program name with args.
15412set dummy $ac_prog; ac_word=$2
15413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15414$as_echo_n "checking for $ac_word... " >&6; }
15415if ${ac_cv_path_PANDOC+:} false; then :
15416  $as_echo_n "(cached) " >&6
15417else
15418  case $PANDOC in
15419  [\\/]* | ?:[\\/]*)
15420  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15421  ;;
15422  *)
15423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15424for as_dir in $PATH
15425do
15426  IFS=$as_save_IFS
15427  test -z "$as_dir" && as_dir=.
15428    for ac_exec_ext in '' $ac_executable_extensions; do
15429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15430    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15432    break 2
15433  fi
15434done
15435  done
15436IFS=$as_save_IFS
15437
15438  ;;
15439esac
15440fi
15441PANDOC=$ac_cv_path_PANDOC
15442if test -n "$PANDOC"; then
15443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15444$as_echo "$PANDOC" >&6; }
15445else
15446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15447$as_echo "no" >&6; }
15448fi
15449
15450
15451  test -n "$PANDOC" && break
15452done
15453
15454    else
15455      # If it succeeded, then it was overridden by the user. We will use it
15456      # for the tool.
15457
15458      # First remove it from the list of overridden variables, so we can test
15459      # for unknown variables in the end.
15460      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15461
15462      # Check if we try to supply an empty value
15463      if test "x$PANDOC" = x; then
15464        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15465$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15466        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15467$as_echo_n "checking for PANDOC... " >&6; }
15468        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15469$as_echo "disabled" >&6; }
15470      else
15471        # Check if the provided tool contains a complete path.
15472        tool_specified="$PANDOC"
15473        tool_basename="${tool_specified##*/}"
15474        if test "x$tool_basename" = "x$tool_specified"; then
15475          # A command without a complete path is provided, search $PATH.
15476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15477$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15478          # Extract the first word of "$tool_basename", so it can be a program name with args.
15479set dummy $tool_basename; ac_word=$2
15480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15481$as_echo_n "checking for $ac_word... " >&6; }
15482if ${ac_cv_path_PANDOC+:} false; then :
15483  $as_echo_n "(cached) " >&6
15484else
15485  case $PANDOC in
15486  [\\/]* | ?:[\\/]*)
15487  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15488  ;;
15489  *)
15490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15491for as_dir in $PATH
15492do
15493  IFS=$as_save_IFS
15494  test -z "$as_dir" && as_dir=.
15495    for ac_exec_ext in '' $ac_executable_extensions; do
15496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15497    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15499    break 2
15500  fi
15501done
15502  done
15503IFS=$as_save_IFS
15504
15505  ;;
15506esac
15507fi
15508PANDOC=$ac_cv_path_PANDOC
15509if test -n "$PANDOC"; then
15510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15511$as_echo "$PANDOC" >&6; }
15512else
15513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15514$as_echo "no" >&6; }
15515fi
15516
15517
15518          if test "x$PANDOC" = x; then
15519            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15520          fi
15521        else
15522          # Otherwise we believe it is a complete path. Use it as it is.
15523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15524$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15525          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15526$as_echo_n "checking for PANDOC... " >&6; }
15527          if test ! -x "$tool_specified"; then
15528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15529$as_echo "not found" >&6; }
15530            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15531          fi
15532          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15533$as_echo "$tool_specified" >&6; }
15534        fi
15535      fi
15536    fi
15537
15538  fi
15539
15540
15541
15542
15543# Now we can determine OpenJDK build and target platforms. This is required to
15544# have early on.
15545# Make sure we can run config.sub.
15546$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15547  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15548
15549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15550$as_echo_n "checking build system type... " >&6; }
15551if ${ac_cv_build+:} false; then :
15552  $as_echo_n "(cached) " >&6
15553else
15554  ac_build_alias=$build_alias
15555test "x$ac_build_alias" = x &&
15556  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15557test "x$ac_build_alias" = x &&
15558  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15559ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15560  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15561
15562fi
15563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15564$as_echo "$ac_cv_build" >&6; }
15565case $ac_cv_build in
15566*-*-*) ;;
15567*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15568esac
15569build=$ac_cv_build
15570ac_save_IFS=$IFS; IFS='-'
15571set x $ac_cv_build
15572shift
15573build_cpu=$1
15574build_vendor=$2
15575shift; shift
15576# Remember, the first character of IFS is used to create $*,
15577# except with old shells:
15578build_os=$*
15579IFS=$ac_save_IFS
15580case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15581
15582
15583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15584$as_echo_n "checking host system type... " >&6; }
15585if ${ac_cv_host+:} false; then :
15586  $as_echo_n "(cached) " >&6
15587else
15588  if test "x$host_alias" = x; then
15589  ac_cv_host=$ac_cv_build
15590else
15591  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15592    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15593fi
15594
15595fi
15596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15597$as_echo "$ac_cv_host" >&6; }
15598case $ac_cv_host in
15599*-*-*) ;;
15600*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15601esac
15602host=$ac_cv_host
15603ac_save_IFS=$IFS; IFS='-'
15604set x $ac_cv_host
15605shift
15606host_cpu=$1
15607host_vendor=$2
15608shift; shift
15609# Remember, the first character of IFS is used to create $*,
15610# except with old shells:
15611host_os=$*
15612IFS=$ac_save_IFS
15613case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15614
15615
15616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15617$as_echo_n "checking target system type... " >&6; }
15618if ${ac_cv_target+:} false; then :
15619  $as_echo_n "(cached) " >&6
15620else
15621  if test "x$target_alias" = x; then
15622  ac_cv_target=$ac_cv_host
15623else
15624  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15625    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15626fi
15627
15628fi
15629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15630$as_echo "$ac_cv_target" >&6; }
15631case $ac_cv_target in
15632*-*-*) ;;
15633*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15634esac
15635target=$ac_cv_target
15636ac_save_IFS=$IFS; IFS='-'
15637set x $ac_cv_target
15638shift
15639target_cpu=$1
15640target_vendor=$2
15641shift; shift
15642# Remember, the first character of IFS is used to create $*,
15643# except with old shells:
15644target_os=$*
15645IFS=$ac_save_IFS
15646case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15647
15648
15649# The aliases save the names the user supplied, while $host etc.
15650# will get canonicalized.
15651test -n "$target_alias" &&
15652  test "$program_prefix$program_suffix$program_transform_name" = \
15653    NONENONEs,x,x, &&
15654  program_prefix=${target_alias}-
15655
15656  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15657  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15658  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15659  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15660  # to use the configure naming style.
15661
15662
15663
15664
15665
15666  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15667  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15668  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15669  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15670  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15671  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15672
15673
15674
15675  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15676
15677  case "$build_os" in
15678    *linux*)
15679      VAR_OS=linux
15680      VAR_OS_TYPE=unix
15681      ;;
15682    *solaris*)
15683      VAR_OS=solaris
15684      VAR_OS_TYPE=unix
15685      ;;
15686    *darwin*)
15687      VAR_OS=macosx
15688      VAR_OS_TYPE=unix
15689      ;;
15690    *bsd*)
15691      VAR_OS=bsd
15692      VAR_OS_TYPE=unix
15693      ;;
15694    *cygwin*)
15695      VAR_OS=windows
15696      VAR_OS_ENV=windows.cygwin
15697      ;;
15698    *mingw*)
15699      VAR_OS=windows
15700      VAR_OS_ENV=windows.msys
15701      ;;
15702    *aix*)
15703      VAR_OS=aix
15704      VAR_OS_TYPE=unix
15705      ;;
15706    *)
15707      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15708      ;;
15709  esac
15710
15711
15712  # First argument is the cpu name from the trip/quad
15713  case "$build_cpu" in
15714    x86_64)
15715      VAR_CPU=x86_64
15716      VAR_CPU_ARCH=x86
15717      VAR_CPU_BITS=64
15718      VAR_CPU_ENDIAN=little
15719      ;;
15720    i?86)
15721      VAR_CPU=x86
15722      VAR_CPU_ARCH=x86
15723      VAR_CPU_BITS=32
15724      VAR_CPU_ENDIAN=little
15725      ;;
15726    arm*)
15727      VAR_CPU=arm
15728      VAR_CPU_ARCH=arm
15729      VAR_CPU_BITS=32
15730      VAR_CPU_ENDIAN=little
15731      ;;
15732    aarch64)
15733      VAR_CPU=aarch64
15734      VAR_CPU_ARCH=aarch64
15735      VAR_CPU_BITS=64
15736      VAR_CPU_ENDIAN=little
15737      ;;
15738    powerpc)
15739      VAR_CPU=ppc
15740      VAR_CPU_ARCH=ppc
15741      VAR_CPU_BITS=32
15742      VAR_CPU_ENDIAN=big
15743      ;;
15744    powerpc64)
15745      VAR_CPU=ppc64
15746      VAR_CPU_ARCH=ppc
15747      VAR_CPU_BITS=64
15748      VAR_CPU_ENDIAN=big
15749      ;;
15750    powerpc64le)
15751      VAR_CPU=ppc64le
15752      VAR_CPU_ARCH=ppc
15753      VAR_CPU_BITS=64
15754      VAR_CPU_ENDIAN=little
15755      ;;
15756    s390)
15757      VAR_CPU=s390
15758      VAR_CPU_ARCH=s390
15759      VAR_CPU_BITS=32
15760      VAR_CPU_ENDIAN=big
15761      ;;
15762    s390x)
15763      VAR_CPU=s390x
15764      VAR_CPU_ARCH=s390
15765      VAR_CPU_BITS=64
15766      VAR_CPU_ENDIAN=big
15767      ;;
15768    sparc)
15769      VAR_CPU=sparc
15770      VAR_CPU_ARCH=sparc
15771      VAR_CPU_BITS=32
15772      VAR_CPU_ENDIAN=big
15773      ;;
15774    sparcv9|sparc64)
15775      VAR_CPU=sparcv9
15776      VAR_CPU_ARCH=sparc
15777      VAR_CPU_BITS=64
15778      VAR_CPU_ENDIAN=big
15779      ;;
15780    *)
15781      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15782      ;;
15783  esac
15784
15785  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15786  OPENJDK_BUILD_OS="$VAR_OS"
15787  if test "x$VAR_OS_TYPE" != x; then
15788    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15789  else
15790    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15791  fi
15792  if test "x$VAR_OS_ENV" != x; then
15793    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15794  else
15795    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15796  fi
15797  OPENJDK_BUILD_CPU="$VAR_CPU"
15798  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15799  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15800  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15801
15802
15803
15804
15805
15806
15807
15808
15809  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15810$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15812$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15813
15814  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15815
15816  case "$host_os" in
15817    *linux*)
15818      VAR_OS=linux
15819      VAR_OS_TYPE=unix
15820      ;;
15821    *solaris*)
15822      VAR_OS=solaris
15823      VAR_OS_TYPE=unix
15824      ;;
15825    *darwin*)
15826      VAR_OS=macosx
15827      VAR_OS_TYPE=unix
15828      ;;
15829    *bsd*)
15830      VAR_OS=bsd
15831      VAR_OS_TYPE=unix
15832      ;;
15833    *cygwin*)
15834      VAR_OS=windows
15835      VAR_OS_ENV=windows.cygwin
15836      ;;
15837    *mingw*)
15838      VAR_OS=windows
15839      VAR_OS_ENV=windows.msys
15840      ;;
15841    *aix*)
15842      VAR_OS=aix
15843      VAR_OS_TYPE=unix
15844      ;;
15845    *)
15846      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15847      ;;
15848  esac
15849
15850
15851  # First argument is the cpu name from the trip/quad
15852  case "$host_cpu" in
15853    x86_64)
15854      VAR_CPU=x86_64
15855      VAR_CPU_ARCH=x86
15856      VAR_CPU_BITS=64
15857      VAR_CPU_ENDIAN=little
15858      ;;
15859    i?86)
15860      VAR_CPU=x86
15861      VAR_CPU_ARCH=x86
15862      VAR_CPU_BITS=32
15863      VAR_CPU_ENDIAN=little
15864      ;;
15865    arm*)
15866      VAR_CPU=arm
15867      VAR_CPU_ARCH=arm
15868      VAR_CPU_BITS=32
15869      VAR_CPU_ENDIAN=little
15870      ;;
15871    aarch64)
15872      VAR_CPU=aarch64
15873      VAR_CPU_ARCH=aarch64
15874      VAR_CPU_BITS=64
15875      VAR_CPU_ENDIAN=little
15876      ;;
15877    powerpc)
15878      VAR_CPU=ppc
15879      VAR_CPU_ARCH=ppc
15880      VAR_CPU_BITS=32
15881      VAR_CPU_ENDIAN=big
15882      ;;
15883    powerpc64)
15884      VAR_CPU=ppc64
15885      VAR_CPU_ARCH=ppc
15886      VAR_CPU_BITS=64
15887      VAR_CPU_ENDIAN=big
15888      ;;
15889    powerpc64le)
15890      VAR_CPU=ppc64le
15891      VAR_CPU_ARCH=ppc
15892      VAR_CPU_BITS=64
15893      VAR_CPU_ENDIAN=little
15894      ;;
15895    s390)
15896      VAR_CPU=s390
15897      VAR_CPU_ARCH=s390
15898      VAR_CPU_BITS=32
15899      VAR_CPU_ENDIAN=big
15900      ;;
15901    s390x)
15902      VAR_CPU=s390x
15903      VAR_CPU_ARCH=s390
15904      VAR_CPU_BITS=64
15905      VAR_CPU_ENDIAN=big
15906      ;;
15907    sparc)
15908      VAR_CPU=sparc
15909      VAR_CPU_ARCH=sparc
15910      VAR_CPU_BITS=32
15911      VAR_CPU_ENDIAN=big
15912      ;;
15913    sparcv9|sparc64)
15914      VAR_CPU=sparcv9
15915      VAR_CPU_ARCH=sparc
15916      VAR_CPU_BITS=64
15917      VAR_CPU_ENDIAN=big
15918      ;;
15919    *)
15920      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15921      ;;
15922  esac
15923
15924  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15925  OPENJDK_TARGET_OS="$VAR_OS"
15926  if test "x$VAR_OS_TYPE" != x; then
15927    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15928  else
15929    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15930  fi
15931  if test "x$VAR_OS_ENV" != x; then
15932    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15933  else
15934    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15935  fi
15936  OPENJDK_TARGET_CPU="$VAR_CPU"
15937  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15938  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15939  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15940
15941
15942
15943
15944
15945
15946
15947
15948  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15949$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15951$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15952
15953
15954
15955# Check whether --with-target-bits was given.
15956if test "${with_target_bits+set}" = set; then :
15957  withval=$with_target_bits;
15958fi
15959
15960
15961  # We have three types of compiles:
15962  # native  == normal compilation, target system == build system
15963  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15964  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15965  #
15966  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15967    # We're doing a proper cross-compilation
15968    COMPILE_TYPE="cross"
15969  else
15970    COMPILE_TYPE="native"
15971  fi
15972
15973  if test "x$with_target_bits" != x; then
15974    if test "x$COMPILE_TYPE" = "xcross"; then
15975      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15976    fi
15977
15978    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15979      # A reduced build is requested
15980      COMPILE_TYPE="reduced"
15981      OPENJDK_TARGET_CPU_BITS=32
15982      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15983        OPENJDK_TARGET_CPU=x86
15984      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15985        OPENJDK_TARGET_CPU=sparc
15986      else
15987        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15988      fi
15989    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15990      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
15991    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15992      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15993$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15994    else
15995      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15996    fi
15997  fi
15998
15999
16000  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16001$as_echo_n "checking compilation type... " >&6; }
16002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16003$as_echo "$COMPILE_TYPE" >&6; }
16004
16005
16006  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16007    OPENJDK_MODULE_TARGET_OS_NAME="macos"
16008  else
16009    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16010  fi
16011
16012  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16013    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16014  else
16015    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16016  fi
16017
16018  OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16019
16020
16021
16022  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16023    RELEASE_FILE_OS_NAME=SunOS
16024  fi
16025  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16026    RELEASE_FILE_OS_NAME=Linux
16027  fi
16028  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16029    RELEASE_FILE_OS_NAME=Windows
16030  fi
16031  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16032    RELEASE_FILE_OS_NAME="Darwin"
16033  fi
16034  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16035    RELEASE_FILE_OS_NAME="AIX"
16036  fi
16037  RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16038
16039
16040
16041
16042
16043
16044  # Also store the legacy naming of the cpu.
16045  # Ie i586 and amd64 instead of x86 and x86_64
16046  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16047  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16048    OPENJDK_TARGET_CPU_LEGACY="i586"
16049  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16050    # On all platforms except MacOSX replace x86_64 with amd64.
16051    OPENJDK_TARGET_CPU_LEGACY="amd64"
16052  fi
16053
16054
16055  # And the second legacy naming of the cpu.
16056  # Ie i386 and amd64 instead of x86 and x86_64.
16057  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16058  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16059    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16060  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16061    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16062  fi
16063
16064
16065  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16066  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16067  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16068  OPENJDK_TARGET_CPU_ISADIR=""
16069  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16070    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16071      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16072    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16073      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16074    fi
16075  fi
16076
16077
16078  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16079  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16080  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16081    # On linux only, we replace x86 with i386.
16082    OPENJDK_TARGET_CPU_OSARCH="i386"
16083  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16084    # On all platforms except macosx, we replace x86_64 with amd64.
16085    OPENJDK_TARGET_CPU_OSARCH="amd64"
16086  fi
16087
16088
16089  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16090  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16091    OPENJDK_TARGET_CPU_JLI="i386"
16092  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16093    # On all platforms except macosx, we replace x86_64 with amd64.
16094    OPENJDK_TARGET_CPU_JLI="amd64"
16095  fi
16096
16097  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16098      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16099  else
16100      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16101  fi
16102
16103
16104  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16105  # Macosx is osx and x86_64 is x64
16106  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16107    OPENJDK_TARGET_OS_BUNDLE="osx"
16108  else
16109    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16110  fi
16111  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16112    OPENJDK_TARGET_CPU_BUNDLE="x64"
16113  else
16114    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16115  fi
16116  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16117
16118
16119  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16120    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16121    # unpack200.exe. This variable is used in
16122    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16123    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16124      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16125    fi
16126  fi
16127
16128  if test "x$COMPILE_TYPE" = "xcross"; then
16129    # FIXME: ... or should this include reduced builds..?
16130    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16131  else
16132    DEFINE_CROSS_COMPILE_ARCH=""
16133  fi
16134
16135
16136  # Convert openjdk platform names to hotspot names
16137
16138  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16139  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16140    HOTSPOT_TARGET_OS=bsd
16141  fi
16142
16143
16144  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16145  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16146    HOTSPOT_TARGET_OS_TYPE=posix
16147  fi
16148
16149
16150  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16151  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16152    HOTSPOT_TARGET_CPU=x86_32
16153  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16154    HOTSPOT_TARGET_CPU=sparc
16155  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16156    HOTSPOT_TARGET_CPU=ppc_64
16157  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16158    HOTSPOT_TARGET_CPU=ppc_64
16159  fi
16160
16161
16162  # This is identical with OPENJDK_*, but define anyway for consistency.
16163  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16164
16165
16166  # Setup HOTSPOT_TARGET_CPU_DEFINE
16167  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16168    HOTSPOT_TARGET_CPU_DEFINE=IA32
16169  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16170    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16171  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16172    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16173  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16174    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16175  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16176    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16177  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16178    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16179
16180  # The cpu defines below are for zero, we don't support them directly.
16181  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16182    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16183  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16184    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16185  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16186    HOTSPOT_TARGET_CPU_DEFINE=S390
16187  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16188    HOTSPOT_TARGET_CPU_DEFINE=S390
16189  elif test "x$OPENJDK_TARGET_CPU" != x; then
16190    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16191  fi
16192
16193
16194
16195
16196  # Also store the legacy naming of the cpu.
16197  # Ie i586 and amd64 instead of x86 and x86_64
16198  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16199  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16200    OPENJDK_BUILD_CPU_LEGACY="i586"
16201  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16202    # On all platforms except MacOSX replace x86_64 with amd64.
16203    OPENJDK_BUILD_CPU_LEGACY="amd64"
16204  fi
16205
16206
16207  # And the second legacy naming of the cpu.
16208  # Ie i386 and amd64 instead of x86 and x86_64.
16209  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16210  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16211    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16212  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16213    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16214  fi
16215
16216
16217  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16218  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16219  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16220  OPENJDK_BUILD_CPU_ISADIR=""
16221  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16222    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16223      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16224    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16225      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16226    fi
16227  fi
16228
16229
16230  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16231  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16232  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16233    # On linux only, we replace x86 with i386.
16234    OPENJDK_BUILD_CPU_OSARCH="i386"
16235  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16236    # On all platforms except macosx, we replace x86_64 with amd64.
16237    OPENJDK_BUILD_CPU_OSARCH="amd64"
16238  fi
16239
16240
16241  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16242  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16243    OPENJDK_BUILD_CPU_JLI="i386"
16244  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16245    # On all platforms except macosx, we replace x86_64 with amd64.
16246    OPENJDK_BUILD_CPU_JLI="amd64"
16247  fi
16248
16249  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16250      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16251  else
16252      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16253  fi
16254
16255
16256  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16257  # Macosx is osx and x86_64 is x64
16258  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16259    OPENJDK_BUILD_OS_BUNDLE="osx"
16260  else
16261    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16262  fi
16263  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16264    OPENJDK_BUILD_CPU_BUNDLE="x64"
16265  else
16266    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16267  fi
16268  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16269
16270
16271  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16272    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16273    # unpack200.exe. This variable is used in
16274    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16275    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16276      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16277    fi
16278  fi
16279
16280  if test "x$COMPILE_TYPE" = "xcross"; then
16281    # FIXME: ... or should this include reduced builds..?
16282    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16283  else
16284    DEFINE_CROSS_COMPILE_ARCH=""
16285  fi
16286
16287
16288  # Convert openjdk platform names to hotspot names
16289
16290  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16291  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16292    HOTSPOT_BUILD_OS=bsd
16293  fi
16294
16295
16296  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16297  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16298    HOTSPOT_BUILD_OS_TYPE=posix
16299  fi
16300
16301
16302  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16303  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16304    HOTSPOT_BUILD_CPU=x86_32
16305  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16306    HOTSPOT_BUILD_CPU=sparc
16307  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16308    HOTSPOT_BUILD_CPU=ppc_64
16309  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16310    HOTSPOT_BUILD_CPU=ppc_64
16311  fi
16312
16313
16314  # This is identical with OPENJDK_*, but define anyway for consistency.
16315  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16316
16317
16318  # Setup HOTSPOT_BUILD_CPU_DEFINE
16319  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16320    HOTSPOT_BUILD_CPU_DEFINE=IA32
16321  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16322    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16323  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16324    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16325  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16326    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16327  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16328    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16329  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16330    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16331
16332  # The cpu defines below are for zero, we don't support them directly.
16333  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16334    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16335  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16336    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16337  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16338    HOTSPOT_BUILD_CPU_DEFINE=S390
16339  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16340    HOTSPOT_BUILD_CPU_DEFINE=S390
16341  elif test "x$OPENJDK_BUILD_CPU" != x; then
16342    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16343  fi
16344
16345
16346
16347
16348
16349
16350# Continue setting up basic stuff. Most remaining code require fundamental tools.
16351
16352  # Save the current directory this script was started from
16353  CURDIR="$PWD"
16354
16355  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16356  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16357  # was not available at that time.
16358  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16359  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16360    ORIGINAL_PATH="$REWRITTEN_PATH"
16361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16362$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16363  fi
16364
16365  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16366    PATH_SEP=";"
16367
16368  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16369  if test $SRC_ROOT_LENGTH -gt 100; then
16370    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16371  fi
16372
16373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16374    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16375$as_echo_n "checking cygwin release... " >&6; }
16376    CYGWIN_VERSION=`$UNAME -r`
16377    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16378$as_echo "$CYGWIN_VERSION" >&6; }
16379    WINDOWS_ENV_VENDOR='cygwin'
16380    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16381
16382    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16383    if test "x$CYGWIN_VERSION_OLD" != x; then
16384      { $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
16385$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;}
16386      as_fn_error $? "Cannot continue" "$LINENO" 5
16387    fi
16388    if test "x$CYGPATH" = x; then
16389      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16390    fi
16391    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16392$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16393    # The cmd output ends with Windows line endings (CR/LF)
16394    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16395    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16396    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16398$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16399    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16400    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16401    if test "x$test_cygdrive_prefix" = x; then
16402      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16403    fi
16404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16406$as_echo_n "checking msys release... " >&6; }
16407    MSYS_VERSION=`$UNAME -r`
16408    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16409$as_echo "$MSYS_VERSION" >&6; }
16410
16411    WINDOWS_ENV_VENDOR='msys'
16412    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16413
16414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16415$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16416    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16417    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16418
16419  windows_path="$MSYS_ROOT_PATH"
16420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16421    unix_path=`$CYGPATH -u "$windows_path"`
16422    MSYS_ROOT_PATH="$unix_path"
16423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16425    MSYS_ROOT_PATH="$unix_path"
16426  fi
16427
16428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16429$as_echo "$MSYS_ROOT_PATH" >&6; }
16430    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16431  else
16432    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16433  fi
16434
16435  # Test if windows or unix (cygwin/msys) find is first in path.
16436  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16437$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16438  FIND_BINARY_OUTPUT=`find --version 2>&1`
16439  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16440    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16441$as_echo "unix style" >&6; }
16442  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16443    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16444$as_echo "Windows" >&6; }
16445    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16446$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16447    { $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
16448$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16449    as_fn_error $? "Cannot continue" "$LINENO" 5
16450  else
16451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16452$as_echo "unknown" >&6; }
16453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16454$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16455  fi
16456
16457  else
16458    PATH_SEP=":"
16459  fi
16460
16461
16462  # We get the top-level directory from the supporting wrappers.
16463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16464$as_echo_n "checking for top-level directory... " >&6; }
16465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16466$as_echo "$TOPDIR" >&6; }
16467
16468
16469  # Save the original version of TOPDIR for string comparisons
16470  ORIGINAL_TOPDIR="$TOPDIR"
16471
16472
16473  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16474
16475  # Only process if variable expands to non-empty
16476
16477  if test "x$CURDIR" != x; then
16478    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16479
16480  # Input might be given as Windows format, start by converting to
16481  # unix format.
16482  path="$CURDIR"
16483  new_path=`$CYGPATH -u "$path"`
16484
16485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16488  # "foo.exe" is OK but "foo" is an error.
16489  #
16490  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16491  # It is also a way to make sure we got the proper file name for the real test later on.
16492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16493  if test "x$test_shortpath" = x; then
16494    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16495$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16496    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16497  fi
16498
16499  # Call helper function which possibly converts this using DOS-style short mode.
16500  # If so, the updated path is stored in $new_path.
16501
16502  input_path="$new_path"
16503  # Check if we need to convert this using DOS-style short mode. If the path
16504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16505  # take no chances and rewrite it.
16506  # Note: m4 eats our [], so we need to use [ and ] instead.
16507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16508  if test "x$has_forbidden_chars" != x; then
16509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16513      # Going to short mode and back again did indeed matter. Since short mode is
16514      # case insensitive, let's make it lowercase to improve readability.
16515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16516      # Now convert it back to Unix-style (cygpath)
16517      input_path=`$CYGPATH -u "$shortmode_path"`
16518      new_path="$input_path"
16519    fi
16520  fi
16521
16522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16523  if test "x$test_cygdrive_prefix" = x; then
16524    # As a simple fix, exclude /usr/bin since it's not a real path.
16525    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16527      # a path prefixed by /cygdrive for fixpath to work.
16528      new_path="$CYGWIN_ROOT_PATH$input_path"
16529    fi
16530  fi
16531
16532
16533  if test "x$path" != "x$new_path"; then
16534    CURDIR="$new_path"
16535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16536$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16537  fi
16538
16539    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16540
16541  path="$CURDIR"
16542  has_colon=`$ECHO $path | $GREP ^.:`
16543  new_path="$path"
16544  if test "x$has_colon" = x; then
16545    # Not in mixed or Windows style, start by that.
16546    new_path=`cmd //c echo $path`
16547  fi
16548
16549
16550  input_path="$new_path"
16551  # Check if we need to convert this using DOS-style short mode. If the path
16552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16553  # take no chances and rewrite it.
16554  # Note: m4 eats our [], so we need to use [ and ] instead.
16555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16556  if test "x$has_forbidden_chars" != x; then
16557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16559  fi
16560
16561
16562  windows_path="$new_path"
16563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16564    unix_path=`$CYGPATH -u "$windows_path"`
16565    new_path="$unix_path"
16566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16568    new_path="$unix_path"
16569  fi
16570
16571  if test "x$path" != "x$new_path"; then
16572    CURDIR="$new_path"
16573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16574$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16575  fi
16576
16577  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16578  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16579
16580    else
16581      # We're on a unix platform. Hooray! :)
16582      path="$CURDIR"
16583      has_space=`$ECHO "$path" | $GREP " "`
16584      if test "x$has_space" != x; then
16585        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16586$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16587        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16588      fi
16589
16590      # Use eval to expand a potential ~
16591      eval path="$path"
16592      if test ! -f "$path" && test ! -d "$path"; then
16593        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16594      fi
16595
16596      if test -d "$path"; then
16597        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16598      else
16599        dir="`$DIRNAME "$path"`"
16600        base="`$BASENAME "$path"`"
16601        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16602      fi
16603    fi
16604  fi
16605
16606
16607  # Only process if variable expands to non-empty
16608
16609  if test "x$TOPDIR" != x; then
16610    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16611
16612  # Input might be given as Windows format, start by converting to
16613  # unix format.
16614  path="$TOPDIR"
16615  new_path=`$CYGPATH -u "$path"`
16616
16617  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16618  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16619  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16620  # "foo.exe" is OK but "foo" is an error.
16621  #
16622  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16623  # It is also a way to make sure we got the proper file name for the real test later on.
16624  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16625  if test "x$test_shortpath" = x; then
16626    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16627$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16628    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16629  fi
16630
16631  # Call helper function which possibly converts this using DOS-style short mode.
16632  # If so, the updated path is stored in $new_path.
16633
16634  input_path="$new_path"
16635  # Check if we need to convert this using DOS-style short mode. If the path
16636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16637  # take no chances and rewrite it.
16638  # Note: m4 eats our [], so we need to use [ and ] instead.
16639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16640  if test "x$has_forbidden_chars" != x; then
16641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16645      # Going to short mode and back again did indeed matter. Since short mode is
16646      # case insensitive, let's make it lowercase to improve readability.
16647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16648      # Now convert it back to Unix-style (cygpath)
16649      input_path=`$CYGPATH -u "$shortmode_path"`
16650      new_path="$input_path"
16651    fi
16652  fi
16653
16654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16655  if test "x$test_cygdrive_prefix" = x; then
16656    # As a simple fix, exclude /usr/bin since it's not a real path.
16657    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16659      # a path prefixed by /cygdrive for fixpath to work.
16660      new_path="$CYGWIN_ROOT_PATH$input_path"
16661    fi
16662  fi
16663
16664
16665  if test "x$path" != "x$new_path"; then
16666    TOPDIR="$new_path"
16667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16668$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16669  fi
16670
16671    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16672
16673  path="$TOPDIR"
16674  has_colon=`$ECHO $path | $GREP ^.:`
16675  new_path="$path"
16676  if test "x$has_colon" = x; then
16677    # Not in mixed or Windows style, start by that.
16678    new_path=`cmd //c echo $path`
16679  fi
16680
16681
16682  input_path="$new_path"
16683  # Check if we need to convert this using DOS-style short mode. If the path
16684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16685  # take no chances and rewrite it.
16686  # Note: m4 eats our [], so we need to use [ and ] instead.
16687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16688  if test "x$has_forbidden_chars" != x; then
16689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16690    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16691  fi
16692
16693
16694  windows_path="$new_path"
16695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16696    unix_path=`$CYGPATH -u "$windows_path"`
16697    new_path="$unix_path"
16698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16700    new_path="$unix_path"
16701  fi
16702
16703  if test "x$path" != "x$new_path"; then
16704    TOPDIR="$new_path"
16705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16706$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16707  fi
16708
16709  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16710  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16711
16712    else
16713      # We're on a unix platform. Hooray! :)
16714      path="$TOPDIR"
16715      has_space=`$ECHO "$path" | $GREP " "`
16716      if test "x$has_space" != x; then
16717        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16718$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16719        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16720      fi
16721
16722      # Use eval to expand a potential ~
16723      eval path="$path"
16724      if test ! -f "$path" && test ! -d "$path"; then
16725        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16726      fi
16727
16728      if test -d "$path"; then
16729        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16730      else
16731        dir="`$DIRNAME "$path"`"
16732        base="`$BASENAME "$path"`"
16733        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16734      fi
16735    fi
16736  fi
16737
16738  # SRC_ROOT is a traditional alias for TOPDIR.
16739  SRC_ROOT=$TOPDIR
16740
16741  # Calculate a canonical version of TOPDIR for string comparisons
16742  CANONICAL_TOPDIR=$TOPDIR
16743
16744  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16745    # Follow a chain of symbolic links. Use readlink
16746    # where it exists, else fall back to horribly
16747    # complicated shell code.
16748    if test "x$READLINK_TESTED" != yes; then
16749      # On MacOSX there is a readlink tool with a different
16750      # purpose than the GNU readlink tool. Check the found readlink.
16751      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16752      if test "x$ISGNU" = x; then
16753        # A readlink that we do not know how to use.
16754        # Are there other non-GNU readlinks out there?
16755        READLINK_TESTED=yes
16756        READLINK=
16757      fi
16758    fi
16759
16760    if test "x$READLINK" != x; then
16761      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16762    else
16763      # Save the current directory for restoring afterwards
16764      STARTDIR=$PWD
16765      COUNTER=0
16766      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16767      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16768      cd $sym_link_dir
16769      # Use -P flag to resolve symlinks in directories.
16770      cd `$THEPWDCMD -P`
16771      sym_link_dir=`$THEPWDCMD -P`
16772      # Resolve file symlinks
16773      while test $COUNTER -lt 20; do
16774        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16775        if test "x$ISLINK" == x; then
16776          # This is not a symbolic link! We are done!
16777          break
16778        fi
16779        # Again resolve directory symlinks since the target of the just found
16780        # link could be in a different directory
16781        cd `$DIRNAME $ISLINK`
16782        sym_link_dir=`$THEPWDCMD -P`
16783        sym_link_file=`$BASENAME $ISLINK`
16784        let COUNTER=COUNTER+1
16785      done
16786      cd $STARTDIR
16787      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16788    fi
16789  fi
16790
16791
16792
16793  # Locate the directory of this script.
16794  AUTOCONF_DIR=$TOPDIR/common/autoconf
16795
16796  # Setup username (for use in adhoc version strings etc)
16797  # Outer [ ] to quote m4.
16798   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16799
16800
16801
16802# Check if it's a pure open build or if custom sources are to be used.
16803
16804  # Check whether --enable-openjdk-only was given.
16805if test "${enable_openjdk_only+set}" = set; then :
16806  enableval=$enable_openjdk_only;
16807else
16808  enable_openjdk_only="no"
16809fi
16810
16811
16812  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16813$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16815$as_echo "$enable_openjdk_only" >&6; }
16816  if test "x$enable_openjdk_only" = "xyes"; then
16817    SUPPRESS_CUSTOM_EXTENSIONS="true"
16818  elif test "x$enable_openjdk_only" = "xno"; then
16819    SUPPRESS_CUSTOM_EXTENSIONS="false"
16820  else
16821    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16822  fi
16823
16824  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16825  # the IncludeCustomExtension macro.
16826
16827
16828# Check whether --with-custom-make-dir was given.
16829if test "${with_custom_make_dir+set}" = set; then :
16830  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
16831$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16832fi
16833
16834
16835
16836
16837# These are needed to be able to create a configuration name (and thus the output directory)
16838
16839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16840$as_echo_n "checking which variant of the JDK to build... " >&6; }
16841
16842# Check whether --with-jdk-variant was given.
16843if test "${with_jdk_variant+set}" = set; then :
16844  withval=$with_jdk_variant;
16845fi
16846
16847
16848  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16849    JDK_VARIANT="normal"
16850  else
16851    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16852  fi
16853
16854
16855
16856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16857$as_echo "$JDK_VARIANT" >&6; }
16858
16859
16860  DEBUG_LEVEL="release"
16861  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16862$as_echo_n "checking which debug level to use... " >&6; }
16863  # Check whether --enable-debug was given.
16864if test "${enable_debug+set}" = set; then :
16865  enableval=$enable_debug;
16866        ENABLE_DEBUG="${enableval}"
16867        DEBUG_LEVEL="fastdebug"
16868
16869else
16870  ENABLE_DEBUG="no"
16871fi
16872
16873
16874
16875# Check whether --with-debug-level was given.
16876if test "${with_debug_level+set}" = set; then :
16877  withval=$with_debug_level;
16878        DEBUG_LEVEL="${withval}"
16879        if test "x$ENABLE_DEBUG" = xyes; then
16880          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16881        fi
16882
16883fi
16884
16885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16886$as_echo "$DEBUG_LEVEL" >&6; }
16887
16888  if test "x$DEBUG_LEVEL" != xrelease && \
16889      test "x$DEBUG_LEVEL" != xoptimized && \
16890      test "x$DEBUG_LEVEL" != xfastdebug && \
16891      test "x$DEBUG_LEVEL" != xslowdebug; then
16892    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16893  fi
16894
16895  # Translate DEBUG_LEVEL to debug level used by Hotspot
16896  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16897  if test "x$DEBUG_LEVEL" = xrelease; then
16898    HOTSPOT_DEBUG_LEVEL="product"
16899  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16900    HOTSPOT_DEBUG_LEVEL="debug"
16901  fi
16902
16903  if test "x$DEBUG_LEVEL" = xoptimized; then
16904    # The debug level 'optimized' is a little special because it is currently only
16905    # applicable to the HotSpot build where it means to build a completely
16906    # optimized version of the VM without any debugging code (like for the
16907    # 'release' debug level which is called 'product' in the HotSpot build) but
16908    # with the exception that it can contain additional code which is otherwise
16909    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16910    # test new and/or experimental features which are not intended for customer
16911    # shipment. Because these new features need to be tested and benchmarked in
16912    # real world scenarios, we want to build the containing JDK at the 'release'
16913    # debug level.
16914    DEBUG_LEVEL="release"
16915  fi
16916
16917
16918
16919
16920
16921
16922# Check whether --with-jvm-variants was given.
16923if test "${with_jvm_variants+set}" = set; then :
16924  withval=$with_jvm_variants;
16925fi
16926
16927
16928
16929
16930# Check whether --with-cpu-port was given.
16931if test "${with_cpu_port+set}" = set; then :
16932  withval=$with_cpu_port;
16933fi
16934
16935
16936  if test "x$with_cpu_port" != x; then
16937    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16938      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16939    fi
16940    if test "x$with_cpu_port" != xarm64 && \
16941        test "x$with_cpu_port" != xaarch64; then
16942      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16943    fi
16944    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16945  fi
16946
16947
16948  if test "x$with_jvm_variants" = x; then
16949    with_jvm_variants="server"
16950  fi
16951  JVM_VARIANTS_OPT="$with_jvm_variants"
16952
16953  # Has the user listed more than one variant?
16954  # Additional [] needed to keep m4 from mangling shell constructs.
16955  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16956    BUILDING_MULTIPLE_JVM_VARIANTS=true
16957  else
16958    BUILDING_MULTIPLE_JVM_VARIANTS=false
16959  fi
16960  # Replace the commas with AND for use in the build directory name.
16961  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16962
16963  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16964$as_echo_n "checking which variants of the JVM to build... " >&6; }
16965  # JVM_VARIANTS is a space-separated list.
16966  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16967  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16969$as_echo "$JVM_VARIANTS" >&6; }
16970
16971  # Check that the selected variants are valid
16972
16973  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16974  # Notice that the original variant failes on SLES 10 and 11
16975  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16976  STACK=${JVM_VARIANTS// /$'\n'}
16977  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16978  if test "x$INVALID_VARIANTS" != x; then
16979    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16980$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16981    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16982  fi
16983
16984  # All "special" variants share the same output directory ("server")
16985  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16986  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16987  STACK=${JVM_VARIANTS// /$'\n'}
16988  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16989  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16990    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16991  fi
16992
16993  # The "main" variant is the one used by other libs to link against during the
16994  # build.
16995  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16996    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16997    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16998      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16999        JVM_VARIANT_MAIN="$variant"
17000        break
17001      fi
17002    done
17003  else
17004    JVM_VARIANT_MAIN="$JVM_VARIANTS"
17005  fi
17006
17007
17008
17009
17010
17011  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17012    # zero behaves as a platform and rewrites these values. This is really weird. :(
17013    # We are guaranteed that we do not build any other variants when building zero.
17014    HOTSPOT_TARGET_CPU=zero
17015    HOTSPOT_TARGET_CPU_ARCH=zero
17016  fi
17017
17018
17019# With basic setup done, call the custom early hook.
17020
17021
17022# Check if we have devkits, extra paths or sysroot set.
17023
17024
17025# Check whether --with-devkit was given.
17026if test "${with_devkit+set}" = set; then :
17027  withval=$with_devkit;
17028
17029  # Only process if variable expands to non-empty
17030
17031  if test "x$with_devkit" != x; then
17032    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17033
17034  # Input might be given as Windows format, start by converting to
17035  # unix format.
17036  path="$with_devkit"
17037  new_path=`$CYGPATH -u "$path"`
17038
17039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17042  # "foo.exe" is OK but "foo" is an error.
17043  #
17044  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17045  # It is also a way to make sure we got the proper file name for the real test later on.
17046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17047  if test "x$test_shortpath" = x; then
17048    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17049$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17050    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17051  fi
17052
17053  # Call helper function which possibly converts this using DOS-style short mode.
17054  # If so, the updated path is stored in $new_path.
17055
17056  input_path="$new_path"
17057  # Check if we need to convert this using DOS-style short mode. If the path
17058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17059  # take no chances and rewrite it.
17060  # Note: m4 eats our [], so we need to use [ and ] instead.
17061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17062  if test "x$has_forbidden_chars" != x; then
17063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17064    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17065    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17066    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17067      # Going to short mode and back again did indeed matter. Since short mode is
17068      # case insensitive, let's make it lowercase to improve readability.
17069      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17070      # Now convert it back to Unix-style (cygpath)
17071      input_path=`$CYGPATH -u "$shortmode_path"`
17072      new_path="$input_path"
17073    fi
17074  fi
17075
17076  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17077  if test "x$test_cygdrive_prefix" = x; then
17078    # As a simple fix, exclude /usr/bin since it's not a real path.
17079    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17080      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17081      # a path prefixed by /cygdrive for fixpath to work.
17082      new_path="$CYGWIN_ROOT_PATH$input_path"
17083    fi
17084  fi
17085
17086
17087  if test "x$path" != "x$new_path"; then
17088    with_devkit="$new_path"
17089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17090$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17091  fi
17092
17093    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17094
17095  path="$with_devkit"
17096  has_colon=`$ECHO $path | $GREP ^.:`
17097  new_path="$path"
17098  if test "x$has_colon" = x; then
17099    # Not in mixed or Windows style, start by that.
17100    new_path=`cmd //c echo $path`
17101  fi
17102
17103
17104  input_path="$new_path"
17105  # Check if we need to convert this using DOS-style short mode. If the path
17106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17107  # take no chances and rewrite it.
17108  # Note: m4 eats our [], so we need to use [ and ] instead.
17109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17110  if test "x$has_forbidden_chars" != x; then
17111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17112    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17113  fi
17114
17115
17116  windows_path="$new_path"
17117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17118    unix_path=`$CYGPATH -u "$windows_path"`
17119    new_path="$unix_path"
17120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17122    new_path="$unix_path"
17123  fi
17124
17125  if test "x$path" != "x$new_path"; then
17126    with_devkit="$new_path"
17127    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17128$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17129  fi
17130
17131  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17132  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17133
17134    else
17135      # We're on a unix platform. Hooray! :)
17136      path="$with_devkit"
17137      has_space=`$ECHO "$path" | $GREP " "`
17138      if test "x$has_space" != x; then
17139        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17140$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17141        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17142      fi
17143
17144      # Use eval to expand a potential ~
17145      eval path="$path"
17146      if test ! -f "$path" && test ! -d "$path"; then
17147        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17148      fi
17149
17150      if test -d "$path"; then
17151        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17152      else
17153        dir="`$DIRNAME "$path"`"
17154        base="`$BASENAME "$path"`"
17155        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17156      fi
17157    fi
17158  fi
17159
17160        DEVKIT_ROOT="$with_devkit"
17161        # Check for a meta data info file in the root of the devkit
17162        if test -f "$DEVKIT_ROOT/devkit.info"; then
17163          . $DEVKIT_ROOT/devkit.info
17164          # This potentially sets the following:
17165          # A descriptive name of the devkit
17166
17167  if test "x$DEVKIT_NAME" = x; then
17168    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17169  fi
17170
17171          # Corresponds to --with-extra-path
17172
17173  if test "x$DEVKIT_EXTRA_PATH" = x; then
17174    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17175  fi
17176
17177          # Corresponds to --with-toolchain-path
17178
17179  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17180    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17181  fi
17182
17183          # Corresponds to --with-sysroot
17184
17185  if test "x$DEVKIT_SYSROOT" = x; then
17186    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17187  fi
17188
17189
17190          # Identifies the Visual Studio version in the devkit
17191
17192  if test "x$DEVKIT_VS_VERSION" = x; then
17193    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17194  fi
17195
17196          # The Visual Studio include environment variable
17197
17198  if test "x$DEVKIT_VS_INCLUDE" = x; then
17199    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17200  fi
17201
17202          # The Visual Studio lib environment variable
17203
17204  if test "x$DEVKIT_VS_LIB" = x; then
17205    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17206  fi
17207
17208          # Corresponds to --with-msvcr-dll
17209
17210  if test "x$DEVKIT_MSVCR_DLL" = x; then
17211    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17212  fi
17213
17214          # Corresponds to --with-msvcp-dll
17215
17216  if test "x$DEVKIT_MSVCP_DLL" = x; then
17217    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17218  fi
17219
17220        fi
17221
17222        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17223$as_echo_n "checking for devkit... " >&6; }
17224        if test "x$DEVKIT_NAME" != x; then
17225          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17226$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17227        else
17228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17229$as_echo "$DEVKIT_ROOT" >&6; }
17230        fi
17231
17232
17233  if test "x$DEVKIT_EXTRA_PATH" != x; then
17234    if test "x$EXTRA_PATH" = x; then
17235      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17236    else
17237      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17238    fi
17239  fi
17240
17241
17242        # Fallback default of just /bin if DEVKIT_PATH is not defined
17243        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17244          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17245        fi
17246
17247  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17248    if test "x$TOOLCHAIN_PATH" = x; then
17249      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17250    else
17251      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17252    fi
17253  fi
17254
17255
17256        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17257        # places for backwards compatiblity.
17258        if test "x$DEVKIT_SYSROOT" != x; then
17259          SYSROOT="$DEVKIT_SYSROOT"
17260        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17261          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17262        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17263          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17264        fi
17265
17266
17267fi
17268
17269
17270  # You can force the sysroot if the sysroot encoded into the compiler tools
17271  # is not correct.
17272
17273# Check whether --with-sys-root was given.
17274if test "${with_sys_root+set}" = set; then :
17275  withval=$with_sys_root; SYSROOT=$with_sys_root
17276
17277fi
17278
17279
17280
17281# Check whether --with-sysroot was given.
17282if test "${with_sysroot+set}" = set; then :
17283  withval=$with_sysroot; SYSROOT=$with_sysroot
17284
17285fi
17286
17287
17288
17289# Check whether --with-tools-dir was given.
17290if test "${with_tools_dir+set}" = set; then :
17291  withval=$with_tools_dir;
17292  if test "x$with_tools_dir" != x; then
17293    if test "x$TOOLCHAIN_PATH" = x; then
17294      TOOLCHAIN_PATH="$with_tools_dir"
17295    else
17296      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17297    fi
17298  fi
17299
17300
17301fi
17302
17303
17304
17305# Check whether --with-toolchain-path was given.
17306if test "${with_toolchain_path+set}" = set; then :
17307  withval=$with_toolchain_path;
17308  if test "x$with_toolchain_path" != x; then
17309    if test "x$TOOLCHAIN_PATH" = x; then
17310      TOOLCHAIN_PATH="$with_toolchain_path"
17311    else
17312      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17313    fi
17314  fi
17315
17316
17317fi
17318
17319
17320
17321# Check whether --with-extra-path was given.
17322if test "${with_extra_path+set}" = set; then :
17323  withval=$with_extra_path;
17324  if test "x$with_extra_path" != x; then
17325    if test "x$EXTRA_PATH" = x; then
17326      EXTRA_PATH="$with_extra_path"
17327    else
17328      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17329    fi
17330  fi
17331
17332
17333fi
17334
17335
17336  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17337    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17338    # If not, detect if Xcode is installed by running xcodebuild -version
17339    # if no Xcode installed, xcodebuild exits with 1
17340    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17341    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17342      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17343      # fall back on the stub binary in /usr/bin/xcodebuild
17344      # Extract the first word of "xcodebuild", so it can be a program name with args.
17345set dummy xcodebuild; ac_word=$2
17346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17347$as_echo_n "checking for $ac_word... " >&6; }
17348if ${ac_cv_path_XCODEBUILD+:} false; then :
17349  $as_echo_n "(cached) " >&6
17350else
17351  case $XCODEBUILD in
17352  [\\/]* | ?:[\\/]*)
17353  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17354  ;;
17355  *)
17356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17357for as_dir in $TOOLCHAIN_PATH
17358do
17359  IFS=$as_save_IFS
17360  test -z "$as_dir" && as_dir=.
17361    for ac_exec_ext in '' $ac_executable_extensions; do
17362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17363    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17365    break 2
17366  fi
17367done
17368  done
17369IFS=$as_save_IFS
17370
17371  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17372  ;;
17373esac
17374fi
17375XCODEBUILD=$ac_cv_path_XCODEBUILD
17376if test -n "$XCODEBUILD"; then
17377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17378$as_echo "$XCODEBUILD" >&6; }
17379else
17380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17381$as_echo "no" >&6; }
17382fi
17383
17384
17385    else
17386      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17387      # when only the command line tools are installed there are no SDKs, so headers
17388      # are copied into the system frameworks
17389      XCODEBUILD=
17390
17391    fi
17392
17393    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17394$as_echo_n "checking for sdk name... " >&6; }
17395
17396# Check whether --with-sdk-name was given.
17397if test "${with_sdk_name+set}" = set; then :
17398  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17399
17400fi
17401
17402    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17403$as_echo "$SDKNAME" >&6; }
17404
17405    # if toolchain path is specified then don't rely on system headers, they may not compile
17406    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17407    test -z "$TOOLCHAIN_PATH" && \
17408      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17409
17410    if test -z "$SYSROOT"; then
17411      if test -n "$XCODEBUILD"; then
17412        # if we don't have system headers, use default SDK name (last resort)
17413        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17414          SDKNAME=${SDKNAME:-macosx}
17415        fi
17416
17417        if test -n "$SDKNAME"; then
17418          # Call xcodebuild to determine SYSROOT
17419          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17420        fi
17421      else
17422        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17423          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
17424        fi
17425      fi
17426    else
17427      # warn user if --with-sdk-name was also set
17428      if test -n "$with_sdk_name"; then
17429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17430$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17431      fi
17432    fi
17433
17434    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17435      # If no system framework headers, then SYSROOT must be set, or we won't build
17436      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
17437    fi
17438
17439    # Perform a basic sanity test
17440    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17441      if test -z "$SYSROOT"; then
17442        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
17443      else
17444        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17445      fi
17446    fi
17447
17448    # set SDKROOT too, Xcode tools will pick it up
17449    SDKROOT="$SYSROOT"
17450
17451  fi
17452
17453  # Prepend the extra path to the global path
17454
17455  if test "x$EXTRA_PATH" != x; then
17456    if test "x$PATH" = x; then
17457      PATH="$EXTRA_PATH"
17458    else
17459      PATH="$EXTRA_PATH:$PATH"
17460    fi
17461  fi
17462
17463
17464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17465$as_echo_n "checking for sysroot... " >&6; }
17466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17467$as_echo "$SYSROOT" >&6; }
17468  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17469$as_echo_n "checking for toolchain path... " >&6; }
17470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17471$as_echo "$TOOLCHAIN_PATH" >&6; }
17472  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17473$as_echo_n "checking for extra path... " >&6; }
17474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17475$as_echo "$EXTRA_PATH" >&6; }
17476
17477
17478# To properly create a configuration name, we need to have the OpenJDK target
17479# and options (variants and debug level) parsed.
17480
17481
17482
17483# Check whether --with-conf-name was given.
17484if test "${with_conf_name+set}" = set; then :
17485  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17486fi
17487
17488
17489  # Test from where we are running configure, in or outside of src root.
17490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17491$as_echo_n "checking where to store configuration... " >&6; }
17492  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17493      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17494      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17495    # We are running configure from the src root.
17496    # Create a default ./build/target-variant-debuglevel output root.
17497    if test "x${CONF_NAME}" = x; then
17498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17499$as_echo "in default location" >&6; }
17500      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17501    else
17502      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17503$as_echo "in build directory with custom name" >&6; }
17504    fi
17505    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17506    $MKDIR -p "$OUTPUT_ROOT"
17507    if test ! -d "$OUTPUT_ROOT"; then
17508      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17509    fi
17510  else
17511    # We are running configure from outside of the src dir.
17512    # Then use the current directory as output dir!
17513    # If configuration is situated in normal build directory, just use the build
17514    # directory name as configuration name, otherwise use the complete path.
17515    if test "x${CONF_NAME}" = x; then
17516      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17517    fi
17518    OUTPUT_ROOT="$CURDIR"
17519    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17520$as_echo "in current directory" >&6; }
17521
17522    # WARNING: This might be a bad thing to do. You need to be sure you want to
17523    # have a configuration in this directory. Do some sanity checks!
17524
17525    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17526      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17527      # other files
17528      files_present=`$LS $OUTPUT_ROOT`
17529      # Configure has already touched config.log and confdefs.h in the current dir when this check
17530      # is performed.
17531      filtered_files=`$ECHO "$files_present" \
17532          | $SED -e 's/config.log//g' \
17533              -e 's/configure.log//g' \
17534              -e 's/confdefs.h//g' \
17535              -e 's/ //g' \
17536          | $TR -d '\n'`
17537      if test "x$filtered_files" != x; then
17538        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17539$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17540        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17541$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17542        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17543$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17544        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17545$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17546        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17547$as_echo "$as_me: seriously mess up just about everything." >&6;}
17548        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17549$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17550        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17551$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17552        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17553      fi
17554    fi
17555  fi
17556  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17557$as_echo_n "checking what configuration name to use... " >&6; }
17558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17559$as_echo "$CONF_NAME" >&6; }
17560
17561
17562  # Only process if variable expands to non-empty
17563
17564  if test "x$OUTPUT_ROOT" != x; then
17565    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17566
17567  # Input might be given as Windows format, start by converting to
17568  # unix format.
17569  path="$OUTPUT_ROOT"
17570  new_path=`$CYGPATH -u "$path"`
17571
17572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17575  # "foo.exe" is OK but "foo" is an error.
17576  #
17577  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17578  # It is also a way to make sure we got the proper file name for the real test later on.
17579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17580  if test "x$test_shortpath" = x; then
17581    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17582$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17583    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17584  fi
17585
17586  # Call helper function which possibly converts this using DOS-style short mode.
17587  # If so, the updated path is stored in $new_path.
17588
17589  input_path="$new_path"
17590  # Check if we need to convert this using DOS-style short mode. If the path
17591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17592  # take no chances and rewrite it.
17593  # Note: m4 eats our [], so we need to use [ and ] instead.
17594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17595  if test "x$has_forbidden_chars" != x; then
17596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17597    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17598    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17599    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17600      # Going to short mode and back again did indeed matter. Since short mode is
17601      # case insensitive, let's make it lowercase to improve readability.
17602      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17603      # Now convert it back to Unix-style (cygpath)
17604      input_path=`$CYGPATH -u "$shortmode_path"`
17605      new_path="$input_path"
17606    fi
17607  fi
17608
17609  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17610  if test "x$test_cygdrive_prefix" = x; then
17611    # As a simple fix, exclude /usr/bin since it's not a real path.
17612    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17613      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17614      # a path prefixed by /cygdrive for fixpath to work.
17615      new_path="$CYGWIN_ROOT_PATH$input_path"
17616    fi
17617  fi
17618
17619
17620  if test "x$path" != "x$new_path"; then
17621    OUTPUT_ROOT="$new_path"
17622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17623$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17624  fi
17625
17626    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17627
17628  path="$OUTPUT_ROOT"
17629  has_colon=`$ECHO $path | $GREP ^.:`
17630  new_path="$path"
17631  if test "x$has_colon" = x; then
17632    # Not in mixed or Windows style, start by that.
17633    new_path=`cmd //c echo $path`
17634  fi
17635
17636
17637  input_path="$new_path"
17638  # Check if we need to convert this using DOS-style short mode. If the path
17639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17640  # take no chances and rewrite it.
17641  # Note: m4 eats our [], so we need to use [ and ] instead.
17642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17643  if test "x$has_forbidden_chars" != x; then
17644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17646  fi
17647
17648
17649  windows_path="$new_path"
17650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17651    unix_path=`$CYGPATH -u "$windows_path"`
17652    new_path="$unix_path"
17653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17655    new_path="$unix_path"
17656  fi
17657
17658  if test "x$path" != "x$new_path"; then
17659    OUTPUT_ROOT="$new_path"
17660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17661$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17662  fi
17663
17664  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17665  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17666
17667    else
17668      # We're on a unix platform. Hooray! :)
17669      path="$OUTPUT_ROOT"
17670      has_space=`$ECHO "$path" | $GREP " "`
17671      if test "x$has_space" != x; then
17672        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17673$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17674        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17675      fi
17676
17677      # Use eval to expand a potential ~
17678      eval path="$path"
17679      if test ! -f "$path" && test ! -d "$path"; then
17680        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17681      fi
17682
17683      if test -d "$path"; then
17684        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17685      else
17686        dir="`$DIRNAME "$path"`"
17687        base="`$BASENAME "$path"`"
17688        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17689      fi
17690    fi
17691  fi
17692
17693
17694  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17695  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17696
17697  SPEC="$OUTPUT_ROOT/spec.gmk"
17698
17699
17700
17701
17702
17703  # The spec.gmk file contains all variables for the make system.
17704  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17705
17706  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17707  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17708
17709  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17710  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17711
17712  # The compare.sh is used to compare the build output to other builds.
17713  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17714
17715  # The generated Makefile knows where the spec.gmk is and where the source is.
17716  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17717  # which will look for generated configurations
17718  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17719
17720
17721
17722# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17723
17724  for ac_prog in apt-get yum brew port pkgutil pkgadd
17725do
17726  # Extract the first word of "$ac_prog", so it can be a program name with args.
17727set dummy $ac_prog; ac_word=$2
17728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17729$as_echo_n "checking for $ac_word... " >&6; }
17730if ${ac_cv_prog_PKGHANDLER+:} false; then :
17731  $as_echo_n "(cached) " >&6
17732else
17733  if test -n "$PKGHANDLER"; then
17734  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17735else
17736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17737for as_dir in $PATH
17738do
17739  IFS=$as_save_IFS
17740  test -z "$as_dir" && as_dir=.
17741    for ac_exec_ext in '' $ac_executable_extensions; do
17742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17743    ac_cv_prog_PKGHANDLER="$ac_prog"
17744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17745    break 2
17746  fi
17747done
17748  done
17749IFS=$as_save_IFS
17750
17751fi
17752fi
17753PKGHANDLER=$ac_cv_prog_PKGHANDLER
17754if test -n "$PKGHANDLER"; then
17755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17756$as_echo "$PKGHANDLER" >&6; }
17757else
17758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17759$as_echo "no" >&6; }
17760fi
17761
17762
17763  test -n "$PKGHANDLER" && break
17764done
17765
17766
17767
17768# Setup tools that requires more complex handling, or that is not needed by the configure script.
17769
17770
17771
17772  # Publish this variable in the help.
17773
17774
17775  if [ -z "${MAKE+x}" ]; then
17776    # The variable is not set by user, try to locate tool using the code snippet
17777
17778    # Try our hardest to locate a correct version of GNU make
17779    for ac_prog in gmake
17780do
17781  # Extract the first word of "$ac_prog", so it can be a program name with args.
17782set dummy $ac_prog; ac_word=$2
17783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17784$as_echo_n "checking for $ac_word... " >&6; }
17785if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17786  $as_echo_n "(cached) " >&6
17787else
17788  case $CHECK_GMAKE in
17789  [\\/]* | ?:[\\/]*)
17790  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17791  ;;
17792  *)
17793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17794for as_dir in $PATH
17795do
17796  IFS=$as_save_IFS
17797  test -z "$as_dir" && as_dir=.
17798    for ac_exec_ext in '' $ac_executable_extensions; do
17799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17800    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17802    break 2
17803  fi
17804done
17805  done
17806IFS=$as_save_IFS
17807
17808  ;;
17809esac
17810fi
17811CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17812if test -n "$CHECK_GMAKE"; then
17813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17814$as_echo "$CHECK_GMAKE" >&6; }
17815else
17816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17817$as_echo "no" >&6; }
17818fi
17819
17820
17821  test -n "$CHECK_GMAKE" && break
17822done
17823
17824
17825  MAKE_CANDIDATE=""$CHECK_GMAKE""
17826  DESCRIPTION="gmake in PATH"
17827
17828  # On Cygwin, we require a newer version of make than on other platforms
17829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17830    MAKE_VERSION_EXPR="-e 4\."
17831    MAKE_REQUIRED_VERSION="4.0"
17832   else
17833    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17834    MAKE_REQUIRED_VERSION="3.81"
17835  fi
17836
17837  if test "x$MAKE_CANDIDATE" != x; then
17838    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17839$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17840    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17841    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17842    if test "x$IS_GNU_MAKE" = x; then
17843      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17844$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17845    else
17846      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17847      if test "x$IS_MODERN_MAKE" = x; then
17848        { $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
17849$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;}
17850      else
17851        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17852          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17853            MAKE_EXPECTED_ENV='cygwin'
17854          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17855            MAKE_EXPECTED_ENV='msys'
17856          else
17857            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17858          fi
17859          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17860          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17861        else
17862          # Not relevant for non-Windows
17863          IS_MAKE_CORRECT_ENV=true
17864        fi
17865        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17866          { $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
17867$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;}
17868        else
17869          FOUND_MAKE=$MAKE_CANDIDATE
17870
17871  # Only process if variable expands to non-empty
17872
17873  if test "x$FOUND_MAKE" != x; then
17874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17875
17876  # First separate the path from the arguments. This will split at the first
17877  # space.
17878  complete="$FOUND_MAKE"
17879  path="${complete%% *}"
17880  tmp="$complete EOL"
17881  arguments="${tmp#* }"
17882
17883  # Input might be given as Windows format, start by converting to
17884  # unix format.
17885  new_path=`$CYGPATH -u "$path"`
17886
17887  # Now try to locate executable using which
17888  new_path=`$WHICH "$new_path" 2> /dev/null`
17889  # bat and cmd files are not always considered executable in cygwin causing which
17890  # to not find them
17891  if test "x$new_path" = x \
17892      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17893      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17894    new_path=`$CYGPATH -u "$path"`
17895  fi
17896  if test "x$new_path" = x; then
17897    # Oops. Which didn't find the executable.
17898    # The splitting of arguments from the executable at a space might have been incorrect,
17899    # since paths with space are more likely in Windows. Give it another try with the whole
17900    # argument.
17901    path="$complete"
17902    arguments="EOL"
17903    new_path=`$CYGPATH -u "$path"`
17904    new_path=`$WHICH "$new_path" 2> /dev/null`
17905    # bat and cmd files are not always considered executable in cygwin causing which
17906    # to not find them
17907    if test "x$new_path" = x \
17908        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17909        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17910      new_path=`$CYGPATH -u "$path"`
17911    fi
17912    if test "x$new_path" = x; then
17913      # It's still not found. Now this is an unrecoverable error.
17914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17915$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17916      has_space=`$ECHO "$complete" | $GREP " "`
17917      if test "x$has_space" != x; then
17918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17920      fi
17921      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17922    fi
17923  fi
17924
17925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17928  # "foo.exe" is OK but "foo" is an error.
17929  #
17930  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17931  # It is also a way to make sure we got the proper file name for the real test later on.
17932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17933  if test "x$test_shortpath" = x; then
17934    # Short path failed, file does not exist as specified.
17935    # Try adding .exe or .cmd
17936    if test -f "${new_path}.exe"; then
17937      input_to_shortpath="${new_path}.exe"
17938    elif test -f "${new_path}.cmd"; then
17939      input_to_shortpath="${new_path}.cmd"
17940    else
17941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17942$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17943      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17944$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17945      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17946    fi
17947  else
17948    input_to_shortpath="$new_path"
17949  fi
17950
17951  # Call helper function which possibly converts this using DOS-style short mode.
17952  # If so, the updated path is stored in $new_path.
17953  new_path="$input_to_shortpath"
17954
17955  input_path="$input_to_shortpath"
17956  # Check if we need to convert this using DOS-style short mode. If the path
17957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17958  # take no chances and rewrite it.
17959  # Note: m4 eats our [], so we need to use [ and ] instead.
17960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17961  if test "x$has_forbidden_chars" != x; then
17962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17963    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17964    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17965    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17966      # Going to short mode and back again did indeed matter. Since short mode is
17967      # case insensitive, let's make it lowercase to improve readability.
17968      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17969      # Now convert it back to Unix-style (cygpath)
17970      input_path=`$CYGPATH -u "$shortmode_path"`
17971      new_path="$input_path"
17972    fi
17973  fi
17974
17975  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17976  if test "x$test_cygdrive_prefix" = x; then
17977    # As a simple fix, exclude /usr/bin since it's not a real path.
17978    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17979      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17980      # a path prefixed by /cygdrive for fixpath to work.
17981      new_path="$CYGWIN_ROOT_PATH$input_path"
17982    fi
17983  fi
17984
17985  # remove trailing .exe if any
17986  new_path="${new_path/%.exe/}"
17987
17988    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17989
17990  # First separate the path from the arguments. This will split at the first
17991  # space.
17992  complete="$FOUND_MAKE"
17993  path="${complete%% *}"
17994  tmp="$complete EOL"
17995  arguments="${tmp#* }"
17996
17997  # Input might be given as Windows format, start by converting to
17998  # unix format.
17999  new_path="$path"
18000
18001  windows_path="$new_path"
18002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18003    unix_path=`$CYGPATH -u "$windows_path"`
18004    new_path="$unix_path"
18005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18007    new_path="$unix_path"
18008  fi
18009
18010
18011  # Now try to locate executable using which
18012  new_path=`$WHICH "$new_path" 2> /dev/null`
18013
18014  if test "x$new_path" = x; then
18015    # Oops. Which didn't find the executable.
18016    # The splitting of arguments from the executable at a space might have been incorrect,
18017    # since paths with space are more likely in Windows. Give it another try with the whole
18018    # argument.
18019    path="$complete"
18020    arguments="EOL"
18021    new_path="$path"
18022
18023  windows_path="$new_path"
18024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18025    unix_path=`$CYGPATH -u "$windows_path"`
18026    new_path="$unix_path"
18027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18029    new_path="$unix_path"
18030  fi
18031
18032
18033    new_path=`$WHICH "$new_path" 2> /dev/null`
18034    # bat and cmd files are not always considered executable in MSYS causing which
18035    # to not find them
18036    if test "x$new_path" = x \
18037        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18038        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18039      new_path="$path"
18040
18041  windows_path="$new_path"
18042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18043    unix_path=`$CYGPATH -u "$windows_path"`
18044    new_path="$unix_path"
18045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18047    new_path="$unix_path"
18048  fi
18049
18050    fi
18051
18052    if test "x$new_path" = x; then
18053      # It's still not found. Now this is an unrecoverable error.
18054      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18055$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18056      has_space=`$ECHO "$complete" | $GREP " "`
18057      if test "x$has_space" != x; then
18058        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18059$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18060      fi
18061      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18062    fi
18063  fi
18064
18065  # Now new_path has a complete unix path to the binary
18066  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18067    # Keep paths in /bin as-is, but remove trailing .exe if any
18068    new_path="${new_path/%.exe/}"
18069    # Do not save /bin paths to all_fixpath_prefixes!
18070  else
18071    # Not in mixed or Windows style, start by that.
18072    new_path=`cmd //c echo $new_path`
18073
18074  input_path="$new_path"
18075  # Check if we need to convert this using DOS-style short mode. If the path
18076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18077  # take no chances and rewrite it.
18078  # Note: m4 eats our [], so we need to use [ and ] instead.
18079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18080  if test "x$has_forbidden_chars" != x; then
18081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18083  fi
18084
18085    # Output is in $new_path
18086
18087  windows_path="$new_path"
18088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18089    unix_path=`$CYGPATH -u "$windows_path"`
18090    new_path="$unix_path"
18091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18093    new_path="$unix_path"
18094  fi
18095
18096    # remove trailing .exe if any
18097    new_path="${new_path/%.exe/}"
18098
18099    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18100    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18101  fi
18102
18103    else
18104      # We're on a unix platform. Hooray! :)
18105      # First separate the path from the arguments. This will split at the first
18106      # space.
18107      complete="$FOUND_MAKE"
18108      path="${complete%% *}"
18109      tmp="$complete EOL"
18110      arguments="${tmp#* }"
18111
18112      # Cannot rely on the command "which" here since it doesn't always work.
18113      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18114      if test -z "$is_absolute_path"; then
18115        # Path to executable is not absolute. Find it.
18116        IFS_save="$IFS"
18117        IFS=:
18118        for p in $PATH; do
18119          if test -f "$p/$path" && test -x "$p/$path"; then
18120            new_path="$p/$path"
18121            break
18122          fi
18123        done
18124        IFS="$IFS_save"
18125      else
18126        # This is an absolute path, we can use it without further modifications.
18127        new_path="$path"
18128      fi
18129
18130      if test "x$new_path" = x; then
18131        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18132$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18133        has_space=`$ECHO "$complete" | $GREP " "`
18134        if test "x$has_space" != x; then
18135          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18136$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18137        fi
18138        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18139      fi
18140    fi
18141
18142    # Now join together the path and the arguments once again
18143    if test "x$arguments" != xEOL; then
18144      new_complete="$new_path ${arguments% *}"
18145    else
18146      new_complete="$new_path"
18147    fi
18148
18149    if test "x$complete" != "x$new_complete"; then
18150      FOUND_MAKE="$new_complete"
18151      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18152$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18153    fi
18154  fi
18155
18156        fi
18157      fi
18158    fi
18159  fi
18160
18161
18162    if test "x$FOUND_MAKE" = x; then
18163      for ac_prog in make
18164do
18165  # Extract the first word of "$ac_prog", so it can be a program name with args.
18166set dummy $ac_prog; ac_word=$2
18167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18168$as_echo_n "checking for $ac_word... " >&6; }
18169if ${ac_cv_path_CHECK_MAKE+:} false; then :
18170  $as_echo_n "(cached) " >&6
18171else
18172  case $CHECK_MAKE in
18173  [\\/]* | ?:[\\/]*)
18174  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18175  ;;
18176  *)
18177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18178for as_dir in $PATH
18179do
18180  IFS=$as_save_IFS
18181  test -z "$as_dir" && as_dir=.
18182    for ac_exec_ext in '' $ac_executable_extensions; do
18183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18184    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18186    break 2
18187  fi
18188done
18189  done
18190IFS=$as_save_IFS
18191
18192  ;;
18193esac
18194fi
18195CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18196if test -n "$CHECK_MAKE"; then
18197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18198$as_echo "$CHECK_MAKE" >&6; }
18199else
18200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18201$as_echo "no" >&6; }
18202fi
18203
18204
18205  test -n "$CHECK_MAKE" && break
18206done
18207
18208
18209  MAKE_CANDIDATE=""$CHECK_MAKE""
18210  DESCRIPTION="make in PATH"
18211
18212  # On Cygwin, we require a newer version of make than on other platforms
18213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18214    MAKE_VERSION_EXPR="-e 4\."
18215    MAKE_REQUIRED_VERSION="4.0"
18216   else
18217    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18218    MAKE_REQUIRED_VERSION="3.81"
18219  fi
18220
18221  if test "x$MAKE_CANDIDATE" != x; then
18222    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18223$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18224    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18225    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18226    if test "x$IS_GNU_MAKE" = x; then
18227      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18228$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18229    else
18230      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18231      if test "x$IS_MODERN_MAKE" = x; then
18232        { $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
18233$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;}
18234      else
18235        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18236          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18237            MAKE_EXPECTED_ENV='cygwin'
18238          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18239            MAKE_EXPECTED_ENV='msys'
18240          else
18241            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18242          fi
18243          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18244          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18245        else
18246          # Not relevant for non-Windows
18247          IS_MAKE_CORRECT_ENV=true
18248        fi
18249        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18250          { $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
18251$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;}
18252        else
18253          FOUND_MAKE=$MAKE_CANDIDATE
18254
18255  # Only process if variable expands to non-empty
18256
18257  if test "x$FOUND_MAKE" != x; then
18258    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18259
18260  # First separate the path from the arguments. This will split at the first
18261  # space.
18262  complete="$FOUND_MAKE"
18263  path="${complete%% *}"
18264  tmp="$complete EOL"
18265  arguments="${tmp#* }"
18266
18267  # Input might be given as Windows format, start by converting to
18268  # unix format.
18269  new_path=`$CYGPATH -u "$path"`
18270
18271  # Now try to locate executable using which
18272  new_path=`$WHICH "$new_path" 2> /dev/null`
18273  # bat and cmd files are not always considered executable in cygwin causing which
18274  # to not find them
18275  if test "x$new_path" = x \
18276      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18277      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18278    new_path=`$CYGPATH -u "$path"`
18279  fi
18280  if test "x$new_path" = x; then
18281    # Oops. Which didn't find the executable.
18282    # The splitting of arguments from the executable at a space might have been incorrect,
18283    # since paths with space are more likely in Windows. Give it another try with the whole
18284    # argument.
18285    path="$complete"
18286    arguments="EOL"
18287    new_path=`$CYGPATH -u "$path"`
18288    new_path=`$WHICH "$new_path" 2> /dev/null`
18289    # bat and cmd files are not always considered executable in cygwin causing which
18290    # to not find them
18291    if test "x$new_path" = x \
18292        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18293        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18294      new_path=`$CYGPATH -u "$path"`
18295    fi
18296    if test "x$new_path" = x; then
18297      # It's still not found. Now this is an unrecoverable error.
18298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18299$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18300      has_space=`$ECHO "$complete" | $GREP " "`
18301      if test "x$has_space" != x; then
18302        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18303$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18304      fi
18305      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18306    fi
18307  fi
18308
18309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18312  # "foo.exe" is OK but "foo" is an error.
18313  #
18314  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18315  # It is also a way to make sure we got the proper file name for the real test later on.
18316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18317  if test "x$test_shortpath" = x; then
18318    # Short path failed, file does not exist as specified.
18319    # Try adding .exe or .cmd
18320    if test -f "${new_path}.exe"; then
18321      input_to_shortpath="${new_path}.exe"
18322    elif test -f "${new_path}.cmd"; then
18323      input_to_shortpath="${new_path}.cmd"
18324    else
18325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18326$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18327      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18328$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18329      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18330    fi
18331  else
18332    input_to_shortpath="$new_path"
18333  fi
18334
18335  # Call helper function which possibly converts this using DOS-style short mode.
18336  # If so, the updated path is stored in $new_path.
18337  new_path="$input_to_shortpath"
18338
18339  input_path="$input_to_shortpath"
18340  # Check if we need to convert this using DOS-style short mode. If the path
18341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18342  # take no chances and rewrite it.
18343  # Note: m4 eats our [], so we need to use [ and ] instead.
18344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18345  if test "x$has_forbidden_chars" != x; then
18346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18350      # Going to short mode and back again did indeed matter. Since short mode is
18351      # case insensitive, let's make it lowercase to improve readability.
18352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18353      # Now convert it back to Unix-style (cygpath)
18354      input_path=`$CYGPATH -u "$shortmode_path"`
18355      new_path="$input_path"
18356    fi
18357  fi
18358
18359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18360  if test "x$test_cygdrive_prefix" = x; then
18361    # As a simple fix, exclude /usr/bin since it's not a real path.
18362    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18364      # a path prefixed by /cygdrive for fixpath to work.
18365      new_path="$CYGWIN_ROOT_PATH$input_path"
18366    fi
18367  fi
18368
18369  # remove trailing .exe if any
18370  new_path="${new_path/%.exe/}"
18371
18372    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18373
18374  # First separate the path from the arguments. This will split at the first
18375  # space.
18376  complete="$FOUND_MAKE"
18377  path="${complete%% *}"
18378  tmp="$complete EOL"
18379  arguments="${tmp#* }"
18380
18381  # Input might be given as Windows format, start by converting to
18382  # unix format.
18383  new_path="$path"
18384
18385  windows_path="$new_path"
18386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18387    unix_path=`$CYGPATH -u "$windows_path"`
18388    new_path="$unix_path"
18389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18391    new_path="$unix_path"
18392  fi
18393
18394
18395  # Now try to locate executable using which
18396  new_path=`$WHICH "$new_path" 2> /dev/null`
18397
18398  if test "x$new_path" = x; then
18399    # Oops. Which didn't find the executable.
18400    # The splitting of arguments from the executable at a space might have been incorrect,
18401    # since paths with space are more likely in Windows. Give it another try with the whole
18402    # argument.
18403    path="$complete"
18404    arguments="EOL"
18405    new_path="$path"
18406
18407  windows_path="$new_path"
18408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18409    unix_path=`$CYGPATH -u "$windows_path"`
18410    new_path="$unix_path"
18411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18413    new_path="$unix_path"
18414  fi
18415
18416
18417    new_path=`$WHICH "$new_path" 2> /dev/null`
18418    # bat and cmd files are not always considered executable in MSYS causing which
18419    # to not find them
18420    if test "x$new_path" = x \
18421        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18422        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18423      new_path="$path"
18424
18425  windows_path="$new_path"
18426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18427    unix_path=`$CYGPATH -u "$windows_path"`
18428    new_path="$unix_path"
18429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18431    new_path="$unix_path"
18432  fi
18433
18434    fi
18435
18436    if test "x$new_path" = x; then
18437      # It's still not found. Now this is an unrecoverable error.
18438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18439$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18440      has_space=`$ECHO "$complete" | $GREP " "`
18441      if test "x$has_space" != x; then
18442        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18443$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18444      fi
18445      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18446    fi
18447  fi
18448
18449  # Now new_path has a complete unix path to the binary
18450  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18451    # Keep paths in /bin as-is, but remove trailing .exe if any
18452    new_path="${new_path/%.exe/}"
18453    # Do not save /bin paths to all_fixpath_prefixes!
18454  else
18455    # Not in mixed or Windows style, start by that.
18456    new_path=`cmd //c echo $new_path`
18457
18458  input_path="$new_path"
18459  # Check if we need to convert this using DOS-style short mode. If the path
18460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18461  # take no chances and rewrite it.
18462  # Note: m4 eats our [], so we need to use [ and ] instead.
18463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18464  if test "x$has_forbidden_chars" != x; then
18465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18467  fi
18468
18469    # Output is in $new_path
18470
18471  windows_path="$new_path"
18472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18473    unix_path=`$CYGPATH -u "$windows_path"`
18474    new_path="$unix_path"
18475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18477    new_path="$unix_path"
18478  fi
18479
18480    # remove trailing .exe if any
18481    new_path="${new_path/%.exe/}"
18482
18483    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18484    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18485  fi
18486
18487    else
18488      # We're on a unix platform. Hooray! :)
18489      # First separate the path from the arguments. This will split at the first
18490      # space.
18491      complete="$FOUND_MAKE"
18492      path="${complete%% *}"
18493      tmp="$complete EOL"
18494      arguments="${tmp#* }"
18495
18496      # Cannot rely on the command "which" here since it doesn't always work.
18497      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18498      if test -z "$is_absolute_path"; then
18499        # Path to executable is not absolute. Find it.
18500        IFS_save="$IFS"
18501        IFS=:
18502        for p in $PATH; do
18503          if test -f "$p/$path" && test -x "$p/$path"; then
18504            new_path="$p/$path"
18505            break
18506          fi
18507        done
18508        IFS="$IFS_save"
18509      else
18510        # This is an absolute path, we can use it without further modifications.
18511        new_path="$path"
18512      fi
18513
18514      if test "x$new_path" = x; then
18515        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18516$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18517        has_space=`$ECHO "$complete" | $GREP " "`
18518        if test "x$has_space" != x; then
18519          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18520$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18521        fi
18522        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18523      fi
18524    fi
18525
18526    # Now join together the path and the arguments once again
18527    if test "x$arguments" != xEOL; then
18528      new_complete="$new_path ${arguments% *}"
18529    else
18530      new_complete="$new_path"
18531    fi
18532
18533    if test "x$complete" != "x$new_complete"; then
18534      FOUND_MAKE="$new_complete"
18535      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18536$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18537    fi
18538  fi
18539
18540        fi
18541      fi
18542    fi
18543  fi
18544
18545    fi
18546
18547    if test "x$FOUND_MAKE" = x; then
18548      if test "x$TOOLCHAIN_PATH" != x; then
18549        # We have a toolchain path, check that as well before giving up.
18550        OLD_PATH=$PATH
18551        PATH=$TOOLCHAIN_PATH:$PATH
18552        for ac_prog in gmake
18553do
18554  # Extract the first word of "$ac_prog", so it can be a program name with args.
18555set dummy $ac_prog; ac_word=$2
18556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18557$as_echo_n "checking for $ac_word... " >&6; }
18558if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18559  $as_echo_n "(cached) " >&6
18560else
18561  case $CHECK_TOOLSDIR_GMAKE in
18562  [\\/]* | ?:[\\/]*)
18563  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18564  ;;
18565  *)
18566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18567for as_dir in $PATH
18568do
18569  IFS=$as_save_IFS
18570  test -z "$as_dir" && as_dir=.
18571    for ac_exec_ext in '' $ac_executable_extensions; do
18572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18573    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18575    break 2
18576  fi
18577done
18578  done
18579IFS=$as_save_IFS
18580
18581  ;;
18582esac
18583fi
18584CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18585if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18587$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18588else
18589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18590$as_echo "no" >&6; }
18591fi
18592
18593
18594  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18595done
18596
18597
18598  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18599  DESCRIPTION="gmake in tools-dir"
18600
18601  # On Cygwin, we require a newer version of make than on other platforms
18602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18603    MAKE_VERSION_EXPR="-e 4\."
18604    MAKE_REQUIRED_VERSION="4.0"
18605   else
18606    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18607    MAKE_REQUIRED_VERSION="3.81"
18608  fi
18609
18610  if test "x$MAKE_CANDIDATE" != x; then
18611    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18612$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18613    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18614    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18615    if test "x$IS_GNU_MAKE" = x; then
18616      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18617$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18618    else
18619      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18620      if test "x$IS_MODERN_MAKE" = x; then
18621        { $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
18622$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;}
18623      else
18624        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18625          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18626            MAKE_EXPECTED_ENV='cygwin'
18627          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18628            MAKE_EXPECTED_ENV='msys'
18629          else
18630            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18631          fi
18632          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18633          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18634        else
18635          # Not relevant for non-Windows
18636          IS_MAKE_CORRECT_ENV=true
18637        fi
18638        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18639          { $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
18640$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;}
18641        else
18642          FOUND_MAKE=$MAKE_CANDIDATE
18643
18644  # Only process if variable expands to non-empty
18645
18646  if test "x$FOUND_MAKE" != x; then
18647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18648
18649  # First separate the path from the arguments. This will split at the first
18650  # space.
18651  complete="$FOUND_MAKE"
18652  path="${complete%% *}"
18653  tmp="$complete EOL"
18654  arguments="${tmp#* }"
18655
18656  # Input might be given as Windows format, start by converting to
18657  # unix format.
18658  new_path=`$CYGPATH -u "$path"`
18659
18660  # Now try to locate executable using which
18661  new_path=`$WHICH "$new_path" 2> /dev/null`
18662  # bat and cmd files are not always considered executable in cygwin causing which
18663  # to not find them
18664  if test "x$new_path" = x \
18665      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18666      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18667    new_path=`$CYGPATH -u "$path"`
18668  fi
18669  if test "x$new_path" = x; then
18670    # Oops. Which didn't find the executable.
18671    # The splitting of arguments from the executable at a space might have been incorrect,
18672    # since paths with space are more likely in Windows. Give it another try with the whole
18673    # argument.
18674    path="$complete"
18675    arguments="EOL"
18676    new_path=`$CYGPATH -u "$path"`
18677    new_path=`$WHICH "$new_path" 2> /dev/null`
18678    # bat and cmd files are not always considered executable in cygwin causing which
18679    # to not find them
18680    if test "x$new_path" = x \
18681        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18682        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18683      new_path=`$CYGPATH -u "$path"`
18684    fi
18685    if test "x$new_path" = x; then
18686      # It's still not found. Now this is an unrecoverable error.
18687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18688$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18689      has_space=`$ECHO "$complete" | $GREP " "`
18690      if test "x$has_space" != x; then
18691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18693      fi
18694      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18695    fi
18696  fi
18697
18698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18701  # "foo.exe" is OK but "foo" is an error.
18702  #
18703  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18704  # It is also a way to make sure we got the proper file name for the real test later on.
18705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18706  if test "x$test_shortpath" = x; then
18707    # Short path failed, file does not exist as specified.
18708    # Try adding .exe or .cmd
18709    if test -f "${new_path}.exe"; then
18710      input_to_shortpath="${new_path}.exe"
18711    elif test -f "${new_path}.cmd"; then
18712      input_to_shortpath="${new_path}.cmd"
18713    else
18714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18715$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18716      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18717$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18718      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18719    fi
18720  else
18721    input_to_shortpath="$new_path"
18722  fi
18723
18724  # Call helper function which possibly converts this using DOS-style short mode.
18725  # If so, the updated path is stored in $new_path.
18726  new_path="$input_to_shortpath"
18727
18728  input_path="$input_to_shortpath"
18729  # Check if we need to convert this using DOS-style short mode. If the path
18730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18731  # take no chances and rewrite it.
18732  # Note: m4 eats our [], so we need to use [ and ] instead.
18733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18734  if test "x$has_forbidden_chars" != x; then
18735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18739      # Going to short mode and back again did indeed matter. Since short mode is
18740      # case insensitive, let's make it lowercase to improve readability.
18741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18742      # Now convert it back to Unix-style (cygpath)
18743      input_path=`$CYGPATH -u "$shortmode_path"`
18744      new_path="$input_path"
18745    fi
18746  fi
18747
18748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18749  if test "x$test_cygdrive_prefix" = x; then
18750    # As a simple fix, exclude /usr/bin since it's not a real path.
18751    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18753      # a path prefixed by /cygdrive for fixpath to work.
18754      new_path="$CYGWIN_ROOT_PATH$input_path"
18755    fi
18756  fi
18757
18758  # remove trailing .exe if any
18759  new_path="${new_path/%.exe/}"
18760
18761    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18762
18763  # First separate the path from the arguments. This will split at the first
18764  # space.
18765  complete="$FOUND_MAKE"
18766  path="${complete%% *}"
18767  tmp="$complete EOL"
18768  arguments="${tmp#* }"
18769
18770  # Input might be given as Windows format, start by converting to
18771  # unix format.
18772  new_path="$path"
18773
18774  windows_path="$new_path"
18775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18776    unix_path=`$CYGPATH -u "$windows_path"`
18777    new_path="$unix_path"
18778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18780    new_path="$unix_path"
18781  fi
18782
18783
18784  # Now try to locate executable using which
18785  new_path=`$WHICH "$new_path" 2> /dev/null`
18786
18787  if test "x$new_path" = x; then
18788    # Oops. Which didn't find the executable.
18789    # The splitting of arguments from the executable at a space might have been incorrect,
18790    # since paths with space are more likely in Windows. Give it another try with the whole
18791    # argument.
18792    path="$complete"
18793    arguments="EOL"
18794    new_path="$path"
18795
18796  windows_path="$new_path"
18797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18798    unix_path=`$CYGPATH -u "$windows_path"`
18799    new_path="$unix_path"
18800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18802    new_path="$unix_path"
18803  fi
18804
18805
18806    new_path=`$WHICH "$new_path" 2> /dev/null`
18807    # bat and cmd files are not always considered executable in MSYS causing which
18808    # to not find them
18809    if test "x$new_path" = x \
18810        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18811        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18812      new_path="$path"
18813
18814  windows_path="$new_path"
18815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18816    unix_path=`$CYGPATH -u "$windows_path"`
18817    new_path="$unix_path"
18818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18820    new_path="$unix_path"
18821  fi
18822
18823    fi
18824
18825    if test "x$new_path" = x; then
18826      # It's still not found. Now this is an unrecoverable error.
18827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18828$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18829      has_space=`$ECHO "$complete" | $GREP " "`
18830      if test "x$has_space" != x; then
18831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18833      fi
18834      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18835    fi
18836  fi
18837
18838  # Now new_path has a complete unix path to the binary
18839  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18840    # Keep paths in /bin as-is, but remove trailing .exe if any
18841    new_path="${new_path/%.exe/}"
18842    # Do not save /bin paths to all_fixpath_prefixes!
18843  else
18844    # Not in mixed or Windows style, start by that.
18845    new_path=`cmd //c echo $new_path`
18846
18847  input_path="$new_path"
18848  # Check if we need to convert this using DOS-style short mode. If the path
18849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18850  # take no chances and rewrite it.
18851  # Note: m4 eats our [], so we need to use [ and ] instead.
18852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18853  if test "x$has_forbidden_chars" != x; then
18854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18856  fi
18857
18858    # Output is in $new_path
18859
18860  windows_path="$new_path"
18861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18862    unix_path=`$CYGPATH -u "$windows_path"`
18863    new_path="$unix_path"
18864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18866    new_path="$unix_path"
18867  fi
18868
18869    # remove trailing .exe if any
18870    new_path="${new_path/%.exe/}"
18871
18872    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18873    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18874  fi
18875
18876    else
18877      # We're on a unix platform. Hooray! :)
18878      # First separate the path from the arguments. This will split at the first
18879      # space.
18880      complete="$FOUND_MAKE"
18881      path="${complete%% *}"
18882      tmp="$complete EOL"
18883      arguments="${tmp#* }"
18884
18885      # Cannot rely on the command "which" here since it doesn't always work.
18886      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18887      if test -z "$is_absolute_path"; then
18888        # Path to executable is not absolute. Find it.
18889        IFS_save="$IFS"
18890        IFS=:
18891        for p in $PATH; do
18892          if test -f "$p/$path" && test -x "$p/$path"; then
18893            new_path="$p/$path"
18894            break
18895          fi
18896        done
18897        IFS="$IFS_save"
18898      else
18899        # This is an absolute path, we can use it without further modifications.
18900        new_path="$path"
18901      fi
18902
18903      if test "x$new_path" = x; then
18904        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18905$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18906        has_space=`$ECHO "$complete" | $GREP " "`
18907        if test "x$has_space" != x; then
18908          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18909$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18910        fi
18911        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18912      fi
18913    fi
18914
18915    # Now join together the path and the arguments once again
18916    if test "x$arguments" != xEOL; then
18917      new_complete="$new_path ${arguments% *}"
18918    else
18919      new_complete="$new_path"
18920    fi
18921
18922    if test "x$complete" != "x$new_complete"; then
18923      FOUND_MAKE="$new_complete"
18924      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18925$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18926    fi
18927  fi
18928
18929        fi
18930      fi
18931    fi
18932  fi
18933
18934        if test "x$FOUND_MAKE" = x; then
18935          for ac_prog in make
18936do
18937  # Extract the first word of "$ac_prog", so it can be a program name with args.
18938set dummy $ac_prog; ac_word=$2
18939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18940$as_echo_n "checking for $ac_word... " >&6; }
18941if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18942  $as_echo_n "(cached) " >&6
18943else
18944  case $CHECK_TOOLSDIR_MAKE in
18945  [\\/]* | ?:[\\/]*)
18946  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18947  ;;
18948  *)
18949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18950for as_dir in $PATH
18951do
18952  IFS=$as_save_IFS
18953  test -z "$as_dir" && as_dir=.
18954    for ac_exec_ext in '' $ac_executable_extensions; do
18955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18956    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18958    break 2
18959  fi
18960done
18961  done
18962IFS=$as_save_IFS
18963
18964  ;;
18965esac
18966fi
18967CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18968if test -n "$CHECK_TOOLSDIR_MAKE"; then
18969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18970$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18971else
18972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18973$as_echo "no" >&6; }
18974fi
18975
18976
18977  test -n "$CHECK_TOOLSDIR_MAKE" && break
18978done
18979
18980
18981  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18982  DESCRIPTION="make in tools-dir"
18983
18984  # On Cygwin, we require a newer version of make than on other platforms
18985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18986    MAKE_VERSION_EXPR="-e 4\."
18987    MAKE_REQUIRED_VERSION="4.0"
18988   else
18989    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18990    MAKE_REQUIRED_VERSION="3.81"
18991  fi
18992
18993  if test "x$MAKE_CANDIDATE" != x; then
18994    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18995$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18996    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18997    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18998    if test "x$IS_GNU_MAKE" = x; then
18999      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19000$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19001    else
19002      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19003      if test "x$IS_MODERN_MAKE" = x; then
19004        { $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
19005$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;}
19006      else
19007        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19008          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19009            MAKE_EXPECTED_ENV='cygwin'
19010          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19011            MAKE_EXPECTED_ENV='msys'
19012          else
19013            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19014          fi
19015          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19016          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19017        else
19018          # Not relevant for non-Windows
19019          IS_MAKE_CORRECT_ENV=true
19020        fi
19021        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19022          { $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
19023$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;}
19024        else
19025          FOUND_MAKE=$MAKE_CANDIDATE
19026
19027  # Only process if variable expands to non-empty
19028
19029  if test "x$FOUND_MAKE" != x; then
19030    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19031
19032  # First separate the path from the arguments. This will split at the first
19033  # space.
19034  complete="$FOUND_MAKE"
19035  path="${complete%% *}"
19036  tmp="$complete EOL"
19037  arguments="${tmp#* }"
19038
19039  # Input might be given as Windows format, start by converting to
19040  # unix format.
19041  new_path=`$CYGPATH -u "$path"`
19042
19043  # Now try to locate executable using which
19044  new_path=`$WHICH "$new_path" 2> /dev/null`
19045  # bat and cmd files are not always considered executable in cygwin causing which
19046  # to not find them
19047  if test "x$new_path" = x \
19048      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19049      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19050    new_path=`$CYGPATH -u "$path"`
19051  fi
19052  if test "x$new_path" = x; then
19053    # Oops. Which didn't find the executable.
19054    # The splitting of arguments from the executable at a space might have been incorrect,
19055    # since paths with space are more likely in Windows. Give it another try with the whole
19056    # argument.
19057    path="$complete"
19058    arguments="EOL"
19059    new_path=`$CYGPATH -u "$path"`
19060    new_path=`$WHICH "$new_path" 2> /dev/null`
19061    # bat and cmd files are not always considered executable in cygwin causing which
19062    # to not find them
19063    if test "x$new_path" = x \
19064        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19065        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19066      new_path=`$CYGPATH -u "$path"`
19067    fi
19068    if test "x$new_path" = x; then
19069      # It's still not found. Now this is an unrecoverable error.
19070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19071$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19072      has_space=`$ECHO "$complete" | $GREP " "`
19073      if test "x$has_space" != x; then
19074        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19075$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19076      fi
19077      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19078    fi
19079  fi
19080
19081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19084  # "foo.exe" is OK but "foo" is an error.
19085  #
19086  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19087  # It is also a way to make sure we got the proper file name for the real test later on.
19088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19089  if test "x$test_shortpath" = x; then
19090    # Short path failed, file does not exist as specified.
19091    # Try adding .exe or .cmd
19092    if test -f "${new_path}.exe"; then
19093      input_to_shortpath="${new_path}.exe"
19094    elif test -f "${new_path}.cmd"; then
19095      input_to_shortpath="${new_path}.cmd"
19096    else
19097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19098$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19099      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19100$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19101      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19102    fi
19103  else
19104    input_to_shortpath="$new_path"
19105  fi
19106
19107  # Call helper function which possibly converts this using DOS-style short mode.
19108  # If so, the updated path is stored in $new_path.
19109  new_path="$input_to_shortpath"
19110
19111  input_path="$input_to_shortpath"
19112  # Check if we need to convert this using DOS-style short mode. If the path
19113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19114  # take no chances and rewrite it.
19115  # Note: m4 eats our [], so we need to use [ and ] instead.
19116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19117  if test "x$has_forbidden_chars" != x; then
19118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19122      # Going to short mode and back again did indeed matter. Since short mode is
19123      # case insensitive, let's make it lowercase to improve readability.
19124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19125      # Now convert it back to Unix-style (cygpath)
19126      input_path=`$CYGPATH -u "$shortmode_path"`
19127      new_path="$input_path"
19128    fi
19129  fi
19130
19131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19132  if test "x$test_cygdrive_prefix" = x; then
19133    # As a simple fix, exclude /usr/bin since it's not a real path.
19134    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19136      # a path prefixed by /cygdrive for fixpath to work.
19137      new_path="$CYGWIN_ROOT_PATH$input_path"
19138    fi
19139  fi
19140
19141  # remove trailing .exe if any
19142  new_path="${new_path/%.exe/}"
19143
19144    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19145
19146  # First separate the path from the arguments. This will split at the first
19147  # space.
19148  complete="$FOUND_MAKE"
19149  path="${complete%% *}"
19150  tmp="$complete EOL"
19151  arguments="${tmp#* }"
19152
19153  # Input might be given as Windows format, start by converting to
19154  # unix format.
19155  new_path="$path"
19156
19157  windows_path="$new_path"
19158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19159    unix_path=`$CYGPATH -u "$windows_path"`
19160    new_path="$unix_path"
19161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19163    new_path="$unix_path"
19164  fi
19165
19166
19167  # Now try to locate executable using which
19168  new_path=`$WHICH "$new_path" 2> /dev/null`
19169
19170  if test "x$new_path" = x; then
19171    # Oops. Which didn't find the executable.
19172    # The splitting of arguments from the executable at a space might have been incorrect,
19173    # since paths with space are more likely in Windows. Give it another try with the whole
19174    # argument.
19175    path="$complete"
19176    arguments="EOL"
19177    new_path="$path"
19178
19179  windows_path="$new_path"
19180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19181    unix_path=`$CYGPATH -u "$windows_path"`
19182    new_path="$unix_path"
19183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19185    new_path="$unix_path"
19186  fi
19187
19188
19189    new_path=`$WHICH "$new_path" 2> /dev/null`
19190    # bat and cmd files are not always considered executable in MSYS causing which
19191    # to not find them
19192    if test "x$new_path" = x \
19193        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19194        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19195      new_path="$path"
19196
19197  windows_path="$new_path"
19198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19199    unix_path=`$CYGPATH -u "$windows_path"`
19200    new_path="$unix_path"
19201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19203    new_path="$unix_path"
19204  fi
19205
19206    fi
19207
19208    if test "x$new_path" = x; then
19209      # It's still not found. Now this is an unrecoverable error.
19210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19211$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19212      has_space=`$ECHO "$complete" | $GREP " "`
19213      if test "x$has_space" != x; then
19214        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19215$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19216      fi
19217      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19218    fi
19219  fi
19220
19221  # Now new_path has a complete unix path to the binary
19222  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19223    # Keep paths in /bin as-is, but remove trailing .exe if any
19224    new_path="${new_path/%.exe/}"
19225    # Do not save /bin paths to all_fixpath_prefixes!
19226  else
19227    # Not in mixed or Windows style, start by that.
19228    new_path=`cmd //c echo $new_path`
19229
19230  input_path="$new_path"
19231  # Check if we need to convert this using DOS-style short mode. If the path
19232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19233  # take no chances and rewrite it.
19234  # Note: m4 eats our [], so we need to use [ and ] instead.
19235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19236  if test "x$has_forbidden_chars" != x; then
19237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19239  fi
19240
19241    # Output is in $new_path
19242
19243  windows_path="$new_path"
19244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19245    unix_path=`$CYGPATH -u "$windows_path"`
19246    new_path="$unix_path"
19247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19249    new_path="$unix_path"
19250  fi
19251
19252    # remove trailing .exe if any
19253    new_path="${new_path/%.exe/}"
19254
19255    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19256    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19257  fi
19258
19259    else
19260      # We're on a unix platform. Hooray! :)
19261      # First separate the path from the arguments. This will split at the first
19262      # space.
19263      complete="$FOUND_MAKE"
19264      path="${complete%% *}"
19265      tmp="$complete EOL"
19266      arguments="${tmp#* }"
19267
19268      # Cannot rely on the command "which" here since it doesn't always work.
19269      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19270      if test -z "$is_absolute_path"; then
19271        # Path to executable is not absolute. Find it.
19272        IFS_save="$IFS"
19273        IFS=:
19274        for p in $PATH; do
19275          if test -f "$p/$path" && test -x "$p/$path"; then
19276            new_path="$p/$path"
19277            break
19278          fi
19279        done
19280        IFS="$IFS_save"
19281      else
19282        # This is an absolute path, we can use it without further modifications.
19283        new_path="$path"
19284      fi
19285
19286      if test "x$new_path" = x; then
19287        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19288$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19289        has_space=`$ECHO "$complete" | $GREP " "`
19290        if test "x$has_space" != x; then
19291          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19292$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19293        fi
19294        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19295      fi
19296    fi
19297
19298    # Now join together the path and the arguments once again
19299    if test "x$arguments" != xEOL; then
19300      new_complete="$new_path ${arguments% *}"
19301    else
19302      new_complete="$new_path"
19303    fi
19304
19305    if test "x$complete" != "x$new_complete"; then
19306      FOUND_MAKE="$new_complete"
19307      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19308$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19309    fi
19310  fi
19311
19312        fi
19313      fi
19314    fi
19315  fi
19316
19317        fi
19318        PATH=$OLD_PATH
19319      fi
19320    fi
19321
19322    if test "x$FOUND_MAKE" = x; then
19323      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
19324    fi
19325
19326  else
19327    # The variable is set, but is it from the command line or the environment?
19328
19329    # Try to remove the string !MAKE! from our list.
19330    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19331    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19332      # If it failed, the variable was not from the command line. Ignore it,
19333      # but warn the user (except for BASH, which is always set by the calling BASH).
19334      if test "xMAKE" != xBASH; then
19335        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19336$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19337      fi
19338      # Try to locate tool using the code snippet
19339
19340    # Try our hardest to locate a correct version of GNU make
19341    for ac_prog in gmake
19342do
19343  # Extract the first word of "$ac_prog", so it can be a program name with args.
19344set dummy $ac_prog; ac_word=$2
19345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19346$as_echo_n "checking for $ac_word... " >&6; }
19347if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19348  $as_echo_n "(cached) " >&6
19349else
19350  case $CHECK_GMAKE in
19351  [\\/]* | ?:[\\/]*)
19352  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19353  ;;
19354  *)
19355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19356for as_dir in $PATH
19357do
19358  IFS=$as_save_IFS
19359  test -z "$as_dir" && as_dir=.
19360    for ac_exec_ext in '' $ac_executable_extensions; do
19361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19362    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19364    break 2
19365  fi
19366done
19367  done
19368IFS=$as_save_IFS
19369
19370  ;;
19371esac
19372fi
19373CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19374if test -n "$CHECK_GMAKE"; then
19375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19376$as_echo "$CHECK_GMAKE" >&6; }
19377else
19378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19379$as_echo "no" >&6; }
19380fi
19381
19382
19383  test -n "$CHECK_GMAKE" && break
19384done
19385
19386
19387  MAKE_CANDIDATE=""$CHECK_GMAKE""
19388  DESCRIPTION="gmake in PATH"
19389
19390  # On Cygwin, we require a newer version of make than on other platforms
19391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19392    MAKE_VERSION_EXPR="-e 4\."
19393    MAKE_REQUIRED_VERSION="4.0"
19394   else
19395    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19396    MAKE_REQUIRED_VERSION="3.81"
19397  fi
19398
19399  if test "x$MAKE_CANDIDATE" != x; then
19400    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19401$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19402    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19403    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19404    if test "x$IS_GNU_MAKE" = x; then
19405      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19406$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19407    else
19408      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19409      if test "x$IS_MODERN_MAKE" = x; then
19410        { $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
19411$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;}
19412      else
19413        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19414          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19415            MAKE_EXPECTED_ENV='cygwin'
19416          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19417            MAKE_EXPECTED_ENV='msys'
19418          else
19419            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19420          fi
19421          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19422          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19423        else
19424          # Not relevant for non-Windows
19425          IS_MAKE_CORRECT_ENV=true
19426        fi
19427        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19428          { $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
19429$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;}
19430        else
19431          FOUND_MAKE=$MAKE_CANDIDATE
19432
19433  # Only process if variable expands to non-empty
19434
19435  if test "x$FOUND_MAKE" != x; then
19436    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19437
19438  # First separate the path from the arguments. This will split at the first
19439  # space.
19440  complete="$FOUND_MAKE"
19441  path="${complete%% *}"
19442  tmp="$complete EOL"
19443  arguments="${tmp#* }"
19444
19445  # Input might be given as Windows format, start by converting to
19446  # unix format.
19447  new_path=`$CYGPATH -u "$path"`
19448
19449  # Now try to locate executable using which
19450  new_path=`$WHICH "$new_path" 2> /dev/null`
19451  # bat and cmd files are not always considered executable in cygwin causing which
19452  # to not find them
19453  if test "x$new_path" = x \
19454      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19455      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19456    new_path=`$CYGPATH -u "$path"`
19457  fi
19458  if test "x$new_path" = x; then
19459    # Oops. Which didn't find the executable.
19460    # The splitting of arguments from the executable at a space might have been incorrect,
19461    # since paths with space are more likely in Windows. Give it another try with the whole
19462    # argument.
19463    path="$complete"
19464    arguments="EOL"
19465    new_path=`$CYGPATH -u "$path"`
19466    new_path=`$WHICH "$new_path" 2> /dev/null`
19467    # bat and cmd files are not always considered executable in cygwin causing which
19468    # to not find them
19469    if test "x$new_path" = x \
19470        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19471        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19472      new_path=`$CYGPATH -u "$path"`
19473    fi
19474    if test "x$new_path" = x; then
19475      # It's still not found. Now this is an unrecoverable error.
19476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19477$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19478      has_space=`$ECHO "$complete" | $GREP " "`
19479      if test "x$has_space" != x; then
19480        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19481$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19482      fi
19483      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19484    fi
19485  fi
19486
19487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19490  # "foo.exe" is OK but "foo" is an error.
19491  #
19492  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19493  # It is also a way to make sure we got the proper file name for the real test later on.
19494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19495  if test "x$test_shortpath" = x; then
19496    # Short path failed, file does not exist as specified.
19497    # Try adding .exe or .cmd
19498    if test -f "${new_path}.exe"; then
19499      input_to_shortpath="${new_path}.exe"
19500    elif test -f "${new_path}.cmd"; then
19501      input_to_shortpath="${new_path}.cmd"
19502    else
19503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19504$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19505      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19506$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19507      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19508    fi
19509  else
19510    input_to_shortpath="$new_path"
19511  fi
19512
19513  # Call helper function which possibly converts this using DOS-style short mode.
19514  # If so, the updated path is stored in $new_path.
19515  new_path="$input_to_shortpath"
19516
19517  input_path="$input_to_shortpath"
19518  # Check if we need to convert this using DOS-style short mode. If the path
19519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19520  # take no chances and rewrite it.
19521  # Note: m4 eats our [], so we need to use [ and ] instead.
19522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19523  if test "x$has_forbidden_chars" != x; then
19524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19525    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19526    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19527    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19528      # Going to short mode and back again did indeed matter. Since short mode is
19529      # case insensitive, let's make it lowercase to improve readability.
19530      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19531      # Now convert it back to Unix-style (cygpath)
19532      input_path=`$CYGPATH -u "$shortmode_path"`
19533      new_path="$input_path"
19534    fi
19535  fi
19536
19537  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19538  if test "x$test_cygdrive_prefix" = x; then
19539    # As a simple fix, exclude /usr/bin since it's not a real path.
19540    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19541      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19542      # a path prefixed by /cygdrive for fixpath to work.
19543      new_path="$CYGWIN_ROOT_PATH$input_path"
19544    fi
19545  fi
19546
19547  # remove trailing .exe if any
19548  new_path="${new_path/%.exe/}"
19549
19550    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19551
19552  # First separate the path from the arguments. This will split at the first
19553  # space.
19554  complete="$FOUND_MAKE"
19555  path="${complete%% *}"
19556  tmp="$complete EOL"
19557  arguments="${tmp#* }"
19558
19559  # Input might be given as Windows format, start by converting to
19560  # unix format.
19561  new_path="$path"
19562
19563  windows_path="$new_path"
19564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19565    unix_path=`$CYGPATH -u "$windows_path"`
19566    new_path="$unix_path"
19567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19569    new_path="$unix_path"
19570  fi
19571
19572
19573  # Now try to locate executable using which
19574  new_path=`$WHICH "$new_path" 2> /dev/null`
19575
19576  if test "x$new_path" = x; then
19577    # Oops. Which didn't find the executable.
19578    # The splitting of arguments from the executable at a space might have been incorrect,
19579    # since paths with space are more likely in Windows. Give it another try with the whole
19580    # argument.
19581    path="$complete"
19582    arguments="EOL"
19583    new_path="$path"
19584
19585  windows_path="$new_path"
19586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19587    unix_path=`$CYGPATH -u "$windows_path"`
19588    new_path="$unix_path"
19589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19591    new_path="$unix_path"
19592  fi
19593
19594
19595    new_path=`$WHICH "$new_path" 2> /dev/null`
19596    # bat and cmd files are not always considered executable in MSYS causing which
19597    # to not find them
19598    if test "x$new_path" = x \
19599        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19600        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19601      new_path="$path"
19602
19603  windows_path="$new_path"
19604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19605    unix_path=`$CYGPATH -u "$windows_path"`
19606    new_path="$unix_path"
19607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19609    new_path="$unix_path"
19610  fi
19611
19612    fi
19613
19614    if test "x$new_path" = x; then
19615      # It's still not found. Now this is an unrecoverable error.
19616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19617$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19618      has_space=`$ECHO "$complete" | $GREP " "`
19619      if test "x$has_space" != x; then
19620        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19621$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19622      fi
19623      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19624    fi
19625  fi
19626
19627  # Now new_path has a complete unix path to the binary
19628  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19629    # Keep paths in /bin as-is, but remove trailing .exe if any
19630    new_path="${new_path/%.exe/}"
19631    # Do not save /bin paths to all_fixpath_prefixes!
19632  else
19633    # Not in mixed or Windows style, start by that.
19634    new_path=`cmd //c echo $new_path`
19635
19636  input_path="$new_path"
19637  # Check if we need to convert this using DOS-style short mode. If the path
19638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19639  # take no chances and rewrite it.
19640  # Note: m4 eats our [], so we need to use [ and ] instead.
19641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19642  if test "x$has_forbidden_chars" != x; then
19643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19644    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19645  fi
19646
19647    # Output is in $new_path
19648
19649  windows_path="$new_path"
19650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19651    unix_path=`$CYGPATH -u "$windows_path"`
19652    new_path="$unix_path"
19653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19655    new_path="$unix_path"
19656  fi
19657
19658    # remove trailing .exe if any
19659    new_path="${new_path/%.exe/}"
19660
19661    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19662    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19663  fi
19664
19665    else
19666      # We're on a unix platform. Hooray! :)
19667      # First separate the path from the arguments. This will split at the first
19668      # space.
19669      complete="$FOUND_MAKE"
19670      path="${complete%% *}"
19671      tmp="$complete EOL"
19672      arguments="${tmp#* }"
19673
19674      # Cannot rely on the command "which" here since it doesn't always work.
19675      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19676      if test -z "$is_absolute_path"; then
19677        # Path to executable is not absolute. Find it.
19678        IFS_save="$IFS"
19679        IFS=:
19680        for p in $PATH; do
19681          if test -f "$p/$path" && test -x "$p/$path"; then
19682            new_path="$p/$path"
19683            break
19684          fi
19685        done
19686        IFS="$IFS_save"
19687      else
19688        # This is an absolute path, we can use it without further modifications.
19689        new_path="$path"
19690      fi
19691
19692      if test "x$new_path" = x; then
19693        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19694$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19695        has_space=`$ECHO "$complete" | $GREP " "`
19696        if test "x$has_space" != x; then
19697          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19698$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19699        fi
19700        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19701      fi
19702    fi
19703
19704    # Now join together the path and the arguments once again
19705    if test "x$arguments" != xEOL; then
19706      new_complete="$new_path ${arguments% *}"
19707    else
19708      new_complete="$new_path"
19709    fi
19710
19711    if test "x$complete" != "x$new_complete"; then
19712      FOUND_MAKE="$new_complete"
19713      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19714$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19715    fi
19716  fi
19717
19718        fi
19719      fi
19720    fi
19721  fi
19722
19723
19724    if test "x$FOUND_MAKE" = x; then
19725      for ac_prog in make
19726do
19727  # Extract the first word of "$ac_prog", so it can be a program name with args.
19728set dummy $ac_prog; ac_word=$2
19729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19730$as_echo_n "checking for $ac_word... " >&6; }
19731if ${ac_cv_path_CHECK_MAKE+:} false; then :
19732  $as_echo_n "(cached) " >&6
19733else
19734  case $CHECK_MAKE in
19735  [\\/]* | ?:[\\/]*)
19736  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19737  ;;
19738  *)
19739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19740for as_dir in $PATH
19741do
19742  IFS=$as_save_IFS
19743  test -z "$as_dir" && as_dir=.
19744    for ac_exec_ext in '' $ac_executable_extensions; do
19745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19746    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19748    break 2
19749  fi
19750done
19751  done
19752IFS=$as_save_IFS
19753
19754  ;;
19755esac
19756fi
19757CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19758if test -n "$CHECK_MAKE"; then
19759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19760$as_echo "$CHECK_MAKE" >&6; }
19761else
19762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19763$as_echo "no" >&6; }
19764fi
19765
19766
19767  test -n "$CHECK_MAKE" && break
19768done
19769
19770
19771  MAKE_CANDIDATE=""$CHECK_MAKE""
19772  DESCRIPTION="make in PATH"
19773
19774  # On Cygwin, we require a newer version of make than on other platforms
19775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19776    MAKE_VERSION_EXPR="-e 4\."
19777    MAKE_REQUIRED_VERSION="4.0"
19778   else
19779    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19780    MAKE_REQUIRED_VERSION="3.81"
19781  fi
19782
19783  if test "x$MAKE_CANDIDATE" != x; then
19784    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19785$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19786    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19787    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19788    if test "x$IS_GNU_MAKE" = x; then
19789      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19790$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19791    else
19792      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19793      if test "x$IS_MODERN_MAKE" = x; then
19794        { $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
19795$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;}
19796      else
19797        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19798          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19799            MAKE_EXPECTED_ENV='cygwin'
19800          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19801            MAKE_EXPECTED_ENV='msys'
19802          else
19803            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19804          fi
19805          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19806          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19807        else
19808          # Not relevant for non-Windows
19809          IS_MAKE_CORRECT_ENV=true
19810        fi
19811        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19812          { $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
19813$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;}
19814        else
19815          FOUND_MAKE=$MAKE_CANDIDATE
19816
19817  # Only process if variable expands to non-empty
19818
19819  if test "x$FOUND_MAKE" != x; then
19820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19821
19822  # First separate the path from the arguments. This will split at the first
19823  # space.
19824  complete="$FOUND_MAKE"
19825  path="${complete%% *}"
19826  tmp="$complete EOL"
19827  arguments="${tmp#* }"
19828
19829  # Input might be given as Windows format, start by converting to
19830  # unix format.
19831  new_path=`$CYGPATH -u "$path"`
19832
19833  # Now try to locate executable using which
19834  new_path=`$WHICH "$new_path" 2> /dev/null`
19835  # bat and cmd files are not always considered executable in cygwin causing which
19836  # to not find them
19837  if test "x$new_path" = x \
19838      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19839      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19840    new_path=`$CYGPATH -u "$path"`
19841  fi
19842  if test "x$new_path" = x; then
19843    # Oops. Which didn't find the executable.
19844    # The splitting of arguments from the executable at a space might have been incorrect,
19845    # since paths with space are more likely in Windows. Give it another try with the whole
19846    # argument.
19847    path="$complete"
19848    arguments="EOL"
19849    new_path=`$CYGPATH -u "$path"`
19850    new_path=`$WHICH "$new_path" 2> /dev/null`
19851    # bat and cmd files are not always considered executable in cygwin causing which
19852    # to not find them
19853    if test "x$new_path" = x \
19854        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19855        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19856      new_path=`$CYGPATH -u "$path"`
19857    fi
19858    if test "x$new_path" = x; then
19859      # It's still not found. Now this is an unrecoverable error.
19860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19861$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19862      has_space=`$ECHO "$complete" | $GREP " "`
19863      if test "x$has_space" != x; then
19864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19866      fi
19867      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19868    fi
19869  fi
19870
19871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19874  # "foo.exe" is OK but "foo" is an error.
19875  #
19876  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19877  # It is also a way to make sure we got the proper file name for the real test later on.
19878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19879  if test "x$test_shortpath" = x; then
19880    # Short path failed, file does not exist as specified.
19881    # Try adding .exe or .cmd
19882    if test -f "${new_path}.exe"; then
19883      input_to_shortpath="${new_path}.exe"
19884    elif test -f "${new_path}.cmd"; then
19885      input_to_shortpath="${new_path}.cmd"
19886    else
19887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19888$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19889      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19890$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19891      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19892    fi
19893  else
19894    input_to_shortpath="$new_path"
19895  fi
19896
19897  # Call helper function which possibly converts this using DOS-style short mode.
19898  # If so, the updated path is stored in $new_path.
19899  new_path="$input_to_shortpath"
19900
19901  input_path="$input_to_shortpath"
19902  # Check if we need to convert this using DOS-style short mode. If the path
19903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19904  # take no chances and rewrite it.
19905  # Note: m4 eats our [], so we need to use [ and ] instead.
19906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19907  if test "x$has_forbidden_chars" != x; then
19908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19912      # Going to short mode and back again did indeed matter. Since short mode is
19913      # case insensitive, let's make it lowercase to improve readability.
19914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19915      # Now convert it back to Unix-style (cygpath)
19916      input_path=`$CYGPATH -u "$shortmode_path"`
19917      new_path="$input_path"
19918    fi
19919  fi
19920
19921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19922  if test "x$test_cygdrive_prefix" = x; then
19923    # As a simple fix, exclude /usr/bin since it's not a real path.
19924    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19926      # a path prefixed by /cygdrive for fixpath to work.
19927      new_path="$CYGWIN_ROOT_PATH$input_path"
19928    fi
19929  fi
19930
19931  # remove trailing .exe if any
19932  new_path="${new_path/%.exe/}"
19933
19934    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19935
19936  # First separate the path from the arguments. This will split at the first
19937  # space.
19938  complete="$FOUND_MAKE"
19939  path="${complete%% *}"
19940  tmp="$complete EOL"
19941  arguments="${tmp#* }"
19942
19943  # Input might be given as Windows format, start by converting to
19944  # unix format.
19945  new_path="$path"
19946
19947  windows_path="$new_path"
19948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19949    unix_path=`$CYGPATH -u "$windows_path"`
19950    new_path="$unix_path"
19951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19953    new_path="$unix_path"
19954  fi
19955
19956
19957  # Now try to locate executable using which
19958  new_path=`$WHICH "$new_path" 2> /dev/null`
19959
19960  if test "x$new_path" = x; then
19961    # Oops. Which didn't find the executable.
19962    # The splitting of arguments from the executable at a space might have been incorrect,
19963    # since paths with space are more likely in Windows. Give it another try with the whole
19964    # argument.
19965    path="$complete"
19966    arguments="EOL"
19967    new_path="$path"
19968
19969  windows_path="$new_path"
19970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19971    unix_path=`$CYGPATH -u "$windows_path"`
19972    new_path="$unix_path"
19973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19975    new_path="$unix_path"
19976  fi
19977
19978
19979    new_path=`$WHICH "$new_path" 2> /dev/null`
19980    # bat and cmd files are not always considered executable in MSYS causing which
19981    # to not find them
19982    if test "x$new_path" = x \
19983        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19984        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19985      new_path="$path"
19986
19987  windows_path="$new_path"
19988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19989    unix_path=`$CYGPATH -u "$windows_path"`
19990    new_path="$unix_path"
19991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19993    new_path="$unix_path"
19994  fi
19995
19996    fi
19997
19998    if test "x$new_path" = x; then
19999      # It's still not found. Now this is an unrecoverable error.
20000      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20001$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20002      has_space=`$ECHO "$complete" | $GREP " "`
20003      if test "x$has_space" != x; then
20004        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20005$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20006      fi
20007      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20008    fi
20009  fi
20010
20011  # Now new_path has a complete unix path to the binary
20012  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20013    # Keep paths in /bin as-is, but remove trailing .exe if any
20014    new_path="${new_path/%.exe/}"
20015    # Do not save /bin paths to all_fixpath_prefixes!
20016  else
20017    # Not in mixed or Windows style, start by that.
20018    new_path=`cmd //c echo $new_path`
20019
20020  input_path="$new_path"
20021  # Check if we need to convert this using DOS-style short mode. If the path
20022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20023  # take no chances and rewrite it.
20024  # Note: m4 eats our [], so we need to use [ and ] instead.
20025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20026  if test "x$has_forbidden_chars" != x; then
20027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20028    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20029  fi
20030
20031    # Output is in $new_path
20032
20033  windows_path="$new_path"
20034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20035    unix_path=`$CYGPATH -u "$windows_path"`
20036    new_path="$unix_path"
20037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20039    new_path="$unix_path"
20040  fi
20041
20042    # remove trailing .exe if any
20043    new_path="${new_path/%.exe/}"
20044
20045    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20046    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20047  fi
20048
20049    else
20050      # We're on a unix platform. Hooray! :)
20051      # First separate the path from the arguments. This will split at the first
20052      # space.
20053      complete="$FOUND_MAKE"
20054      path="${complete%% *}"
20055      tmp="$complete EOL"
20056      arguments="${tmp#* }"
20057
20058      # Cannot rely on the command "which" here since it doesn't always work.
20059      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20060      if test -z "$is_absolute_path"; then
20061        # Path to executable is not absolute. Find it.
20062        IFS_save="$IFS"
20063        IFS=:
20064        for p in $PATH; do
20065          if test -f "$p/$path" && test -x "$p/$path"; then
20066            new_path="$p/$path"
20067            break
20068          fi
20069        done
20070        IFS="$IFS_save"
20071      else
20072        # This is an absolute path, we can use it without further modifications.
20073        new_path="$path"
20074      fi
20075
20076      if test "x$new_path" = x; then
20077        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20078$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20079        has_space=`$ECHO "$complete" | $GREP " "`
20080        if test "x$has_space" != x; then
20081          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20082$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20083        fi
20084        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20085      fi
20086    fi
20087
20088    # Now join together the path and the arguments once again
20089    if test "x$arguments" != xEOL; then
20090      new_complete="$new_path ${arguments% *}"
20091    else
20092      new_complete="$new_path"
20093    fi
20094
20095    if test "x$complete" != "x$new_complete"; then
20096      FOUND_MAKE="$new_complete"
20097      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20098$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20099    fi
20100  fi
20101
20102        fi
20103      fi
20104    fi
20105  fi
20106
20107    fi
20108
20109    if test "x$FOUND_MAKE" = x; then
20110      if test "x$TOOLCHAIN_PATH" != x; then
20111        # We have a toolchain path, check that as well before giving up.
20112        OLD_PATH=$PATH
20113        PATH=$TOOLCHAIN_PATH:$PATH
20114        for ac_prog in gmake
20115do
20116  # Extract the first word of "$ac_prog", so it can be a program name with args.
20117set dummy $ac_prog; ac_word=$2
20118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20119$as_echo_n "checking for $ac_word... " >&6; }
20120if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20121  $as_echo_n "(cached) " >&6
20122else
20123  case $CHECK_TOOLSDIR_GMAKE in
20124  [\\/]* | ?:[\\/]*)
20125  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20126  ;;
20127  *)
20128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20129for as_dir in $PATH
20130do
20131  IFS=$as_save_IFS
20132  test -z "$as_dir" && as_dir=.
20133    for ac_exec_ext in '' $ac_executable_extensions; do
20134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20135    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20137    break 2
20138  fi
20139done
20140  done
20141IFS=$as_save_IFS
20142
20143  ;;
20144esac
20145fi
20146CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20147if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20149$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20150else
20151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20152$as_echo "no" >&6; }
20153fi
20154
20155
20156  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20157done
20158
20159
20160  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20161  DESCRIPTION="gmake in tools-dir"
20162
20163  # On Cygwin, we require a newer version of make than on other platforms
20164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20165    MAKE_VERSION_EXPR="-e 4\."
20166    MAKE_REQUIRED_VERSION="4.0"
20167   else
20168    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20169    MAKE_REQUIRED_VERSION="3.81"
20170  fi
20171
20172  if test "x$MAKE_CANDIDATE" != x; then
20173    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20174$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20175    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20176    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20177    if test "x$IS_GNU_MAKE" = x; then
20178      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20179$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20180    else
20181      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20182      if test "x$IS_MODERN_MAKE" = x; then
20183        { $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
20184$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;}
20185      else
20186        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20187          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20188            MAKE_EXPECTED_ENV='cygwin'
20189          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20190            MAKE_EXPECTED_ENV='msys'
20191          else
20192            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20193          fi
20194          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20195          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20196        else
20197          # Not relevant for non-Windows
20198          IS_MAKE_CORRECT_ENV=true
20199        fi
20200        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20201          { $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
20202$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;}
20203        else
20204          FOUND_MAKE=$MAKE_CANDIDATE
20205
20206  # Only process if variable expands to non-empty
20207
20208  if test "x$FOUND_MAKE" != x; then
20209    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20210
20211  # First separate the path from the arguments. This will split at the first
20212  # space.
20213  complete="$FOUND_MAKE"
20214  path="${complete%% *}"
20215  tmp="$complete EOL"
20216  arguments="${tmp#* }"
20217
20218  # Input might be given as Windows format, start by converting to
20219  # unix format.
20220  new_path=`$CYGPATH -u "$path"`
20221
20222  # Now try to locate executable using which
20223  new_path=`$WHICH "$new_path" 2> /dev/null`
20224  # bat and cmd files are not always considered executable in cygwin causing which
20225  # to not find them
20226  if test "x$new_path" = x \
20227      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20228      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20229    new_path=`$CYGPATH -u "$path"`
20230  fi
20231  if test "x$new_path" = x; then
20232    # Oops. Which didn't find the executable.
20233    # The splitting of arguments from the executable at a space might have been incorrect,
20234    # since paths with space are more likely in Windows. Give it another try with the whole
20235    # argument.
20236    path="$complete"
20237    arguments="EOL"
20238    new_path=`$CYGPATH -u "$path"`
20239    new_path=`$WHICH "$new_path" 2> /dev/null`
20240    # bat and cmd files are not always considered executable in cygwin causing which
20241    # to not find them
20242    if test "x$new_path" = x \
20243        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20244        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20245      new_path=`$CYGPATH -u "$path"`
20246    fi
20247    if test "x$new_path" = x; then
20248      # It's still not found. Now this is an unrecoverable error.
20249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20250$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20251      has_space=`$ECHO "$complete" | $GREP " "`
20252      if test "x$has_space" != x; then
20253        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20254$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20255      fi
20256      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20257    fi
20258  fi
20259
20260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20263  # "foo.exe" is OK but "foo" is an error.
20264  #
20265  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20266  # It is also a way to make sure we got the proper file name for the real test later on.
20267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20268  if test "x$test_shortpath" = x; then
20269    # Short path failed, file does not exist as specified.
20270    # Try adding .exe or .cmd
20271    if test -f "${new_path}.exe"; then
20272      input_to_shortpath="${new_path}.exe"
20273    elif test -f "${new_path}.cmd"; then
20274      input_to_shortpath="${new_path}.cmd"
20275    else
20276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20277$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20278      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20279$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20280      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20281    fi
20282  else
20283    input_to_shortpath="$new_path"
20284  fi
20285
20286  # Call helper function which possibly converts this using DOS-style short mode.
20287  # If so, the updated path is stored in $new_path.
20288  new_path="$input_to_shortpath"
20289
20290  input_path="$input_to_shortpath"
20291  # Check if we need to convert this using DOS-style short mode. If the path
20292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20293  # take no chances and rewrite it.
20294  # Note: m4 eats our [], so we need to use [ and ] instead.
20295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20296  if test "x$has_forbidden_chars" != x; then
20297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20298    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20299    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20300    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20301      # Going to short mode and back again did indeed matter. Since short mode is
20302      # case insensitive, let's make it lowercase to improve readability.
20303      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20304      # Now convert it back to Unix-style (cygpath)
20305      input_path=`$CYGPATH -u "$shortmode_path"`
20306      new_path="$input_path"
20307    fi
20308  fi
20309
20310  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20311  if test "x$test_cygdrive_prefix" = x; then
20312    # As a simple fix, exclude /usr/bin since it's not a real path.
20313    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20314      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20315      # a path prefixed by /cygdrive for fixpath to work.
20316      new_path="$CYGWIN_ROOT_PATH$input_path"
20317    fi
20318  fi
20319
20320  # remove trailing .exe if any
20321  new_path="${new_path/%.exe/}"
20322
20323    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20324
20325  # First separate the path from the arguments. This will split at the first
20326  # space.
20327  complete="$FOUND_MAKE"
20328  path="${complete%% *}"
20329  tmp="$complete EOL"
20330  arguments="${tmp#* }"
20331
20332  # Input might be given as Windows format, start by converting to
20333  # unix format.
20334  new_path="$path"
20335
20336  windows_path="$new_path"
20337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20338    unix_path=`$CYGPATH -u "$windows_path"`
20339    new_path="$unix_path"
20340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20342    new_path="$unix_path"
20343  fi
20344
20345
20346  # Now try to locate executable using which
20347  new_path=`$WHICH "$new_path" 2> /dev/null`
20348
20349  if test "x$new_path" = x; then
20350    # Oops. Which didn't find the executable.
20351    # The splitting of arguments from the executable at a space might have been incorrect,
20352    # since paths with space are more likely in Windows. Give it another try with the whole
20353    # argument.
20354    path="$complete"
20355    arguments="EOL"
20356    new_path="$path"
20357
20358  windows_path="$new_path"
20359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20360    unix_path=`$CYGPATH -u "$windows_path"`
20361    new_path="$unix_path"
20362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20364    new_path="$unix_path"
20365  fi
20366
20367
20368    new_path=`$WHICH "$new_path" 2> /dev/null`
20369    # bat and cmd files are not always considered executable in MSYS causing which
20370    # to not find them
20371    if test "x$new_path" = x \
20372        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20373        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20374      new_path="$path"
20375
20376  windows_path="$new_path"
20377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20378    unix_path=`$CYGPATH -u "$windows_path"`
20379    new_path="$unix_path"
20380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20382    new_path="$unix_path"
20383  fi
20384
20385    fi
20386
20387    if test "x$new_path" = x; then
20388      # It's still not found. Now this is an unrecoverable error.
20389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20390$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20391      has_space=`$ECHO "$complete" | $GREP " "`
20392      if test "x$has_space" != x; then
20393        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20394$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20395      fi
20396      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20397    fi
20398  fi
20399
20400  # Now new_path has a complete unix path to the binary
20401  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20402    # Keep paths in /bin as-is, but remove trailing .exe if any
20403    new_path="${new_path/%.exe/}"
20404    # Do not save /bin paths to all_fixpath_prefixes!
20405  else
20406    # Not in mixed or Windows style, start by that.
20407    new_path=`cmd //c echo $new_path`
20408
20409  input_path="$new_path"
20410  # Check if we need to convert this using DOS-style short mode. If the path
20411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20412  # take no chances and rewrite it.
20413  # Note: m4 eats our [], so we need to use [ and ] instead.
20414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20415  if test "x$has_forbidden_chars" != x; then
20416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20418  fi
20419
20420    # Output is in $new_path
20421
20422  windows_path="$new_path"
20423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20424    unix_path=`$CYGPATH -u "$windows_path"`
20425    new_path="$unix_path"
20426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20428    new_path="$unix_path"
20429  fi
20430
20431    # remove trailing .exe if any
20432    new_path="${new_path/%.exe/}"
20433
20434    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20435    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20436  fi
20437
20438    else
20439      # We're on a unix platform. Hooray! :)
20440      # First separate the path from the arguments. This will split at the first
20441      # space.
20442      complete="$FOUND_MAKE"
20443      path="${complete%% *}"
20444      tmp="$complete EOL"
20445      arguments="${tmp#* }"
20446
20447      # Cannot rely on the command "which" here since it doesn't always work.
20448      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20449      if test -z "$is_absolute_path"; then
20450        # Path to executable is not absolute. Find it.
20451        IFS_save="$IFS"
20452        IFS=:
20453        for p in $PATH; do
20454          if test -f "$p/$path" && test -x "$p/$path"; then
20455            new_path="$p/$path"
20456            break
20457          fi
20458        done
20459        IFS="$IFS_save"
20460      else
20461        # This is an absolute path, we can use it without further modifications.
20462        new_path="$path"
20463      fi
20464
20465      if test "x$new_path" = x; then
20466        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20467$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20468        has_space=`$ECHO "$complete" | $GREP " "`
20469        if test "x$has_space" != x; then
20470          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20471$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20472        fi
20473        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20474      fi
20475    fi
20476
20477    # Now join together the path and the arguments once again
20478    if test "x$arguments" != xEOL; then
20479      new_complete="$new_path ${arguments% *}"
20480    else
20481      new_complete="$new_path"
20482    fi
20483
20484    if test "x$complete" != "x$new_complete"; then
20485      FOUND_MAKE="$new_complete"
20486      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20487$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20488    fi
20489  fi
20490
20491        fi
20492      fi
20493    fi
20494  fi
20495
20496        if test "x$FOUND_MAKE" = x; then
20497          for ac_prog in make
20498do
20499  # Extract the first word of "$ac_prog", so it can be a program name with args.
20500set dummy $ac_prog; ac_word=$2
20501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20502$as_echo_n "checking for $ac_word... " >&6; }
20503if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20504  $as_echo_n "(cached) " >&6
20505else
20506  case $CHECK_TOOLSDIR_MAKE in
20507  [\\/]* | ?:[\\/]*)
20508  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20509  ;;
20510  *)
20511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20512for as_dir in $PATH
20513do
20514  IFS=$as_save_IFS
20515  test -z "$as_dir" && as_dir=.
20516    for ac_exec_ext in '' $ac_executable_extensions; do
20517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20518    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20520    break 2
20521  fi
20522done
20523  done
20524IFS=$as_save_IFS
20525
20526  ;;
20527esac
20528fi
20529CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20530if test -n "$CHECK_TOOLSDIR_MAKE"; then
20531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20532$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20533else
20534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20535$as_echo "no" >&6; }
20536fi
20537
20538
20539  test -n "$CHECK_TOOLSDIR_MAKE" && break
20540done
20541
20542
20543  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20544  DESCRIPTION="make in tools-dir"
20545
20546  # On Cygwin, we require a newer version of make than on other platforms
20547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20548    MAKE_VERSION_EXPR="-e 4\."
20549    MAKE_REQUIRED_VERSION="4.0"
20550   else
20551    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20552    MAKE_REQUIRED_VERSION="3.81"
20553  fi
20554
20555  if test "x$MAKE_CANDIDATE" != x; then
20556    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20557$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20558    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20559    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20560    if test "x$IS_GNU_MAKE" = x; then
20561      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20562$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20563    else
20564      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20565      if test "x$IS_MODERN_MAKE" = x; then
20566        { $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
20567$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;}
20568      else
20569        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20570          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20571            MAKE_EXPECTED_ENV='cygwin'
20572          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20573            MAKE_EXPECTED_ENV='msys'
20574          else
20575            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20576          fi
20577          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20578          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20579        else
20580          # Not relevant for non-Windows
20581          IS_MAKE_CORRECT_ENV=true
20582        fi
20583        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20584          { $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
20585$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;}
20586        else
20587          FOUND_MAKE=$MAKE_CANDIDATE
20588
20589  # Only process if variable expands to non-empty
20590
20591  if test "x$FOUND_MAKE" != x; then
20592    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20593
20594  # First separate the path from the arguments. This will split at the first
20595  # space.
20596  complete="$FOUND_MAKE"
20597  path="${complete%% *}"
20598  tmp="$complete EOL"
20599  arguments="${tmp#* }"
20600
20601  # Input might be given as Windows format, start by converting to
20602  # unix format.
20603  new_path=`$CYGPATH -u "$path"`
20604
20605  # Now try to locate executable using which
20606  new_path=`$WHICH "$new_path" 2> /dev/null`
20607  # bat and cmd files are not always considered executable in cygwin causing which
20608  # to not find them
20609  if test "x$new_path" = x \
20610      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20611      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20612    new_path=`$CYGPATH -u "$path"`
20613  fi
20614  if test "x$new_path" = x; then
20615    # Oops. Which didn't find the executable.
20616    # The splitting of arguments from the executable at a space might have been incorrect,
20617    # since paths with space are more likely in Windows. Give it another try with the whole
20618    # argument.
20619    path="$complete"
20620    arguments="EOL"
20621    new_path=`$CYGPATH -u "$path"`
20622    new_path=`$WHICH "$new_path" 2> /dev/null`
20623    # bat and cmd files are not always considered executable in cygwin causing which
20624    # to not find them
20625    if test "x$new_path" = x \
20626        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20627        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20628      new_path=`$CYGPATH -u "$path"`
20629    fi
20630    if test "x$new_path" = x; then
20631      # It's still not found. Now this is an unrecoverable error.
20632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20633$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20634      has_space=`$ECHO "$complete" | $GREP " "`
20635      if test "x$has_space" != x; then
20636        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20637$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20638      fi
20639      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20640    fi
20641  fi
20642
20643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20646  # "foo.exe" is OK but "foo" is an error.
20647  #
20648  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20649  # It is also a way to make sure we got the proper file name for the real test later on.
20650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20651  if test "x$test_shortpath" = x; then
20652    # Short path failed, file does not exist as specified.
20653    # Try adding .exe or .cmd
20654    if test -f "${new_path}.exe"; then
20655      input_to_shortpath="${new_path}.exe"
20656    elif test -f "${new_path}.cmd"; then
20657      input_to_shortpath="${new_path}.cmd"
20658    else
20659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20660$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20661      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20662$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20663      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20664    fi
20665  else
20666    input_to_shortpath="$new_path"
20667  fi
20668
20669  # Call helper function which possibly converts this using DOS-style short mode.
20670  # If so, the updated path is stored in $new_path.
20671  new_path="$input_to_shortpath"
20672
20673  input_path="$input_to_shortpath"
20674  # Check if we need to convert this using DOS-style short mode. If the path
20675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20676  # take no chances and rewrite it.
20677  # Note: m4 eats our [], so we need to use [ and ] instead.
20678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20679  if test "x$has_forbidden_chars" != x; then
20680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20684      # Going to short mode and back again did indeed matter. Since short mode is
20685      # case insensitive, let's make it lowercase to improve readability.
20686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20687      # Now convert it back to Unix-style (cygpath)
20688      input_path=`$CYGPATH -u "$shortmode_path"`
20689      new_path="$input_path"
20690    fi
20691  fi
20692
20693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20694  if test "x$test_cygdrive_prefix" = x; then
20695    # As a simple fix, exclude /usr/bin since it's not a real path.
20696    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20698      # a path prefixed by /cygdrive for fixpath to work.
20699      new_path="$CYGWIN_ROOT_PATH$input_path"
20700    fi
20701  fi
20702
20703  # remove trailing .exe if any
20704  new_path="${new_path/%.exe/}"
20705
20706    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20707
20708  # First separate the path from the arguments. This will split at the first
20709  # space.
20710  complete="$FOUND_MAKE"
20711  path="${complete%% *}"
20712  tmp="$complete EOL"
20713  arguments="${tmp#* }"
20714
20715  # Input might be given as Windows format, start by converting to
20716  # unix format.
20717  new_path="$path"
20718
20719  windows_path="$new_path"
20720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20721    unix_path=`$CYGPATH -u "$windows_path"`
20722    new_path="$unix_path"
20723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20725    new_path="$unix_path"
20726  fi
20727
20728
20729  # Now try to locate executable using which
20730  new_path=`$WHICH "$new_path" 2> /dev/null`
20731
20732  if test "x$new_path" = x; then
20733    # Oops. Which didn't find the executable.
20734    # The splitting of arguments from the executable at a space might have been incorrect,
20735    # since paths with space are more likely in Windows. Give it another try with the whole
20736    # argument.
20737    path="$complete"
20738    arguments="EOL"
20739    new_path="$path"
20740
20741  windows_path="$new_path"
20742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20743    unix_path=`$CYGPATH -u "$windows_path"`
20744    new_path="$unix_path"
20745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20747    new_path="$unix_path"
20748  fi
20749
20750
20751    new_path=`$WHICH "$new_path" 2> /dev/null`
20752    # bat and cmd files are not always considered executable in MSYS causing which
20753    # to not find them
20754    if test "x$new_path" = x \
20755        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20756        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20757      new_path="$path"
20758
20759  windows_path="$new_path"
20760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20761    unix_path=`$CYGPATH -u "$windows_path"`
20762    new_path="$unix_path"
20763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20765    new_path="$unix_path"
20766  fi
20767
20768    fi
20769
20770    if test "x$new_path" = x; then
20771      # It's still not found. Now this is an unrecoverable error.
20772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20773$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20774      has_space=`$ECHO "$complete" | $GREP " "`
20775      if test "x$has_space" != x; then
20776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20778      fi
20779      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20780    fi
20781  fi
20782
20783  # Now new_path has a complete unix path to the binary
20784  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20785    # Keep paths in /bin as-is, but remove trailing .exe if any
20786    new_path="${new_path/%.exe/}"
20787    # Do not save /bin paths to all_fixpath_prefixes!
20788  else
20789    # Not in mixed or Windows style, start by that.
20790    new_path=`cmd //c echo $new_path`
20791
20792  input_path="$new_path"
20793  # Check if we need to convert this using DOS-style short mode. If the path
20794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20795  # take no chances and rewrite it.
20796  # Note: m4 eats our [], so we need to use [ and ] instead.
20797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20798  if test "x$has_forbidden_chars" != x; then
20799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20801  fi
20802
20803    # Output is in $new_path
20804
20805  windows_path="$new_path"
20806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20807    unix_path=`$CYGPATH -u "$windows_path"`
20808    new_path="$unix_path"
20809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20811    new_path="$unix_path"
20812  fi
20813
20814    # remove trailing .exe if any
20815    new_path="${new_path/%.exe/}"
20816
20817    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20818    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20819  fi
20820
20821    else
20822      # We're on a unix platform. Hooray! :)
20823      # First separate the path from the arguments. This will split at the first
20824      # space.
20825      complete="$FOUND_MAKE"
20826      path="${complete%% *}"
20827      tmp="$complete EOL"
20828      arguments="${tmp#* }"
20829
20830      # Cannot rely on the command "which" here since it doesn't always work.
20831      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20832      if test -z "$is_absolute_path"; then
20833        # Path to executable is not absolute. Find it.
20834        IFS_save="$IFS"
20835        IFS=:
20836        for p in $PATH; do
20837          if test -f "$p/$path" && test -x "$p/$path"; then
20838            new_path="$p/$path"
20839            break
20840          fi
20841        done
20842        IFS="$IFS_save"
20843      else
20844        # This is an absolute path, we can use it without further modifications.
20845        new_path="$path"
20846      fi
20847
20848      if test "x$new_path" = x; then
20849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20850$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20851        has_space=`$ECHO "$complete" | $GREP " "`
20852        if test "x$has_space" != x; then
20853          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20854$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20855        fi
20856        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20857      fi
20858    fi
20859
20860    # Now join together the path and the arguments once again
20861    if test "x$arguments" != xEOL; then
20862      new_complete="$new_path ${arguments% *}"
20863    else
20864      new_complete="$new_path"
20865    fi
20866
20867    if test "x$complete" != "x$new_complete"; then
20868      FOUND_MAKE="$new_complete"
20869      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20870$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20871    fi
20872  fi
20873
20874        fi
20875      fi
20876    fi
20877  fi
20878
20879        fi
20880        PATH=$OLD_PATH
20881      fi
20882    fi
20883
20884    if test "x$FOUND_MAKE" = x; then
20885      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
20886    fi
20887
20888    else
20889      # If it succeeded, then it was overridden by the user. We will use it
20890      # for the tool.
20891
20892      # First remove it from the list of overridden variables, so we can test
20893      # for unknown variables in the end.
20894      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20895
20896      # Check if we try to supply an empty value
20897      if test "x$MAKE" = x; then
20898        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20899$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20900        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20901$as_echo_n "checking for MAKE... " >&6; }
20902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20903$as_echo "disabled" >&6; }
20904      else
20905        # Check if the provided tool contains a complete path.
20906        tool_specified="$MAKE"
20907        tool_basename="${tool_specified##*/}"
20908        if test "x$tool_basename" = "x$tool_specified"; then
20909          # A command without a complete path is provided, search $PATH.
20910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20911$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20912          # Extract the first word of "$tool_basename", so it can be a program name with args.
20913set dummy $tool_basename; ac_word=$2
20914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20915$as_echo_n "checking for $ac_word... " >&6; }
20916if ${ac_cv_path_MAKE+:} false; then :
20917  $as_echo_n "(cached) " >&6
20918else
20919  case $MAKE in
20920  [\\/]* | ?:[\\/]*)
20921  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20922  ;;
20923  *)
20924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20925for as_dir in $PATH
20926do
20927  IFS=$as_save_IFS
20928  test -z "$as_dir" && as_dir=.
20929    for ac_exec_ext in '' $ac_executable_extensions; do
20930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20931    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20933    break 2
20934  fi
20935done
20936  done
20937IFS=$as_save_IFS
20938
20939  ;;
20940esac
20941fi
20942MAKE=$ac_cv_path_MAKE
20943if test -n "$MAKE"; then
20944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20945$as_echo "$MAKE" >&6; }
20946else
20947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20948$as_echo "no" >&6; }
20949fi
20950
20951
20952          if test "x$MAKE" = x; then
20953            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20954          fi
20955        else
20956          # Otherwise we believe it is a complete path. Use it as it is.
20957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20958$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20959          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20960$as_echo_n "checking for MAKE... " >&6; }
20961          if test ! -x "$tool_specified"; then
20962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20963$as_echo "not found" >&6; }
20964            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20965          fi
20966          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20967$as_echo "$tool_specified" >&6; }
20968        fi
20969      fi
20970    fi
20971
20972    # If MAKE was set by user, verify the version
20973
20974  MAKE_CANDIDATE=""$MAKE""
20975  DESCRIPTION="user supplied MAKE=$MAKE"
20976
20977  # On Cygwin, we require a newer version of make than on other platforms
20978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20979    MAKE_VERSION_EXPR="-e 4\."
20980    MAKE_REQUIRED_VERSION="4.0"
20981   else
20982    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20983    MAKE_REQUIRED_VERSION="3.81"
20984  fi
20985
20986  if test "x$MAKE_CANDIDATE" != x; then
20987    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20988$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20989    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20990    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20991    if test "x$IS_GNU_MAKE" = x; then
20992      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20993$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20994    else
20995      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20996      if test "x$IS_MODERN_MAKE" = x; then
20997        { $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
20998$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;}
20999      else
21000        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21001          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21002            MAKE_EXPECTED_ENV='cygwin'
21003          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21004            MAKE_EXPECTED_ENV='msys'
21005          else
21006            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21007          fi
21008          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21009          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21010        else
21011          # Not relevant for non-Windows
21012          IS_MAKE_CORRECT_ENV=true
21013        fi
21014        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21015          { $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
21016$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;}
21017        else
21018          FOUND_MAKE=$MAKE_CANDIDATE
21019
21020  # Only process if variable expands to non-empty
21021
21022  if test "x$FOUND_MAKE" != x; then
21023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21024
21025  # First separate the path from the arguments. This will split at the first
21026  # space.
21027  complete="$FOUND_MAKE"
21028  path="${complete%% *}"
21029  tmp="$complete EOL"
21030  arguments="${tmp#* }"
21031
21032  # Input might be given as Windows format, start by converting to
21033  # unix format.
21034  new_path=`$CYGPATH -u "$path"`
21035
21036  # Now try to locate executable using which
21037  new_path=`$WHICH "$new_path" 2> /dev/null`
21038  # bat and cmd files are not always considered executable in cygwin causing which
21039  # to not find them
21040  if test "x$new_path" = x \
21041      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21042      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21043    new_path=`$CYGPATH -u "$path"`
21044  fi
21045  if test "x$new_path" = x; then
21046    # Oops. Which didn't find the executable.
21047    # The splitting of arguments from the executable at a space might have been incorrect,
21048    # since paths with space are more likely in Windows. Give it another try with the whole
21049    # argument.
21050    path="$complete"
21051    arguments="EOL"
21052    new_path=`$CYGPATH -u "$path"`
21053    new_path=`$WHICH "$new_path" 2> /dev/null`
21054    # bat and cmd files are not always considered executable in cygwin causing which
21055    # to not find them
21056    if test "x$new_path" = x \
21057        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21058        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21059      new_path=`$CYGPATH -u "$path"`
21060    fi
21061    if test "x$new_path" = x; then
21062      # It's still not found. Now this is an unrecoverable error.
21063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21064$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21065      has_space=`$ECHO "$complete" | $GREP " "`
21066      if test "x$has_space" != x; then
21067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21069      fi
21070      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21071    fi
21072  fi
21073
21074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21077  # "foo.exe" is OK but "foo" is an error.
21078  #
21079  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21080  # It is also a way to make sure we got the proper file name for the real test later on.
21081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21082  if test "x$test_shortpath" = x; then
21083    # Short path failed, file does not exist as specified.
21084    # Try adding .exe or .cmd
21085    if test -f "${new_path}.exe"; then
21086      input_to_shortpath="${new_path}.exe"
21087    elif test -f "${new_path}.cmd"; then
21088      input_to_shortpath="${new_path}.cmd"
21089    else
21090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21091$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21092      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21093$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21094      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21095    fi
21096  else
21097    input_to_shortpath="$new_path"
21098  fi
21099
21100  # Call helper function which possibly converts this using DOS-style short mode.
21101  # If so, the updated path is stored in $new_path.
21102  new_path="$input_to_shortpath"
21103
21104  input_path="$input_to_shortpath"
21105  # Check if we need to convert this using DOS-style short mode. If the path
21106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21107  # take no chances and rewrite it.
21108  # Note: m4 eats our [], so we need to use [ and ] instead.
21109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21110  if test "x$has_forbidden_chars" != x; then
21111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21115      # Going to short mode and back again did indeed matter. Since short mode is
21116      # case insensitive, let's make it lowercase to improve readability.
21117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21118      # Now convert it back to Unix-style (cygpath)
21119      input_path=`$CYGPATH -u "$shortmode_path"`
21120      new_path="$input_path"
21121    fi
21122  fi
21123
21124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21125  if test "x$test_cygdrive_prefix" = x; then
21126    # As a simple fix, exclude /usr/bin since it's not a real path.
21127    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21129      # a path prefixed by /cygdrive for fixpath to work.
21130      new_path="$CYGWIN_ROOT_PATH$input_path"
21131    fi
21132  fi
21133
21134  # remove trailing .exe if any
21135  new_path="${new_path/%.exe/}"
21136
21137    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21138
21139  # First separate the path from the arguments. This will split at the first
21140  # space.
21141  complete="$FOUND_MAKE"
21142  path="${complete%% *}"
21143  tmp="$complete EOL"
21144  arguments="${tmp#* }"
21145
21146  # Input might be given as Windows format, start by converting to
21147  # unix format.
21148  new_path="$path"
21149
21150  windows_path="$new_path"
21151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21152    unix_path=`$CYGPATH -u "$windows_path"`
21153    new_path="$unix_path"
21154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21156    new_path="$unix_path"
21157  fi
21158
21159
21160  # Now try to locate executable using which
21161  new_path=`$WHICH "$new_path" 2> /dev/null`
21162
21163  if test "x$new_path" = x; then
21164    # Oops. Which didn't find the executable.
21165    # The splitting of arguments from the executable at a space might have been incorrect,
21166    # since paths with space are more likely in Windows. Give it another try with the whole
21167    # argument.
21168    path="$complete"
21169    arguments="EOL"
21170    new_path="$path"
21171
21172  windows_path="$new_path"
21173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21174    unix_path=`$CYGPATH -u "$windows_path"`
21175    new_path="$unix_path"
21176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21178    new_path="$unix_path"
21179  fi
21180
21181
21182    new_path=`$WHICH "$new_path" 2> /dev/null`
21183    # bat and cmd files are not always considered executable in MSYS causing which
21184    # to not find them
21185    if test "x$new_path" = x \
21186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21188      new_path="$path"
21189
21190  windows_path="$new_path"
21191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21192    unix_path=`$CYGPATH -u "$windows_path"`
21193    new_path="$unix_path"
21194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21196    new_path="$unix_path"
21197  fi
21198
21199    fi
21200
21201    if test "x$new_path" = x; then
21202      # It's still not found. Now this is an unrecoverable error.
21203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21204$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21205      has_space=`$ECHO "$complete" | $GREP " "`
21206      if test "x$has_space" != x; then
21207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21209      fi
21210      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21211    fi
21212  fi
21213
21214  # Now new_path has a complete unix path to the binary
21215  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21216    # Keep paths in /bin as-is, but remove trailing .exe if any
21217    new_path="${new_path/%.exe/}"
21218    # Do not save /bin paths to all_fixpath_prefixes!
21219  else
21220    # Not in mixed or Windows style, start by that.
21221    new_path=`cmd //c echo $new_path`
21222
21223  input_path="$new_path"
21224  # Check if we need to convert this using DOS-style short mode. If the path
21225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21226  # take no chances and rewrite it.
21227  # Note: m4 eats our [], so we need to use [ and ] instead.
21228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21229  if test "x$has_forbidden_chars" != x; then
21230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21232  fi
21233
21234    # Output is in $new_path
21235
21236  windows_path="$new_path"
21237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21238    unix_path=`$CYGPATH -u "$windows_path"`
21239    new_path="$unix_path"
21240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21242    new_path="$unix_path"
21243  fi
21244
21245    # remove trailing .exe if any
21246    new_path="${new_path/%.exe/}"
21247
21248    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21249    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21250  fi
21251
21252    else
21253      # We're on a unix platform. Hooray! :)
21254      # First separate the path from the arguments. This will split at the first
21255      # space.
21256      complete="$FOUND_MAKE"
21257      path="${complete%% *}"
21258      tmp="$complete EOL"
21259      arguments="${tmp#* }"
21260
21261      # Cannot rely on the command "which" here since it doesn't always work.
21262      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21263      if test -z "$is_absolute_path"; then
21264        # Path to executable is not absolute. Find it.
21265        IFS_save="$IFS"
21266        IFS=:
21267        for p in $PATH; do
21268          if test -f "$p/$path" && test -x "$p/$path"; then
21269            new_path="$p/$path"
21270            break
21271          fi
21272        done
21273        IFS="$IFS_save"
21274      else
21275        # This is an absolute path, we can use it without further modifications.
21276        new_path="$path"
21277      fi
21278
21279      if test "x$new_path" = x; then
21280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21281$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21282        has_space=`$ECHO "$complete" | $GREP " "`
21283        if test "x$has_space" != x; then
21284          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21286        fi
21287        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21288      fi
21289    fi
21290
21291    # Now join together the path and the arguments once again
21292    if test "x$arguments" != xEOL; then
21293      new_complete="$new_path ${arguments% *}"
21294    else
21295      new_complete="$new_path"
21296    fi
21297
21298    if test "x$complete" != "x$new_complete"; then
21299      FOUND_MAKE="$new_complete"
21300      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21301$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21302    fi
21303  fi
21304
21305        fi
21306      fi
21307    fi
21308  fi
21309
21310    if test "x$FOUND_MAKE" = x; then
21311      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21312    fi
21313
21314  fi
21315
21316
21317  MAKE=$FOUND_MAKE
21318
21319  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21320$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21321
21322
21323  # Check if make supports the output sync option and if so, setup using it.
21324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21325$as_echo_n "checking if make --output-sync is supported... " >&6; }
21326  if $MAKE --version -O > /dev/null 2>&1; then
21327    OUTPUT_SYNC_SUPPORTED=true
21328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21329$as_echo "yes" >&6; }
21330    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21331$as_echo_n "checking for output-sync value... " >&6; }
21332
21333# Check whether --with-output-sync was given.
21334if test "${with_output_sync+set}" = set; then :
21335  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21336fi
21337
21338    if test "x$OUTPUT_SYNC" = "x"; then
21339      OUTPUT_SYNC=none
21340    fi
21341    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21342$as_echo "$OUTPUT_SYNC" >&6; }
21343    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21344      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21345    fi
21346  else
21347    OUTPUT_SYNC_SUPPORTED=false
21348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21349$as_echo "no" >&6; }
21350  fi
21351
21352
21353
21354
21355
21356
21357  # Test if find supports -delete
21358  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21359$as_echo_n "checking if find supports -delete... " >&6; }
21360  FIND_DELETE="-delete"
21361
21362  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21363
21364  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21365
21366  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21367  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21368    # No, it does not.
21369    $RM $DELETEDIR/TestIfFindSupportsDelete
21370    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21371      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21372      FIND_DELETE="-print | $XARGS $RM"
21373    else
21374      FIND_DELETE="-exec $RM \{\} \+"
21375    fi
21376    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21377$as_echo "no" >&6; }
21378  else
21379    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21380$as_echo "yes" >&6; }
21381  fi
21382  $RMDIR $DELETEDIR
21383
21384
21385
21386  # Test which kind of tar was found
21387  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21388    TAR_TYPE="gnu"
21389  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21390    TAR_TYPE="bsd"
21391  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21392    TAR_TYPE="bsd"
21393  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21394    TAR_TYPE="solaris"
21395  fi
21396  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21397$as_echo_n "checking what type of tar was found... " >&6; }
21398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21399$as_echo "$TAR_TYPE" >&6; }
21400
21401  TAR_CREATE_FILE_PARAM=""
21402
21403  if test "x$TAR_TYPE" = "xgnu"; then
21404    TAR_INCLUDE_PARAM="T"
21405    TAR_SUPPORTS_TRANSFORM="true"
21406    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21407      # When using gnu tar for Solaris targets, need to use compatibility mode
21408      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21409    fi
21410  else
21411    TAR_INCLUDE_PARAM="I"
21412    TAR_SUPPORTS_TRANSFORM="false"
21413  fi
21414
21415
21416
21417
21418
21419
21420  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21421  # This is a problem for the grep resident on AIX.
21422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21423$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21424  # Multiple subsequent spaces..
21425  STACK_SPACES='aaa   bbb   ccc'
21426  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21427  # patterns in it.
21428  STACK_LIST=${STACK_SPACES// /$'\n'}
21429  NEEDLE_SPACES='ccc bbb aaa'
21430  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21431  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21432  if test "x$RESULT" == "x"; then
21433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21434$as_echo "yes" >&6; }
21435  else
21436    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21437      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21438    fi
21439    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21440  fi
21441
21442
21443  # These tools might not be installed by default,
21444  # need hint on how to install them.
21445
21446
21447
21448  # Publish this variable in the help.
21449
21450
21451  if [ -z "${UNZIP+x}" ]; then
21452    # The variable is not set by user, try to locate tool using the code snippet
21453    for ac_prog in unzip
21454do
21455  # Extract the first word of "$ac_prog", so it can be a program name with args.
21456set dummy $ac_prog; ac_word=$2
21457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21458$as_echo_n "checking for $ac_word... " >&6; }
21459if ${ac_cv_path_UNZIP+:} false; then :
21460  $as_echo_n "(cached) " >&6
21461else
21462  case $UNZIP in
21463  [\\/]* | ?:[\\/]*)
21464  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21465  ;;
21466  *)
21467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21468for as_dir in $PATH
21469do
21470  IFS=$as_save_IFS
21471  test -z "$as_dir" && as_dir=.
21472    for ac_exec_ext in '' $ac_executable_extensions; do
21473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21474    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21476    break 2
21477  fi
21478done
21479  done
21480IFS=$as_save_IFS
21481
21482  ;;
21483esac
21484fi
21485UNZIP=$ac_cv_path_UNZIP
21486if test -n "$UNZIP"; then
21487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21488$as_echo "$UNZIP" >&6; }
21489else
21490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21491$as_echo "no" >&6; }
21492fi
21493
21494
21495  test -n "$UNZIP" && break
21496done
21497
21498  else
21499    # The variable is set, but is it from the command line or the environment?
21500
21501    # Try to remove the string !UNZIP! from our list.
21502    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21503    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21504      # If it failed, the variable was not from the command line. Ignore it,
21505      # but warn the user (except for BASH, which is always set by the calling BASH).
21506      if test "xUNZIP" != xBASH; then
21507        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21508$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21509      fi
21510      # Try to locate tool using the code snippet
21511      for ac_prog in unzip
21512do
21513  # Extract the first word of "$ac_prog", so it can be a program name with args.
21514set dummy $ac_prog; ac_word=$2
21515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21516$as_echo_n "checking for $ac_word... " >&6; }
21517if ${ac_cv_path_UNZIP+:} false; then :
21518  $as_echo_n "(cached) " >&6
21519else
21520  case $UNZIP in
21521  [\\/]* | ?:[\\/]*)
21522  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21523  ;;
21524  *)
21525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21526for as_dir in $PATH
21527do
21528  IFS=$as_save_IFS
21529  test -z "$as_dir" && as_dir=.
21530    for ac_exec_ext in '' $ac_executable_extensions; do
21531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21532    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21534    break 2
21535  fi
21536done
21537  done
21538IFS=$as_save_IFS
21539
21540  ;;
21541esac
21542fi
21543UNZIP=$ac_cv_path_UNZIP
21544if test -n "$UNZIP"; then
21545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21546$as_echo "$UNZIP" >&6; }
21547else
21548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21549$as_echo "no" >&6; }
21550fi
21551
21552
21553  test -n "$UNZIP" && break
21554done
21555
21556    else
21557      # If it succeeded, then it was overridden by the user. We will use it
21558      # for the tool.
21559
21560      # First remove it from the list of overridden variables, so we can test
21561      # for unknown variables in the end.
21562      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21563
21564      # Check if we try to supply an empty value
21565      if test "x$UNZIP" = x; then
21566        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21567$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21569$as_echo_n "checking for UNZIP... " >&6; }
21570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21571$as_echo "disabled" >&6; }
21572      else
21573        # Check if the provided tool contains a complete path.
21574        tool_specified="$UNZIP"
21575        tool_basename="${tool_specified##*/}"
21576        if test "x$tool_basename" = "x$tool_specified"; then
21577          # A command without a complete path is provided, search $PATH.
21578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21579$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21580          # Extract the first word of "$tool_basename", so it can be a program name with args.
21581set dummy $tool_basename; ac_word=$2
21582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21583$as_echo_n "checking for $ac_word... " >&6; }
21584if ${ac_cv_path_UNZIP+:} false; then :
21585  $as_echo_n "(cached) " >&6
21586else
21587  case $UNZIP in
21588  [\\/]* | ?:[\\/]*)
21589  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21590  ;;
21591  *)
21592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21593for as_dir in $PATH
21594do
21595  IFS=$as_save_IFS
21596  test -z "$as_dir" && as_dir=.
21597    for ac_exec_ext in '' $ac_executable_extensions; do
21598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21599    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21601    break 2
21602  fi
21603done
21604  done
21605IFS=$as_save_IFS
21606
21607  ;;
21608esac
21609fi
21610UNZIP=$ac_cv_path_UNZIP
21611if test -n "$UNZIP"; then
21612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21613$as_echo "$UNZIP" >&6; }
21614else
21615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21616$as_echo "no" >&6; }
21617fi
21618
21619
21620          if test "x$UNZIP" = x; then
21621            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21622          fi
21623        else
21624          # Otherwise we believe it is a complete path. Use it as it is.
21625          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21626$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21627          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21628$as_echo_n "checking for UNZIP... " >&6; }
21629          if test ! -x "$tool_specified"; then
21630            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21631$as_echo "not found" >&6; }
21632            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21633          fi
21634          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21635$as_echo "$tool_specified" >&6; }
21636        fi
21637      fi
21638    fi
21639
21640  fi
21641
21642
21643
21644  if test "x$UNZIP" = x; then
21645    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21646  fi
21647
21648
21649  # Since zip uses "ZIP" as a environment variable for passing options, we need
21650  # to name our variable differently, hence ZIPEXE.
21651
21652
21653
21654  # Publish this variable in the help.
21655
21656
21657  if [ -z "${ZIPEXE+x}" ]; then
21658    # The variable is not set by user, try to locate tool using the code snippet
21659    for ac_prog in zip
21660do
21661  # Extract the first word of "$ac_prog", so it can be a program name with args.
21662set dummy $ac_prog; ac_word=$2
21663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21664$as_echo_n "checking for $ac_word... " >&6; }
21665if ${ac_cv_path_ZIPEXE+:} false; then :
21666  $as_echo_n "(cached) " >&6
21667else
21668  case $ZIPEXE in
21669  [\\/]* | ?:[\\/]*)
21670  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21671  ;;
21672  *)
21673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21674for as_dir in $PATH
21675do
21676  IFS=$as_save_IFS
21677  test -z "$as_dir" && as_dir=.
21678    for ac_exec_ext in '' $ac_executable_extensions; do
21679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21680    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21682    break 2
21683  fi
21684done
21685  done
21686IFS=$as_save_IFS
21687
21688  ;;
21689esac
21690fi
21691ZIPEXE=$ac_cv_path_ZIPEXE
21692if test -n "$ZIPEXE"; then
21693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21694$as_echo "$ZIPEXE" >&6; }
21695else
21696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21697$as_echo "no" >&6; }
21698fi
21699
21700
21701  test -n "$ZIPEXE" && break
21702done
21703
21704  else
21705    # The variable is set, but is it from the command line or the environment?
21706
21707    # Try to remove the string !ZIPEXE! from our list.
21708    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21709    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21710      # If it failed, the variable was not from the command line. Ignore it,
21711      # but warn the user (except for BASH, which is always set by the calling BASH).
21712      if test "xZIPEXE" != xBASH; then
21713        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21714$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21715      fi
21716      # Try to locate tool using the code snippet
21717      for ac_prog in zip
21718do
21719  # Extract the first word of "$ac_prog", so it can be a program name with args.
21720set dummy $ac_prog; ac_word=$2
21721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21722$as_echo_n "checking for $ac_word... " >&6; }
21723if ${ac_cv_path_ZIPEXE+:} false; then :
21724  $as_echo_n "(cached) " >&6
21725else
21726  case $ZIPEXE in
21727  [\\/]* | ?:[\\/]*)
21728  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21729  ;;
21730  *)
21731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21732for as_dir in $PATH
21733do
21734  IFS=$as_save_IFS
21735  test -z "$as_dir" && as_dir=.
21736    for ac_exec_ext in '' $ac_executable_extensions; do
21737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21738    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21740    break 2
21741  fi
21742done
21743  done
21744IFS=$as_save_IFS
21745
21746  ;;
21747esac
21748fi
21749ZIPEXE=$ac_cv_path_ZIPEXE
21750if test -n "$ZIPEXE"; then
21751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21752$as_echo "$ZIPEXE" >&6; }
21753else
21754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21755$as_echo "no" >&6; }
21756fi
21757
21758
21759  test -n "$ZIPEXE" && break
21760done
21761
21762    else
21763      # If it succeeded, then it was overridden by the user. We will use it
21764      # for the tool.
21765
21766      # First remove it from the list of overridden variables, so we can test
21767      # for unknown variables in the end.
21768      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21769
21770      # Check if we try to supply an empty value
21771      if test "x$ZIPEXE" = x; then
21772        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21773$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21774        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21775$as_echo_n "checking for ZIPEXE... " >&6; }
21776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21777$as_echo "disabled" >&6; }
21778      else
21779        # Check if the provided tool contains a complete path.
21780        tool_specified="$ZIPEXE"
21781        tool_basename="${tool_specified##*/}"
21782        if test "x$tool_basename" = "x$tool_specified"; then
21783          # A command without a complete path is provided, search $PATH.
21784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21785$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21786          # Extract the first word of "$tool_basename", so it can be a program name with args.
21787set dummy $tool_basename; ac_word=$2
21788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21789$as_echo_n "checking for $ac_word... " >&6; }
21790if ${ac_cv_path_ZIPEXE+:} false; then :
21791  $as_echo_n "(cached) " >&6
21792else
21793  case $ZIPEXE in
21794  [\\/]* | ?:[\\/]*)
21795  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21796  ;;
21797  *)
21798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21799for as_dir in $PATH
21800do
21801  IFS=$as_save_IFS
21802  test -z "$as_dir" && as_dir=.
21803    for ac_exec_ext in '' $ac_executable_extensions; do
21804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21805    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21807    break 2
21808  fi
21809done
21810  done
21811IFS=$as_save_IFS
21812
21813  ;;
21814esac
21815fi
21816ZIPEXE=$ac_cv_path_ZIPEXE
21817if test -n "$ZIPEXE"; then
21818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21819$as_echo "$ZIPEXE" >&6; }
21820else
21821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21822$as_echo "no" >&6; }
21823fi
21824
21825
21826          if test "x$ZIPEXE" = x; then
21827            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21828          fi
21829        else
21830          # Otherwise we believe it is a complete path. Use it as it is.
21831          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21832$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21833          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21834$as_echo_n "checking for ZIPEXE... " >&6; }
21835          if test ! -x "$tool_specified"; then
21836            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21837$as_echo "not found" >&6; }
21838            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21839          fi
21840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21841$as_echo "$tool_specified" >&6; }
21842        fi
21843      fi
21844    fi
21845
21846  fi
21847
21848
21849
21850  if test "x$ZIPEXE" = x; then
21851    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21852  fi
21853
21854
21855
21856  # Non-required basic tools
21857
21858
21859
21860  # Publish this variable in the help.
21861
21862
21863  if [ -z "${LDD+x}" ]; then
21864    # The variable is not set by user, try to locate tool using the code snippet
21865    for ac_prog in ldd
21866do
21867  # Extract the first word of "$ac_prog", so it can be a program name with args.
21868set dummy $ac_prog; ac_word=$2
21869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21870$as_echo_n "checking for $ac_word... " >&6; }
21871if ${ac_cv_path_LDD+:} false; then :
21872  $as_echo_n "(cached) " >&6
21873else
21874  case $LDD in
21875  [\\/]* | ?:[\\/]*)
21876  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21877  ;;
21878  *)
21879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21880for as_dir in $PATH
21881do
21882  IFS=$as_save_IFS
21883  test -z "$as_dir" && as_dir=.
21884    for ac_exec_ext in '' $ac_executable_extensions; do
21885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21886    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21888    break 2
21889  fi
21890done
21891  done
21892IFS=$as_save_IFS
21893
21894  ;;
21895esac
21896fi
21897LDD=$ac_cv_path_LDD
21898if test -n "$LDD"; then
21899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21900$as_echo "$LDD" >&6; }
21901else
21902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21903$as_echo "no" >&6; }
21904fi
21905
21906
21907  test -n "$LDD" && break
21908done
21909
21910  else
21911    # The variable is set, but is it from the command line or the environment?
21912
21913    # Try to remove the string !LDD! from our list.
21914    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21915    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21916      # If it failed, the variable was not from the command line. Ignore it,
21917      # but warn the user (except for BASH, which is always set by the calling BASH).
21918      if test "xLDD" != xBASH; then
21919        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21920$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21921      fi
21922      # Try to locate tool using the code snippet
21923      for ac_prog in ldd
21924do
21925  # Extract the first word of "$ac_prog", so it can be a program name with args.
21926set dummy $ac_prog; ac_word=$2
21927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21928$as_echo_n "checking for $ac_word... " >&6; }
21929if ${ac_cv_path_LDD+:} false; then :
21930  $as_echo_n "(cached) " >&6
21931else
21932  case $LDD in
21933  [\\/]* | ?:[\\/]*)
21934  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21935  ;;
21936  *)
21937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21938for as_dir in $PATH
21939do
21940  IFS=$as_save_IFS
21941  test -z "$as_dir" && as_dir=.
21942    for ac_exec_ext in '' $ac_executable_extensions; do
21943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21944    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21946    break 2
21947  fi
21948done
21949  done
21950IFS=$as_save_IFS
21951
21952  ;;
21953esac
21954fi
21955LDD=$ac_cv_path_LDD
21956if test -n "$LDD"; then
21957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21958$as_echo "$LDD" >&6; }
21959else
21960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21961$as_echo "no" >&6; }
21962fi
21963
21964
21965  test -n "$LDD" && break
21966done
21967
21968    else
21969      # If it succeeded, then it was overridden by the user. We will use it
21970      # for the tool.
21971
21972      # First remove it from the list of overridden variables, so we can test
21973      # for unknown variables in the end.
21974      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21975
21976      # Check if we try to supply an empty value
21977      if test "x$LDD" = x; then
21978        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21979$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21980        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21981$as_echo_n "checking for LDD... " >&6; }
21982        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21983$as_echo "disabled" >&6; }
21984      else
21985        # Check if the provided tool contains a complete path.
21986        tool_specified="$LDD"
21987        tool_basename="${tool_specified##*/}"
21988        if test "x$tool_basename" = "x$tool_specified"; then
21989          # A command without a complete path is provided, search $PATH.
21990          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21991$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21992          # Extract the first word of "$tool_basename", so it can be a program name with args.
21993set dummy $tool_basename; ac_word=$2
21994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21995$as_echo_n "checking for $ac_word... " >&6; }
21996if ${ac_cv_path_LDD+:} false; then :
21997  $as_echo_n "(cached) " >&6
21998else
21999  case $LDD in
22000  [\\/]* | ?:[\\/]*)
22001  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22002  ;;
22003  *)
22004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22005for as_dir in $PATH
22006do
22007  IFS=$as_save_IFS
22008  test -z "$as_dir" && as_dir=.
22009    for ac_exec_ext in '' $ac_executable_extensions; do
22010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22011    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22013    break 2
22014  fi
22015done
22016  done
22017IFS=$as_save_IFS
22018
22019  ;;
22020esac
22021fi
22022LDD=$ac_cv_path_LDD
22023if test -n "$LDD"; then
22024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22025$as_echo "$LDD" >&6; }
22026else
22027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22028$as_echo "no" >&6; }
22029fi
22030
22031
22032          if test "x$LDD" = x; then
22033            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22034          fi
22035        else
22036          # Otherwise we believe it is a complete path. Use it as it is.
22037          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22038$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22039          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22040$as_echo_n "checking for LDD... " >&6; }
22041          if test ! -x "$tool_specified"; then
22042            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22043$as_echo "not found" >&6; }
22044            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22045          fi
22046          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22047$as_echo "$tool_specified" >&6; }
22048        fi
22049      fi
22050    fi
22051
22052  fi
22053
22054
22055  if test "x$LDD" = "x"; then
22056    # List shared lib dependencies is used for
22057    # debug output and checking for forbidden dependencies.
22058    # We can build without it.
22059    LDD="true"
22060  fi
22061
22062
22063  # Publish this variable in the help.
22064
22065
22066  if [ -z "${OTOOL+x}" ]; then
22067    # The variable is not set by user, try to locate tool using the code snippet
22068    for ac_prog in otool
22069do
22070  # Extract the first word of "$ac_prog", so it can be a program name with args.
22071set dummy $ac_prog; ac_word=$2
22072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22073$as_echo_n "checking for $ac_word... " >&6; }
22074if ${ac_cv_path_OTOOL+:} false; then :
22075  $as_echo_n "(cached) " >&6
22076else
22077  case $OTOOL in
22078  [\\/]* | ?:[\\/]*)
22079  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22080  ;;
22081  *)
22082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22083for as_dir in $PATH
22084do
22085  IFS=$as_save_IFS
22086  test -z "$as_dir" && as_dir=.
22087    for ac_exec_ext in '' $ac_executable_extensions; do
22088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22089    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22091    break 2
22092  fi
22093done
22094  done
22095IFS=$as_save_IFS
22096
22097  ;;
22098esac
22099fi
22100OTOOL=$ac_cv_path_OTOOL
22101if test -n "$OTOOL"; then
22102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22103$as_echo "$OTOOL" >&6; }
22104else
22105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22106$as_echo "no" >&6; }
22107fi
22108
22109
22110  test -n "$OTOOL" && break
22111done
22112
22113  else
22114    # The variable is set, but is it from the command line or the environment?
22115
22116    # Try to remove the string !OTOOL! from our list.
22117    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22118    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22119      # If it failed, the variable was not from the command line. Ignore it,
22120      # but warn the user (except for BASH, which is always set by the calling BASH).
22121      if test "xOTOOL" != xBASH; then
22122        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22123$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22124      fi
22125      # Try to locate tool using the code snippet
22126      for ac_prog in otool
22127do
22128  # Extract the first word of "$ac_prog", so it can be a program name with args.
22129set dummy $ac_prog; ac_word=$2
22130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22131$as_echo_n "checking for $ac_word... " >&6; }
22132if ${ac_cv_path_OTOOL+:} false; then :
22133  $as_echo_n "(cached) " >&6
22134else
22135  case $OTOOL in
22136  [\\/]* | ?:[\\/]*)
22137  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22138  ;;
22139  *)
22140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22141for as_dir in $PATH
22142do
22143  IFS=$as_save_IFS
22144  test -z "$as_dir" && as_dir=.
22145    for ac_exec_ext in '' $ac_executable_extensions; do
22146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22147    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22149    break 2
22150  fi
22151done
22152  done
22153IFS=$as_save_IFS
22154
22155  ;;
22156esac
22157fi
22158OTOOL=$ac_cv_path_OTOOL
22159if test -n "$OTOOL"; then
22160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22161$as_echo "$OTOOL" >&6; }
22162else
22163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22164$as_echo "no" >&6; }
22165fi
22166
22167
22168  test -n "$OTOOL" && break
22169done
22170
22171    else
22172      # If it succeeded, then it was overridden by the user. We will use it
22173      # for the tool.
22174
22175      # First remove it from the list of overridden variables, so we can test
22176      # for unknown variables in the end.
22177      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22178
22179      # Check if we try to supply an empty value
22180      if test "x$OTOOL" = x; then
22181        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22182$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22183        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22184$as_echo_n "checking for OTOOL... " >&6; }
22185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22186$as_echo "disabled" >&6; }
22187      else
22188        # Check if the provided tool contains a complete path.
22189        tool_specified="$OTOOL"
22190        tool_basename="${tool_specified##*/}"
22191        if test "x$tool_basename" = "x$tool_specified"; then
22192          # A command without a complete path is provided, search $PATH.
22193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22194$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22195          # Extract the first word of "$tool_basename", so it can be a program name with args.
22196set dummy $tool_basename; ac_word=$2
22197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22198$as_echo_n "checking for $ac_word... " >&6; }
22199if ${ac_cv_path_OTOOL+:} false; then :
22200  $as_echo_n "(cached) " >&6
22201else
22202  case $OTOOL in
22203  [\\/]* | ?:[\\/]*)
22204  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22205  ;;
22206  *)
22207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22208for as_dir in $PATH
22209do
22210  IFS=$as_save_IFS
22211  test -z "$as_dir" && as_dir=.
22212    for ac_exec_ext in '' $ac_executable_extensions; do
22213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22214    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22216    break 2
22217  fi
22218done
22219  done
22220IFS=$as_save_IFS
22221
22222  ;;
22223esac
22224fi
22225OTOOL=$ac_cv_path_OTOOL
22226if test -n "$OTOOL"; then
22227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22228$as_echo "$OTOOL" >&6; }
22229else
22230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22231$as_echo "no" >&6; }
22232fi
22233
22234
22235          if test "x$OTOOL" = x; then
22236            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22237          fi
22238        else
22239          # Otherwise we believe it is a complete path. Use it as it is.
22240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22241$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22242          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22243$as_echo_n "checking for OTOOL... " >&6; }
22244          if test ! -x "$tool_specified"; then
22245            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22246$as_echo "not found" >&6; }
22247            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22248          fi
22249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22250$as_echo "$tool_specified" >&6; }
22251        fi
22252      fi
22253    fi
22254
22255  fi
22256
22257
22258  if test "x$OTOOL" = "x"; then
22259    OTOOL="true"
22260  fi
22261
22262
22263  # Publish this variable in the help.
22264
22265
22266  if [ -z "${READELF+x}" ]; then
22267    # The variable is not set by user, try to locate tool using the code snippet
22268    for ac_prog in greadelf readelf
22269do
22270  # Extract the first word of "$ac_prog", so it can be a program name with args.
22271set dummy $ac_prog; ac_word=$2
22272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22273$as_echo_n "checking for $ac_word... " >&6; }
22274if ${ac_cv_path_READELF+:} false; then :
22275  $as_echo_n "(cached) " >&6
22276else
22277  case $READELF in
22278  [\\/]* | ?:[\\/]*)
22279  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22280  ;;
22281  *)
22282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22283for as_dir in $PATH
22284do
22285  IFS=$as_save_IFS
22286  test -z "$as_dir" && as_dir=.
22287    for ac_exec_ext in '' $ac_executable_extensions; do
22288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22289    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22291    break 2
22292  fi
22293done
22294  done
22295IFS=$as_save_IFS
22296
22297  ;;
22298esac
22299fi
22300READELF=$ac_cv_path_READELF
22301if test -n "$READELF"; then
22302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22303$as_echo "$READELF" >&6; }
22304else
22305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22306$as_echo "no" >&6; }
22307fi
22308
22309
22310  test -n "$READELF" && break
22311done
22312
22313  else
22314    # The variable is set, but is it from the command line or the environment?
22315
22316    # Try to remove the string !READELF! from our list.
22317    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22318    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22319      # If it failed, the variable was not from the command line. Ignore it,
22320      # but warn the user (except for BASH, which is always set by the calling BASH).
22321      if test "xREADELF" != xBASH; then
22322        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22323$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22324      fi
22325      # Try to locate tool using the code snippet
22326      for ac_prog in greadelf readelf
22327do
22328  # Extract the first word of "$ac_prog", so it can be a program name with args.
22329set dummy $ac_prog; ac_word=$2
22330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22331$as_echo_n "checking for $ac_word... " >&6; }
22332if ${ac_cv_path_READELF+:} false; then :
22333  $as_echo_n "(cached) " >&6
22334else
22335  case $READELF in
22336  [\\/]* | ?:[\\/]*)
22337  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22338  ;;
22339  *)
22340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22341for as_dir in $PATH
22342do
22343  IFS=$as_save_IFS
22344  test -z "$as_dir" && as_dir=.
22345    for ac_exec_ext in '' $ac_executable_extensions; do
22346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22347    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22349    break 2
22350  fi
22351done
22352  done
22353IFS=$as_save_IFS
22354
22355  ;;
22356esac
22357fi
22358READELF=$ac_cv_path_READELF
22359if test -n "$READELF"; then
22360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22361$as_echo "$READELF" >&6; }
22362else
22363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22364$as_echo "no" >&6; }
22365fi
22366
22367
22368  test -n "$READELF" && break
22369done
22370
22371    else
22372      # If it succeeded, then it was overridden by the user. We will use it
22373      # for the tool.
22374
22375      # First remove it from the list of overridden variables, so we can test
22376      # for unknown variables in the end.
22377      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22378
22379      # Check if we try to supply an empty value
22380      if test "x$READELF" = x; then
22381        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22382$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22383        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22384$as_echo_n "checking for READELF... " >&6; }
22385        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22386$as_echo "disabled" >&6; }
22387      else
22388        # Check if the provided tool contains a complete path.
22389        tool_specified="$READELF"
22390        tool_basename="${tool_specified##*/}"
22391        if test "x$tool_basename" = "x$tool_specified"; then
22392          # A command without a complete path is provided, search $PATH.
22393          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22394$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22395          # Extract the first word of "$tool_basename", so it can be a program name with args.
22396set dummy $tool_basename; ac_word=$2
22397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22398$as_echo_n "checking for $ac_word... " >&6; }
22399if ${ac_cv_path_READELF+:} false; then :
22400  $as_echo_n "(cached) " >&6
22401else
22402  case $READELF in
22403  [\\/]* | ?:[\\/]*)
22404  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22405  ;;
22406  *)
22407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22408for as_dir in $PATH
22409do
22410  IFS=$as_save_IFS
22411  test -z "$as_dir" && as_dir=.
22412    for ac_exec_ext in '' $ac_executable_extensions; do
22413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22414    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22416    break 2
22417  fi
22418done
22419  done
22420IFS=$as_save_IFS
22421
22422  ;;
22423esac
22424fi
22425READELF=$ac_cv_path_READELF
22426if test -n "$READELF"; then
22427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22428$as_echo "$READELF" >&6; }
22429else
22430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22431$as_echo "no" >&6; }
22432fi
22433
22434
22435          if test "x$READELF" = x; then
22436            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22437          fi
22438        else
22439          # Otherwise we believe it is a complete path. Use it as it is.
22440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22441$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22442          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22443$as_echo_n "checking for READELF... " >&6; }
22444          if test ! -x "$tool_specified"; then
22445            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22446$as_echo "not found" >&6; }
22447            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22448          fi
22449          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22450$as_echo "$tool_specified" >&6; }
22451        fi
22452      fi
22453    fi
22454
22455  fi
22456
22457
22458
22459
22460  # Publish this variable in the help.
22461
22462
22463  if [ -z "${DOT+x}" ]; then
22464    # The variable is not set by user, try to locate tool using the code snippet
22465    for ac_prog in dot
22466do
22467  # Extract the first word of "$ac_prog", so it can be a program name with args.
22468set dummy $ac_prog; ac_word=$2
22469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22470$as_echo_n "checking for $ac_word... " >&6; }
22471if ${ac_cv_path_DOT+:} false; then :
22472  $as_echo_n "(cached) " >&6
22473else
22474  case $DOT in
22475  [\\/]* | ?:[\\/]*)
22476  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22477  ;;
22478  *)
22479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22480for as_dir in $PATH
22481do
22482  IFS=$as_save_IFS
22483  test -z "$as_dir" && as_dir=.
22484    for ac_exec_ext in '' $ac_executable_extensions; do
22485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22486    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22488    break 2
22489  fi
22490done
22491  done
22492IFS=$as_save_IFS
22493
22494  ;;
22495esac
22496fi
22497DOT=$ac_cv_path_DOT
22498if test -n "$DOT"; then
22499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22500$as_echo "$DOT" >&6; }
22501else
22502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22503$as_echo "no" >&6; }
22504fi
22505
22506
22507  test -n "$DOT" && break
22508done
22509
22510  else
22511    # The variable is set, but is it from the command line or the environment?
22512
22513    # Try to remove the string !DOT! from our list.
22514    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22515    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22516      # If it failed, the variable was not from the command line. Ignore it,
22517      # but warn the user (except for BASH, which is always set by the calling BASH).
22518      if test "xDOT" != xBASH; then
22519        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22520$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22521      fi
22522      # Try to locate tool using the code snippet
22523      for ac_prog in dot
22524do
22525  # Extract the first word of "$ac_prog", so it can be a program name with args.
22526set dummy $ac_prog; ac_word=$2
22527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22528$as_echo_n "checking for $ac_word... " >&6; }
22529if ${ac_cv_path_DOT+:} false; then :
22530  $as_echo_n "(cached) " >&6
22531else
22532  case $DOT in
22533  [\\/]* | ?:[\\/]*)
22534  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22535  ;;
22536  *)
22537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22538for as_dir in $PATH
22539do
22540  IFS=$as_save_IFS
22541  test -z "$as_dir" && as_dir=.
22542    for ac_exec_ext in '' $ac_executable_extensions; do
22543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22544    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22546    break 2
22547  fi
22548done
22549  done
22550IFS=$as_save_IFS
22551
22552  ;;
22553esac
22554fi
22555DOT=$ac_cv_path_DOT
22556if test -n "$DOT"; then
22557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22558$as_echo "$DOT" >&6; }
22559else
22560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22561$as_echo "no" >&6; }
22562fi
22563
22564
22565  test -n "$DOT" && break
22566done
22567
22568    else
22569      # If it succeeded, then it was overridden by the user. We will use it
22570      # for the tool.
22571
22572      # First remove it from the list of overridden variables, so we can test
22573      # for unknown variables in the end.
22574      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22575
22576      # Check if we try to supply an empty value
22577      if test "x$DOT" = x; then
22578        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22579$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22580        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22581$as_echo_n "checking for DOT... " >&6; }
22582        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22583$as_echo "disabled" >&6; }
22584      else
22585        # Check if the provided tool contains a complete path.
22586        tool_specified="$DOT"
22587        tool_basename="${tool_specified##*/}"
22588        if test "x$tool_basename" = "x$tool_specified"; then
22589          # A command without a complete path is provided, search $PATH.
22590          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22591$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22592          # Extract the first word of "$tool_basename", so it can be a program name with args.
22593set dummy $tool_basename; ac_word=$2
22594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22595$as_echo_n "checking for $ac_word... " >&6; }
22596if ${ac_cv_path_DOT+:} false; then :
22597  $as_echo_n "(cached) " >&6
22598else
22599  case $DOT in
22600  [\\/]* | ?:[\\/]*)
22601  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22602  ;;
22603  *)
22604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22605for as_dir in $PATH
22606do
22607  IFS=$as_save_IFS
22608  test -z "$as_dir" && as_dir=.
22609    for ac_exec_ext in '' $ac_executable_extensions; do
22610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22611    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22613    break 2
22614  fi
22615done
22616  done
22617IFS=$as_save_IFS
22618
22619  ;;
22620esac
22621fi
22622DOT=$ac_cv_path_DOT
22623if test -n "$DOT"; then
22624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22625$as_echo "$DOT" >&6; }
22626else
22627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22628$as_echo "no" >&6; }
22629fi
22630
22631
22632          if test "x$DOT" = x; then
22633            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22634          fi
22635        else
22636          # Otherwise we believe it is a complete path. Use it as it is.
22637          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22638$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22639          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22640$as_echo_n "checking for DOT... " >&6; }
22641          if test ! -x "$tool_specified"; then
22642            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22643$as_echo "not found" >&6; }
22644            as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22645          fi
22646          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22647$as_echo "$tool_specified" >&6; }
22648        fi
22649      fi
22650    fi
22651
22652  fi
22653
22654
22655
22656
22657  # Publish this variable in the help.
22658
22659
22660  if [ -z "${HG+x}" ]; then
22661    # The variable is not set by user, try to locate tool using the code snippet
22662    for ac_prog in hg
22663do
22664  # Extract the first word of "$ac_prog", so it can be a program name with args.
22665set dummy $ac_prog; ac_word=$2
22666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22667$as_echo_n "checking for $ac_word... " >&6; }
22668if ${ac_cv_path_HG+:} false; then :
22669  $as_echo_n "(cached) " >&6
22670else
22671  case $HG in
22672  [\\/]* | ?:[\\/]*)
22673  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22674  ;;
22675  *)
22676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22677for as_dir in $PATH
22678do
22679  IFS=$as_save_IFS
22680  test -z "$as_dir" && as_dir=.
22681    for ac_exec_ext in '' $ac_executable_extensions; do
22682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22683    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22685    break 2
22686  fi
22687done
22688  done
22689IFS=$as_save_IFS
22690
22691  ;;
22692esac
22693fi
22694HG=$ac_cv_path_HG
22695if test -n "$HG"; then
22696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22697$as_echo "$HG" >&6; }
22698else
22699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22700$as_echo "no" >&6; }
22701fi
22702
22703
22704  test -n "$HG" && break
22705done
22706
22707  else
22708    # The variable is set, but is it from the command line or the environment?
22709
22710    # Try to remove the string !HG! from our list.
22711    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22712    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22713      # If it failed, the variable was not from the command line. Ignore it,
22714      # but warn the user (except for BASH, which is always set by the calling BASH).
22715      if test "xHG" != xBASH; then
22716        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22717$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22718      fi
22719      # Try to locate tool using the code snippet
22720      for ac_prog in hg
22721do
22722  # Extract the first word of "$ac_prog", so it can be a program name with args.
22723set dummy $ac_prog; ac_word=$2
22724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22725$as_echo_n "checking for $ac_word... " >&6; }
22726if ${ac_cv_path_HG+:} false; then :
22727  $as_echo_n "(cached) " >&6
22728else
22729  case $HG in
22730  [\\/]* | ?:[\\/]*)
22731  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22732  ;;
22733  *)
22734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22735for as_dir in $PATH
22736do
22737  IFS=$as_save_IFS
22738  test -z "$as_dir" && as_dir=.
22739    for ac_exec_ext in '' $ac_executable_extensions; do
22740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22741    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22743    break 2
22744  fi
22745done
22746  done
22747IFS=$as_save_IFS
22748
22749  ;;
22750esac
22751fi
22752HG=$ac_cv_path_HG
22753if test -n "$HG"; then
22754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22755$as_echo "$HG" >&6; }
22756else
22757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22758$as_echo "no" >&6; }
22759fi
22760
22761
22762  test -n "$HG" && break
22763done
22764
22765    else
22766      # If it succeeded, then it was overridden by the user. We will use it
22767      # for the tool.
22768
22769      # First remove it from the list of overridden variables, so we can test
22770      # for unknown variables in the end.
22771      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22772
22773      # Check if we try to supply an empty value
22774      if test "x$HG" = x; then
22775        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22776$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22777        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22778$as_echo_n "checking for HG... " >&6; }
22779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22780$as_echo "disabled" >&6; }
22781      else
22782        # Check if the provided tool contains a complete path.
22783        tool_specified="$HG"
22784        tool_basename="${tool_specified##*/}"
22785        if test "x$tool_basename" = "x$tool_specified"; then
22786          # A command without a complete path is provided, search $PATH.
22787          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22788$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22789          # Extract the first word of "$tool_basename", so it can be a program name with args.
22790set dummy $tool_basename; ac_word=$2
22791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22792$as_echo_n "checking for $ac_word... " >&6; }
22793if ${ac_cv_path_HG+:} false; then :
22794  $as_echo_n "(cached) " >&6
22795else
22796  case $HG in
22797  [\\/]* | ?:[\\/]*)
22798  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22799  ;;
22800  *)
22801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22802for as_dir in $PATH
22803do
22804  IFS=$as_save_IFS
22805  test -z "$as_dir" && as_dir=.
22806    for ac_exec_ext in '' $ac_executable_extensions; do
22807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22808    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22810    break 2
22811  fi
22812done
22813  done
22814IFS=$as_save_IFS
22815
22816  ;;
22817esac
22818fi
22819HG=$ac_cv_path_HG
22820if test -n "$HG"; then
22821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22822$as_echo "$HG" >&6; }
22823else
22824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22825$as_echo "no" >&6; }
22826fi
22827
22828
22829          if test "x$HG" = x; then
22830            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22831          fi
22832        else
22833          # Otherwise we believe it is a complete path. Use it as it is.
22834          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22835$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22836          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22837$as_echo_n "checking for HG... " >&6; }
22838          if test ! -x "$tool_specified"; then
22839            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22840$as_echo "not found" >&6; }
22841            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22842          fi
22843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22844$as_echo "$tool_specified" >&6; }
22845        fi
22846      fi
22847    fi
22848
22849  fi
22850
22851
22852
22853
22854  # Publish this variable in the help.
22855
22856
22857  if [ -z "${STAT+x}" ]; then
22858    # The variable is not set by user, try to locate tool using the code snippet
22859    for ac_prog in stat
22860do
22861  # Extract the first word of "$ac_prog", so it can be a program name with args.
22862set dummy $ac_prog; ac_word=$2
22863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22864$as_echo_n "checking for $ac_word... " >&6; }
22865if ${ac_cv_path_STAT+:} false; then :
22866  $as_echo_n "(cached) " >&6
22867else
22868  case $STAT in
22869  [\\/]* | ?:[\\/]*)
22870  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22871  ;;
22872  *)
22873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22874for as_dir in $PATH
22875do
22876  IFS=$as_save_IFS
22877  test -z "$as_dir" && as_dir=.
22878    for ac_exec_ext in '' $ac_executable_extensions; do
22879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22880    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22882    break 2
22883  fi
22884done
22885  done
22886IFS=$as_save_IFS
22887
22888  ;;
22889esac
22890fi
22891STAT=$ac_cv_path_STAT
22892if test -n "$STAT"; then
22893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22894$as_echo "$STAT" >&6; }
22895else
22896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22897$as_echo "no" >&6; }
22898fi
22899
22900
22901  test -n "$STAT" && break
22902done
22903
22904  else
22905    # The variable is set, but is it from the command line or the environment?
22906
22907    # Try to remove the string !STAT! from our list.
22908    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22909    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22910      # If it failed, the variable was not from the command line. Ignore it,
22911      # but warn the user (except for BASH, which is always set by the calling BASH).
22912      if test "xSTAT" != xBASH; then
22913        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22914$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22915      fi
22916      # Try to locate tool using the code snippet
22917      for ac_prog in stat
22918do
22919  # Extract the first word of "$ac_prog", so it can be a program name with args.
22920set dummy $ac_prog; ac_word=$2
22921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22922$as_echo_n "checking for $ac_word... " >&6; }
22923if ${ac_cv_path_STAT+:} false; then :
22924  $as_echo_n "(cached) " >&6
22925else
22926  case $STAT in
22927  [\\/]* | ?:[\\/]*)
22928  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22929  ;;
22930  *)
22931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22932for as_dir in $PATH
22933do
22934  IFS=$as_save_IFS
22935  test -z "$as_dir" && as_dir=.
22936    for ac_exec_ext in '' $ac_executable_extensions; do
22937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22938    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22940    break 2
22941  fi
22942done
22943  done
22944IFS=$as_save_IFS
22945
22946  ;;
22947esac
22948fi
22949STAT=$ac_cv_path_STAT
22950if test -n "$STAT"; then
22951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22952$as_echo "$STAT" >&6; }
22953else
22954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22955$as_echo "no" >&6; }
22956fi
22957
22958
22959  test -n "$STAT" && break
22960done
22961
22962    else
22963      # If it succeeded, then it was overridden by the user. We will use it
22964      # for the tool.
22965
22966      # First remove it from the list of overridden variables, so we can test
22967      # for unknown variables in the end.
22968      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22969
22970      # Check if we try to supply an empty value
22971      if test "x$STAT" = x; then
22972        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22973$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22974        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22975$as_echo_n "checking for STAT... " >&6; }
22976        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22977$as_echo "disabled" >&6; }
22978      else
22979        # Check if the provided tool contains a complete path.
22980        tool_specified="$STAT"
22981        tool_basename="${tool_specified##*/}"
22982        if test "x$tool_basename" = "x$tool_specified"; then
22983          # A command without a complete path is provided, search $PATH.
22984          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22985$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22986          # Extract the first word of "$tool_basename", so it can be a program name with args.
22987set dummy $tool_basename; ac_word=$2
22988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22989$as_echo_n "checking for $ac_word... " >&6; }
22990if ${ac_cv_path_STAT+:} false; then :
22991  $as_echo_n "(cached) " >&6
22992else
22993  case $STAT in
22994  [\\/]* | ?:[\\/]*)
22995  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22996  ;;
22997  *)
22998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22999for as_dir in $PATH
23000do
23001  IFS=$as_save_IFS
23002  test -z "$as_dir" && as_dir=.
23003    for ac_exec_ext in '' $ac_executable_extensions; do
23004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23005    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23007    break 2
23008  fi
23009done
23010  done
23011IFS=$as_save_IFS
23012
23013  ;;
23014esac
23015fi
23016STAT=$ac_cv_path_STAT
23017if test -n "$STAT"; then
23018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23019$as_echo "$STAT" >&6; }
23020else
23021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23022$as_echo "no" >&6; }
23023fi
23024
23025
23026          if test "x$STAT" = x; then
23027            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23028          fi
23029        else
23030          # Otherwise we believe it is a complete path. Use it as it is.
23031          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23032$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23033          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23034$as_echo_n "checking for STAT... " >&6; }
23035          if test ! -x "$tool_specified"; then
23036            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23037$as_echo "not found" >&6; }
23038            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23039          fi
23040          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23041$as_echo "$tool_specified" >&6; }
23042        fi
23043      fi
23044    fi
23045
23046  fi
23047
23048
23049
23050
23051  # Publish this variable in the help.
23052
23053
23054  if [ -z "${TIME+x}" ]; then
23055    # The variable is not set by user, try to locate tool using the code snippet
23056    for ac_prog in time
23057do
23058  # Extract the first word of "$ac_prog", so it can be a program name with args.
23059set dummy $ac_prog; ac_word=$2
23060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23061$as_echo_n "checking for $ac_word... " >&6; }
23062if ${ac_cv_path_TIME+:} false; then :
23063  $as_echo_n "(cached) " >&6
23064else
23065  case $TIME in
23066  [\\/]* | ?:[\\/]*)
23067  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23068  ;;
23069  *)
23070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23071for as_dir in $PATH
23072do
23073  IFS=$as_save_IFS
23074  test -z "$as_dir" && as_dir=.
23075    for ac_exec_ext in '' $ac_executable_extensions; do
23076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23077    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23079    break 2
23080  fi
23081done
23082  done
23083IFS=$as_save_IFS
23084
23085  ;;
23086esac
23087fi
23088TIME=$ac_cv_path_TIME
23089if test -n "$TIME"; then
23090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23091$as_echo "$TIME" >&6; }
23092else
23093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23094$as_echo "no" >&6; }
23095fi
23096
23097
23098  test -n "$TIME" && break
23099done
23100
23101  else
23102    # The variable is set, but is it from the command line or the environment?
23103
23104    # Try to remove the string !TIME! from our list.
23105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23107      # If it failed, the variable was not from the command line. Ignore it,
23108      # but warn the user (except for BASH, which is always set by the calling BASH).
23109      if test "xTIME" != xBASH; then
23110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23111$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23112      fi
23113      # Try to locate tool using the code snippet
23114      for ac_prog in time
23115do
23116  # Extract the first word of "$ac_prog", so it can be a program name with args.
23117set dummy $ac_prog; ac_word=$2
23118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23119$as_echo_n "checking for $ac_word... " >&6; }
23120if ${ac_cv_path_TIME+:} false; then :
23121  $as_echo_n "(cached) " >&6
23122else
23123  case $TIME in
23124  [\\/]* | ?:[\\/]*)
23125  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23126  ;;
23127  *)
23128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23129for as_dir in $PATH
23130do
23131  IFS=$as_save_IFS
23132  test -z "$as_dir" && as_dir=.
23133    for ac_exec_ext in '' $ac_executable_extensions; do
23134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23135    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23137    break 2
23138  fi
23139done
23140  done
23141IFS=$as_save_IFS
23142
23143  ;;
23144esac
23145fi
23146TIME=$ac_cv_path_TIME
23147if test -n "$TIME"; then
23148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23149$as_echo "$TIME" >&6; }
23150else
23151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23152$as_echo "no" >&6; }
23153fi
23154
23155
23156  test -n "$TIME" && break
23157done
23158
23159    else
23160      # If it succeeded, then it was overridden by the user. We will use it
23161      # for the tool.
23162
23163      # First remove it from the list of overridden variables, so we can test
23164      # for unknown variables in the end.
23165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23166
23167      # Check if we try to supply an empty value
23168      if test "x$TIME" = x; then
23169        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23170$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23172$as_echo_n "checking for TIME... " >&6; }
23173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23174$as_echo "disabled" >&6; }
23175      else
23176        # Check if the provided tool contains a complete path.
23177        tool_specified="$TIME"
23178        tool_basename="${tool_specified##*/}"
23179        if test "x$tool_basename" = "x$tool_specified"; then
23180          # A command without a complete path is provided, search $PATH.
23181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23182$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23183          # Extract the first word of "$tool_basename", so it can be a program name with args.
23184set dummy $tool_basename; ac_word=$2
23185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23186$as_echo_n "checking for $ac_word... " >&6; }
23187if ${ac_cv_path_TIME+:} false; then :
23188  $as_echo_n "(cached) " >&6
23189else
23190  case $TIME in
23191  [\\/]* | ?:[\\/]*)
23192  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23193  ;;
23194  *)
23195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23196for as_dir in $PATH
23197do
23198  IFS=$as_save_IFS
23199  test -z "$as_dir" && as_dir=.
23200    for ac_exec_ext in '' $ac_executable_extensions; do
23201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23202    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23204    break 2
23205  fi
23206done
23207  done
23208IFS=$as_save_IFS
23209
23210  ;;
23211esac
23212fi
23213TIME=$ac_cv_path_TIME
23214if test -n "$TIME"; then
23215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23216$as_echo "$TIME" >&6; }
23217else
23218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23219$as_echo "no" >&6; }
23220fi
23221
23222
23223          if test "x$TIME" = x; then
23224            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23225          fi
23226        else
23227          # Otherwise we believe it is a complete path. Use it as it is.
23228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23229$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23230          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23231$as_echo_n "checking for TIME... " >&6; }
23232          if test ! -x "$tool_specified"; then
23233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23234$as_echo "not found" >&6; }
23235            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23236          fi
23237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23238$as_echo "$tool_specified" >&6; }
23239        fi
23240      fi
23241    fi
23242
23243  fi
23244
23245
23246
23247
23248  # Publish this variable in the help.
23249
23250
23251  if [ -z "${FLOCK+x}" ]; then
23252    # The variable is not set by user, try to locate tool using the code snippet
23253    for ac_prog in flock
23254do
23255  # Extract the first word of "$ac_prog", so it can be a program name with args.
23256set dummy $ac_prog; ac_word=$2
23257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23258$as_echo_n "checking for $ac_word... " >&6; }
23259if ${ac_cv_path_FLOCK+:} false; then :
23260  $as_echo_n "(cached) " >&6
23261else
23262  case $FLOCK in
23263  [\\/]* | ?:[\\/]*)
23264  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23265  ;;
23266  *)
23267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23268for as_dir in $PATH
23269do
23270  IFS=$as_save_IFS
23271  test -z "$as_dir" && as_dir=.
23272    for ac_exec_ext in '' $ac_executable_extensions; do
23273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23274    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23276    break 2
23277  fi
23278done
23279  done
23280IFS=$as_save_IFS
23281
23282  ;;
23283esac
23284fi
23285FLOCK=$ac_cv_path_FLOCK
23286if test -n "$FLOCK"; then
23287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23288$as_echo "$FLOCK" >&6; }
23289else
23290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23291$as_echo "no" >&6; }
23292fi
23293
23294
23295  test -n "$FLOCK" && break
23296done
23297
23298  else
23299    # The variable is set, but is it from the command line or the environment?
23300
23301    # Try to remove the string !FLOCK! from our list.
23302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23304      # If it failed, the variable was not from the command line. Ignore it,
23305      # but warn the user (except for BASH, which is always set by the calling BASH).
23306      if test "xFLOCK" != xBASH; then
23307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23308$as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23309      fi
23310      # Try to locate tool using the code snippet
23311      for ac_prog in flock
23312do
23313  # Extract the first word of "$ac_prog", so it can be a program name with args.
23314set dummy $ac_prog; ac_word=$2
23315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23316$as_echo_n "checking for $ac_word... " >&6; }
23317if ${ac_cv_path_FLOCK+:} false; then :
23318  $as_echo_n "(cached) " >&6
23319else
23320  case $FLOCK in
23321  [\\/]* | ?:[\\/]*)
23322  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23323  ;;
23324  *)
23325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23326for as_dir in $PATH
23327do
23328  IFS=$as_save_IFS
23329  test -z "$as_dir" && as_dir=.
23330    for ac_exec_ext in '' $ac_executable_extensions; do
23331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23332    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23334    break 2
23335  fi
23336done
23337  done
23338IFS=$as_save_IFS
23339
23340  ;;
23341esac
23342fi
23343FLOCK=$ac_cv_path_FLOCK
23344if test -n "$FLOCK"; then
23345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23346$as_echo "$FLOCK" >&6; }
23347else
23348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23349$as_echo "no" >&6; }
23350fi
23351
23352
23353  test -n "$FLOCK" && break
23354done
23355
23356    else
23357      # If it succeeded, then it was overridden by the user. We will use it
23358      # for the tool.
23359
23360      # First remove it from the list of overridden variables, so we can test
23361      # for unknown variables in the end.
23362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23363
23364      # Check if we try to supply an empty value
23365      if test "x$FLOCK" = x; then
23366        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23367$as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23369$as_echo_n "checking for FLOCK... " >&6; }
23370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23371$as_echo "disabled" >&6; }
23372      else
23373        # Check if the provided tool contains a complete path.
23374        tool_specified="$FLOCK"
23375        tool_basename="${tool_specified##*/}"
23376        if test "x$tool_basename" = "x$tool_specified"; then
23377          # A command without a complete path is provided, search $PATH.
23378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23379$as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23380          # Extract the first word of "$tool_basename", so it can be a program name with args.
23381set dummy $tool_basename; ac_word=$2
23382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23383$as_echo_n "checking for $ac_word... " >&6; }
23384if ${ac_cv_path_FLOCK+:} false; then :
23385  $as_echo_n "(cached) " >&6
23386else
23387  case $FLOCK in
23388  [\\/]* | ?:[\\/]*)
23389  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23390  ;;
23391  *)
23392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23393for as_dir in $PATH
23394do
23395  IFS=$as_save_IFS
23396  test -z "$as_dir" && as_dir=.
23397    for ac_exec_ext in '' $ac_executable_extensions; do
23398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23399    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23401    break 2
23402  fi
23403done
23404  done
23405IFS=$as_save_IFS
23406
23407  ;;
23408esac
23409fi
23410FLOCK=$ac_cv_path_FLOCK
23411if test -n "$FLOCK"; then
23412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23413$as_echo "$FLOCK" >&6; }
23414else
23415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23416$as_echo "no" >&6; }
23417fi
23418
23419
23420          if test "x$FLOCK" = x; then
23421            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23422          fi
23423        else
23424          # Otherwise we believe it is a complete path. Use it as it is.
23425          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23426$as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23427          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23428$as_echo_n "checking for FLOCK... " >&6; }
23429          if test ! -x "$tool_specified"; then
23430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23431$as_echo "not found" >&6; }
23432            as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23433          fi
23434          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23435$as_echo "$tool_specified" >&6; }
23436        fi
23437      fi
23438    fi
23439
23440  fi
23441
23442
23443  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23444  # be in the user path.
23445
23446
23447  # Publish this variable in the help.
23448
23449
23450  if [ -z "${DTRACE+x}" ]; then
23451    # The variable is not set by user, try to locate tool using the code snippet
23452    for ac_prog in dtrace
23453do
23454  # Extract the first word of "$ac_prog", so it can be a program name with args.
23455set dummy $ac_prog; ac_word=$2
23456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23457$as_echo_n "checking for $ac_word... " >&6; }
23458if ${ac_cv_path_DTRACE+:} false; then :
23459  $as_echo_n "(cached) " >&6
23460else
23461  case $DTRACE in
23462  [\\/]* | ?:[\\/]*)
23463  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23464  ;;
23465  *)
23466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23467as_dummy="$PATH:/usr/sbin"
23468for as_dir in $as_dummy
23469do
23470  IFS=$as_save_IFS
23471  test -z "$as_dir" && as_dir=.
23472    for ac_exec_ext in '' $ac_executable_extensions; do
23473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23474    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23476    break 2
23477  fi
23478done
23479  done
23480IFS=$as_save_IFS
23481
23482  ;;
23483esac
23484fi
23485DTRACE=$ac_cv_path_DTRACE
23486if test -n "$DTRACE"; then
23487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23488$as_echo "$DTRACE" >&6; }
23489else
23490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23491$as_echo "no" >&6; }
23492fi
23493
23494
23495  test -n "$DTRACE" && break
23496done
23497
23498  else
23499    # The variable is set, but is it from the command line or the environment?
23500
23501    # Try to remove the string !DTRACE! from our list.
23502    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23503    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23504      # If it failed, the variable was not from the command line. Ignore it,
23505      # but warn the user (except for BASH, which is always set by the calling BASH).
23506      if test "xDTRACE" != xBASH; then
23507        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23508$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23509      fi
23510      # Try to locate tool using the code snippet
23511      for ac_prog in dtrace
23512do
23513  # Extract the first word of "$ac_prog", so it can be a program name with args.
23514set dummy $ac_prog; ac_word=$2
23515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23516$as_echo_n "checking for $ac_word... " >&6; }
23517if ${ac_cv_path_DTRACE+:} false; then :
23518  $as_echo_n "(cached) " >&6
23519else
23520  case $DTRACE in
23521  [\\/]* | ?:[\\/]*)
23522  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23523  ;;
23524  *)
23525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23526as_dummy="$PATH:/usr/sbin"
23527for as_dir in $as_dummy
23528do
23529  IFS=$as_save_IFS
23530  test -z "$as_dir" && as_dir=.
23531    for ac_exec_ext in '' $ac_executable_extensions; do
23532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23533    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23535    break 2
23536  fi
23537done
23538  done
23539IFS=$as_save_IFS
23540
23541  ;;
23542esac
23543fi
23544DTRACE=$ac_cv_path_DTRACE
23545if test -n "$DTRACE"; then
23546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23547$as_echo "$DTRACE" >&6; }
23548else
23549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23550$as_echo "no" >&6; }
23551fi
23552
23553
23554  test -n "$DTRACE" && break
23555done
23556
23557    else
23558      # If it succeeded, then it was overridden by the user. We will use it
23559      # for the tool.
23560
23561      # First remove it from the list of overridden variables, so we can test
23562      # for unknown variables in the end.
23563      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23564
23565      # Check if we try to supply an empty value
23566      if test "x$DTRACE" = x; then
23567        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23568$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23569        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23570$as_echo_n "checking for DTRACE... " >&6; }
23571        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23572$as_echo "disabled" >&6; }
23573      else
23574        # Check if the provided tool contains a complete path.
23575        tool_specified="$DTRACE"
23576        tool_basename="${tool_specified##*/}"
23577        if test "x$tool_basename" = "x$tool_specified"; then
23578          # A command without a complete path is provided, search $PATH.
23579          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23580$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23581          # Extract the first word of "$tool_basename", so it can be a program name with args.
23582set dummy $tool_basename; ac_word=$2
23583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23584$as_echo_n "checking for $ac_word... " >&6; }
23585if ${ac_cv_path_DTRACE+:} false; then :
23586  $as_echo_n "(cached) " >&6
23587else
23588  case $DTRACE in
23589  [\\/]* | ?:[\\/]*)
23590  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23591  ;;
23592  *)
23593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23594for as_dir in $PATH
23595do
23596  IFS=$as_save_IFS
23597  test -z "$as_dir" && as_dir=.
23598    for ac_exec_ext in '' $ac_executable_extensions; do
23599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23600    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23602    break 2
23603  fi
23604done
23605  done
23606IFS=$as_save_IFS
23607
23608  ;;
23609esac
23610fi
23611DTRACE=$ac_cv_path_DTRACE
23612if test -n "$DTRACE"; then
23613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23614$as_echo "$DTRACE" >&6; }
23615else
23616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23617$as_echo "no" >&6; }
23618fi
23619
23620
23621          if test "x$DTRACE" = x; then
23622            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23623          fi
23624        else
23625          # Otherwise we believe it is a complete path. Use it as it is.
23626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23627$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23628          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23629$as_echo_n "checking for DTRACE... " >&6; }
23630          if test ! -x "$tool_specified"; then
23631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23632$as_echo "not found" >&6; }
23633            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23634          fi
23635          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23636$as_echo "$tool_specified" >&6; }
23637        fi
23638      fi
23639    fi
23640
23641  fi
23642
23643
23644
23645
23646  # Publish this variable in the help.
23647
23648
23649  if [ -z "${PATCH+x}" ]; then
23650    # The variable is not set by user, try to locate tool using the code snippet
23651    for ac_prog in gpatch patch
23652do
23653  # Extract the first word of "$ac_prog", so it can be a program name with args.
23654set dummy $ac_prog; ac_word=$2
23655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23656$as_echo_n "checking for $ac_word... " >&6; }
23657if ${ac_cv_path_PATCH+:} false; then :
23658  $as_echo_n "(cached) " >&6
23659else
23660  case $PATCH in
23661  [\\/]* | ?:[\\/]*)
23662  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23663  ;;
23664  *)
23665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23666for as_dir in $PATH
23667do
23668  IFS=$as_save_IFS
23669  test -z "$as_dir" && as_dir=.
23670    for ac_exec_ext in '' $ac_executable_extensions; do
23671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23672    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23674    break 2
23675  fi
23676done
23677  done
23678IFS=$as_save_IFS
23679
23680  ;;
23681esac
23682fi
23683PATCH=$ac_cv_path_PATCH
23684if test -n "$PATCH"; then
23685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23686$as_echo "$PATCH" >&6; }
23687else
23688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23689$as_echo "no" >&6; }
23690fi
23691
23692
23693  test -n "$PATCH" && break
23694done
23695
23696  else
23697    # The variable is set, but is it from the command line or the environment?
23698
23699    # Try to remove the string !PATCH! from our list.
23700    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23701    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23702      # If it failed, the variable was not from the command line. Ignore it,
23703      # but warn the user (except for BASH, which is always set by the calling BASH).
23704      if test "xPATCH" != xBASH; then
23705        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23706$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23707      fi
23708      # Try to locate tool using the code snippet
23709      for ac_prog in gpatch patch
23710do
23711  # Extract the first word of "$ac_prog", so it can be a program name with args.
23712set dummy $ac_prog; ac_word=$2
23713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23714$as_echo_n "checking for $ac_word... " >&6; }
23715if ${ac_cv_path_PATCH+:} false; then :
23716  $as_echo_n "(cached) " >&6
23717else
23718  case $PATCH in
23719  [\\/]* | ?:[\\/]*)
23720  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23721  ;;
23722  *)
23723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23724for as_dir in $PATH
23725do
23726  IFS=$as_save_IFS
23727  test -z "$as_dir" && as_dir=.
23728    for ac_exec_ext in '' $ac_executable_extensions; do
23729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23730    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23732    break 2
23733  fi
23734done
23735  done
23736IFS=$as_save_IFS
23737
23738  ;;
23739esac
23740fi
23741PATCH=$ac_cv_path_PATCH
23742if test -n "$PATCH"; then
23743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23744$as_echo "$PATCH" >&6; }
23745else
23746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23747$as_echo "no" >&6; }
23748fi
23749
23750
23751  test -n "$PATCH" && break
23752done
23753
23754    else
23755      # If it succeeded, then it was overridden by the user. We will use it
23756      # for the tool.
23757
23758      # First remove it from the list of overridden variables, so we can test
23759      # for unknown variables in the end.
23760      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23761
23762      # Check if we try to supply an empty value
23763      if test "x$PATCH" = x; then
23764        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23765$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23766        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23767$as_echo_n "checking for PATCH... " >&6; }
23768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23769$as_echo "disabled" >&6; }
23770      else
23771        # Check if the provided tool contains a complete path.
23772        tool_specified="$PATCH"
23773        tool_basename="${tool_specified##*/}"
23774        if test "x$tool_basename" = "x$tool_specified"; then
23775          # A command without a complete path is provided, search $PATH.
23776          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23777$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23778          # Extract the first word of "$tool_basename", so it can be a program name with args.
23779set dummy $tool_basename; ac_word=$2
23780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23781$as_echo_n "checking for $ac_word... " >&6; }
23782if ${ac_cv_path_PATCH+:} false; then :
23783  $as_echo_n "(cached) " >&6
23784else
23785  case $PATCH in
23786  [\\/]* | ?:[\\/]*)
23787  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23788  ;;
23789  *)
23790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23791for as_dir in $PATH
23792do
23793  IFS=$as_save_IFS
23794  test -z "$as_dir" && as_dir=.
23795    for ac_exec_ext in '' $ac_executable_extensions; do
23796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23797    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23799    break 2
23800  fi
23801done
23802  done
23803IFS=$as_save_IFS
23804
23805  ;;
23806esac
23807fi
23808PATCH=$ac_cv_path_PATCH
23809if test -n "$PATCH"; then
23810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23811$as_echo "$PATCH" >&6; }
23812else
23813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23814$as_echo "no" >&6; }
23815fi
23816
23817
23818          if test "x$PATCH" = x; then
23819            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23820          fi
23821        else
23822          # Otherwise we believe it is a complete path. Use it as it is.
23823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23824$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23825          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23826$as_echo_n "checking for PATCH... " >&6; }
23827          if test ! -x "$tool_specified"; then
23828            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23829$as_echo "not found" >&6; }
23830            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23831          fi
23832          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23833$as_echo "$tool_specified" >&6; }
23834        fi
23835      fi
23836    fi
23837
23838  fi
23839
23840
23841  # Check if it's GNU time
23842  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23843  if test "x$IS_GNU_TIME" != x; then
23844    IS_GNU_TIME=yes
23845  else
23846    IS_GNU_TIME=no
23847  fi
23848
23849
23850  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23851
23852
23853
23854  # Publish this variable in the help.
23855
23856
23857  if [ -z "${DSYMUTIL+x}" ]; then
23858    # The variable is not set by user, try to locate tool using the code snippet
23859    for ac_prog in dsymutil
23860do
23861  # Extract the first word of "$ac_prog", so it can be a program name with args.
23862set dummy $ac_prog; ac_word=$2
23863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23864$as_echo_n "checking for $ac_word... " >&6; }
23865if ${ac_cv_path_DSYMUTIL+:} false; then :
23866  $as_echo_n "(cached) " >&6
23867else
23868  case $DSYMUTIL in
23869  [\\/]* | ?:[\\/]*)
23870  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23871  ;;
23872  *)
23873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23874for as_dir in $PATH
23875do
23876  IFS=$as_save_IFS
23877  test -z "$as_dir" && as_dir=.
23878    for ac_exec_ext in '' $ac_executable_extensions; do
23879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23880    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23882    break 2
23883  fi
23884done
23885  done
23886IFS=$as_save_IFS
23887
23888  ;;
23889esac
23890fi
23891DSYMUTIL=$ac_cv_path_DSYMUTIL
23892if test -n "$DSYMUTIL"; then
23893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23894$as_echo "$DSYMUTIL" >&6; }
23895else
23896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23897$as_echo "no" >&6; }
23898fi
23899
23900
23901  test -n "$DSYMUTIL" && break
23902done
23903
23904  else
23905    # The variable is set, but is it from the command line or the environment?
23906
23907    # Try to remove the string !DSYMUTIL! from our list.
23908    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23909    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23910      # If it failed, the variable was not from the command line. Ignore it,
23911      # but warn the user (except for BASH, which is always set by the calling BASH).
23912      if test "xDSYMUTIL" != xBASH; then
23913        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23914$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23915      fi
23916      # Try to locate tool using the code snippet
23917      for ac_prog in dsymutil
23918do
23919  # Extract the first word of "$ac_prog", so it can be a program name with args.
23920set dummy $ac_prog; ac_word=$2
23921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23922$as_echo_n "checking for $ac_word... " >&6; }
23923if ${ac_cv_path_DSYMUTIL+:} false; then :
23924  $as_echo_n "(cached) " >&6
23925else
23926  case $DSYMUTIL in
23927  [\\/]* | ?:[\\/]*)
23928  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23929  ;;
23930  *)
23931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23932for as_dir in $PATH
23933do
23934  IFS=$as_save_IFS
23935  test -z "$as_dir" && as_dir=.
23936    for ac_exec_ext in '' $ac_executable_extensions; do
23937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23938    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23940    break 2
23941  fi
23942done
23943  done
23944IFS=$as_save_IFS
23945
23946  ;;
23947esac
23948fi
23949DSYMUTIL=$ac_cv_path_DSYMUTIL
23950if test -n "$DSYMUTIL"; then
23951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23952$as_echo "$DSYMUTIL" >&6; }
23953else
23954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23955$as_echo "no" >&6; }
23956fi
23957
23958
23959  test -n "$DSYMUTIL" && break
23960done
23961
23962    else
23963      # If it succeeded, then it was overridden by the user. We will use it
23964      # for the tool.
23965
23966      # First remove it from the list of overridden variables, so we can test
23967      # for unknown variables in the end.
23968      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23969
23970      # Check if we try to supply an empty value
23971      if test "x$DSYMUTIL" = x; then
23972        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23973$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23974        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23975$as_echo_n "checking for DSYMUTIL... " >&6; }
23976        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23977$as_echo "disabled" >&6; }
23978      else
23979        # Check if the provided tool contains a complete path.
23980        tool_specified="$DSYMUTIL"
23981        tool_basename="${tool_specified##*/}"
23982        if test "x$tool_basename" = "x$tool_specified"; then
23983          # A command without a complete path is provided, search $PATH.
23984          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23985$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23986          # Extract the first word of "$tool_basename", so it can be a program name with args.
23987set dummy $tool_basename; ac_word=$2
23988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23989$as_echo_n "checking for $ac_word... " >&6; }
23990if ${ac_cv_path_DSYMUTIL+:} false; then :
23991  $as_echo_n "(cached) " >&6
23992else
23993  case $DSYMUTIL in
23994  [\\/]* | ?:[\\/]*)
23995  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23996  ;;
23997  *)
23998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23999for as_dir in $PATH
24000do
24001  IFS=$as_save_IFS
24002  test -z "$as_dir" && as_dir=.
24003    for ac_exec_ext in '' $ac_executable_extensions; do
24004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24005    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24007    break 2
24008  fi
24009done
24010  done
24011IFS=$as_save_IFS
24012
24013  ;;
24014esac
24015fi
24016DSYMUTIL=$ac_cv_path_DSYMUTIL
24017if test -n "$DSYMUTIL"; then
24018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24019$as_echo "$DSYMUTIL" >&6; }
24020else
24021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24022$as_echo "no" >&6; }
24023fi
24024
24025
24026          if test "x$DSYMUTIL" = x; then
24027            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24028          fi
24029        else
24030          # Otherwise we believe it is a complete path. Use it as it is.
24031          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
24032$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
24033          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24034$as_echo_n "checking for DSYMUTIL... " >&6; }
24035          if test ! -x "$tool_specified"; then
24036            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24037$as_echo "not found" >&6; }
24038            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
24039          fi
24040          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24041$as_echo "$tool_specified" >&6; }
24042        fi
24043      fi
24044    fi
24045
24046  fi
24047
24048
24049
24050  if test "x$DSYMUTIL" = x; then
24051    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
24052  fi
24053
24054
24055
24056
24057
24058  # Publish this variable in the help.
24059
24060
24061  if [ -z "${XATTR+x}" ]; then
24062    # The variable is not set by user, try to locate tool using the code snippet
24063    for ac_prog in xattr
24064do
24065  # Extract the first word of "$ac_prog", so it can be a program name with args.
24066set dummy $ac_prog; ac_word=$2
24067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24068$as_echo_n "checking for $ac_word... " >&6; }
24069if ${ac_cv_path_XATTR+:} false; then :
24070  $as_echo_n "(cached) " >&6
24071else
24072  case $XATTR in
24073  [\\/]* | ?:[\\/]*)
24074  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24075  ;;
24076  *)
24077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24078for as_dir in $PATH
24079do
24080  IFS=$as_save_IFS
24081  test -z "$as_dir" && as_dir=.
24082    for ac_exec_ext in '' $ac_executable_extensions; do
24083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24084    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24086    break 2
24087  fi
24088done
24089  done
24090IFS=$as_save_IFS
24091
24092  ;;
24093esac
24094fi
24095XATTR=$ac_cv_path_XATTR
24096if test -n "$XATTR"; then
24097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24098$as_echo "$XATTR" >&6; }
24099else
24100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24101$as_echo "no" >&6; }
24102fi
24103
24104
24105  test -n "$XATTR" && break
24106done
24107
24108  else
24109    # The variable is set, but is it from the command line or the environment?
24110
24111    # Try to remove the string !XATTR! from our list.
24112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
24113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24114      # If it failed, the variable was not from the command line. Ignore it,
24115      # but warn the user (except for BASH, which is always set by the calling BASH).
24116      if test "xXATTR" != xBASH; then
24117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
24118$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
24119      fi
24120      # Try to locate tool using the code snippet
24121      for ac_prog in xattr
24122do
24123  # Extract the first word of "$ac_prog", so it can be a program name with args.
24124set dummy $ac_prog; ac_word=$2
24125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24126$as_echo_n "checking for $ac_word... " >&6; }
24127if ${ac_cv_path_XATTR+:} false; then :
24128  $as_echo_n "(cached) " >&6
24129else
24130  case $XATTR in
24131  [\\/]* | ?:[\\/]*)
24132  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24133  ;;
24134  *)
24135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24136for as_dir in $PATH
24137do
24138  IFS=$as_save_IFS
24139  test -z "$as_dir" && as_dir=.
24140    for ac_exec_ext in '' $ac_executable_extensions; do
24141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24142    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24144    break 2
24145  fi
24146done
24147  done
24148IFS=$as_save_IFS
24149
24150  ;;
24151esac
24152fi
24153XATTR=$ac_cv_path_XATTR
24154if test -n "$XATTR"; then
24155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24156$as_echo "$XATTR" >&6; }
24157else
24158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24159$as_echo "no" >&6; }
24160fi
24161
24162
24163  test -n "$XATTR" && break
24164done
24165
24166    else
24167      # If it succeeded, then it was overridden by the user. We will use it
24168      # for the tool.
24169
24170      # First remove it from the list of overridden variables, so we can test
24171      # for unknown variables in the end.
24172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24173
24174      # Check if we try to supply an empty value
24175      if test "x$XATTR" = x; then
24176        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24177$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24178        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24179$as_echo_n "checking for XATTR... " >&6; }
24180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24181$as_echo "disabled" >&6; }
24182      else
24183        # Check if the provided tool contains a complete path.
24184        tool_specified="$XATTR"
24185        tool_basename="${tool_specified##*/}"
24186        if test "x$tool_basename" = "x$tool_specified"; then
24187          # A command without a complete path is provided, search $PATH.
24188          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24189$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24190          # Extract the first word of "$tool_basename", so it can be a program name with args.
24191set dummy $tool_basename; ac_word=$2
24192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24193$as_echo_n "checking for $ac_word... " >&6; }
24194if ${ac_cv_path_XATTR+:} false; then :
24195  $as_echo_n "(cached) " >&6
24196else
24197  case $XATTR in
24198  [\\/]* | ?:[\\/]*)
24199  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24200  ;;
24201  *)
24202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24203for as_dir in $PATH
24204do
24205  IFS=$as_save_IFS
24206  test -z "$as_dir" && as_dir=.
24207    for ac_exec_ext in '' $ac_executable_extensions; do
24208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24209    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24211    break 2
24212  fi
24213done
24214  done
24215IFS=$as_save_IFS
24216
24217  ;;
24218esac
24219fi
24220XATTR=$ac_cv_path_XATTR
24221if test -n "$XATTR"; then
24222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24223$as_echo "$XATTR" >&6; }
24224else
24225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24226$as_echo "no" >&6; }
24227fi
24228
24229
24230          if test "x$XATTR" = x; then
24231            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24232          fi
24233        else
24234          # Otherwise we believe it is a complete path. Use it as it is.
24235          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24236$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24237          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24238$as_echo_n "checking for XATTR... " >&6; }
24239          if test ! -x "$tool_specified"; then
24240            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24241$as_echo "not found" >&6; }
24242            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24243          fi
24244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24245$as_echo "$tool_specified" >&6; }
24246        fi
24247      fi
24248    fi
24249
24250  fi
24251
24252
24253
24254  if test "x$XATTR" = x; then
24255    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24256  fi
24257
24258
24259
24260
24261  # Publish this variable in the help.
24262
24263
24264  if [ -z "${CODESIGN+x}" ]; then
24265    # The variable is not set by user, try to locate tool using the code snippet
24266    for ac_prog in codesign
24267do
24268  # Extract the first word of "$ac_prog", so it can be a program name with args.
24269set dummy $ac_prog; ac_word=$2
24270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24271$as_echo_n "checking for $ac_word... " >&6; }
24272if ${ac_cv_path_CODESIGN+:} false; then :
24273  $as_echo_n "(cached) " >&6
24274else
24275  case $CODESIGN in
24276  [\\/]* | ?:[\\/]*)
24277  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24278  ;;
24279  *)
24280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24281for as_dir in $PATH
24282do
24283  IFS=$as_save_IFS
24284  test -z "$as_dir" && as_dir=.
24285    for ac_exec_ext in '' $ac_executable_extensions; do
24286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24287    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24289    break 2
24290  fi
24291done
24292  done
24293IFS=$as_save_IFS
24294
24295  ;;
24296esac
24297fi
24298CODESIGN=$ac_cv_path_CODESIGN
24299if test -n "$CODESIGN"; then
24300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24301$as_echo "$CODESIGN" >&6; }
24302else
24303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24304$as_echo "no" >&6; }
24305fi
24306
24307
24308  test -n "$CODESIGN" && break
24309done
24310
24311  else
24312    # The variable is set, but is it from the command line or the environment?
24313
24314    # Try to remove the string !CODESIGN! from our list.
24315    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24316    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24317      # If it failed, the variable was not from the command line. Ignore it,
24318      # but warn the user (except for BASH, which is always set by the calling BASH).
24319      if test "xCODESIGN" != xBASH; then
24320        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24321$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24322      fi
24323      # Try to locate tool using the code snippet
24324      for ac_prog in codesign
24325do
24326  # Extract the first word of "$ac_prog", so it can be a program name with args.
24327set dummy $ac_prog; ac_word=$2
24328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24329$as_echo_n "checking for $ac_word... " >&6; }
24330if ${ac_cv_path_CODESIGN+:} false; then :
24331  $as_echo_n "(cached) " >&6
24332else
24333  case $CODESIGN in
24334  [\\/]* | ?:[\\/]*)
24335  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24336  ;;
24337  *)
24338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24339for as_dir in $PATH
24340do
24341  IFS=$as_save_IFS
24342  test -z "$as_dir" && as_dir=.
24343    for ac_exec_ext in '' $ac_executable_extensions; do
24344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24345    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24347    break 2
24348  fi
24349done
24350  done
24351IFS=$as_save_IFS
24352
24353  ;;
24354esac
24355fi
24356CODESIGN=$ac_cv_path_CODESIGN
24357if test -n "$CODESIGN"; then
24358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24359$as_echo "$CODESIGN" >&6; }
24360else
24361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24362$as_echo "no" >&6; }
24363fi
24364
24365
24366  test -n "$CODESIGN" && break
24367done
24368
24369    else
24370      # If it succeeded, then it was overridden by the user. We will use it
24371      # for the tool.
24372
24373      # First remove it from the list of overridden variables, so we can test
24374      # for unknown variables in the end.
24375      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24376
24377      # Check if we try to supply an empty value
24378      if test "x$CODESIGN" = x; then
24379        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24380$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24381        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24382$as_echo_n "checking for CODESIGN... " >&6; }
24383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24384$as_echo "disabled" >&6; }
24385      else
24386        # Check if the provided tool contains a complete path.
24387        tool_specified="$CODESIGN"
24388        tool_basename="${tool_specified##*/}"
24389        if test "x$tool_basename" = "x$tool_specified"; then
24390          # A command without a complete path is provided, search $PATH.
24391          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24392$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24393          # Extract the first word of "$tool_basename", so it can be a program name with args.
24394set dummy $tool_basename; ac_word=$2
24395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24396$as_echo_n "checking for $ac_word... " >&6; }
24397if ${ac_cv_path_CODESIGN+:} false; then :
24398  $as_echo_n "(cached) " >&6
24399else
24400  case $CODESIGN in
24401  [\\/]* | ?:[\\/]*)
24402  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24403  ;;
24404  *)
24405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24406for as_dir in $PATH
24407do
24408  IFS=$as_save_IFS
24409  test -z "$as_dir" && as_dir=.
24410    for ac_exec_ext in '' $ac_executable_extensions; do
24411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24412    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24414    break 2
24415  fi
24416done
24417  done
24418IFS=$as_save_IFS
24419
24420  ;;
24421esac
24422fi
24423CODESIGN=$ac_cv_path_CODESIGN
24424if test -n "$CODESIGN"; then
24425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24426$as_echo "$CODESIGN" >&6; }
24427else
24428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24429$as_echo "no" >&6; }
24430fi
24431
24432
24433          if test "x$CODESIGN" = x; then
24434            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24435          fi
24436        else
24437          # Otherwise we believe it is a complete path. Use it as it is.
24438          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24439$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24440          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24441$as_echo_n "checking for CODESIGN... " >&6; }
24442          if test ! -x "$tool_specified"; then
24443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24444$as_echo "not found" >&6; }
24445            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24446          fi
24447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24448$as_echo "$tool_specified" >&6; }
24449        fi
24450      fi
24451    fi
24452
24453  fi
24454
24455
24456    if test "x$CODESIGN" != "x"; then
24457      # Verify that the openjdk_codesign certificate is present
24458      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24459$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24460      $RM codesign-testfile
24461      $TOUCH codesign-testfile
24462      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24463      $RM codesign-testfile
24464      if test "x$CODESIGN" = x; then
24465        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24466$as_echo "no" >&6; }
24467      else
24468        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24469$as_echo "yes" >&6; }
24470      fi
24471    fi
24472
24473
24474
24475  # Publish this variable in the help.
24476
24477
24478  if [ -z "${SETFILE+x}" ]; then
24479    # The variable is not set by user, try to locate tool using the code snippet
24480    for ac_prog in SetFile
24481do
24482  # Extract the first word of "$ac_prog", so it can be a program name with args.
24483set dummy $ac_prog; ac_word=$2
24484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24485$as_echo_n "checking for $ac_word... " >&6; }
24486if ${ac_cv_path_SETFILE+:} false; then :
24487  $as_echo_n "(cached) " >&6
24488else
24489  case $SETFILE in
24490  [\\/]* | ?:[\\/]*)
24491  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24492  ;;
24493  *)
24494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24495for as_dir in $PATH
24496do
24497  IFS=$as_save_IFS
24498  test -z "$as_dir" && as_dir=.
24499    for ac_exec_ext in '' $ac_executable_extensions; do
24500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24501    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24503    break 2
24504  fi
24505done
24506  done
24507IFS=$as_save_IFS
24508
24509  ;;
24510esac
24511fi
24512SETFILE=$ac_cv_path_SETFILE
24513if test -n "$SETFILE"; then
24514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24515$as_echo "$SETFILE" >&6; }
24516else
24517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24518$as_echo "no" >&6; }
24519fi
24520
24521
24522  test -n "$SETFILE" && break
24523done
24524
24525  else
24526    # The variable is set, but is it from the command line or the environment?
24527
24528    # Try to remove the string !SETFILE! from our list.
24529    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24530    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24531      # If it failed, the variable was not from the command line. Ignore it,
24532      # but warn the user (except for BASH, which is always set by the calling BASH).
24533      if test "xSETFILE" != xBASH; then
24534        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24535$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24536      fi
24537      # Try to locate tool using the code snippet
24538      for ac_prog in SetFile
24539do
24540  # Extract the first word of "$ac_prog", so it can be a program name with args.
24541set dummy $ac_prog; ac_word=$2
24542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24543$as_echo_n "checking for $ac_word... " >&6; }
24544if ${ac_cv_path_SETFILE+:} false; then :
24545  $as_echo_n "(cached) " >&6
24546else
24547  case $SETFILE in
24548  [\\/]* | ?:[\\/]*)
24549  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24550  ;;
24551  *)
24552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24553for as_dir in $PATH
24554do
24555  IFS=$as_save_IFS
24556  test -z "$as_dir" && as_dir=.
24557    for ac_exec_ext in '' $ac_executable_extensions; do
24558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24559    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24561    break 2
24562  fi
24563done
24564  done
24565IFS=$as_save_IFS
24566
24567  ;;
24568esac
24569fi
24570SETFILE=$ac_cv_path_SETFILE
24571if test -n "$SETFILE"; then
24572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24573$as_echo "$SETFILE" >&6; }
24574else
24575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24576$as_echo "no" >&6; }
24577fi
24578
24579
24580  test -n "$SETFILE" && break
24581done
24582
24583    else
24584      # If it succeeded, then it was overridden by the user. We will use it
24585      # for the tool.
24586
24587      # First remove it from the list of overridden variables, so we can test
24588      # for unknown variables in the end.
24589      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24590
24591      # Check if we try to supply an empty value
24592      if test "x$SETFILE" = x; then
24593        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24594$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24595        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24596$as_echo_n "checking for SETFILE... " >&6; }
24597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24598$as_echo "disabled" >&6; }
24599      else
24600        # Check if the provided tool contains a complete path.
24601        tool_specified="$SETFILE"
24602        tool_basename="${tool_specified##*/}"
24603        if test "x$tool_basename" = "x$tool_specified"; then
24604          # A command without a complete path is provided, search $PATH.
24605          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24606$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24607          # Extract the first word of "$tool_basename", so it can be a program name with args.
24608set dummy $tool_basename; ac_word=$2
24609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24610$as_echo_n "checking for $ac_word... " >&6; }
24611if ${ac_cv_path_SETFILE+:} false; then :
24612  $as_echo_n "(cached) " >&6
24613else
24614  case $SETFILE in
24615  [\\/]* | ?:[\\/]*)
24616  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24617  ;;
24618  *)
24619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24620for as_dir in $PATH
24621do
24622  IFS=$as_save_IFS
24623  test -z "$as_dir" && as_dir=.
24624    for ac_exec_ext in '' $ac_executable_extensions; do
24625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24626    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24628    break 2
24629  fi
24630done
24631  done
24632IFS=$as_save_IFS
24633
24634  ;;
24635esac
24636fi
24637SETFILE=$ac_cv_path_SETFILE
24638if test -n "$SETFILE"; then
24639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24640$as_echo "$SETFILE" >&6; }
24641else
24642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24643$as_echo "no" >&6; }
24644fi
24645
24646
24647          if test "x$SETFILE" = x; then
24648            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24649          fi
24650        else
24651          # Otherwise we believe it is a complete path. Use it as it is.
24652          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24653$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24654          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24655$as_echo_n "checking for SETFILE... " >&6; }
24656          if test ! -x "$tool_specified"; then
24657            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24658$as_echo "not found" >&6; }
24659            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24660          fi
24661          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24662$as_echo "$tool_specified" >&6; }
24663        fi
24664      fi
24665    fi
24666
24667  fi
24668
24669
24670
24671  if test "x$SETFILE" = x; then
24672    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24673  fi
24674
24675
24676  fi
24677
24678
24679  # Check bash version
24680  # Extra [ ] to stop m4 mangling
24681   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24683$as_echo_n "checking bash version... " >&6; }
24684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24685$as_echo "$BASH_VER" >&6; }
24686
24687  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24688  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24689  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24690    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24691  fi
24692
24693  # Test if bash supports pipefail.
24694  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24695$as_echo_n "checking if bash supports pipefail... " >&6; }
24696  if ${BASH} -c 'set -o pipefail'; then
24697    BASH_ARGS="$BASH_ARGS -o pipefail"
24698    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24699$as_echo "yes" >&6; }
24700  else
24701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24702$as_echo "no" >&6; }
24703  fi
24704
24705  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24706$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24707  if ${BASH} -e -c 'true'; then
24708    BASH_ARGS="$BASH_ARGS -e"
24709    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24710$as_echo "yes" >&6; }
24711  else
24712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24713$as_echo "no" >&6; }
24714  fi
24715
24716
24717
24718
24719# Check if pkg-config is available.
24720
24721
24722if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24723	if test -n "$ac_tool_prefix"; then
24724  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24725set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24727$as_echo_n "checking for $ac_word... " >&6; }
24728if ${ac_cv_path_PKG_CONFIG+:} false; then :
24729  $as_echo_n "(cached) " >&6
24730else
24731  case $PKG_CONFIG in
24732  [\\/]* | ?:[\\/]*)
24733  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24734  ;;
24735  *)
24736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24737for as_dir in $PATH
24738do
24739  IFS=$as_save_IFS
24740  test -z "$as_dir" && as_dir=.
24741    for ac_exec_ext in '' $ac_executable_extensions; do
24742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24743    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24745    break 2
24746  fi
24747done
24748  done
24749IFS=$as_save_IFS
24750
24751  ;;
24752esac
24753fi
24754PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24755if test -n "$PKG_CONFIG"; then
24756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24757$as_echo "$PKG_CONFIG" >&6; }
24758else
24759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24760$as_echo "no" >&6; }
24761fi
24762
24763
24764fi
24765if test -z "$ac_cv_path_PKG_CONFIG"; then
24766  ac_pt_PKG_CONFIG=$PKG_CONFIG
24767  # Extract the first word of "pkg-config", so it can be a program name with args.
24768set dummy pkg-config; ac_word=$2
24769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24770$as_echo_n "checking for $ac_word... " >&6; }
24771if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24772  $as_echo_n "(cached) " >&6
24773else
24774  case $ac_pt_PKG_CONFIG in
24775  [\\/]* | ?:[\\/]*)
24776  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24777  ;;
24778  *)
24779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24780for as_dir in $PATH
24781do
24782  IFS=$as_save_IFS
24783  test -z "$as_dir" && as_dir=.
24784    for ac_exec_ext in '' $ac_executable_extensions; do
24785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24786    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24788    break 2
24789  fi
24790done
24791  done
24792IFS=$as_save_IFS
24793
24794  ;;
24795esac
24796fi
24797ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24798if test -n "$ac_pt_PKG_CONFIG"; then
24799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24800$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24801else
24802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24803$as_echo "no" >&6; }
24804fi
24805
24806  if test "x$ac_pt_PKG_CONFIG" = x; then
24807    PKG_CONFIG=""
24808  else
24809    case $cross_compiling:$ac_tool_warned in
24810yes:)
24811{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24812$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24813ac_tool_warned=yes ;;
24814esac
24815    PKG_CONFIG=$ac_pt_PKG_CONFIG
24816  fi
24817else
24818  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24819fi
24820
24821fi
24822if test -n "$PKG_CONFIG"; then
24823	_pkg_min_version=0.9.0
24824	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24825$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24826	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24827		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24828$as_echo "yes" >&6; }
24829	else
24830		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24831$as_echo "no" >&6; }
24832		PKG_CONFIG=""
24833	fi
24834
24835fi
24836
24837# After basic tools have been setup, we can check build os specific details.
24838
24839  ###############################################################################
24840
24841  # Note that this is the build platform OS version!
24842
24843  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24844  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24845  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24846  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24847
24848
24849
24850
24851
24852# Misc basic settings
24853
24854
24855# Check whether --with-default-make-target was given.
24856if test "${with_default_make_target+set}" = set; then :
24857  withval=$with_default_make_target;
24858fi
24859
24860  if test "x$with_default_make_target" = "x" \
24861      || test "x$with_default_make_target" = "xyes"; then
24862    DEFAULT_MAKE_TARGET="exploded-image"
24863  elif test "x$with_default_make_target" = "xno"; then
24864    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24865  else
24866    DEFAULT_MAKE_TARGET="$with_default_make_target"
24867  fi
24868
24869
24870
24871
24872###############################################################################
24873#
24874# Determine OpenJDK variants, options and version numbers.
24875#
24876###############################################################################
24877
24878# We need build & target for this.
24879
24880  # Should we build a JDK without a graphical UI?
24881  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24882$as_echo_n "checking headless only... " >&6; }
24883  # Check whether --enable-headless-only was given.
24884if test "${enable_headless_only+set}" = set; then :
24885  enableval=$enable_headless_only;
24886fi
24887
24888
24889  if test "x$enable_headless_only" = "xyes"; then
24890    ENABLE_HEADLESS_ONLY="true"
24891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24892$as_echo "yes" >&6; }
24893  elif test "x$enable_headless_only" = "xno"; then
24894    ENABLE_HEADLESS_ONLY="false"
24895    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24896$as_echo "no" >&6; }
24897  elif test "x$enable_headless_only" = "x"; then
24898    ENABLE_HEADLESS_ONLY="false"
24899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24900$as_echo "no" >&6; }
24901  else
24902    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24903  fi
24904
24905
24906
24907  # Should we build the complete docs, or just a lightweight version?
24908  # Check whether --enable-full-docs was given.
24909if test "${enable_full_docs+set}" = set; then :
24910  enableval=$enable_full_docs;
24911fi
24912
24913
24914  # Verify dependencies
24915  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24916$as_echo_n "checking for graphviz dot... " >&6; }
24917  if test "x$DOT" != "x"; then
24918    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24919$as_echo "yes" >&6; }
24920  else
24921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24922$as_echo "no, cannot generate full docs" >&6; }
24923    FULL_DOCS_DEP_MISSING=true
24924  fi
24925
24926  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
24927$as_echo_n "checking for pandoc... " >&6; }
24928  if test "x$PANDOC" != "x"; then
24929    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24930$as_echo "yes" >&6; }
24931  else
24932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24933$as_echo "no, cannot generate full docs" >&6; }
24934    FULL_DOCS_DEP_MISSING=true
24935  fi
24936
24937  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
24938$as_echo_n "checking full docs... " >&6; }
24939  if test "x$enable_full_docs" = xyes; then
24940    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
24941      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24942$as_echo "no, missing dependencies" >&6; }
24943
24944  # Print a helpful message on how to acquire the necessary build dependency.
24945  # dot is the help tag: freetype, cups, alsa etc
24946  MISSING_DEPENDENCY=dot
24947
24948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24949    cygwin_help $MISSING_DEPENDENCY
24950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24951    msys_help $MISSING_DEPENDENCY
24952  else
24953    PKGHANDLER_COMMAND=
24954
24955    case $PKGHANDLER in
24956      apt-get)
24957        apt_help     $MISSING_DEPENDENCY ;;
24958      yum)
24959        yum_help     $MISSING_DEPENDENCY ;;
24960      brew)
24961        brew_help    $MISSING_DEPENDENCY ;;
24962      port)
24963        port_help    $MISSING_DEPENDENCY ;;
24964      pkgutil)
24965        pkgutil_help $MISSING_DEPENDENCY ;;
24966      pkgadd)
24967        pkgadd_help  $MISSING_DEPENDENCY ;;
24968    esac
24969
24970    if test "x$PKGHANDLER_COMMAND" != x; then
24971      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24972    fi
24973  fi
24974
24975      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
24976    else
24977      ENABLE_FULL_DOCS=true
24978      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
24979$as_echo "yes, forced" >&6; }
24980    fi
24981  elif test "x$enable_full_docs" = xno; then
24982    ENABLE_FULL_DOCS=false
24983    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
24984$as_echo "no, forced" >&6; }
24985  elif test "x$enable_full_docs" = x; then
24986    # Check for prerequisites
24987    if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
24988      ENABLE_FULL_DOCS=false
24989      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24990$as_echo "no, missing dependencies" >&6; }
24991    else
24992      ENABLE_FULL_DOCS=true
24993      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
24994$as_echo "yes, dependencies present" >&6; }
24995    fi
24996  else
24997    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
24998  fi
24999
25000
25001
25002  # Choose cacerts source file
25003
25004# Check whether --with-cacerts-file was given.
25005if test "${with_cacerts_file+set}" = set; then :
25006  withval=$with_cacerts_file;
25007fi
25008
25009  if test "x$with_cacerts_file" != x; then
25010    CACERTS_FILE=$with_cacerts_file
25011  fi
25012
25013
25014  # Enable or disable unlimited crypto
25015  # Check whether --enable-unlimited-crypto was given.
25016if test "${enable_unlimited_crypto+set}" = set; then :
25017  enableval=$enable_unlimited_crypto;
25018else
25019  enable_unlimited_crypto=yes
25020fi
25021
25022  if test "x$enable_unlimited_crypto" = "xyes"; then
25023    UNLIMITED_CRYPTO=true
25024  else
25025    UNLIMITED_CRYPTO=false
25026  fi
25027
25028
25029  # Should we build the serviceability agent (SA)?
25030  INCLUDE_SA=true
25031  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
25032    INCLUDE_SA=false
25033  fi
25034  if test "x$OPENJDK_TARGET_OS" = xaix ; then
25035    INCLUDE_SA=false
25036  fi
25037
25038
25039  # Compress jars
25040  COMPRESS_JARS=false
25041
25042
25043
25044  # Setup default copyright year. Mostly overridden when building close to a new year.
25045
25046# Check whether --with-copyright-year was given.
25047if test "${with_copyright_year+set}" = set; then :
25048  withval=$with_copyright_year;
25049fi
25050
25051  if test "x$with_copyright_year" = xyes; then
25052    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
25053  elif test "x$with_copyright_year" != x; then
25054    COPYRIGHT_YEAR="$with_copyright_year"
25055  else
25056    COPYRIGHT_YEAR=`$DATE +'%Y'`
25057  fi
25058
25059
25060
25061  # Check whether --enable-keep-packaged-modules was given.
25062if test "${enable_keep_packaged_modules+set}" = set; then :
25063  enableval=$enable_keep_packaged_modules;
25064fi
25065
25066
25067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
25068$as_echo_n "checking if packaged modules are kept... " >&6; }
25069  if test "x$enable_keep_packaged_modules" = "xyes"; then
25070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25071$as_echo "yes" >&6; }
25072    JLINK_KEEP_PACKAGED_MODULES=true
25073  elif test "x$enable_keep_packaged_modules" = "xno"; then
25074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25075$as_echo "no" >&6; }
25076    JLINK_KEEP_PACKAGED_MODULES=false
25077  elif test "x$enable_keep_packaged_modules" = "x"; then
25078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
25079$as_echo "yes (default)" >&6; }
25080    JLINK_KEEP_PACKAGED_MODULES=true
25081  else
25082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
25083$as_echo "error" >&6; }
25084    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
25085  fi
25086
25087
25088
25089
25090  # Warn user that old version arguments are deprecated.
25091
25092
25093# Check whether --with-milestone was given.
25094if test "${with_milestone+set}" = set; then :
25095  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
25096$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
25097fi
25098
25099
25100
25101
25102# Check whether --with-update-version was given.
25103if test "${with_update_version+set}" = set; then :
25104  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
25105$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
25106fi
25107
25108
25109
25110
25111# Check whether --with-user-release-suffix was given.
25112if test "${with_user_release_suffix+set}" = set; then :
25113  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
25114$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
25115fi
25116
25117
25118
25119
25120# Check whether --with-build-number was given.
25121if test "${with_build_number+set}" = set; then :
25122  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
25123$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
25124fi
25125
25126
25127
25128  # Source the version numbers file
25129  . $AUTOCONF_DIR/version-numbers
25130
25131  # Some non-version number information is set in that file
25132
25133
25134
25135
25136
25137
25138
25139
25140
25141  # Override version from arguments
25142
25143  # If --with-version-string is set, process it first. It is possible to
25144  # override parts with more specific flags, since these are processed later.
25145
25146# Check whether --with-version-string was given.
25147if test "${with_version_string+set}" = set; then :
25148  withval=$with_version_string;
25149fi
25150
25151  if test "x$with_version_string" = xyes; then
25152    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
25153  elif test "x$with_version_string" != x; then
25154    # Additional [] needed to keep m4 from mangling shell constructs.
25155    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
25156      VERSION_MAJOR=${BASH_REMATCH[1]}
25157      VERSION_MINOR=${BASH_REMATCH[3]}
25158      VERSION_SECURITY=${BASH_REMATCH[5]}
25159      VERSION_PATCH=${BASH_REMATCH[7]}
25160      VERSION_PRE=${BASH_REMATCH[9]}
25161      version_plus_separator=${BASH_REMATCH[11]}
25162      VERSION_BUILD=${BASH_REMATCH[12]}
25163      VERSION_OPT=${BASH_REMATCH[14]}
25164      # Unspecified numerical fields are interpreted as 0.
25165      if test "x$VERSION_MINOR" = x; then
25166        VERSION_MINOR=0
25167      fi
25168      if test "x$VERSION_SECURITY" = x; then
25169        VERSION_SECURITY=0
25170      fi
25171      if test "x$VERSION_PATCH" = x; then
25172        VERSION_PATCH=0
25173      fi
25174      if test "x$version_plus_separator" != x \
25175          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25176        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25177      fi
25178      # Stop the version part process from setting default values.
25179      # We still allow them to explicitly override though.
25180      NO_DEFAULT_VERSION_PARTS=true
25181    else
25182      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25183    fi
25184  fi
25185
25186
25187# Check whether --with-version-pre was given.
25188if test "${with_version_pre+set}" = set; then :
25189  withval=$with_version_pre; with_version_pre_present=true
25190else
25191  with_version_pre_present=false
25192fi
25193
25194
25195  if test "x$with_version_pre_present" = xtrue; then
25196    if test "x$with_version_pre" = xyes; then
25197      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25198    elif test "x$with_version_pre" = xno; then
25199      # Interpret --without-* as empty string instead of the literal "no"
25200      VERSION_PRE=
25201    else
25202      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25203       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25204      if test "x$VERSION_PRE" != "x$with_version_pre"; then
25205        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25206$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25207      fi
25208    fi
25209  else
25210    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25211      # Default is to use "internal" as pre
25212      VERSION_PRE="internal"
25213    fi
25214  fi
25215
25216
25217# Check whether --with-version-opt was given.
25218if test "${with_version_opt+set}" = set; then :
25219  withval=$with_version_opt; with_version_opt_present=true
25220else
25221  with_version_opt_present=false
25222fi
25223
25224
25225  if test "x$with_version_opt_present" = xtrue; then
25226    if test "x$with_version_opt" = xyes; then
25227      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25228    elif test "x$with_version_opt" = xno; then
25229      # Interpret --without-* as empty string instead of the literal "no"
25230      VERSION_OPT=
25231    else
25232      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25233       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25234      if test "x$VERSION_OPT" != "x$with_version_opt"; then
25235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25236$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25237      fi
25238    fi
25239  else
25240    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25241      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25242      # Outer [ ] to quote m4.
25243       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25244      VERSION_OPT="adhoc.$USERNAME.$basedirname"
25245    fi
25246  fi
25247
25248
25249# Check whether --with-version-build was given.
25250if test "${with_version_build+set}" = set; then :
25251  withval=$with_version_build; with_version_build_present=true
25252else
25253  with_version_build_present=false
25254fi
25255
25256
25257  if test "x$with_version_build_present" = xtrue; then
25258    if test "x$with_version_build" = xyes; then
25259      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25260    elif test "x$with_version_build" = xno; then
25261      # Interpret --without-* as empty string instead of the literal "no"
25262      VERSION_BUILD=
25263    elif test "x$with_version_build" = x; then
25264      VERSION_BUILD=
25265    else
25266
25267  # Additional [] needed to keep m4 from mangling shell constructs.
25268  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25269    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25270  fi
25271  # Extract the version number without leading zeros.
25272  cleaned_value=${BASH_REMATCH[1]}
25273  if test "x$cleaned_value" = x; then
25274    # Special case for zero
25275    cleaned_value=${BASH_REMATCH[2]}
25276  fi
25277
25278  if test $cleaned_value -gt 255; then
25279    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25280  fi
25281  if test "x$cleaned_value" != "x$with_version_build"; then
25282    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25283$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25284  fi
25285  VERSION_BUILD=$cleaned_value
25286
25287    fi
25288  else
25289    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25290      # Default is to not have a build number.
25291      VERSION_BUILD=""
25292      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25293      VERSION_BUILD=0
25294    fi
25295  fi
25296
25297
25298# Check whether --with-version-major was given.
25299if test "${with_version_major+set}" = set; then :
25300  withval=$with_version_major; with_version_major_present=true
25301else
25302  with_version_major_present=false
25303fi
25304
25305
25306  if test "x$with_version_major_present" = xtrue; then
25307    if test "x$with_version_major" = xyes; then
25308      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25309    else
25310
25311  # Additional [] needed to keep m4 from mangling shell constructs.
25312  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25313    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25314  fi
25315  # Extract the version number without leading zeros.
25316  cleaned_value=${BASH_REMATCH[1]}
25317  if test "x$cleaned_value" = x; then
25318    # Special case for zero
25319    cleaned_value=${BASH_REMATCH[2]}
25320  fi
25321
25322  if test $cleaned_value -gt 255; then
25323    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25324  fi
25325  if test "x$cleaned_value" != "x$with_version_major"; then
25326    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25327$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25328  fi
25329  VERSION_MAJOR=$cleaned_value
25330
25331    fi
25332  else
25333    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25334      # Default is to get value from version-numbers
25335      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25336    fi
25337  fi
25338
25339
25340# Check whether --with-version-minor was given.
25341if test "${with_version_minor+set}" = set; then :
25342  withval=$with_version_minor; with_version_minor_present=true
25343else
25344  with_version_minor_present=false
25345fi
25346
25347
25348  if test "x$with_version_minor_present" = xtrue; then
25349    if test "x$with_version_minor" = xyes; then
25350      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25351    elif test "x$with_version_minor" = xno; then
25352      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25353      VERSION_MINOR=0
25354    elif test "x$with_version_minor" = x; then
25355      VERSION_MINOR=0
25356    else
25357
25358  # Additional [] needed to keep m4 from mangling shell constructs.
25359  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25360    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25361  fi
25362  # Extract the version number without leading zeros.
25363  cleaned_value=${BASH_REMATCH[1]}
25364  if test "x$cleaned_value" = x; then
25365    # Special case for zero
25366    cleaned_value=${BASH_REMATCH[2]}
25367  fi
25368
25369  if test $cleaned_value -gt 255; then
25370    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25371  fi
25372  if test "x$cleaned_value" != "x$with_version_minor"; then
25373    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25374$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25375  fi
25376  VERSION_MINOR=$cleaned_value
25377
25378    fi
25379  else
25380    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25381      # Default is 0, if unspecified
25382      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25383    fi
25384  fi
25385
25386
25387# Check whether --with-version-security was given.
25388if test "${with_version_security+set}" = set; then :
25389  withval=$with_version_security; with_version_security_present=true
25390else
25391  with_version_security_present=false
25392fi
25393
25394
25395  if test "x$with_version_security_present" = xtrue; then
25396    if test "x$with_version_security" = xyes; then
25397      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25398    elif test "x$with_version_security" = xno; then
25399      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25400      VERSION_SECURITY=0
25401    elif test "x$with_version_security" = x; then
25402      VERSION_SECURITY=0
25403    else
25404
25405  # Additional [] needed to keep m4 from mangling shell constructs.
25406  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25407    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25408  fi
25409  # Extract the version number without leading zeros.
25410  cleaned_value=${BASH_REMATCH[1]}
25411  if test "x$cleaned_value" = x; then
25412    # Special case for zero
25413    cleaned_value=${BASH_REMATCH[2]}
25414  fi
25415
25416  if test $cleaned_value -gt 255; then
25417    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25418  fi
25419  if test "x$cleaned_value" != "x$with_version_security"; then
25420    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25421$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25422  fi
25423  VERSION_SECURITY=$cleaned_value
25424
25425    fi
25426  else
25427    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25428      # Default is 0, if unspecified
25429      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25430    fi
25431  fi
25432
25433
25434# Check whether --with-version-patch was given.
25435if test "${with_version_patch+set}" = set; then :
25436  withval=$with_version_patch; with_version_patch_present=true
25437else
25438  with_version_patch_present=false
25439fi
25440
25441
25442  if test "x$with_version_patch_present" = xtrue; then
25443    if test "x$with_version_patch" = xyes; then
25444      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25445    elif test "x$with_version_patch" = xno; then
25446      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25447      VERSION_PATCH=0
25448    elif test "x$with_version_patch" = x; then
25449      VERSION_PATCH=0
25450    else
25451
25452  # Additional [] needed to keep m4 from mangling shell constructs.
25453  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25454    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25455  fi
25456  # Extract the version number without leading zeros.
25457  cleaned_value=${BASH_REMATCH[1]}
25458  if test "x$cleaned_value" = x; then
25459    # Special case for zero
25460    cleaned_value=${BASH_REMATCH[2]}
25461  fi
25462
25463  if test $cleaned_value -gt 255; then
25464    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25465  fi
25466  if test "x$cleaned_value" != "x$with_version_patch"; then
25467    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25468$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25469  fi
25470  VERSION_PATCH=$cleaned_value
25471
25472    fi
25473  else
25474    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25475      # Default is 0, if unspecified
25476      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25477    fi
25478  fi
25479
25480  # Calculate derived version properties
25481
25482  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25483  if test "x$VERSION_PRE" = x; then
25484    VERSION_IS_GA=true
25485  else
25486    VERSION_IS_GA=false
25487  fi
25488
25489  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25490  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25491
25492  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25493  # Strip trailing zeroes from stripped_version_number
25494  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25495  VERSION_NUMBER=$stripped_version_number
25496
25497  # The complete version string, with additional build information
25498  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25499    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25500  else
25501    # If either build or opt is set, we need a + separator
25502    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25503  fi
25504
25505  # The short version string, just VERSION_NUMBER and PRE, if present.
25506  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25507
25508  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25509$as_echo_n "checking for version string... " >&6; }
25510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25511$as_echo "$VERSION_STRING" >&6; }
25512
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525
25526
25527###############################################################################
25528#
25529# Setup BootJDK, used to bootstrap the build.
25530#
25531###############################################################################
25532
25533
25534  BOOT_JDK_FOUND=no
25535
25536# Check whether --with-boot-jdk was given.
25537if test "${with_boot_jdk+set}" = set; then :
25538  withval=$with_boot_jdk;
25539fi
25540
25541
25542  # We look for the Boot JDK through various means, going from more certain to
25543  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25544  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25545  # must check if this is indeed valid; otherwise we'll continue looking.
25546
25547  # Test: Is bootjdk explicitly set by command line arguments?
25548
25549  if test "x$BOOT_JDK_FOUND" = xno; then
25550    # Now execute the test
25551
25552  if test "x$with_boot_jdk" != x; then
25553    BOOT_JDK=$with_boot_jdk
25554    BOOT_JDK_FOUND=maybe
25555    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25556$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25557  fi
25558
25559
25560    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25561    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25562      # Do we have a bin/java?
25563      if test ! -x "$BOOT_JDK/bin/java"; then
25564        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25565$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25566        BOOT_JDK_FOUND=no
25567      else
25568        # Do we have a bin/javac?
25569        if test ! -x "$BOOT_JDK/bin/javac"; then
25570          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25572          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25573$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25574          BOOT_JDK_FOUND=no
25575        else
25576          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25577          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25578
25579          # Extra M4 quote needed to protect [] in grep expression.
25580          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25581          if test "x$FOUND_CORRECT_VERSION" = x; then
25582            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25583$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25584            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25585$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25586            BOOT_JDK_FOUND=no
25587          else
25588            # We're done! :-)
25589            BOOT_JDK_FOUND=yes
25590
25591  # Only process if variable expands to non-empty
25592
25593  if test "x$BOOT_JDK" != x; then
25594    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25595
25596  # Input might be given as Windows format, start by converting to
25597  # unix format.
25598  path="$BOOT_JDK"
25599  new_path=`$CYGPATH -u "$path"`
25600
25601  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25602  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25603  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25604  # "foo.exe" is OK but "foo" is an error.
25605  #
25606  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25607  # It is also a way to make sure we got the proper file name for the real test later on.
25608  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25609  if test "x$test_shortpath" = x; then
25610    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25611$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25612    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25613  fi
25614
25615  # Call helper function which possibly converts this using DOS-style short mode.
25616  # If so, the updated path is stored in $new_path.
25617
25618  input_path="$new_path"
25619  # Check if we need to convert this using DOS-style short mode. If the path
25620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25621  # take no chances and rewrite it.
25622  # Note: m4 eats our [], so we need to use [ and ] instead.
25623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25624  if test "x$has_forbidden_chars" != x; then
25625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25626    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25627    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25628    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25629      # Going to short mode and back again did indeed matter. Since short mode is
25630      # case insensitive, let's make it lowercase to improve readability.
25631      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25632      # Now convert it back to Unix-style (cygpath)
25633      input_path=`$CYGPATH -u "$shortmode_path"`
25634      new_path="$input_path"
25635    fi
25636  fi
25637
25638  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25639  if test "x$test_cygdrive_prefix" = x; then
25640    # As a simple fix, exclude /usr/bin since it's not a real path.
25641    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25642      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25643      # a path prefixed by /cygdrive for fixpath to work.
25644      new_path="$CYGWIN_ROOT_PATH$input_path"
25645    fi
25646  fi
25647
25648
25649  if test "x$path" != "x$new_path"; then
25650    BOOT_JDK="$new_path"
25651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25652$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25653  fi
25654
25655    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25656
25657  path="$BOOT_JDK"
25658  has_colon=`$ECHO $path | $GREP ^.:`
25659  new_path="$path"
25660  if test "x$has_colon" = x; then
25661    # Not in mixed or Windows style, start by that.
25662    new_path=`cmd //c echo $path`
25663  fi
25664
25665
25666  input_path="$new_path"
25667  # Check if we need to convert this using DOS-style short mode. If the path
25668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25669  # take no chances and rewrite it.
25670  # Note: m4 eats our [], so we need to use [ and ] instead.
25671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25672  if test "x$has_forbidden_chars" != x; then
25673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25674    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25675  fi
25676
25677
25678  windows_path="$new_path"
25679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25680    unix_path=`$CYGPATH -u "$windows_path"`
25681    new_path="$unix_path"
25682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25684    new_path="$unix_path"
25685  fi
25686
25687  if test "x$path" != "x$new_path"; then
25688    BOOT_JDK="$new_path"
25689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25690$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25691  fi
25692
25693  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25694  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25695
25696    else
25697      # We're on a unix platform. Hooray! :)
25698      path="$BOOT_JDK"
25699      has_space=`$ECHO "$path" | $GREP " "`
25700      if test "x$has_space" != x; then
25701        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25702$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25703        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25704      fi
25705
25706      # Use eval to expand a potential ~
25707      eval path="$path"
25708      if test ! -f "$path" && test ! -d "$path"; then
25709        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25710      fi
25711
25712      if test -d "$path"; then
25713        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25714      else
25715        dir="`$DIRNAME "$path"`"
25716        base="`$BASENAME "$path"`"
25717        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25718      fi
25719    fi
25720  fi
25721
25722            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25723$as_echo_n "checking for Boot JDK... " >&6; }
25724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25725$as_echo "$BOOT_JDK" >&6; }
25726            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25727$as_echo_n "checking Boot JDK version... " >&6; }
25728            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25730$as_echo "$BOOT_JDK_VERSION" >&6; }
25731          fi # end check jdk version
25732        fi # end check javac
25733      fi # end check java
25734    fi # end check boot jdk found
25735  fi
25736
25737  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25738    # Having specified an argument which is incorrect will produce an instant failure;
25739    # we should not go on looking
25740    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25741  fi
25742
25743  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25744
25745  if test "x$BOOT_JDK_FOUND" = xno; then
25746    # Now execute the test
25747
25748  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25749    # First check at user selected default
25750
25751  if test "x$BOOT_JDK_FOUND" = xno; then
25752    # Now execute the test
25753
25754  if test -x /usr/libexec/java_home; then
25755    BOOT_JDK=`/usr/libexec/java_home `
25756    BOOT_JDK_FOUND=maybe
25757    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25758$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25759  fi
25760
25761
25762    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25763    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25764      # Do we have a bin/java?
25765      if test ! -x "$BOOT_JDK/bin/java"; then
25766        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25767$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25768        BOOT_JDK_FOUND=no
25769      else
25770        # Do we have a bin/javac?
25771        if test ! -x "$BOOT_JDK/bin/javac"; then
25772          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25773$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25774          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25775$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25776          BOOT_JDK_FOUND=no
25777        else
25778          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25779          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25780
25781          # Extra M4 quote needed to protect [] in grep expression.
25782          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25783          if test "x$FOUND_CORRECT_VERSION" = x; then
25784            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25786            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25787$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25788            BOOT_JDK_FOUND=no
25789          else
25790            # We're done! :-)
25791            BOOT_JDK_FOUND=yes
25792
25793  # Only process if variable expands to non-empty
25794
25795  if test "x$BOOT_JDK" != x; then
25796    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25797
25798  # Input might be given as Windows format, start by converting to
25799  # unix format.
25800  path="$BOOT_JDK"
25801  new_path=`$CYGPATH -u "$path"`
25802
25803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25806  # "foo.exe" is OK but "foo" is an error.
25807  #
25808  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25809  # It is also a way to make sure we got the proper file name for the real test later on.
25810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25811  if test "x$test_shortpath" = x; then
25812    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25813$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25814    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25815  fi
25816
25817  # Call helper function which possibly converts this using DOS-style short mode.
25818  # If so, the updated path is stored in $new_path.
25819
25820  input_path="$new_path"
25821  # Check if we need to convert this using DOS-style short mode. If the path
25822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25823  # take no chances and rewrite it.
25824  # Note: m4 eats our [], so we need to use [ and ] instead.
25825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25826  if test "x$has_forbidden_chars" != x; then
25827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25831      # Going to short mode and back again did indeed matter. Since short mode is
25832      # case insensitive, let's make it lowercase to improve readability.
25833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25834      # Now convert it back to Unix-style (cygpath)
25835      input_path=`$CYGPATH -u "$shortmode_path"`
25836      new_path="$input_path"
25837    fi
25838  fi
25839
25840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25841  if test "x$test_cygdrive_prefix" = x; then
25842    # As a simple fix, exclude /usr/bin since it's not a real path.
25843    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25845      # a path prefixed by /cygdrive for fixpath to work.
25846      new_path="$CYGWIN_ROOT_PATH$input_path"
25847    fi
25848  fi
25849
25850
25851  if test "x$path" != "x$new_path"; then
25852    BOOT_JDK="$new_path"
25853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25854$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25855  fi
25856
25857    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25858
25859  path="$BOOT_JDK"
25860  has_colon=`$ECHO $path | $GREP ^.:`
25861  new_path="$path"
25862  if test "x$has_colon" = x; then
25863    # Not in mixed or Windows style, start by that.
25864    new_path=`cmd //c echo $path`
25865  fi
25866
25867
25868  input_path="$new_path"
25869  # Check if we need to convert this using DOS-style short mode. If the path
25870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25871  # take no chances and rewrite it.
25872  # Note: m4 eats our [], so we need to use [ and ] instead.
25873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25874  if test "x$has_forbidden_chars" != x; then
25875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25877  fi
25878
25879
25880  windows_path="$new_path"
25881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25882    unix_path=`$CYGPATH -u "$windows_path"`
25883    new_path="$unix_path"
25884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25886    new_path="$unix_path"
25887  fi
25888
25889  if test "x$path" != "x$new_path"; then
25890    BOOT_JDK="$new_path"
25891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25892$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25893  fi
25894
25895  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25896  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25897
25898    else
25899      # We're on a unix platform. Hooray! :)
25900      path="$BOOT_JDK"
25901      has_space=`$ECHO "$path" | $GREP " "`
25902      if test "x$has_space" != x; then
25903        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25904$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25905        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25906      fi
25907
25908      # Use eval to expand a potential ~
25909      eval path="$path"
25910      if test ! -f "$path" && test ! -d "$path"; then
25911        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25912      fi
25913
25914      if test -d "$path"; then
25915        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25916      else
25917        dir="`$DIRNAME "$path"`"
25918        base="`$BASENAME "$path"`"
25919        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25920      fi
25921    fi
25922  fi
25923
25924            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25925$as_echo_n "checking for Boot JDK... " >&6; }
25926            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25927$as_echo "$BOOT_JDK" >&6; }
25928            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25929$as_echo_n "checking Boot JDK version... " >&6; }
25930            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25932$as_echo "$BOOT_JDK_VERSION" >&6; }
25933          fi # end check jdk version
25934        fi # end check javac
25935      fi # end check java
25936    fi # end check boot jdk found
25937  fi
25938
25939    # If that did not work out (e.g. too old), try explicit versions instead
25940
25941  if test "x$BOOT_JDK_FOUND" = xno; then
25942    # Now execute the test
25943
25944  if test -x /usr/libexec/java_home; then
25945    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25946    BOOT_JDK_FOUND=maybe
25947    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25948$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25949  fi
25950
25951
25952    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25953    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25954      # Do we have a bin/java?
25955      if test ! -x "$BOOT_JDK/bin/java"; then
25956        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25958        BOOT_JDK_FOUND=no
25959      else
25960        # Do we have a bin/javac?
25961        if test ! -x "$BOOT_JDK/bin/javac"; then
25962          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25964          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25965$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25966          BOOT_JDK_FOUND=no
25967        else
25968          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25969          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25970
25971          # Extra M4 quote needed to protect [] in grep expression.
25972          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25973          if test "x$FOUND_CORRECT_VERSION" = x; then
25974            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25976            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25977$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25978            BOOT_JDK_FOUND=no
25979          else
25980            # We're done! :-)
25981            BOOT_JDK_FOUND=yes
25982
25983  # Only process if variable expands to non-empty
25984
25985  if test "x$BOOT_JDK" != x; then
25986    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25987
25988  # Input might be given as Windows format, start by converting to
25989  # unix format.
25990  path="$BOOT_JDK"
25991  new_path=`$CYGPATH -u "$path"`
25992
25993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25996  # "foo.exe" is OK but "foo" is an error.
25997  #
25998  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25999  # It is also a way to make sure we got the proper file name for the real test later on.
26000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26001  if test "x$test_shortpath" = x; then
26002    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26003$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26004    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26005  fi
26006
26007  # Call helper function which possibly converts this using DOS-style short mode.
26008  # If so, the updated path is stored in $new_path.
26009
26010  input_path="$new_path"
26011  # Check if we need to convert this using DOS-style short mode. If the path
26012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26013  # take no chances and rewrite it.
26014  # Note: m4 eats our [], so we need to use [ and ] instead.
26015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26016  if test "x$has_forbidden_chars" != x; then
26017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26018    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26019    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26020    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26021      # Going to short mode and back again did indeed matter. Since short mode is
26022      # case insensitive, let's make it lowercase to improve readability.
26023      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26024      # Now convert it back to Unix-style (cygpath)
26025      input_path=`$CYGPATH -u "$shortmode_path"`
26026      new_path="$input_path"
26027    fi
26028  fi
26029
26030  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26031  if test "x$test_cygdrive_prefix" = x; then
26032    # As a simple fix, exclude /usr/bin since it's not a real path.
26033    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26034      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26035      # a path prefixed by /cygdrive for fixpath to work.
26036      new_path="$CYGWIN_ROOT_PATH$input_path"
26037    fi
26038  fi
26039
26040
26041  if test "x$path" != "x$new_path"; then
26042    BOOT_JDK="$new_path"
26043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26044$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26045  fi
26046
26047    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26048
26049  path="$BOOT_JDK"
26050  has_colon=`$ECHO $path | $GREP ^.:`
26051  new_path="$path"
26052  if test "x$has_colon" = x; then
26053    # Not in mixed or Windows style, start by that.
26054    new_path=`cmd //c echo $path`
26055  fi
26056
26057
26058  input_path="$new_path"
26059  # Check if we need to convert this using DOS-style short mode. If the path
26060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26061  # take no chances and rewrite it.
26062  # Note: m4 eats our [], so we need to use [ and ] instead.
26063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26064  if test "x$has_forbidden_chars" != x; then
26065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26067  fi
26068
26069
26070  windows_path="$new_path"
26071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26072    unix_path=`$CYGPATH -u "$windows_path"`
26073    new_path="$unix_path"
26074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26076    new_path="$unix_path"
26077  fi
26078
26079  if test "x$path" != "x$new_path"; then
26080    BOOT_JDK="$new_path"
26081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26082$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26083  fi
26084
26085  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26086  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26087
26088    else
26089      # We're on a unix platform. Hooray! :)
26090      path="$BOOT_JDK"
26091      has_space=`$ECHO "$path" | $GREP " "`
26092      if test "x$has_space" != x; then
26093        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26094$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26095        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26096      fi
26097
26098      # Use eval to expand a potential ~
26099      eval path="$path"
26100      if test ! -f "$path" && test ! -d "$path"; then
26101        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26102      fi
26103
26104      if test -d "$path"; then
26105        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26106      else
26107        dir="`$DIRNAME "$path"`"
26108        base="`$BASENAME "$path"`"
26109        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26110      fi
26111    fi
26112  fi
26113
26114            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26115$as_echo_n "checking for Boot JDK... " >&6; }
26116            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26117$as_echo "$BOOT_JDK" >&6; }
26118            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26119$as_echo_n "checking Boot JDK version... " >&6; }
26120            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26122$as_echo "$BOOT_JDK_VERSION" >&6; }
26123          fi # end check jdk version
26124        fi # end check javac
26125      fi # end check java
26126    fi # end check boot jdk found
26127  fi
26128
26129
26130  if test "x$BOOT_JDK_FOUND" = xno; then
26131    # Now execute the test
26132
26133  if test -x /usr/libexec/java_home; then
26134    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
26135    BOOT_JDK_FOUND=maybe
26136    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
26137$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
26138  fi
26139
26140
26141    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26142    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26143      # Do we have a bin/java?
26144      if test ! -x "$BOOT_JDK/bin/java"; then
26145        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26147        BOOT_JDK_FOUND=no
26148      else
26149        # Do we have a bin/javac?
26150        if test ! -x "$BOOT_JDK/bin/javac"; then
26151          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26153          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26154$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26155          BOOT_JDK_FOUND=no
26156        else
26157          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26158          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26159
26160          # Extra M4 quote needed to protect [] in grep expression.
26161          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26162          if test "x$FOUND_CORRECT_VERSION" = x; then
26163            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26165            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26166$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26167            BOOT_JDK_FOUND=no
26168          else
26169            # We're done! :-)
26170            BOOT_JDK_FOUND=yes
26171
26172  # Only process if variable expands to non-empty
26173
26174  if test "x$BOOT_JDK" != x; then
26175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26176
26177  # Input might be given as Windows format, start by converting to
26178  # unix format.
26179  path="$BOOT_JDK"
26180  new_path=`$CYGPATH -u "$path"`
26181
26182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26185  # "foo.exe" is OK but "foo" is an error.
26186  #
26187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26188  # It is also a way to make sure we got the proper file name for the real test later on.
26189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26190  if test "x$test_shortpath" = x; then
26191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26192$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26193    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26194  fi
26195
26196  # Call helper function which possibly converts this using DOS-style short mode.
26197  # If so, the updated path is stored in $new_path.
26198
26199  input_path="$new_path"
26200  # Check if we need to convert this using DOS-style short mode. If the path
26201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26202  # take no chances and rewrite it.
26203  # Note: m4 eats our [], so we need to use [ and ] instead.
26204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26205  if test "x$has_forbidden_chars" != x; then
26206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26210      # Going to short mode and back again did indeed matter. Since short mode is
26211      # case insensitive, let's make it lowercase to improve readability.
26212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26213      # Now convert it back to Unix-style (cygpath)
26214      input_path=`$CYGPATH -u "$shortmode_path"`
26215      new_path="$input_path"
26216    fi
26217  fi
26218
26219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26220  if test "x$test_cygdrive_prefix" = x; then
26221    # As a simple fix, exclude /usr/bin since it's not a real path.
26222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26224      # a path prefixed by /cygdrive for fixpath to work.
26225      new_path="$CYGWIN_ROOT_PATH$input_path"
26226    fi
26227  fi
26228
26229
26230  if test "x$path" != "x$new_path"; then
26231    BOOT_JDK="$new_path"
26232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26233$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26234  fi
26235
26236    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26237
26238  path="$BOOT_JDK"
26239  has_colon=`$ECHO $path | $GREP ^.:`
26240  new_path="$path"
26241  if test "x$has_colon" = x; then
26242    # Not in mixed or Windows style, start by that.
26243    new_path=`cmd //c echo $path`
26244  fi
26245
26246
26247  input_path="$new_path"
26248  # Check if we need to convert this using DOS-style short mode. If the path
26249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26250  # take no chances and rewrite it.
26251  # Note: m4 eats our [], so we need to use [ and ] instead.
26252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26253  if test "x$has_forbidden_chars" != x; then
26254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26256  fi
26257
26258
26259  windows_path="$new_path"
26260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26261    unix_path=`$CYGPATH -u "$windows_path"`
26262    new_path="$unix_path"
26263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26265    new_path="$unix_path"
26266  fi
26267
26268  if test "x$path" != "x$new_path"; then
26269    BOOT_JDK="$new_path"
26270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26271$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26272  fi
26273
26274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26276
26277    else
26278      # We're on a unix platform. Hooray! :)
26279      path="$BOOT_JDK"
26280      has_space=`$ECHO "$path" | $GREP " "`
26281      if test "x$has_space" != x; then
26282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26283$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26284        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26285      fi
26286
26287      # Use eval to expand a potential ~
26288      eval path="$path"
26289      if test ! -f "$path" && test ! -d "$path"; then
26290        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26291      fi
26292
26293      if test -d "$path"; then
26294        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26295      else
26296        dir="`$DIRNAME "$path"`"
26297        base="`$BASENAME "$path"`"
26298        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26299      fi
26300    fi
26301  fi
26302
26303            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26304$as_echo_n "checking for Boot JDK... " >&6; }
26305            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26306$as_echo "$BOOT_JDK" >&6; }
26307            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26308$as_echo_n "checking Boot JDK version... " >&6; }
26309            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26310            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26311$as_echo "$BOOT_JDK_VERSION" >&6; }
26312          fi # end check jdk version
26313        fi # end check javac
26314      fi # end check java
26315    fi # end check boot jdk found
26316  fi
26317
26318
26319  if test "x$BOOT_JDK_FOUND" = xno; then
26320    # Now execute the test
26321
26322  if test -x /usr/libexec/java_home; then
26323    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26324    BOOT_JDK_FOUND=maybe
26325    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26326$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26327  fi
26328
26329
26330    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26331    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26332      # Do we have a bin/java?
26333      if test ! -x "$BOOT_JDK/bin/java"; then
26334        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26336        BOOT_JDK_FOUND=no
26337      else
26338        # Do we have a bin/javac?
26339        if test ! -x "$BOOT_JDK/bin/javac"; then
26340          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26342          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26343$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26344          BOOT_JDK_FOUND=no
26345        else
26346          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26347          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26348
26349          # Extra M4 quote needed to protect [] in grep expression.
26350          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26351          if test "x$FOUND_CORRECT_VERSION" = x; then
26352            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26353$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26354            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26355$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26356            BOOT_JDK_FOUND=no
26357          else
26358            # We're done! :-)
26359            BOOT_JDK_FOUND=yes
26360
26361  # Only process if variable expands to non-empty
26362
26363  if test "x$BOOT_JDK" != x; then
26364    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26365
26366  # Input might be given as Windows format, start by converting to
26367  # unix format.
26368  path="$BOOT_JDK"
26369  new_path=`$CYGPATH -u "$path"`
26370
26371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26374  # "foo.exe" is OK but "foo" is an error.
26375  #
26376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26377  # It is also a way to make sure we got the proper file name for the real test later on.
26378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26379  if test "x$test_shortpath" = x; then
26380    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26381$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26382    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26383  fi
26384
26385  # Call helper function which possibly converts this using DOS-style short mode.
26386  # If so, the updated path is stored in $new_path.
26387
26388  input_path="$new_path"
26389  # Check if we need to convert this using DOS-style short mode. If the path
26390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26391  # take no chances and rewrite it.
26392  # Note: m4 eats our [], so we need to use [ and ] instead.
26393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26394  if test "x$has_forbidden_chars" != x; then
26395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26399      # Going to short mode and back again did indeed matter. Since short mode is
26400      # case insensitive, let's make it lowercase to improve readability.
26401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26402      # Now convert it back to Unix-style (cygpath)
26403      input_path=`$CYGPATH -u "$shortmode_path"`
26404      new_path="$input_path"
26405    fi
26406  fi
26407
26408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26409  if test "x$test_cygdrive_prefix" = x; then
26410    # As a simple fix, exclude /usr/bin since it's not a real path.
26411    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26413      # a path prefixed by /cygdrive for fixpath to work.
26414      new_path="$CYGWIN_ROOT_PATH$input_path"
26415    fi
26416  fi
26417
26418
26419  if test "x$path" != "x$new_path"; then
26420    BOOT_JDK="$new_path"
26421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26422$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26423  fi
26424
26425    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26426
26427  path="$BOOT_JDK"
26428  has_colon=`$ECHO $path | $GREP ^.:`
26429  new_path="$path"
26430  if test "x$has_colon" = x; then
26431    # Not in mixed or Windows style, start by that.
26432    new_path=`cmd //c echo $path`
26433  fi
26434
26435
26436  input_path="$new_path"
26437  # Check if we need to convert this using DOS-style short mode. If the path
26438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26439  # take no chances and rewrite it.
26440  # Note: m4 eats our [], so we need to use [ and ] instead.
26441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26442  if test "x$has_forbidden_chars" != x; then
26443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26445  fi
26446
26447
26448  windows_path="$new_path"
26449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26450    unix_path=`$CYGPATH -u "$windows_path"`
26451    new_path="$unix_path"
26452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26454    new_path="$unix_path"
26455  fi
26456
26457  if test "x$path" != "x$new_path"; then
26458    BOOT_JDK="$new_path"
26459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26461  fi
26462
26463  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26464  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26465
26466    else
26467      # We're on a unix platform. Hooray! :)
26468      path="$BOOT_JDK"
26469      has_space=`$ECHO "$path" | $GREP " "`
26470      if test "x$has_space" != x; then
26471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26472$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26473        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26474      fi
26475
26476      # Use eval to expand a potential ~
26477      eval path="$path"
26478      if test ! -f "$path" && test ! -d "$path"; then
26479        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26480      fi
26481
26482      if test -d "$path"; then
26483        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26484      else
26485        dir="`$DIRNAME "$path"`"
26486        base="`$BASENAME "$path"`"
26487        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26488      fi
26489    fi
26490  fi
26491
26492            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26493$as_echo_n "checking for Boot JDK... " >&6; }
26494            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26495$as_echo "$BOOT_JDK" >&6; }
26496            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26497$as_echo_n "checking Boot JDK version... " >&6; }
26498            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26499            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26500$as_echo "$BOOT_JDK_VERSION" >&6; }
26501          fi # end check jdk version
26502        fi # end check javac
26503      fi # end check java
26504    fi # end check boot jdk found
26505  fi
26506
26507  fi
26508
26509
26510    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26511    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26512      # Do we have a bin/java?
26513      if test ! -x "$BOOT_JDK/bin/java"; then
26514        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26516        BOOT_JDK_FOUND=no
26517      else
26518        # Do we have a bin/javac?
26519        if test ! -x "$BOOT_JDK/bin/javac"; then
26520          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26522          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26523$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26524          BOOT_JDK_FOUND=no
26525        else
26526          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26527          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26528
26529          # Extra M4 quote needed to protect [] in grep expression.
26530          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26531          if test "x$FOUND_CORRECT_VERSION" = x; then
26532            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26534            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26535$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26536            BOOT_JDK_FOUND=no
26537          else
26538            # We're done! :-)
26539            BOOT_JDK_FOUND=yes
26540
26541  # Only process if variable expands to non-empty
26542
26543  if test "x$BOOT_JDK" != x; then
26544    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26545
26546  # Input might be given as Windows format, start by converting to
26547  # unix format.
26548  path="$BOOT_JDK"
26549  new_path=`$CYGPATH -u "$path"`
26550
26551  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26552  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26553  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26554  # "foo.exe" is OK but "foo" is an error.
26555  #
26556  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26557  # It is also a way to make sure we got the proper file name for the real test later on.
26558  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26559  if test "x$test_shortpath" = x; then
26560    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26561$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26562    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26563  fi
26564
26565  # Call helper function which possibly converts this using DOS-style short mode.
26566  # If so, the updated path is stored in $new_path.
26567
26568  input_path="$new_path"
26569  # Check if we need to convert this using DOS-style short mode. If the path
26570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26571  # take no chances and rewrite it.
26572  # Note: m4 eats our [], so we need to use [ and ] instead.
26573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26574  if test "x$has_forbidden_chars" != x; then
26575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26576    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26577    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26578    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26579      # Going to short mode and back again did indeed matter. Since short mode is
26580      # case insensitive, let's make it lowercase to improve readability.
26581      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26582      # Now convert it back to Unix-style (cygpath)
26583      input_path=`$CYGPATH -u "$shortmode_path"`
26584      new_path="$input_path"
26585    fi
26586  fi
26587
26588  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26589  if test "x$test_cygdrive_prefix" = x; then
26590    # As a simple fix, exclude /usr/bin since it's not a real path.
26591    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26592      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26593      # a path prefixed by /cygdrive for fixpath to work.
26594      new_path="$CYGWIN_ROOT_PATH$input_path"
26595    fi
26596  fi
26597
26598
26599  if test "x$path" != "x$new_path"; then
26600    BOOT_JDK="$new_path"
26601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26602$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26603  fi
26604
26605    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26606
26607  path="$BOOT_JDK"
26608  has_colon=`$ECHO $path | $GREP ^.:`
26609  new_path="$path"
26610  if test "x$has_colon" = x; then
26611    # Not in mixed or Windows style, start by that.
26612    new_path=`cmd //c echo $path`
26613  fi
26614
26615
26616  input_path="$new_path"
26617  # Check if we need to convert this using DOS-style short mode. If the path
26618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26619  # take no chances and rewrite it.
26620  # Note: m4 eats our [], so we need to use [ and ] instead.
26621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26622  if test "x$has_forbidden_chars" != x; then
26623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26624    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26625  fi
26626
26627
26628  windows_path="$new_path"
26629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26630    unix_path=`$CYGPATH -u "$windows_path"`
26631    new_path="$unix_path"
26632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26634    new_path="$unix_path"
26635  fi
26636
26637  if test "x$path" != "x$new_path"; then
26638    BOOT_JDK="$new_path"
26639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26640$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26641  fi
26642
26643  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26644  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26645
26646    else
26647      # We're on a unix platform. Hooray! :)
26648      path="$BOOT_JDK"
26649      has_space=`$ECHO "$path" | $GREP " "`
26650      if test "x$has_space" != x; then
26651        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26653        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26654      fi
26655
26656      # Use eval to expand a potential ~
26657      eval path="$path"
26658      if test ! -f "$path" && test ! -d "$path"; then
26659        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26660      fi
26661
26662      if test -d "$path"; then
26663        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26664      else
26665        dir="`$DIRNAME "$path"`"
26666        base="`$BASENAME "$path"`"
26667        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26668      fi
26669    fi
26670  fi
26671
26672            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26673$as_echo_n "checking for Boot JDK... " >&6; }
26674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26675$as_echo "$BOOT_JDK" >&6; }
26676            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26677$as_echo_n "checking Boot JDK version... " >&6; }
26678            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26680$as_echo "$BOOT_JDK_VERSION" >&6; }
26681          fi # end check jdk version
26682        fi # end check javac
26683      fi # end check java
26684    fi # end check boot jdk found
26685  fi
26686
26687
26688  # Test: Is $JAVA_HOME set?
26689
26690  if test "x$BOOT_JDK_FOUND" = xno; then
26691    # Now execute the test
26692
26693  if test "x$JAVA_HOME" != x; then
26694    JAVA_HOME_PROCESSED="$JAVA_HOME"
26695
26696  # Only process if variable expands to non-empty
26697
26698  if test "x$JAVA_HOME_PROCESSED" != x; then
26699    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26700
26701  # Input might be given as Windows format, start by converting to
26702  # unix format.
26703  path="$JAVA_HOME_PROCESSED"
26704  new_path=`$CYGPATH -u "$path"`
26705
26706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26709  # "foo.exe" is OK but "foo" is an error.
26710  #
26711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26712  # It is also a way to make sure we got the proper file name for the real test later on.
26713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26714  if test "x$test_shortpath" = x; then
26715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26716$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26717    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26718  fi
26719
26720  # Call helper function which possibly converts this using DOS-style short mode.
26721  # If so, the updated path is stored in $new_path.
26722
26723  input_path="$new_path"
26724  # Check if we need to convert this using DOS-style short mode. If the path
26725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26726  # take no chances and rewrite it.
26727  # Note: m4 eats our [], so we need to use [ and ] instead.
26728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26729  if test "x$has_forbidden_chars" != x; then
26730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26734      # Going to short mode and back again did indeed matter. Since short mode is
26735      # case insensitive, let's make it lowercase to improve readability.
26736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26737      # Now convert it back to Unix-style (cygpath)
26738      input_path=`$CYGPATH -u "$shortmode_path"`
26739      new_path="$input_path"
26740    fi
26741  fi
26742
26743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26744  if test "x$test_cygdrive_prefix" = x; then
26745    # As a simple fix, exclude /usr/bin since it's not a real path.
26746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26748      # a path prefixed by /cygdrive for fixpath to work.
26749      new_path="$CYGWIN_ROOT_PATH$input_path"
26750    fi
26751  fi
26752
26753
26754  if test "x$path" != "x$new_path"; then
26755    JAVA_HOME_PROCESSED="$new_path"
26756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26757$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26758  fi
26759
26760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26761
26762  path="$JAVA_HOME_PROCESSED"
26763  has_colon=`$ECHO $path | $GREP ^.:`
26764  new_path="$path"
26765  if test "x$has_colon" = x; then
26766    # Not in mixed or Windows style, start by that.
26767    new_path=`cmd //c echo $path`
26768  fi
26769
26770
26771  input_path="$new_path"
26772  # Check if we need to convert this using DOS-style short mode. If the path
26773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26774  # take no chances and rewrite it.
26775  # Note: m4 eats our [], so we need to use [ and ] instead.
26776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26777  if test "x$has_forbidden_chars" != x; then
26778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26780  fi
26781
26782
26783  windows_path="$new_path"
26784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26785    unix_path=`$CYGPATH -u "$windows_path"`
26786    new_path="$unix_path"
26787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26789    new_path="$unix_path"
26790  fi
26791
26792  if test "x$path" != "x$new_path"; then
26793    JAVA_HOME_PROCESSED="$new_path"
26794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26795$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26796  fi
26797
26798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26800
26801    else
26802      # We're on a unix platform. Hooray! :)
26803      path="$JAVA_HOME_PROCESSED"
26804      has_space=`$ECHO "$path" | $GREP " "`
26805      if test "x$has_space" != x; then
26806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26807$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26808        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26809      fi
26810
26811      # Use eval to expand a potential ~
26812      eval path="$path"
26813      if test ! -f "$path" && test ! -d "$path"; then
26814        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26815      fi
26816
26817      if test -d "$path"; then
26818        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26819      else
26820        dir="`$DIRNAME "$path"`"
26821        base="`$BASENAME "$path"`"
26822        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26823      fi
26824    fi
26825  fi
26826
26827    if test ! -d "$JAVA_HOME_PROCESSED"; then
26828      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26829$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26830    else
26831      # Aha, the user has set a JAVA_HOME
26832      # let us use that as the Boot JDK.
26833      BOOT_JDK="$JAVA_HOME_PROCESSED"
26834      BOOT_JDK_FOUND=maybe
26835      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26836$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26837    fi
26838  fi
26839
26840
26841    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26842    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26843      # Do we have a bin/java?
26844      if test ! -x "$BOOT_JDK/bin/java"; then
26845        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26846$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26847        BOOT_JDK_FOUND=no
26848      else
26849        # Do we have a bin/javac?
26850        if test ! -x "$BOOT_JDK/bin/javac"; then
26851          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26852$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26853          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26854$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26855          BOOT_JDK_FOUND=no
26856        else
26857          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26858          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26859
26860          # Extra M4 quote needed to protect [] in grep expression.
26861          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26862          if test "x$FOUND_CORRECT_VERSION" = x; then
26863            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26864$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26865            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26866$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26867            BOOT_JDK_FOUND=no
26868          else
26869            # We're done! :-)
26870            BOOT_JDK_FOUND=yes
26871
26872  # Only process if variable expands to non-empty
26873
26874  if test "x$BOOT_JDK" != x; then
26875    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26876
26877  # Input might be given as Windows format, start by converting to
26878  # unix format.
26879  path="$BOOT_JDK"
26880  new_path=`$CYGPATH -u "$path"`
26881
26882  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26883  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26884  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26885  # "foo.exe" is OK but "foo" is an error.
26886  #
26887  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26888  # It is also a way to make sure we got the proper file name for the real test later on.
26889  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26890  if test "x$test_shortpath" = x; then
26891    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26892$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26893    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26894  fi
26895
26896  # Call helper function which possibly converts this using DOS-style short mode.
26897  # If so, the updated path is stored in $new_path.
26898
26899  input_path="$new_path"
26900  # Check if we need to convert this using DOS-style short mode. If the path
26901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26902  # take no chances and rewrite it.
26903  # Note: m4 eats our [], so we need to use [ and ] instead.
26904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26905  if test "x$has_forbidden_chars" != x; then
26906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26907    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26908    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26909    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26910      # Going to short mode and back again did indeed matter. Since short mode is
26911      # case insensitive, let's make it lowercase to improve readability.
26912      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26913      # Now convert it back to Unix-style (cygpath)
26914      input_path=`$CYGPATH -u "$shortmode_path"`
26915      new_path="$input_path"
26916    fi
26917  fi
26918
26919  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26920  if test "x$test_cygdrive_prefix" = x; then
26921    # As a simple fix, exclude /usr/bin since it's not a real path.
26922    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26923      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26924      # a path prefixed by /cygdrive for fixpath to work.
26925      new_path="$CYGWIN_ROOT_PATH$input_path"
26926    fi
26927  fi
26928
26929
26930  if test "x$path" != "x$new_path"; then
26931    BOOT_JDK="$new_path"
26932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26933$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26934  fi
26935
26936    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26937
26938  path="$BOOT_JDK"
26939  has_colon=`$ECHO $path | $GREP ^.:`
26940  new_path="$path"
26941  if test "x$has_colon" = x; then
26942    # Not in mixed or Windows style, start by that.
26943    new_path=`cmd //c echo $path`
26944  fi
26945
26946
26947  input_path="$new_path"
26948  # Check if we need to convert this using DOS-style short mode. If the path
26949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26950  # take no chances and rewrite it.
26951  # Note: m4 eats our [], so we need to use [ and ] instead.
26952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26953  if test "x$has_forbidden_chars" != x; then
26954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26955    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26956  fi
26957
26958
26959  windows_path="$new_path"
26960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26961    unix_path=`$CYGPATH -u "$windows_path"`
26962    new_path="$unix_path"
26963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26965    new_path="$unix_path"
26966  fi
26967
26968  if test "x$path" != "x$new_path"; then
26969    BOOT_JDK="$new_path"
26970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26971$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26972  fi
26973
26974  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26975  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26976
26977    else
26978      # We're on a unix platform. Hooray! :)
26979      path="$BOOT_JDK"
26980      has_space=`$ECHO "$path" | $GREP " "`
26981      if test "x$has_space" != x; then
26982        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26983$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26984        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26985      fi
26986
26987      # Use eval to expand a potential ~
26988      eval path="$path"
26989      if test ! -f "$path" && test ! -d "$path"; then
26990        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26991      fi
26992
26993      if test -d "$path"; then
26994        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26995      else
26996        dir="`$DIRNAME "$path"`"
26997        base="`$BASENAME "$path"`"
26998        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26999      fi
27000    fi
27001  fi
27002
27003            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27004$as_echo_n "checking for Boot JDK... " >&6; }
27005            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27006$as_echo "$BOOT_JDK" >&6; }
27007            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27008$as_echo_n "checking Boot JDK version... " >&6; }
27009            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27010            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27011$as_echo "$BOOT_JDK_VERSION" >&6; }
27012          fi # end check jdk version
27013        fi # end check javac
27014      fi # end check java
27015    fi # end check boot jdk found
27016  fi
27017
27018
27019  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
27020
27021  if test "x$BOOT_JDK_FOUND" = xno; then
27022    # Now execute the test
27023
27024  # Extract the first word of "javac", so it can be a program name with args.
27025set dummy javac; ac_word=$2
27026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27027$as_echo_n "checking for $ac_word... " >&6; }
27028if ${ac_cv_path_JAVAC_CHECK+:} false; then :
27029  $as_echo_n "(cached) " >&6
27030else
27031  case $JAVAC_CHECK in
27032  [\\/]* | ?:[\\/]*)
27033  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
27034  ;;
27035  *)
27036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27037for as_dir in $PATH
27038do
27039  IFS=$as_save_IFS
27040  test -z "$as_dir" && as_dir=.
27041    for ac_exec_ext in '' $ac_executable_extensions; do
27042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27043    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
27044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27045    break 2
27046  fi
27047done
27048  done
27049IFS=$as_save_IFS
27050
27051  ;;
27052esac
27053fi
27054JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
27055if test -n "$JAVAC_CHECK"; then
27056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
27057$as_echo "$JAVAC_CHECK" >&6; }
27058else
27059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27060$as_echo "no" >&6; }
27061fi
27062
27063
27064  # Extract the first word of "java", so it can be a program name with args.
27065set dummy java; ac_word=$2
27066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27067$as_echo_n "checking for $ac_word... " >&6; }
27068if ${ac_cv_path_JAVA_CHECK+:} false; then :
27069  $as_echo_n "(cached) " >&6
27070else
27071  case $JAVA_CHECK in
27072  [\\/]* | ?:[\\/]*)
27073  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
27074  ;;
27075  *)
27076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27077for as_dir in $PATH
27078do
27079  IFS=$as_save_IFS
27080  test -z "$as_dir" && as_dir=.
27081    for ac_exec_ext in '' $ac_executable_extensions; do
27082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27083    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
27084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27085    break 2
27086  fi
27087done
27088  done
27089IFS=$as_save_IFS
27090
27091  ;;
27092esac
27093fi
27094JAVA_CHECK=$ac_cv_path_JAVA_CHECK
27095if test -n "$JAVA_CHECK"; then
27096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
27097$as_echo "$JAVA_CHECK" >&6; }
27098else
27099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27100$as_echo "no" >&6; }
27101fi
27102
27103
27104  BINARY="$JAVAC_CHECK"
27105  if test "x$JAVAC_CHECK" = x; then
27106    BINARY="$JAVA_CHECK"
27107  fi
27108  if test "x$BINARY" != x; then
27109    # So there is a java(c) binary, it might be part of a JDK.
27110    # Lets find the JDK/JRE directory by following symbolic links.
27111    # Linux/GNU systems often have links from /usr/bin/java to
27112    # /etc/alternatives/java to the real JDK binary.
27113
27114  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27115    # Follow a chain of symbolic links. Use readlink
27116    # where it exists, else fall back to horribly
27117    # complicated shell code.
27118    if test "x$READLINK_TESTED" != yes; then
27119      # On MacOSX there is a readlink tool with a different
27120      # purpose than the GNU readlink tool. Check the found readlink.
27121      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27122      if test "x$ISGNU" = x; then
27123        # A readlink that we do not know how to use.
27124        # Are there other non-GNU readlinks out there?
27125        READLINK_TESTED=yes
27126        READLINK=
27127      fi
27128    fi
27129
27130    if test "x$READLINK" != x; then
27131      BINARY=`$READLINK -f $BINARY`
27132    else
27133      # Save the current directory for restoring afterwards
27134      STARTDIR=$PWD
27135      COUNTER=0
27136      sym_link_dir=`$DIRNAME $BINARY`
27137      sym_link_file=`$BASENAME $BINARY`
27138      cd $sym_link_dir
27139      # Use -P flag to resolve symlinks in directories.
27140      cd `$THEPWDCMD -P`
27141      sym_link_dir=`$THEPWDCMD -P`
27142      # Resolve file symlinks
27143      while test $COUNTER -lt 20; do
27144        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27145        if test "x$ISLINK" == x; then
27146          # This is not a symbolic link! We are done!
27147          break
27148        fi
27149        # Again resolve directory symlinks since the target of the just found
27150        # link could be in a different directory
27151        cd `$DIRNAME $ISLINK`
27152        sym_link_dir=`$THEPWDCMD -P`
27153        sym_link_file=`$BASENAME $ISLINK`
27154        let COUNTER=COUNTER+1
27155      done
27156      cd $STARTDIR
27157      BINARY=$sym_link_dir/$sym_link_file
27158    fi
27159  fi
27160
27161    BOOT_JDK=`dirname "$BINARY"`
27162    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
27163    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
27164      # Looks like we found ourselves an JDK
27165      BOOT_JDK_FOUND=maybe
27166      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27167$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27168    fi
27169  fi
27170
27171
27172    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27173    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27174      # Do we have a bin/java?
27175      if test ! -x "$BOOT_JDK/bin/java"; then
27176        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27178        BOOT_JDK_FOUND=no
27179      else
27180        # Do we have a bin/javac?
27181        if test ! -x "$BOOT_JDK/bin/javac"; then
27182          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27183$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27184          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27185$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27186          BOOT_JDK_FOUND=no
27187        else
27188          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27189          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27190
27191          # Extra M4 quote needed to protect [] in grep expression.
27192          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27193          if test "x$FOUND_CORRECT_VERSION" = x; then
27194            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27196            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27197$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27198            BOOT_JDK_FOUND=no
27199          else
27200            # We're done! :-)
27201            BOOT_JDK_FOUND=yes
27202
27203  # Only process if variable expands to non-empty
27204
27205  if test "x$BOOT_JDK" != x; then
27206    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27207
27208  # Input might be given as Windows format, start by converting to
27209  # unix format.
27210  path="$BOOT_JDK"
27211  new_path=`$CYGPATH -u "$path"`
27212
27213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27216  # "foo.exe" is OK but "foo" is an error.
27217  #
27218  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27219  # It is also a way to make sure we got the proper file name for the real test later on.
27220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27221  if test "x$test_shortpath" = x; then
27222    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27223$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27224    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27225  fi
27226
27227  # Call helper function which possibly converts this using DOS-style short mode.
27228  # If so, the updated path is stored in $new_path.
27229
27230  input_path="$new_path"
27231  # Check if we need to convert this using DOS-style short mode. If the path
27232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27233  # take no chances and rewrite it.
27234  # Note: m4 eats our [], so we need to use [ and ] instead.
27235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27236  if test "x$has_forbidden_chars" != x; then
27237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27241      # Going to short mode and back again did indeed matter. Since short mode is
27242      # case insensitive, let's make it lowercase to improve readability.
27243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27244      # Now convert it back to Unix-style (cygpath)
27245      input_path=`$CYGPATH -u "$shortmode_path"`
27246      new_path="$input_path"
27247    fi
27248  fi
27249
27250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27251  if test "x$test_cygdrive_prefix" = x; then
27252    # As a simple fix, exclude /usr/bin since it's not a real path.
27253    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27255      # a path prefixed by /cygdrive for fixpath to work.
27256      new_path="$CYGWIN_ROOT_PATH$input_path"
27257    fi
27258  fi
27259
27260
27261  if test "x$path" != "x$new_path"; then
27262    BOOT_JDK="$new_path"
27263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27264$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27265  fi
27266
27267    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27268
27269  path="$BOOT_JDK"
27270  has_colon=`$ECHO $path | $GREP ^.:`
27271  new_path="$path"
27272  if test "x$has_colon" = x; then
27273    # Not in mixed or Windows style, start by that.
27274    new_path=`cmd //c echo $path`
27275  fi
27276
27277
27278  input_path="$new_path"
27279  # Check if we need to convert this using DOS-style short mode. If the path
27280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27281  # take no chances and rewrite it.
27282  # Note: m4 eats our [], so we need to use [ and ] instead.
27283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27284  if test "x$has_forbidden_chars" != x; then
27285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27287  fi
27288
27289
27290  windows_path="$new_path"
27291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27292    unix_path=`$CYGPATH -u "$windows_path"`
27293    new_path="$unix_path"
27294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27296    new_path="$unix_path"
27297  fi
27298
27299  if test "x$path" != "x$new_path"; then
27300    BOOT_JDK="$new_path"
27301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27302$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27303  fi
27304
27305  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27306  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27307
27308    else
27309      # We're on a unix platform. Hooray! :)
27310      path="$BOOT_JDK"
27311      has_space=`$ECHO "$path" | $GREP " "`
27312      if test "x$has_space" != x; then
27313        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27314$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27315        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27316      fi
27317
27318      # Use eval to expand a potential ~
27319      eval path="$path"
27320      if test ! -f "$path" && test ! -d "$path"; then
27321        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27322      fi
27323
27324      if test -d "$path"; then
27325        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27326      else
27327        dir="`$DIRNAME "$path"`"
27328        base="`$BASENAME "$path"`"
27329        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27330      fi
27331    fi
27332  fi
27333
27334            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27335$as_echo_n "checking for Boot JDK... " >&6; }
27336            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27337$as_echo "$BOOT_JDK" >&6; }
27338            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27339$as_echo_n "checking Boot JDK version... " >&6; }
27340            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27341            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27342$as_echo "$BOOT_JDK_VERSION" >&6; }
27343          fi # end check jdk version
27344        fi # end check javac
27345      fi # end check java
27346    fi # end check boot jdk found
27347  fi
27348
27349
27350  # Test: Is there a JDK installed in default, well-known locations?
27351
27352  if test "x$BOOT_JDK_FOUND" = xno; then
27353    # Now execute the test
27354
27355  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27356
27357  if test "x$BOOT_JDK_FOUND" = xno; then
27358    # Now execute the test
27359
27360  if test "x$ProgramW6432" != x; then
27361    VIRTUAL_DIR="$ProgramW6432/Java"
27362
27363  windows_path="$VIRTUAL_DIR"
27364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27365    unix_path=`$CYGPATH -u "$windows_path"`
27366    VIRTUAL_DIR="$unix_path"
27367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27369    VIRTUAL_DIR="$unix_path"
27370  fi
27371
27372
27373  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27374  BOOT_JDK_SUFFIX=""
27375  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27376  if test "x$ALL_JDKS_FOUND" != x; then
27377    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27378
27379  if test "x$BOOT_JDK_FOUND" = xno; then
27380    # Now execute the test
27381
27382        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27383        if test -d "$BOOT_JDK"; then
27384          BOOT_JDK_FOUND=maybe
27385          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27386$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27387        fi
27388
27389
27390    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27391    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27392      # Do we have a bin/java?
27393      if test ! -x "$BOOT_JDK/bin/java"; then
27394        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27396        BOOT_JDK_FOUND=no
27397      else
27398        # Do we have a bin/javac?
27399        if test ! -x "$BOOT_JDK/bin/javac"; then
27400          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27402          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27403$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27404          BOOT_JDK_FOUND=no
27405        else
27406          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27407          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27408
27409          # Extra M4 quote needed to protect [] in grep expression.
27410          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27411          if test "x$FOUND_CORRECT_VERSION" = x; then
27412            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27414            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27415$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27416            BOOT_JDK_FOUND=no
27417          else
27418            # We're done! :-)
27419            BOOT_JDK_FOUND=yes
27420
27421  # Only process if variable expands to non-empty
27422
27423  if test "x$BOOT_JDK" != x; then
27424    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27425
27426  # Input might be given as Windows format, start by converting to
27427  # unix format.
27428  path="$BOOT_JDK"
27429  new_path=`$CYGPATH -u "$path"`
27430
27431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27434  # "foo.exe" is OK but "foo" is an error.
27435  #
27436  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27437  # It is also a way to make sure we got the proper file name for the real test later on.
27438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27439  if test "x$test_shortpath" = x; then
27440    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27441$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27442    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27443  fi
27444
27445  # Call helper function which possibly converts this using DOS-style short mode.
27446  # If so, the updated path is stored in $new_path.
27447
27448  input_path="$new_path"
27449  # Check if we need to convert this using DOS-style short mode. If the path
27450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27451  # take no chances and rewrite it.
27452  # Note: m4 eats our [], so we need to use [ and ] instead.
27453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27454  if test "x$has_forbidden_chars" != x; then
27455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27459      # Going to short mode and back again did indeed matter. Since short mode is
27460      # case insensitive, let's make it lowercase to improve readability.
27461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27462      # Now convert it back to Unix-style (cygpath)
27463      input_path=`$CYGPATH -u "$shortmode_path"`
27464      new_path="$input_path"
27465    fi
27466  fi
27467
27468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27469  if test "x$test_cygdrive_prefix" = x; then
27470    # As a simple fix, exclude /usr/bin since it's not a real path.
27471    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27473      # a path prefixed by /cygdrive for fixpath to work.
27474      new_path="$CYGWIN_ROOT_PATH$input_path"
27475    fi
27476  fi
27477
27478
27479  if test "x$path" != "x$new_path"; then
27480    BOOT_JDK="$new_path"
27481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27482$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27483  fi
27484
27485    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27486
27487  path="$BOOT_JDK"
27488  has_colon=`$ECHO $path | $GREP ^.:`
27489  new_path="$path"
27490  if test "x$has_colon" = x; then
27491    # Not in mixed or Windows style, start by that.
27492    new_path=`cmd //c echo $path`
27493  fi
27494
27495
27496  input_path="$new_path"
27497  # Check if we need to convert this using DOS-style short mode. If the path
27498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27499  # take no chances and rewrite it.
27500  # Note: m4 eats our [], so we need to use [ and ] instead.
27501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27502  if test "x$has_forbidden_chars" != x; then
27503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27505  fi
27506
27507
27508  windows_path="$new_path"
27509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27510    unix_path=`$CYGPATH -u "$windows_path"`
27511    new_path="$unix_path"
27512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27514    new_path="$unix_path"
27515  fi
27516
27517  if test "x$path" != "x$new_path"; then
27518    BOOT_JDK="$new_path"
27519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27520$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27521  fi
27522
27523  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27524  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27525
27526    else
27527      # We're on a unix platform. Hooray! :)
27528      path="$BOOT_JDK"
27529      has_space=`$ECHO "$path" | $GREP " "`
27530      if test "x$has_space" != x; then
27531        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27532$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27533        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27534      fi
27535
27536      # Use eval to expand a potential ~
27537      eval path="$path"
27538      if test ! -f "$path" && test ! -d "$path"; then
27539        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27540      fi
27541
27542      if test -d "$path"; then
27543        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27544      else
27545        dir="`$DIRNAME "$path"`"
27546        base="`$BASENAME "$path"`"
27547        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27548      fi
27549    fi
27550  fi
27551
27552            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27553$as_echo_n "checking for Boot JDK... " >&6; }
27554            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27555$as_echo "$BOOT_JDK" >&6; }
27556            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27557$as_echo_n "checking Boot JDK version... " >&6; }
27558            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27559            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27560$as_echo "$BOOT_JDK_VERSION" >&6; }
27561          fi # end check jdk version
27562        fi # end check javac
27563      fi # end check java
27564    fi # end check boot jdk found
27565  fi
27566
27567    done
27568  fi
27569
27570  fi
27571
27572
27573    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27574    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27575      # Do we have a bin/java?
27576      if test ! -x "$BOOT_JDK/bin/java"; then
27577        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27578$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27579        BOOT_JDK_FOUND=no
27580      else
27581        # Do we have a bin/javac?
27582        if test ! -x "$BOOT_JDK/bin/javac"; then
27583          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27584$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27585          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27586$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27587          BOOT_JDK_FOUND=no
27588        else
27589          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27590          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27591
27592          # Extra M4 quote needed to protect [] in grep expression.
27593          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27594          if test "x$FOUND_CORRECT_VERSION" = x; then
27595            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27597            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27598$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27599            BOOT_JDK_FOUND=no
27600          else
27601            # We're done! :-)
27602            BOOT_JDK_FOUND=yes
27603
27604  # Only process if variable expands to non-empty
27605
27606  if test "x$BOOT_JDK" != x; then
27607    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27608
27609  # Input might be given as Windows format, start by converting to
27610  # unix format.
27611  path="$BOOT_JDK"
27612  new_path=`$CYGPATH -u "$path"`
27613
27614  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27615  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27616  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27617  # "foo.exe" is OK but "foo" is an error.
27618  #
27619  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27620  # It is also a way to make sure we got the proper file name for the real test later on.
27621  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27622  if test "x$test_shortpath" = x; then
27623    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27624$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27625    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27626  fi
27627
27628  # Call helper function which possibly converts this using DOS-style short mode.
27629  # If so, the updated path is stored in $new_path.
27630
27631  input_path="$new_path"
27632  # Check if we need to convert this using DOS-style short mode. If the path
27633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27634  # take no chances and rewrite it.
27635  # Note: m4 eats our [], so we need to use [ and ] instead.
27636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27637  if test "x$has_forbidden_chars" != x; then
27638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27639    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27640    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27641    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27642      # Going to short mode and back again did indeed matter. Since short mode is
27643      # case insensitive, let's make it lowercase to improve readability.
27644      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27645      # Now convert it back to Unix-style (cygpath)
27646      input_path=`$CYGPATH -u "$shortmode_path"`
27647      new_path="$input_path"
27648    fi
27649  fi
27650
27651  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27652  if test "x$test_cygdrive_prefix" = x; then
27653    # As a simple fix, exclude /usr/bin since it's not a real path.
27654    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27655      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27656      # a path prefixed by /cygdrive for fixpath to work.
27657      new_path="$CYGWIN_ROOT_PATH$input_path"
27658    fi
27659  fi
27660
27661
27662  if test "x$path" != "x$new_path"; then
27663    BOOT_JDK="$new_path"
27664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27665$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27666  fi
27667
27668    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27669
27670  path="$BOOT_JDK"
27671  has_colon=`$ECHO $path | $GREP ^.:`
27672  new_path="$path"
27673  if test "x$has_colon" = x; then
27674    # Not in mixed or Windows style, start by that.
27675    new_path=`cmd //c echo $path`
27676  fi
27677
27678
27679  input_path="$new_path"
27680  # Check if we need to convert this using DOS-style short mode. If the path
27681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27682  # take no chances and rewrite it.
27683  # Note: m4 eats our [], so we need to use [ and ] instead.
27684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27685  if test "x$has_forbidden_chars" != x; then
27686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27688  fi
27689
27690
27691  windows_path="$new_path"
27692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27693    unix_path=`$CYGPATH -u "$windows_path"`
27694    new_path="$unix_path"
27695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27697    new_path="$unix_path"
27698  fi
27699
27700  if test "x$path" != "x$new_path"; then
27701    BOOT_JDK="$new_path"
27702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27703$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27704  fi
27705
27706  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27707  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27708
27709    else
27710      # We're on a unix platform. Hooray! :)
27711      path="$BOOT_JDK"
27712      has_space=`$ECHO "$path" | $GREP " "`
27713      if test "x$has_space" != x; then
27714        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27715$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27716        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27717      fi
27718
27719      # Use eval to expand a potential ~
27720      eval path="$path"
27721      if test ! -f "$path" && test ! -d "$path"; then
27722        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27723      fi
27724
27725      if test -d "$path"; then
27726        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27727      else
27728        dir="`$DIRNAME "$path"`"
27729        base="`$BASENAME "$path"`"
27730        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27731      fi
27732    fi
27733  fi
27734
27735            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27736$as_echo_n "checking for Boot JDK... " >&6; }
27737            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27738$as_echo "$BOOT_JDK" >&6; }
27739            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27740$as_echo_n "checking Boot JDK version... " >&6; }
27741            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27742            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27743$as_echo "$BOOT_JDK_VERSION" >&6; }
27744          fi # end check jdk version
27745        fi # end check javac
27746      fi # end check java
27747    fi # end check boot jdk found
27748  fi
27749
27750
27751  if test "x$BOOT_JDK_FOUND" = xno; then
27752    # Now execute the test
27753
27754  if test "x$PROGRAMW6432" != x; then
27755    VIRTUAL_DIR="$PROGRAMW6432/Java"
27756
27757  windows_path="$VIRTUAL_DIR"
27758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27759    unix_path=`$CYGPATH -u "$windows_path"`
27760    VIRTUAL_DIR="$unix_path"
27761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27763    VIRTUAL_DIR="$unix_path"
27764  fi
27765
27766
27767  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27768  BOOT_JDK_SUFFIX=""
27769  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27770  if test "x$ALL_JDKS_FOUND" != x; then
27771    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27772
27773  if test "x$BOOT_JDK_FOUND" = xno; then
27774    # Now execute the test
27775
27776        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27777        if test -d "$BOOT_JDK"; then
27778          BOOT_JDK_FOUND=maybe
27779          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27780$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27781        fi
27782
27783
27784    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27785    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27786      # Do we have a bin/java?
27787      if test ! -x "$BOOT_JDK/bin/java"; then
27788        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27790        BOOT_JDK_FOUND=no
27791      else
27792        # Do we have a bin/javac?
27793        if test ! -x "$BOOT_JDK/bin/javac"; then
27794          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27796          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27797$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27798          BOOT_JDK_FOUND=no
27799        else
27800          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27801          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27802
27803          # Extra M4 quote needed to protect [] in grep expression.
27804          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27805          if test "x$FOUND_CORRECT_VERSION" = x; then
27806            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27808            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27809$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27810            BOOT_JDK_FOUND=no
27811          else
27812            # We're done! :-)
27813            BOOT_JDK_FOUND=yes
27814
27815  # Only process if variable expands to non-empty
27816
27817  if test "x$BOOT_JDK" != x; then
27818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27819
27820  # Input might be given as Windows format, start by converting to
27821  # unix format.
27822  path="$BOOT_JDK"
27823  new_path=`$CYGPATH -u "$path"`
27824
27825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27828  # "foo.exe" is OK but "foo" is an error.
27829  #
27830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27831  # It is also a way to make sure we got the proper file name for the real test later on.
27832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27833  if test "x$test_shortpath" = x; then
27834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27835$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27836    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27837  fi
27838
27839  # Call helper function which possibly converts this using DOS-style short mode.
27840  # If so, the updated path is stored in $new_path.
27841
27842  input_path="$new_path"
27843  # Check if we need to convert this using DOS-style short mode. If the path
27844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27845  # take no chances and rewrite it.
27846  # Note: m4 eats our [], so we need to use [ and ] instead.
27847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27848  if test "x$has_forbidden_chars" != x; then
27849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27853      # Going to short mode and back again did indeed matter. Since short mode is
27854      # case insensitive, let's make it lowercase to improve readability.
27855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27856      # Now convert it back to Unix-style (cygpath)
27857      input_path=`$CYGPATH -u "$shortmode_path"`
27858      new_path="$input_path"
27859    fi
27860  fi
27861
27862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27863  if test "x$test_cygdrive_prefix" = x; then
27864    # As a simple fix, exclude /usr/bin since it's not a real path.
27865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27867      # a path prefixed by /cygdrive for fixpath to work.
27868      new_path="$CYGWIN_ROOT_PATH$input_path"
27869    fi
27870  fi
27871
27872
27873  if test "x$path" != "x$new_path"; then
27874    BOOT_JDK="$new_path"
27875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27876$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27877  fi
27878
27879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27880
27881  path="$BOOT_JDK"
27882  has_colon=`$ECHO $path | $GREP ^.:`
27883  new_path="$path"
27884  if test "x$has_colon" = x; then
27885    # Not in mixed or Windows style, start by that.
27886    new_path=`cmd //c echo $path`
27887  fi
27888
27889
27890  input_path="$new_path"
27891  # Check if we need to convert this using DOS-style short mode. If the path
27892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27893  # take no chances and rewrite it.
27894  # Note: m4 eats our [], so we need to use [ and ] instead.
27895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27896  if test "x$has_forbidden_chars" != x; then
27897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27899  fi
27900
27901
27902  windows_path="$new_path"
27903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27904    unix_path=`$CYGPATH -u "$windows_path"`
27905    new_path="$unix_path"
27906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27908    new_path="$unix_path"
27909  fi
27910
27911  if test "x$path" != "x$new_path"; then
27912    BOOT_JDK="$new_path"
27913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27914$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27915  fi
27916
27917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27919
27920    else
27921      # We're on a unix platform. Hooray! :)
27922      path="$BOOT_JDK"
27923      has_space=`$ECHO "$path" | $GREP " "`
27924      if test "x$has_space" != x; then
27925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27926$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27927        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27928      fi
27929
27930      # Use eval to expand a potential ~
27931      eval path="$path"
27932      if test ! -f "$path" && test ! -d "$path"; then
27933        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27934      fi
27935
27936      if test -d "$path"; then
27937        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27938      else
27939        dir="`$DIRNAME "$path"`"
27940        base="`$BASENAME "$path"`"
27941        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27942      fi
27943    fi
27944  fi
27945
27946            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27947$as_echo_n "checking for Boot JDK... " >&6; }
27948            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27949$as_echo "$BOOT_JDK" >&6; }
27950            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27951$as_echo_n "checking Boot JDK version... " >&6; }
27952            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27953            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27954$as_echo "$BOOT_JDK_VERSION" >&6; }
27955          fi # end check jdk version
27956        fi # end check javac
27957      fi # end check java
27958    fi # end check boot jdk found
27959  fi
27960
27961    done
27962  fi
27963
27964  fi
27965
27966
27967    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27968    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27969      # Do we have a bin/java?
27970      if test ! -x "$BOOT_JDK/bin/java"; then
27971        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27972$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27973        BOOT_JDK_FOUND=no
27974      else
27975        # Do we have a bin/javac?
27976        if test ! -x "$BOOT_JDK/bin/javac"; then
27977          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27978$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27979          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27980$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27981          BOOT_JDK_FOUND=no
27982        else
27983          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27984          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27985
27986          # Extra M4 quote needed to protect [] in grep expression.
27987          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27988          if test "x$FOUND_CORRECT_VERSION" = x; then
27989            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27991            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27992$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27993            BOOT_JDK_FOUND=no
27994          else
27995            # We're done! :-)
27996            BOOT_JDK_FOUND=yes
27997
27998  # Only process if variable expands to non-empty
27999
28000  if test "x$BOOT_JDK" != x; then
28001    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28002
28003  # Input might be given as Windows format, start by converting to
28004  # unix format.
28005  path="$BOOT_JDK"
28006  new_path=`$CYGPATH -u "$path"`
28007
28008  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28009  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28010  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28011  # "foo.exe" is OK but "foo" is an error.
28012  #
28013  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28014  # It is also a way to make sure we got the proper file name for the real test later on.
28015  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28016  if test "x$test_shortpath" = x; then
28017    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28018$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28019    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28020  fi
28021
28022  # Call helper function which possibly converts this using DOS-style short mode.
28023  # If so, the updated path is stored in $new_path.
28024
28025  input_path="$new_path"
28026  # Check if we need to convert this using DOS-style short mode. If the path
28027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28028  # take no chances and rewrite it.
28029  # Note: m4 eats our [], so we need to use [ and ] instead.
28030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28031  if test "x$has_forbidden_chars" != x; then
28032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28036      # Going to short mode and back again did indeed matter. Since short mode is
28037      # case insensitive, let's make it lowercase to improve readability.
28038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28039      # Now convert it back to Unix-style (cygpath)
28040      input_path=`$CYGPATH -u "$shortmode_path"`
28041      new_path="$input_path"
28042    fi
28043  fi
28044
28045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28046  if test "x$test_cygdrive_prefix" = x; then
28047    # As a simple fix, exclude /usr/bin since it's not a real path.
28048    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28050      # a path prefixed by /cygdrive for fixpath to work.
28051      new_path="$CYGWIN_ROOT_PATH$input_path"
28052    fi
28053  fi
28054
28055
28056  if test "x$path" != "x$new_path"; then
28057    BOOT_JDK="$new_path"
28058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28059$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28060  fi
28061
28062    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28063
28064  path="$BOOT_JDK"
28065  has_colon=`$ECHO $path | $GREP ^.:`
28066  new_path="$path"
28067  if test "x$has_colon" = x; then
28068    # Not in mixed or Windows style, start by that.
28069    new_path=`cmd //c echo $path`
28070  fi
28071
28072
28073  input_path="$new_path"
28074  # Check if we need to convert this using DOS-style short mode. If the path
28075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28076  # take no chances and rewrite it.
28077  # Note: m4 eats our [], so we need to use [ and ] instead.
28078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28079  if test "x$has_forbidden_chars" != x; then
28080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28081    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28082  fi
28083
28084
28085  windows_path="$new_path"
28086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28087    unix_path=`$CYGPATH -u "$windows_path"`
28088    new_path="$unix_path"
28089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28091    new_path="$unix_path"
28092  fi
28093
28094  if test "x$path" != "x$new_path"; then
28095    BOOT_JDK="$new_path"
28096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28097$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28098  fi
28099
28100  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28101  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28102
28103    else
28104      # We're on a unix platform. Hooray! :)
28105      path="$BOOT_JDK"
28106      has_space=`$ECHO "$path" | $GREP " "`
28107      if test "x$has_space" != x; then
28108        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28109$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28110        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28111      fi
28112
28113      # Use eval to expand a potential ~
28114      eval path="$path"
28115      if test ! -f "$path" && test ! -d "$path"; then
28116        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28117      fi
28118
28119      if test -d "$path"; then
28120        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28121      else
28122        dir="`$DIRNAME "$path"`"
28123        base="`$BASENAME "$path"`"
28124        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28125      fi
28126    fi
28127  fi
28128
28129            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28130$as_echo_n "checking for Boot JDK... " >&6; }
28131            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28132$as_echo "$BOOT_JDK" >&6; }
28133            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28134$as_echo_n "checking Boot JDK version... " >&6; }
28135            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28136            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28137$as_echo "$BOOT_JDK_VERSION" >&6; }
28138          fi # end check jdk version
28139        fi # end check javac
28140      fi # end check java
28141    fi # end check boot jdk found
28142  fi
28143
28144
28145  if test "x$BOOT_JDK_FOUND" = xno; then
28146    # Now execute the test
28147
28148  if test "x$PROGRAMFILES" != x; then
28149    VIRTUAL_DIR="$PROGRAMFILES/Java"
28150
28151  windows_path="$VIRTUAL_DIR"
28152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28153    unix_path=`$CYGPATH -u "$windows_path"`
28154    VIRTUAL_DIR="$unix_path"
28155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28157    VIRTUAL_DIR="$unix_path"
28158  fi
28159
28160
28161  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28162  BOOT_JDK_SUFFIX=""
28163  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28164  if test "x$ALL_JDKS_FOUND" != x; then
28165    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28166
28167  if test "x$BOOT_JDK_FOUND" = xno; then
28168    # Now execute the test
28169
28170        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28171        if test -d "$BOOT_JDK"; then
28172          BOOT_JDK_FOUND=maybe
28173          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28174$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28175        fi
28176
28177
28178    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28179    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28180      # Do we have a bin/java?
28181      if test ! -x "$BOOT_JDK/bin/java"; then
28182        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28183$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28184        BOOT_JDK_FOUND=no
28185      else
28186        # Do we have a bin/javac?
28187        if test ! -x "$BOOT_JDK/bin/javac"; then
28188          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28190          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28191$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28192          BOOT_JDK_FOUND=no
28193        else
28194          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28195          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28196
28197          # Extra M4 quote needed to protect [] in grep expression.
28198          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28199          if test "x$FOUND_CORRECT_VERSION" = x; then
28200            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28201$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28202            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28203$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28204            BOOT_JDK_FOUND=no
28205          else
28206            # We're done! :-)
28207            BOOT_JDK_FOUND=yes
28208
28209  # Only process if variable expands to non-empty
28210
28211  if test "x$BOOT_JDK" != x; then
28212    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28213
28214  # Input might be given as Windows format, start by converting to
28215  # unix format.
28216  path="$BOOT_JDK"
28217  new_path=`$CYGPATH -u "$path"`
28218
28219  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28220  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28221  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28222  # "foo.exe" is OK but "foo" is an error.
28223  #
28224  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28225  # It is also a way to make sure we got the proper file name for the real test later on.
28226  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28227  if test "x$test_shortpath" = x; then
28228    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28229$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28230    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28231  fi
28232
28233  # Call helper function which possibly converts this using DOS-style short mode.
28234  # If so, the updated path is stored in $new_path.
28235
28236  input_path="$new_path"
28237  # Check if we need to convert this using DOS-style short mode. If the path
28238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28239  # take no chances and rewrite it.
28240  # Note: m4 eats our [], so we need to use [ and ] instead.
28241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28242  if test "x$has_forbidden_chars" != x; then
28243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28247      # Going to short mode and back again did indeed matter. Since short mode is
28248      # case insensitive, let's make it lowercase to improve readability.
28249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28250      # Now convert it back to Unix-style (cygpath)
28251      input_path=`$CYGPATH -u "$shortmode_path"`
28252      new_path="$input_path"
28253    fi
28254  fi
28255
28256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28257  if test "x$test_cygdrive_prefix" = x; then
28258    # As a simple fix, exclude /usr/bin since it's not a real path.
28259    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28261      # a path prefixed by /cygdrive for fixpath to work.
28262      new_path="$CYGWIN_ROOT_PATH$input_path"
28263    fi
28264  fi
28265
28266
28267  if test "x$path" != "x$new_path"; then
28268    BOOT_JDK="$new_path"
28269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28270$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28271  fi
28272
28273    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28274
28275  path="$BOOT_JDK"
28276  has_colon=`$ECHO $path | $GREP ^.:`
28277  new_path="$path"
28278  if test "x$has_colon" = x; then
28279    # Not in mixed or Windows style, start by that.
28280    new_path=`cmd //c echo $path`
28281  fi
28282
28283
28284  input_path="$new_path"
28285  # Check if we need to convert this using DOS-style short mode. If the path
28286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28287  # take no chances and rewrite it.
28288  # Note: m4 eats our [], so we need to use [ and ] instead.
28289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28290  if test "x$has_forbidden_chars" != x; then
28291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28293  fi
28294
28295
28296  windows_path="$new_path"
28297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28298    unix_path=`$CYGPATH -u "$windows_path"`
28299    new_path="$unix_path"
28300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28302    new_path="$unix_path"
28303  fi
28304
28305  if test "x$path" != "x$new_path"; then
28306    BOOT_JDK="$new_path"
28307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28308$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28309  fi
28310
28311  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28312  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28313
28314    else
28315      # We're on a unix platform. Hooray! :)
28316      path="$BOOT_JDK"
28317      has_space=`$ECHO "$path" | $GREP " "`
28318      if test "x$has_space" != x; then
28319        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28320$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28321        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28322      fi
28323
28324      # Use eval to expand a potential ~
28325      eval path="$path"
28326      if test ! -f "$path" && test ! -d "$path"; then
28327        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28328      fi
28329
28330      if test -d "$path"; then
28331        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28332      else
28333        dir="`$DIRNAME "$path"`"
28334        base="`$BASENAME "$path"`"
28335        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28336      fi
28337    fi
28338  fi
28339
28340            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28341$as_echo_n "checking for Boot JDK... " >&6; }
28342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28343$as_echo "$BOOT_JDK" >&6; }
28344            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28345$as_echo_n "checking Boot JDK version... " >&6; }
28346            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28347            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28348$as_echo "$BOOT_JDK_VERSION" >&6; }
28349          fi # end check jdk version
28350        fi # end check javac
28351      fi # end check java
28352    fi # end check boot jdk found
28353  fi
28354
28355    done
28356  fi
28357
28358  fi
28359
28360
28361    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28362    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28363      # Do we have a bin/java?
28364      if test ! -x "$BOOT_JDK/bin/java"; then
28365        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28367        BOOT_JDK_FOUND=no
28368      else
28369        # Do we have a bin/javac?
28370        if test ! -x "$BOOT_JDK/bin/javac"; then
28371          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28373          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28374$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28375          BOOT_JDK_FOUND=no
28376        else
28377          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28378          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28379
28380          # Extra M4 quote needed to protect [] in grep expression.
28381          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28382          if test "x$FOUND_CORRECT_VERSION" = x; then
28383            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28385            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28386$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28387            BOOT_JDK_FOUND=no
28388          else
28389            # We're done! :-)
28390            BOOT_JDK_FOUND=yes
28391
28392  # Only process if variable expands to non-empty
28393
28394  if test "x$BOOT_JDK" != x; then
28395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28396
28397  # Input might be given as Windows format, start by converting to
28398  # unix format.
28399  path="$BOOT_JDK"
28400  new_path=`$CYGPATH -u "$path"`
28401
28402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28405  # "foo.exe" is OK but "foo" is an error.
28406  #
28407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28408  # It is also a way to make sure we got the proper file name for the real test later on.
28409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28410  if test "x$test_shortpath" = x; then
28411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28412$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28413    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28414  fi
28415
28416  # Call helper function which possibly converts this using DOS-style short mode.
28417  # If so, the updated path is stored in $new_path.
28418
28419  input_path="$new_path"
28420  # Check if we need to convert this using DOS-style short mode. If the path
28421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28422  # take no chances and rewrite it.
28423  # Note: m4 eats our [], so we need to use [ and ] instead.
28424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28425  if test "x$has_forbidden_chars" != x; then
28426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28430      # Going to short mode and back again did indeed matter. Since short mode is
28431      # case insensitive, let's make it lowercase to improve readability.
28432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28433      # Now convert it back to Unix-style (cygpath)
28434      input_path=`$CYGPATH -u "$shortmode_path"`
28435      new_path="$input_path"
28436    fi
28437  fi
28438
28439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28440  if test "x$test_cygdrive_prefix" = x; then
28441    # As a simple fix, exclude /usr/bin since it's not a real path.
28442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28444      # a path prefixed by /cygdrive for fixpath to work.
28445      new_path="$CYGWIN_ROOT_PATH$input_path"
28446    fi
28447  fi
28448
28449
28450  if test "x$path" != "x$new_path"; then
28451    BOOT_JDK="$new_path"
28452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28453$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28454  fi
28455
28456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28457
28458  path="$BOOT_JDK"
28459  has_colon=`$ECHO $path | $GREP ^.:`
28460  new_path="$path"
28461  if test "x$has_colon" = x; then
28462    # Not in mixed or Windows style, start by that.
28463    new_path=`cmd //c echo $path`
28464  fi
28465
28466
28467  input_path="$new_path"
28468  # Check if we need to convert this using DOS-style short mode. If the path
28469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28470  # take no chances and rewrite it.
28471  # Note: m4 eats our [], so we need to use [ and ] instead.
28472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28473  if test "x$has_forbidden_chars" != x; then
28474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28476  fi
28477
28478
28479  windows_path="$new_path"
28480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28481    unix_path=`$CYGPATH -u "$windows_path"`
28482    new_path="$unix_path"
28483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28485    new_path="$unix_path"
28486  fi
28487
28488  if test "x$path" != "x$new_path"; then
28489    BOOT_JDK="$new_path"
28490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28492  fi
28493
28494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28496
28497    else
28498      # We're on a unix platform. Hooray! :)
28499      path="$BOOT_JDK"
28500      has_space=`$ECHO "$path" | $GREP " "`
28501      if test "x$has_space" != x; then
28502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28503$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28505      fi
28506
28507      # Use eval to expand a potential ~
28508      eval path="$path"
28509      if test ! -f "$path" && test ! -d "$path"; then
28510        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28511      fi
28512
28513      if test -d "$path"; then
28514        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28515      else
28516        dir="`$DIRNAME "$path"`"
28517        base="`$BASENAME "$path"`"
28518        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28519      fi
28520    fi
28521  fi
28522
28523            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28524$as_echo_n "checking for Boot JDK... " >&6; }
28525            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28526$as_echo "$BOOT_JDK" >&6; }
28527            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28528$as_echo_n "checking Boot JDK version... " >&6; }
28529            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28531$as_echo "$BOOT_JDK_VERSION" >&6; }
28532          fi # end check jdk version
28533        fi # end check javac
28534      fi # end check java
28535    fi # end check boot jdk found
28536  fi
28537
28538
28539  if test "x$BOOT_JDK_FOUND" = xno; then
28540    # Now execute the test
28541
28542  if test "x$ProgramFiles" != x; then
28543    VIRTUAL_DIR="$ProgramFiles/Java"
28544
28545  windows_path="$VIRTUAL_DIR"
28546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28547    unix_path=`$CYGPATH -u "$windows_path"`
28548    VIRTUAL_DIR="$unix_path"
28549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28551    VIRTUAL_DIR="$unix_path"
28552  fi
28553
28554
28555  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28556  BOOT_JDK_SUFFIX=""
28557  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28558  if test "x$ALL_JDKS_FOUND" != x; then
28559    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28560
28561  if test "x$BOOT_JDK_FOUND" = xno; then
28562    # Now execute the test
28563
28564        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28565        if test -d "$BOOT_JDK"; then
28566          BOOT_JDK_FOUND=maybe
28567          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28568$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28569        fi
28570
28571
28572    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28573    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28574      # Do we have a bin/java?
28575      if test ! -x "$BOOT_JDK/bin/java"; then
28576        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28578        BOOT_JDK_FOUND=no
28579      else
28580        # Do we have a bin/javac?
28581        if test ! -x "$BOOT_JDK/bin/javac"; then
28582          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28583$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28584          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28585$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28586          BOOT_JDK_FOUND=no
28587        else
28588          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28589          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28590
28591          # Extra M4 quote needed to protect [] in grep expression.
28592          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28593          if test "x$FOUND_CORRECT_VERSION" = x; then
28594            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28596            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28597$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28598            BOOT_JDK_FOUND=no
28599          else
28600            # We're done! :-)
28601            BOOT_JDK_FOUND=yes
28602
28603  # Only process if variable expands to non-empty
28604
28605  if test "x$BOOT_JDK" != x; then
28606    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28607
28608  # Input might be given as Windows format, start by converting to
28609  # unix format.
28610  path="$BOOT_JDK"
28611  new_path=`$CYGPATH -u "$path"`
28612
28613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28616  # "foo.exe" is OK but "foo" is an error.
28617  #
28618  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28619  # It is also a way to make sure we got the proper file name for the real test later on.
28620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28621  if test "x$test_shortpath" = x; then
28622    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28623$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28624    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28625  fi
28626
28627  # Call helper function which possibly converts this using DOS-style short mode.
28628  # If so, the updated path is stored in $new_path.
28629
28630  input_path="$new_path"
28631  # Check if we need to convert this using DOS-style short mode. If the path
28632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28633  # take no chances and rewrite it.
28634  # Note: m4 eats our [], so we need to use [ and ] instead.
28635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28636  if test "x$has_forbidden_chars" != x; then
28637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28641      # Going to short mode and back again did indeed matter. Since short mode is
28642      # case insensitive, let's make it lowercase to improve readability.
28643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28644      # Now convert it back to Unix-style (cygpath)
28645      input_path=`$CYGPATH -u "$shortmode_path"`
28646      new_path="$input_path"
28647    fi
28648  fi
28649
28650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28651  if test "x$test_cygdrive_prefix" = x; then
28652    # As a simple fix, exclude /usr/bin since it's not a real path.
28653    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28655      # a path prefixed by /cygdrive for fixpath to work.
28656      new_path="$CYGWIN_ROOT_PATH$input_path"
28657    fi
28658  fi
28659
28660
28661  if test "x$path" != "x$new_path"; then
28662    BOOT_JDK="$new_path"
28663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28664$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28665  fi
28666
28667    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28668
28669  path="$BOOT_JDK"
28670  has_colon=`$ECHO $path | $GREP ^.:`
28671  new_path="$path"
28672  if test "x$has_colon" = x; then
28673    # Not in mixed or Windows style, start by that.
28674    new_path=`cmd //c echo $path`
28675  fi
28676
28677
28678  input_path="$new_path"
28679  # Check if we need to convert this using DOS-style short mode. If the path
28680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28681  # take no chances and rewrite it.
28682  # Note: m4 eats our [], so we need to use [ and ] instead.
28683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28684  if test "x$has_forbidden_chars" != x; then
28685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28687  fi
28688
28689
28690  windows_path="$new_path"
28691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28692    unix_path=`$CYGPATH -u "$windows_path"`
28693    new_path="$unix_path"
28694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28696    new_path="$unix_path"
28697  fi
28698
28699  if test "x$path" != "x$new_path"; then
28700    BOOT_JDK="$new_path"
28701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28702$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28703  fi
28704
28705  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28706  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28707
28708    else
28709      # We're on a unix platform. Hooray! :)
28710      path="$BOOT_JDK"
28711      has_space=`$ECHO "$path" | $GREP " "`
28712      if test "x$has_space" != x; then
28713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28714$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28715        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28716      fi
28717
28718      # Use eval to expand a potential ~
28719      eval path="$path"
28720      if test ! -f "$path" && test ! -d "$path"; then
28721        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28722      fi
28723
28724      if test -d "$path"; then
28725        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28726      else
28727        dir="`$DIRNAME "$path"`"
28728        base="`$BASENAME "$path"`"
28729        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28730      fi
28731    fi
28732  fi
28733
28734            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28735$as_echo_n "checking for Boot JDK... " >&6; }
28736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28737$as_echo "$BOOT_JDK" >&6; }
28738            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28739$as_echo_n "checking Boot JDK version... " >&6; }
28740            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28741            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28742$as_echo "$BOOT_JDK_VERSION" >&6; }
28743          fi # end check jdk version
28744        fi # end check javac
28745      fi # end check java
28746    fi # end check boot jdk found
28747  fi
28748
28749    done
28750  fi
28751
28752  fi
28753
28754
28755    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28756    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28757      # Do we have a bin/java?
28758      if test ! -x "$BOOT_JDK/bin/java"; then
28759        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28761        BOOT_JDK_FOUND=no
28762      else
28763        # Do we have a bin/javac?
28764        if test ! -x "$BOOT_JDK/bin/javac"; then
28765          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28767          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28768$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28769          BOOT_JDK_FOUND=no
28770        else
28771          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28772          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28773
28774          # Extra M4 quote needed to protect [] in grep expression.
28775          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28776          if test "x$FOUND_CORRECT_VERSION" = x; then
28777            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28779            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28780$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28781            BOOT_JDK_FOUND=no
28782          else
28783            # We're done! :-)
28784            BOOT_JDK_FOUND=yes
28785
28786  # Only process if variable expands to non-empty
28787
28788  if test "x$BOOT_JDK" != x; then
28789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28790
28791  # Input might be given as Windows format, start by converting to
28792  # unix format.
28793  path="$BOOT_JDK"
28794  new_path=`$CYGPATH -u "$path"`
28795
28796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28799  # "foo.exe" is OK but "foo" is an error.
28800  #
28801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28802  # It is also a way to make sure we got the proper file name for the real test later on.
28803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28804  if test "x$test_shortpath" = x; then
28805    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28806$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28807    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28808  fi
28809
28810  # Call helper function which possibly converts this using DOS-style short mode.
28811  # If so, the updated path is stored in $new_path.
28812
28813  input_path="$new_path"
28814  # Check if we need to convert this using DOS-style short mode. If the path
28815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28816  # take no chances and rewrite it.
28817  # Note: m4 eats our [], so we need to use [ and ] instead.
28818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28819  if test "x$has_forbidden_chars" != x; then
28820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28824      # Going to short mode and back again did indeed matter. Since short mode is
28825      # case insensitive, let's make it lowercase to improve readability.
28826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28827      # Now convert it back to Unix-style (cygpath)
28828      input_path=`$CYGPATH -u "$shortmode_path"`
28829      new_path="$input_path"
28830    fi
28831  fi
28832
28833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28834  if test "x$test_cygdrive_prefix" = x; then
28835    # As a simple fix, exclude /usr/bin since it's not a real path.
28836    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28838      # a path prefixed by /cygdrive for fixpath to work.
28839      new_path="$CYGWIN_ROOT_PATH$input_path"
28840    fi
28841  fi
28842
28843
28844  if test "x$path" != "x$new_path"; then
28845    BOOT_JDK="$new_path"
28846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28847$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28848  fi
28849
28850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28851
28852  path="$BOOT_JDK"
28853  has_colon=`$ECHO $path | $GREP ^.:`
28854  new_path="$path"
28855  if test "x$has_colon" = x; then
28856    # Not in mixed or Windows style, start by that.
28857    new_path=`cmd //c echo $path`
28858  fi
28859
28860
28861  input_path="$new_path"
28862  # Check if we need to convert this using DOS-style short mode. If the path
28863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28864  # take no chances and rewrite it.
28865  # Note: m4 eats our [], so we need to use [ and ] instead.
28866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28867  if test "x$has_forbidden_chars" != x; then
28868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28870  fi
28871
28872
28873  windows_path="$new_path"
28874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28875    unix_path=`$CYGPATH -u "$windows_path"`
28876    new_path="$unix_path"
28877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28879    new_path="$unix_path"
28880  fi
28881
28882  if test "x$path" != "x$new_path"; then
28883    BOOT_JDK="$new_path"
28884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28885$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28886  fi
28887
28888  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28889  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28890
28891    else
28892      # We're on a unix platform. Hooray! :)
28893      path="$BOOT_JDK"
28894      has_space=`$ECHO "$path" | $GREP " "`
28895      if test "x$has_space" != x; then
28896        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28897$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28898        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28899      fi
28900
28901      # Use eval to expand a potential ~
28902      eval path="$path"
28903      if test ! -f "$path" && test ! -d "$path"; then
28904        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28905      fi
28906
28907      if test -d "$path"; then
28908        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28909      else
28910        dir="`$DIRNAME "$path"`"
28911        base="`$BASENAME "$path"`"
28912        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28913      fi
28914    fi
28915  fi
28916
28917            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28918$as_echo_n "checking for Boot JDK... " >&6; }
28919            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28920$as_echo "$BOOT_JDK" >&6; }
28921            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28922$as_echo_n "checking Boot JDK version... " >&6; }
28923            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28925$as_echo "$BOOT_JDK_VERSION" >&6; }
28926          fi # end check jdk version
28927        fi # end check javac
28928      fi # end check java
28929    fi # end check boot jdk found
28930  fi
28931
28932
28933  if test "x$BOOT_JDK_FOUND" = xno; then
28934    # Now execute the test
28935
28936  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28937  BOOT_JDK_SUFFIX=""
28938  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28939  if test "x$ALL_JDKS_FOUND" != x; then
28940    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28941
28942  if test "x$BOOT_JDK_FOUND" = xno; then
28943    # Now execute the test
28944
28945        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28946        if test -d "$BOOT_JDK"; then
28947          BOOT_JDK_FOUND=maybe
28948          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28949$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28950        fi
28951
28952
28953    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28954    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28955      # Do we have a bin/java?
28956      if test ! -x "$BOOT_JDK/bin/java"; then
28957        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28959        BOOT_JDK_FOUND=no
28960      else
28961        # Do we have a bin/javac?
28962        if test ! -x "$BOOT_JDK/bin/javac"; then
28963          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28964$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28965          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28966$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28967          BOOT_JDK_FOUND=no
28968        else
28969          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28970          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28971
28972          # Extra M4 quote needed to protect [] in grep expression.
28973          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28974          if test "x$FOUND_CORRECT_VERSION" = x; then
28975            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28977            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28978$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28979            BOOT_JDK_FOUND=no
28980          else
28981            # We're done! :-)
28982            BOOT_JDK_FOUND=yes
28983
28984  # Only process if variable expands to non-empty
28985
28986  if test "x$BOOT_JDK" != x; then
28987    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28988
28989  # Input might be given as Windows format, start by converting to
28990  # unix format.
28991  path="$BOOT_JDK"
28992  new_path=`$CYGPATH -u "$path"`
28993
28994  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28995  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28996  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28997  # "foo.exe" is OK but "foo" is an error.
28998  #
28999  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29000  # It is also a way to make sure we got the proper file name for the real test later on.
29001  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29002  if test "x$test_shortpath" = x; then
29003    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29004$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29005    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29006  fi
29007
29008  # Call helper function which possibly converts this using DOS-style short mode.
29009  # If so, the updated path is stored in $new_path.
29010
29011  input_path="$new_path"
29012  # Check if we need to convert this using DOS-style short mode. If the path
29013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29014  # take no chances and rewrite it.
29015  # Note: m4 eats our [], so we need to use [ and ] instead.
29016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29017  if test "x$has_forbidden_chars" != x; then
29018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29019    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29020    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29021    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29022      # Going to short mode and back again did indeed matter. Since short mode is
29023      # case insensitive, let's make it lowercase to improve readability.
29024      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29025      # Now convert it back to Unix-style (cygpath)
29026      input_path=`$CYGPATH -u "$shortmode_path"`
29027      new_path="$input_path"
29028    fi
29029  fi
29030
29031  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29032  if test "x$test_cygdrive_prefix" = x; then
29033    # As a simple fix, exclude /usr/bin since it's not a real path.
29034    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29035      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29036      # a path prefixed by /cygdrive for fixpath to work.
29037      new_path="$CYGWIN_ROOT_PATH$input_path"
29038    fi
29039  fi
29040
29041
29042  if test "x$path" != "x$new_path"; then
29043    BOOT_JDK="$new_path"
29044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29045$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29046  fi
29047
29048    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29049
29050  path="$BOOT_JDK"
29051  has_colon=`$ECHO $path | $GREP ^.:`
29052  new_path="$path"
29053  if test "x$has_colon" = x; then
29054    # Not in mixed or Windows style, start by that.
29055    new_path=`cmd //c echo $path`
29056  fi
29057
29058
29059  input_path="$new_path"
29060  # Check if we need to convert this using DOS-style short mode. If the path
29061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29062  # take no chances and rewrite it.
29063  # Note: m4 eats our [], so we need to use [ and ] instead.
29064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29065  if test "x$has_forbidden_chars" != x; then
29066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29067    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29068  fi
29069
29070
29071  windows_path="$new_path"
29072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29073    unix_path=`$CYGPATH -u "$windows_path"`
29074    new_path="$unix_path"
29075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29077    new_path="$unix_path"
29078  fi
29079
29080  if test "x$path" != "x$new_path"; then
29081    BOOT_JDK="$new_path"
29082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29083$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29084  fi
29085
29086  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29087  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29088
29089    else
29090      # We're on a unix platform. Hooray! :)
29091      path="$BOOT_JDK"
29092      has_space=`$ECHO "$path" | $GREP " "`
29093      if test "x$has_space" != x; then
29094        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29095$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29096        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29097      fi
29098
29099      # Use eval to expand a potential ~
29100      eval path="$path"
29101      if test ! -f "$path" && test ! -d "$path"; then
29102        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29103      fi
29104
29105      if test -d "$path"; then
29106        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29107      else
29108        dir="`$DIRNAME "$path"`"
29109        base="`$BASENAME "$path"`"
29110        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29111      fi
29112    fi
29113  fi
29114
29115            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29116$as_echo_n "checking for Boot JDK... " >&6; }
29117            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29118$as_echo "$BOOT_JDK" >&6; }
29119            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29120$as_echo_n "checking Boot JDK version... " >&6; }
29121            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29122            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29123$as_echo "$BOOT_JDK_VERSION" >&6; }
29124          fi # end check jdk version
29125        fi # end check javac
29126      fi # end check java
29127    fi # end check boot jdk found
29128  fi
29129
29130    done
29131  fi
29132
29133
29134    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29135    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29136      # Do we have a bin/java?
29137      if test ! -x "$BOOT_JDK/bin/java"; then
29138        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29140        BOOT_JDK_FOUND=no
29141      else
29142        # Do we have a bin/javac?
29143        if test ! -x "$BOOT_JDK/bin/javac"; then
29144          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29146          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29147$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29148          BOOT_JDK_FOUND=no
29149        else
29150          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29151          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29152
29153          # Extra M4 quote needed to protect [] in grep expression.
29154          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29155          if test "x$FOUND_CORRECT_VERSION" = x; then
29156            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29158            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29159$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29160            BOOT_JDK_FOUND=no
29161          else
29162            # We're done! :-)
29163            BOOT_JDK_FOUND=yes
29164
29165  # Only process if variable expands to non-empty
29166
29167  if test "x$BOOT_JDK" != x; then
29168    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29169
29170  # Input might be given as Windows format, start by converting to
29171  # unix format.
29172  path="$BOOT_JDK"
29173  new_path=`$CYGPATH -u "$path"`
29174
29175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29178  # "foo.exe" is OK but "foo" is an error.
29179  #
29180  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29181  # It is also a way to make sure we got the proper file name for the real test later on.
29182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29183  if test "x$test_shortpath" = x; then
29184    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29185$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29186    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29187  fi
29188
29189  # Call helper function which possibly converts this using DOS-style short mode.
29190  # If so, the updated path is stored in $new_path.
29191
29192  input_path="$new_path"
29193  # Check if we need to convert this using DOS-style short mode. If the path
29194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29195  # take no chances and rewrite it.
29196  # Note: m4 eats our [], so we need to use [ and ] instead.
29197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29198  if test "x$has_forbidden_chars" != x; then
29199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29200    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29201    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29202    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29203      # Going to short mode and back again did indeed matter. Since short mode is
29204      # case insensitive, let's make it lowercase to improve readability.
29205      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29206      # Now convert it back to Unix-style (cygpath)
29207      input_path=`$CYGPATH -u "$shortmode_path"`
29208      new_path="$input_path"
29209    fi
29210  fi
29211
29212  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29213  if test "x$test_cygdrive_prefix" = x; then
29214    # As a simple fix, exclude /usr/bin since it's not a real path.
29215    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29216      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29217      # a path prefixed by /cygdrive for fixpath to work.
29218      new_path="$CYGWIN_ROOT_PATH$input_path"
29219    fi
29220  fi
29221
29222
29223  if test "x$path" != "x$new_path"; then
29224    BOOT_JDK="$new_path"
29225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29226$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29227  fi
29228
29229    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29230
29231  path="$BOOT_JDK"
29232  has_colon=`$ECHO $path | $GREP ^.:`
29233  new_path="$path"
29234  if test "x$has_colon" = x; then
29235    # Not in mixed or Windows style, start by that.
29236    new_path=`cmd //c echo $path`
29237  fi
29238
29239
29240  input_path="$new_path"
29241  # Check if we need to convert this using DOS-style short mode. If the path
29242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29243  # take no chances and rewrite it.
29244  # Note: m4 eats our [], so we need to use [ and ] instead.
29245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29246  if test "x$has_forbidden_chars" != x; then
29247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29248    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29249  fi
29250
29251
29252  windows_path="$new_path"
29253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29254    unix_path=`$CYGPATH -u "$windows_path"`
29255    new_path="$unix_path"
29256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29258    new_path="$unix_path"
29259  fi
29260
29261  if test "x$path" != "x$new_path"; then
29262    BOOT_JDK="$new_path"
29263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29264$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29265  fi
29266
29267  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29268  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29269
29270    else
29271      # We're on a unix platform. Hooray! :)
29272      path="$BOOT_JDK"
29273      has_space=`$ECHO "$path" | $GREP " "`
29274      if test "x$has_space" != x; then
29275        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29276$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29277        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29278      fi
29279
29280      # Use eval to expand a potential ~
29281      eval path="$path"
29282      if test ! -f "$path" && test ! -d "$path"; then
29283        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29284      fi
29285
29286      if test -d "$path"; then
29287        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29288      else
29289        dir="`$DIRNAME "$path"`"
29290        base="`$BASENAME "$path"`"
29291        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29292      fi
29293    fi
29294  fi
29295
29296            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29297$as_echo_n "checking for Boot JDK... " >&6; }
29298            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29299$as_echo "$BOOT_JDK" >&6; }
29300            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29301$as_echo_n "checking Boot JDK version... " >&6; }
29302            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29304$as_echo "$BOOT_JDK_VERSION" >&6; }
29305          fi # end check jdk version
29306        fi # end check javac
29307      fi # end check java
29308    fi # end check boot jdk found
29309  fi
29310
29311  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29312
29313  if test "x$BOOT_JDK_FOUND" = xno; then
29314    # Now execute the test
29315
29316  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29317  BOOT_JDK_SUFFIX="/Contents/Home"
29318  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29319  if test "x$ALL_JDKS_FOUND" != x; then
29320    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29321
29322  if test "x$BOOT_JDK_FOUND" = xno; then
29323    # Now execute the test
29324
29325        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29326        if test -d "$BOOT_JDK"; then
29327          BOOT_JDK_FOUND=maybe
29328          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29329$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29330        fi
29331
29332
29333    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29334    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29335      # Do we have a bin/java?
29336      if test ! -x "$BOOT_JDK/bin/java"; then
29337        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29339        BOOT_JDK_FOUND=no
29340      else
29341        # Do we have a bin/javac?
29342        if test ! -x "$BOOT_JDK/bin/javac"; then
29343          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29345          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29346$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29347          BOOT_JDK_FOUND=no
29348        else
29349          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29350          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29351
29352          # Extra M4 quote needed to protect [] in grep expression.
29353          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29354          if test "x$FOUND_CORRECT_VERSION" = x; then
29355            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29357            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29358$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29359            BOOT_JDK_FOUND=no
29360          else
29361            # We're done! :-)
29362            BOOT_JDK_FOUND=yes
29363
29364  # Only process if variable expands to non-empty
29365
29366  if test "x$BOOT_JDK" != x; then
29367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29368
29369  # Input might be given as Windows format, start by converting to
29370  # unix format.
29371  path="$BOOT_JDK"
29372  new_path=`$CYGPATH -u "$path"`
29373
29374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29377  # "foo.exe" is OK but "foo" is an error.
29378  #
29379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29380  # It is also a way to make sure we got the proper file name for the real test later on.
29381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29382  if test "x$test_shortpath" = x; then
29383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29385    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29386  fi
29387
29388  # Call helper function which possibly converts this using DOS-style short mode.
29389  # If so, the updated path is stored in $new_path.
29390
29391  input_path="$new_path"
29392  # Check if we need to convert this using DOS-style short mode. If the path
29393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29394  # take no chances and rewrite it.
29395  # Note: m4 eats our [], so we need to use [ and ] instead.
29396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29397  if test "x$has_forbidden_chars" != x; then
29398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29402      # Going to short mode and back again did indeed matter. Since short mode is
29403      # case insensitive, let's make it lowercase to improve readability.
29404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29405      # Now convert it back to Unix-style (cygpath)
29406      input_path=`$CYGPATH -u "$shortmode_path"`
29407      new_path="$input_path"
29408    fi
29409  fi
29410
29411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29412  if test "x$test_cygdrive_prefix" = x; then
29413    # As a simple fix, exclude /usr/bin since it's not a real path.
29414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29416      # a path prefixed by /cygdrive for fixpath to work.
29417      new_path="$CYGWIN_ROOT_PATH$input_path"
29418    fi
29419  fi
29420
29421
29422  if test "x$path" != "x$new_path"; then
29423    BOOT_JDK="$new_path"
29424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29425$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29426  fi
29427
29428    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29429
29430  path="$BOOT_JDK"
29431  has_colon=`$ECHO $path | $GREP ^.:`
29432  new_path="$path"
29433  if test "x$has_colon" = x; then
29434    # Not in mixed or Windows style, start by that.
29435    new_path=`cmd //c echo $path`
29436  fi
29437
29438
29439  input_path="$new_path"
29440  # Check if we need to convert this using DOS-style short mode. If the path
29441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29442  # take no chances and rewrite it.
29443  # Note: m4 eats our [], so we need to use [ and ] instead.
29444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29445  if test "x$has_forbidden_chars" != x; then
29446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29448  fi
29449
29450
29451  windows_path="$new_path"
29452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29453    unix_path=`$CYGPATH -u "$windows_path"`
29454    new_path="$unix_path"
29455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29457    new_path="$unix_path"
29458  fi
29459
29460  if test "x$path" != "x$new_path"; then
29461    BOOT_JDK="$new_path"
29462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29463$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29464  fi
29465
29466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29468
29469    else
29470      # We're on a unix platform. Hooray! :)
29471      path="$BOOT_JDK"
29472      has_space=`$ECHO "$path" | $GREP " "`
29473      if test "x$has_space" != x; then
29474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29476        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29477      fi
29478
29479      # Use eval to expand a potential ~
29480      eval path="$path"
29481      if test ! -f "$path" && test ! -d "$path"; then
29482        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29483      fi
29484
29485      if test -d "$path"; then
29486        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29487      else
29488        dir="`$DIRNAME "$path"`"
29489        base="`$BASENAME "$path"`"
29490        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29491      fi
29492    fi
29493  fi
29494
29495            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29496$as_echo_n "checking for Boot JDK... " >&6; }
29497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29498$as_echo "$BOOT_JDK" >&6; }
29499            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29500$as_echo_n "checking Boot JDK version... " >&6; }
29501            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29502            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29503$as_echo "$BOOT_JDK_VERSION" >&6; }
29504          fi # end check jdk version
29505        fi # end check javac
29506      fi # end check java
29507    fi # end check boot jdk found
29508  fi
29509
29510    done
29511  fi
29512
29513
29514    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29515    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29516      # Do we have a bin/java?
29517      if test ! -x "$BOOT_JDK/bin/java"; then
29518        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29520        BOOT_JDK_FOUND=no
29521      else
29522        # Do we have a bin/javac?
29523        if test ! -x "$BOOT_JDK/bin/javac"; then
29524          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29526          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29527$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29528          BOOT_JDK_FOUND=no
29529        else
29530          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29531          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29532
29533          # Extra M4 quote needed to protect [] in grep expression.
29534          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29535          if test "x$FOUND_CORRECT_VERSION" = x; then
29536            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29537$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29538            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29539$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29540            BOOT_JDK_FOUND=no
29541          else
29542            # We're done! :-)
29543            BOOT_JDK_FOUND=yes
29544
29545  # Only process if variable expands to non-empty
29546
29547  if test "x$BOOT_JDK" != x; then
29548    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29549
29550  # Input might be given as Windows format, start by converting to
29551  # unix format.
29552  path="$BOOT_JDK"
29553  new_path=`$CYGPATH -u "$path"`
29554
29555  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29556  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29557  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29558  # "foo.exe" is OK but "foo" is an error.
29559  #
29560  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29561  # It is also a way to make sure we got the proper file name for the real test later on.
29562  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29563  if test "x$test_shortpath" = x; then
29564    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29565$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29566    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29567  fi
29568
29569  # Call helper function which possibly converts this using DOS-style short mode.
29570  # If so, the updated path is stored in $new_path.
29571
29572  input_path="$new_path"
29573  # Check if we need to convert this using DOS-style short mode. If the path
29574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29575  # take no chances and rewrite it.
29576  # Note: m4 eats our [], so we need to use [ and ] instead.
29577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29578  if test "x$has_forbidden_chars" != x; then
29579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29583      # Going to short mode and back again did indeed matter. Since short mode is
29584      # case insensitive, let's make it lowercase to improve readability.
29585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29586      # Now convert it back to Unix-style (cygpath)
29587      input_path=`$CYGPATH -u "$shortmode_path"`
29588      new_path="$input_path"
29589    fi
29590  fi
29591
29592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29593  if test "x$test_cygdrive_prefix" = x; then
29594    # As a simple fix, exclude /usr/bin since it's not a real path.
29595    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29597      # a path prefixed by /cygdrive for fixpath to work.
29598      new_path="$CYGWIN_ROOT_PATH$input_path"
29599    fi
29600  fi
29601
29602
29603  if test "x$path" != "x$new_path"; then
29604    BOOT_JDK="$new_path"
29605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29606$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29607  fi
29608
29609    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29610
29611  path="$BOOT_JDK"
29612  has_colon=`$ECHO $path | $GREP ^.:`
29613  new_path="$path"
29614  if test "x$has_colon" = x; then
29615    # Not in mixed or Windows style, start by that.
29616    new_path=`cmd //c echo $path`
29617  fi
29618
29619
29620  input_path="$new_path"
29621  # Check if we need to convert this using DOS-style short mode. If the path
29622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29623  # take no chances and rewrite it.
29624  # Note: m4 eats our [], so we need to use [ and ] instead.
29625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29626  if test "x$has_forbidden_chars" != x; then
29627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29629  fi
29630
29631
29632  windows_path="$new_path"
29633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29634    unix_path=`$CYGPATH -u "$windows_path"`
29635    new_path="$unix_path"
29636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29638    new_path="$unix_path"
29639  fi
29640
29641  if test "x$path" != "x$new_path"; then
29642    BOOT_JDK="$new_path"
29643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29644$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29645  fi
29646
29647  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29648  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29649
29650    else
29651      # We're on a unix platform. Hooray! :)
29652      path="$BOOT_JDK"
29653      has_space=`$ECHO "$path" | $GREP " "`
29654      if test "x$has_space" != x; then
29655        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29656$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29657        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29658      fi
29659
29660      # Use eval to expand a potential ~
29661      eval path="$path"
29662      if test ! -f "$path" && test ! -d "$path"; then
29663        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29664      fi
29665
29666      if test -d "$path"; then
29667        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29668      else
29669        dir="`$DIRNAME "$path"`"
29670        base="`$BASENAME "$path"`"
29671        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29672      fi
29673    fi
29674  fi
29675
29676            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29677$as_echo_n "checking for Boot JDK... " >&6; }
29678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29679$as_echo "$BOOT_JDK" >&6; }
29680            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29681$as_echo_n "checking Boot JDK version... " >&6; }
29682            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29683            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29684$as_echo "$BOOT_JDK_VERSION" >&6; }
29685          fi # end check jdk version
29686        fi # end check javac
29687      fi # end check java
29688    fi # end check boot jdk found
29689  fi
29690
29691
29692  if test "x$BOOT_JDK_FOUND" = xno; then
29693    # Now execute the test
29694
29695  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29696  BOOT_JDK_SUFFIX="/Contents/Home"
29697  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29698  if test "x$ALL_JDKS_FOUND" != x; then
29699    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29700
29701  if test "x$BOOT_JDK_FOUND" = xno; then
29702    # Now execute the test
29703
29704        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29705        if test -d "$BOOT_JDK"; then
29706          BOOT_JDK_FOUND=maybe
29707          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29708$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29709        fi
29710
29711
29712    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29713    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29714      # Do we have a bin/java?
29715      if test ! -x "$BOOT_JDK/bin/java"; then
29716        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29718        BOOT_JDK_FOUND=no
29719      else
29720        # Do we have a bin/javac?
29721        if test ! -x "$BOOT_JDK/bin/javac"; then
29722          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29724          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29725$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29726          BOOT_JDK_FOUND=no
29727        else
29728          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29729          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29730
29731          # Extra M4 quote needed to protect [] in grep expression.
29732          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29733          if test "x$FOUND_CORRECT_VERSION" = x; then
29734            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29736            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29737$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29738            BOOT_JDK_FOUND=no
29739          else
29740            # We're done! :-)
29741            BOOT_JDK_FOUND=yes
29742
29743  # Only process if variable expands to non-empty
29744
29745  if test "x$BOOT_JDK" != x; then
29746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29747
29748  # Input might be given as Windows format, start by converting to
29749  # unix format.
29750  path="$BOOT_JDK"
29751  new_path=`$CYGPATH -u "$path"`
29752
29753  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29754  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29755  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29756  # "foo.exe" is OK but "foo" is an error.
29757  #
29758  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29759  # It is also a way to make sure we got the proper file name for the real test later on.
29760  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29761  if test "x$test_shortpath" = x; then
29762    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29763$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29764    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29765  fi
29766
29767  # Call helper function which possibly converts this using DOS-style short mode.
29768  # If so, the updated path is stored in $new_path.
29769
29770  input_path="$new_path"
29771  # Check if we need to convert this using DOS-style short mode. If the path
29772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29773  # take no chances and rewrite it.
29774  # Note: m4 eats our [], so we need to use [ and ] instead.
29775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29776  if test "x$has_forbidden_chars" != x; then
29777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29778    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29779    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29780    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29781      # Going to short mode and back again did indeed matter. Since short mode is
29782      # case insensitive, let's make it lowercase to improve readability.
29783      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29784      # Now convert it back to Unix-style (cygpath)
29785      input_path=`$CYGPATH -u "$shortmode_path"`
29786      new_path="$input_path"
29787    fi
29788  fi
29789
29790  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29791  if test "x$test_cygdrive_prefix" = x; then
29792    # As a simple fix, exclude /usr/bin since it's not a real path.
29793    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29794      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29795      # a path prefixed by /cygdrive for fixpath to work.
29796      new_path="$CYGWIN_ROOT_PATH$input_path"
29797    fi
29798  fi
29799
29800
29801  if test "x$path" != "x$new_path"; then
29802    BOOT_JDK="$new_path"
29803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29804$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29805  fi
29806
29807    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29808
29809  path="$BOOT_JDK"
29810  has_colon=`$ECHO $path | $GREP ^.:`
29811  new_path="$path"
29812  if test "x$has_colon" = x; then
29813    # Not in mixed or Windows style, start by that.
29814    new_path=`cmd //c echo $path`
29815  fi
29816
29817
29818  input_path="$new_path"
29819  # Check if we need to convert this using DOS-style short mode. If the path
29820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29821  # take no chances and rewrite it.
29822  # Note: m4 eats our [], so we need to use [ and ] instead.
29823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29824  if test "x$has_forbidden_chars" != x; then
29825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29826    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29827  fi
29828
29829
29830  windows_path="$new_path"
29831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29832    unix_path=`$CYGPATH -u "$windows_path"`
29833    new_path="$unix_path"
29834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29836    new_path="$unix_path"
29837  fi
29838
29839  if test "x$path" != "x$new_path"; then
29840    BOOT_JDK="$new_path"
29841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29842$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29843  fi
29844
29845  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29846  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29847
29848    else
29849      # We're on a unix platform. Hooray! :)
29850      path="$BOOT_JDK"
29851      has_space=`$ECHO "$path" | $GREP " "`
29852      if test "x$has_space" != x; then
29853        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29854$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29855        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29856      fi
29857
29858      # Use eval to expand a potential ~
29859      eval path="$path"
29860      if test ! -f "$path" && test ! -d "$path"; then
29861        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29862      fi
29863
29864      if test -d "$path"; then
29865        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29866      else
29867        dir="`$DIRNAME "$path"`"
29868        base="`$BASENAME "$path"`"
29869        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29870      fi
29871    fi
29872  fi
29873
29874            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29875$as_echo_n "checking for Boot JDK... " >&6; }
29876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29877$as_echo "$BOOT_JDK" >&6; }
29878            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29879$as_echo_n "checking Boot JDK version... " >&6; }
29880            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29881            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29882$as_echo "$BOOT_JDK_VERSION" >&6; }
29883          fi # end check jdk version
29884        fi # end check javac
29885      fi # end check java
29886    fi # end check boot jdk found
29887  fi
29888
29889    done
29890  fi
29891
29892
29893    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29894    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29895      # Do we have a bin/java?
29896      if test ! -x "$BOOT_JDK/bin/java"; then
29897        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29899        BOOT_JDK_FOUND=no
29900      else
29901        # Do we have a bin/javac?
29902        if test ! -x "$BOOT_JDK/bin/javac"; then
29903          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29905          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29906$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29907          BOOT_JDK_FOUND=no
29908        else
29909          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29910          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29911
29912          # Extra M4 quote needed to protect [] in grep expression.
29913          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29914          if test "x$FOUND_CORRECT_VERSION" = x; then
29915            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29917            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29918$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29919            BOOT_JDK_FOUND=no
29920          else
29921            # We're done! :-)
29922            BOOT_JDK_FOUND=yes
29923
29924  # Only process if variable expands to non-empty
29925
29926  if test "x$BOOT_JDK" != x; then
29927    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29928
29929  # Input might be given as Windows format, start by converting to
29930  # unix format.
29931  path="$BOOT_JDK"
29932  new_path=`$CYGPATH -u "$path"`
29933
29934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29937  # "foo.exe" is OK but "foo" is an error.
29938  #
29939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29940  # It is also a way to make sure we got the proper file name for the real test later on.
29941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29942  if test "x$test_shortpath" = x; then
29943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29945    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29946  fi
29947
29948  # Call helper function which possibly converts this using DOS-style short mode.
29949  # If so, the updated path is stored in $new_path.
29950
29951  input_path="$new_path"
29952  # Check if we need to convert this using DOS-style short mode. If the path
29953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29954  # take no chances and rewrite it.
29955  # Note: m4 eats our [], so we need to use [ and ] instead.
29956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29957  if test "x$has_forbidden_chars" != x; then
29958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29962      # Going to short mode and back again did indeed matter. Since short mode is
29963      # case insensitive, let's make it lowercase to improve readability.
29964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29965      # Now convert it back to Unix-style (cygpath)
29966      input_path=`$CYGPATH -u "$shortmode_path"`
29967      new_path="$input_path"
29968    fi
29969  fi
29970
29971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29972  if test "x$test_cygdrive_prefix" = x; then
29973    # As a simple fix, exclude /usr/bin since it's not a real path.
29974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29976      # a path prefixed by /cygdrive for fixpath to work.
29977      new_path="$CYGWIN_ROOT_PATH$input_path"
29978    fi
29979  fi
29980
29981
29982  if test "x$path" != "x$new_path"; then
29983    BOOT_JDK="$new_path"
29984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29985$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29986  fi
29987
29988    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29989
29990  path="$BOOT_JDK"
29991  has_colon=`$ECHO $path | $GREP ^.:`
29992  new_path="$path"
29993  if test "x$has_colon" = x; then
29994    # Not in mixed or Windows style, start by that.
29995    new_path=`cmd //c echo $path`
29996  fi
29997
29998
29999  input_path="$new_path"
30000  # Check if we need to convert this using DOS-style short mode. If the path
30001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30002  # take no chances and rewrite it.
30003  # Note: m4 eats our [], so we need to use [ and ] instead.
30004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30005  if test "x$has_forbidden_chars" != x; then
30006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30008  fi
30009
30010
30011  windows_path="$new_path"
30012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30013    unix_path=`$CYGPATH -u "$windows_path"`
30014    new_path="$unix_path"
30015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30017    new_path="$unix_path"
30018  fi
30019
30020  if test "x$path" != "x$new_path"; then
30021    BOOT_JDK="$new_path"
30022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30023$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30024  fi
30025
30026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30028
30029    else
30030      # We're on a unix platform. Hooray! :)
30031      path="$BOOT_JDK"
30032      has_space=`$ECHO "$path" | $GREP " "`
30033      if test "x$has_space" != x; then
30034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30035$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30036        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30037      fi
30038
30039      # Use eval to expand a potential ~
30040      eval path="$path"
30041      if test ! -f "$path" && test ! -d "$path"; then
30042        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30043      fi
30044
30045      if test -d "$path"; then
30046        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30047      else
30048        dir="`$DIRNAME "$path"`"
30049        base="`$BASENAME "$path"`"
30050        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30051      fi
30052    fi
30053  fi
30054
30055            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30056$as_echo_n "checking for Boot JDK... " >&6; }
30057            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30058$as_echo "$BOOT_JDK" >&6; }
30059            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30060$as_echo_n "checking Boot JDK version... " >&6; }
30061            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30062            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30063$as_echo "$BOOT_JDK_VERSION" >&6; }
30064          fi # end check jdk version
30065        fi # end check javac
30066      fi # end check java
30067    fi # end check boot jdk found
30068  fi
30069
30070  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
30071
30072  if test "x$BOOT_JDK_FOUND" = xno; then
30073    # Now execute the test
30074
30075  BOOT_JDK_PREFIX="/usr/lib/jvm"
30076  BOOT_JDK_SUFFIX=""
30077  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
30078  if test "x$ALL_JDKS_FOUND" != x; then
30079    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
30080
30081  if test "x$BOOT_JDK_FOUND" = xno; then
30082    # Now execute the test
30083
30084        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
30085        if test -d "$BOOT_JDK"; then
30086          BOOT_JDK_FOUND=maybe
30087          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
30088$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
30089        fi
30090
30091
30092    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30093    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30094      # Do we have a bin/java?
30095      if test ! -x "$BOOT_JDK/bin/java"; then
30096        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30097$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30098        BOOT_JDK_FOUND=no
30099      else
30100        # Do we have a bin/javac?
30101        if test ! -x "$BOOT_JDK/bin/javac"; then
30102          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30104          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30105$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30106          BOOT_JDK_FOUND=no
30107        else
30108          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30109          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30110
30111          # Extra M4 quote needed to protect [] in grep expression.
30112          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30113          if test "x$FOUND_CORRECT_VERSION" = x; then
30114            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30116            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30117$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30118            BOOT_JDK_FOUND=no
30119          else
30120            # We're done! :-)
30121            BOOT_JDK_FOUND=yes
30122
30123  # Only process if variable expands to non-empty
30124
30125  if test "x$BOOT_JDK" != x; then
30126    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30127
30128  # Input might be given as Windows format, start by converting to
30129  # unix format.
30130  path="$BOOT_JDK"
30131  new_path=`$CYGPATH -u "$path"`
30132
30133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30136  # "foo.exe" is OK but "foo" is an error.
30137  #
30138  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30139  # It is also a way to make sure we got the proper file name for the real test later on.
30140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30141  if test "x$test_shortpath" = x; then
30142    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30143$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30144    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30145  fi
30146
30147  # Call helper function which possibly converts this using DOS-style short mode.
30148  # If so, the updated path is stored in $new_path.
30149
30150  input_path="$new_path"
30151  # Check if we need to convert this using DOS-style short mode. If the path
30152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30153  # take no chances and rewrite it.
30154  # Note: m4 eats our [], so we need to use [ and ] instead.
30155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30156  if test "x$has_forbidden_chars" != x; then
30157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30158    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30159    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30160    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30161      # Going to short mode and back again did indeed matter. Since short mode is
30162      # case insensitive, let's make it lowercase to improve readability.
30163      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30164      # Now convert it back to Unix-style (cygpath)
30165      input_path=`$CYGPATH -u "$shortmode_path"`
30166      new_path="$input_path"
30167    fi
30168  fi
30169
30170  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30171  if test "x$test_cygdrive_prefix" = x; then
30172    # As a simple fix, exclude /usr/bin since it's not a real path.
30173    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30174      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30175      # a path prefixed by /cygdrive for fixpath to work.
30176      new_path="$CYGWIN_ROOT_PATH$input_path"
30177    fi
30178  fi
30179
30180
30181  if test "x$path" != "x$new_path"; then
30182    BOOT_JDK="$new_path"
30183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30184$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30185  fi
30186
30187    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30188
30189  path="$BOOT_JDK"
30190  has_colon=`$ECHO $path | $GREP ^.:`
30191  new_path="$path"
30192  if test "x$has_colon" = x; then
30193    # Not in mixed or Windows style, start by that.
30194    new_path=`cmd //c echo $path`
30195  fi
30196
30197
30198  input_path="$new_path"
30199  # Check if we need to convert this using DOS-style short mode. If the path
30200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30201  # take no chances and rewrite it.
30202  # Note: m4 eats our [], so we need to use [ and ] instead.
30203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30204  if test "x$has_forbidden_chars" != x; then
30205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30207  fi
30208
30209
30210  windows_path="$new_path"
30211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30212    unix_path=`$CYGPATH -u "$windows_path"`
30213    new_path="$unix_path"
30214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30216    new_path="$unix_path"
30217  fi
30218
30219  if test "x$path" != "x$new_path"; then
30220    BOOT_JDK="$new_path"
30221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30223  fi
30224
30225  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30226  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30227
30228    else
30229      # We're on a unix platform. Hooray! :)
30230      path="$BOOT_JDK"
30231      has_space=`$ECHO "$path" | $GREP " "`
30232      if test "x$has_space" != x; then
30233        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30234$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30235        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30236      fi
30237
30238      # Use eval to expand a potential ~
30239      eval path="$path"
30240      if test ! -f "$path" && test ! -d "$path"; then
30241        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30242      fi
30243
30244      if test -d "$path"; then
30245        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30246      else
30247        dir="`$DIRNAME "$path"`"
30248        base="`$BASENAME "$path"`"
30249        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30250      fi
30251    fi
30252  fi
30253
30254            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30255$as_echo_n "checking for Boot JDK... " >&6; }
30256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30257$as_echo "$BOOT_JDK" >&6; }
30258            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30259$as_echo_n "checking Boot JDK version... " >&6; }
30260            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30261            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30262$as_echo "$BOOT_JDK_VERSION" >&6; }
30263          fi # end check jdk version
30264        fi # end check javac
30265      fi # end check java
30266    fi # end check boot jdk found
30267  fi
30268
30269    done
30270  fi
30271
30272
30273    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30274    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30275      # Do we have a bin/java?
30276      if test ! -x "$BOOT_JDK/bin/java"; then
30277        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30279        BOOT_JDK_FOUND=no
30280      else
30281        # Do we have a bin/javac?
30282        if test ! -x "$BOOT_JDK/bin/javac"; then
30283          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30284$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30285          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30286$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30287          BOOT_JDK_FOUND=no
30288        else
30289          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30290          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30291
30292          # Extra M4 quote needed to protect [] in grep expression.
30293          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30294          if test "x$FOUND_CORRECT_VERSION" = x; then
30295            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30297            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30298$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30299            BOOT_JDK_FOUND=no
30300          else
30301            # We're done! :-)
30302            BOOT_JDK_FOUND=yes
30303
30304  # Only process if variable expands to non-empty
30305
30306  if test "x$BOOT_JDK" != x; then
30307    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30308
30309  # Input might be given as Windows format, start by converting to
30310  # unix format.
30311  path="$BOOT_JDK"
30312  new_path=`$CYGPATH -u "$path"`
30313
30314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30317  # "foo.exe" is OK but "foo" is an error.
30318  #
30319  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30320  # It is also a way to make sure we got the proper file name for the real test later on.
30321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30322  if test "x$test_shortpath" = x; then
30323    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30324$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30325    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30326  fi
30327
30328  # Call helper function which possibly converts this using DOS-style short mode.
30329  # If so, the updated path is stored in $new_path.
30330
30331  input_path="$new_path"
30332  # Check if we need to convert this using DOS-style short mode. If the path
30333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30334  # take no chances and rewrite it.
30335  # Note: m4 eats our [], so we need to use [ and ] instead.
30336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30337  if test "x$has_forbidden_chars" != x; then
30338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30342      # Going to short mode and back again did indeed matter. Since short mode is
30343      # case insensitive, let's make it lowercase to improve readability.
30344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30345      # Now convert it back to Unix-style (cygpath)
30346      input_path=`$CYGPATH -u "$shortmode_path"`
30347      new_path="$input_path"
30348    fi
30349  fi
30350
30351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30352  if test "x$test_cygdrive_prefix" = x; then
30353    # As a simple fix, exclude /usr/bin since it's not a real path.
30354    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30356      # a path prefixed by /cygdrive for fixpath to work.
30357      new_path="$CYGWIN_ROOT_PATH$input_path"
30358    fi
30359  fi
30360
30361
30362  if test "x$path" != "x$new_path"; then
30363    BOOT_JDK="$new_path"
30364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30365$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30366  fi
30367
30368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30369
30370  path="$BOOT_JDK"
30371  has_colon=`$ECHO $path | $GREP ^.:`
30372  new_path="$path"
30373  if test "x$has_colon" = x; then
30374    # Not in mixed or Windows style, start by that.
30375    new_path=`cmd //c echo $path`
30376  fi
30377
30378
30379  input_path="$new_path"
30380  # Check if we need to convert this using DOS-style short mode. If the path
30381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30382  # take no chances and rewrite it.
30383  # Note: m4 eats our [], so we need to use [ and ] instead.
30384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30385  if test "x$has_forbidden_chars" != x; then
30386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30388  fi
30389
30390
30391  windows_path="$new_path"
30392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30393    unix_path=`$CYGPATH -u "$windows_path"`
30394    new_path="$unix_path"
30395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30397    new_path="$unix_path"
30398  fi
30399
30400  if test "x$path" != "x$new_path"; then
30401    BOOT_JDK="$new_path"
30402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30403$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30404  fi
30405
30406  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30407  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30408
30409    else
30410      # We're on a unix platform. Hooray! :)
30411      path="$BOOT_JDK"
30412      has_space=`$ECHO "$path" | $GREP " "`
30413      if test "x$has_space" != x; then
30414        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30415$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30416        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30417      fi
30418
30419      # Use eval to expand a potential ~
30420      eval path="$path"
30421      if test ! -f "$path" && test ! -d "$path"; then
30422        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30423      fi
30424
30425      if test -d "$path"; then
30426        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30427      else
30428        dir="`$DIRNAME "$path"`"
30429        base="`$BASENAME "$path"`"
30430        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30431      fi
30432    fi
30433  fi
30434
30435            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30436$as_echo_n "checking for Boot JDK... " >&6; }
30437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30438$as_echo "$BOOT_JDK" >&6; }
30439            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30440$as_echo_n "checking Boot JDK version... " >&6; }
30441            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30442            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30443$as_echo "$BOOT_JDK_VERSION" >&6; }
30444          fi # end check jdk version
30445        fi # end check javac
30446      fi # end check java
30447    fi # end check boot jdk found
30448  fi
30449
30450  fi
30451
30452
30453    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30454    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30455      # Do we have a bin/java?
30456      if test ! -x "$BOOT_JDK/bin/java"; then
30457        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30459        BOOT_JDK_FOUND=no
30460      else
30461        # Do we have a bin/javac?
30462        if test ! -x "$BOOT_JDK/bin/javac"; then
30463          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30464$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30465          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30466$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30467          BOOT_JDK_FOUND=no
30468        else
30469          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30470          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30471
30472          # Extra M4 quote needed to protect [] in grep expression.
30473          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30474          if test "x$FOUND_CORRECT_VERSION" = x; then
30475            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30476$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30477            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30478$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30479            BOOT_JDK_FOUND=no
30480          else
30481            # We're done! :-)
30482            BOOT_JDK_FOUND=yes
30483
30484  # Only process if variable expands to non-empty
30485
30486  if test "x$BOOT_JDK" != x; then
30487    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30488
30489  # Input might be given as Windows format, start by converting to
30490  # unix format.
30491  path="$BOOT_JDK"
30492  new_path=`$CYGPATH -u "$path"`
30493
30494  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30495  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30496  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30497  # "foo.exe" is OK but "foo" is an error.
30498  #
30499  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30500  # It is also a way to make sure we got the proper file name for the real test later on.
30501  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30502  if test "x$test_shortpath" = x; then
30503    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30504$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30505    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30506  fi
30507
30508  # Call helper function which possibly converts this using DOS-style short mode.
30509  # If so, the updated path is stored in $new_path.
30510
30511  input_path="$new_path"
30512  # Check if we need to convert this using DOS-style short mode. If the path
30513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30514  # take no chances and rewrite it.
30515  # Note: m4 eats our [], so we need to use [ and ] instead.
30516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30517  if test "x$has_forbidden_chars" != x; then
30518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30519    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30520    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30521    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30522      # Going to short mode and back again did indeed matter. Since short mode is
30523      # case insensitive, let's make it lowercase to improve readability.
30524      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30525      # Now convert it back to Unix-style (cygpath)
30526      input_path=`$CYGPATH -u "$shortmode_path"`
30527      new_path="$input_path"
30528    fi
30529  fi
30530
30531  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30532  if test "x$test_cygdrive_prefix" = x; then
30533    # As a simple fix, exclude /usr/bin since it's not a real path.
30534    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30535      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30536      # a path prefixed by /cygdrive for fixpath to work.
30537      new_path="$CYGWIN_ROOT_PATH$input_path"
30538    fi
30539  fi
30540
30541
30542  if test "x$path" != "x$new_path"; then
30543    BOOT_JDK="$new_path"
30544    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30545$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30546  fi
30547
30548    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30549
30550  path="$BOOT_JDK"
30551  has_colon=`$ECHO $path | $GREP ^.:`
30552  new_path="$path"
30553  if test "x$has_colon" = x; then
30554    # Not in mixed or Windows style, start by that.
30555    new_path=`cmd //c echo $path`
30556  fi
30557
30558
30559  input_path="$new_path"
30560  # Check if we need to convert this using DOS-style short mode. If the path
30561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30562  # take no chances and rewrite it.
30563  # Note: m4 eats our [], so we need to use [ and ] instead.
30564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30565  if test "x$has_forbidden_chars" != x; then
30566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30567    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30568  fi
30569
30570
30571  windows_path="$new_path"
30572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30573    unix_path=`$CYGPATH -u "$windows_path"`
30574    new_path="$unix_path"
30575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30577    new_path="$unix_path"
30578  fi
30579
30580  if test "x$path" != "x$new_path"; then
30581    BOOT_JDK="$new_path"
30582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30583$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30584  fi
30585
30586  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30587  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30588
30589    else
30590      # We're on a unix platform. Hooray! :)
30591      path="$BOOT_JDK"
30592      has_space=`$ECHO "$path" | $GREP " "`
30593      if test "x$has_space" != x; then
30594        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30595$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30596        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30597      fi
30598
30599      # Use eval to expand a potential ~
30600      eval path="$path"
30601      if test ! -f "$path" && test ! -d "$path"; then
30602        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30603      fi
30604
30605      if test -d "$path"; then
30606        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30607      else
30608        dir="`$DIRNAME "$path"`"
30609        base="`$BASENAME "$path"`"
30610        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30611      fi
30612    fi
30613  fi
30614
30615            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30616$as_echo_n "checking for Boot JDK... " >&6; }
30617            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30618$as_echo "$BOOT_JDK" >&6; }
30619            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30620$as_echo_n "checking Boot JDK version... " >&6; }
30621            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30622            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30623$as_echo "$BOOT_JDK_VERSION" >&6; }
30624          fi # end check jdk version
30625        fi # end check javac
30626      fi # end check java
30627    fi # end check boot jdk found
30628  fi
30629
30630
30631  # If we haven't found anything yet, we've truly lost. Give up.
30632  if test "x$BOOT_JDK_FOUND" = xno; then
30633
30634  # Print a helpful message on how to acquire the necessary build dependency.
30635  # openjdk is the help tag: freetype, cups, alsa etc
30636  MISSING_DEPENDENCY=openjdk
30637
30638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30639    cygwin_help $MISSING_DEPENDENCY
30640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30641    msys_help $MISSING_DEPENDENCY
30642  else
30643    PKGHANDLER_COMMAND=
30644
30645    case $PKGHANDLER in
30646      apt-get)
30647        apt_help     $MISSING_DEPENDENCY ;;
30648      yum)
30649        yum_help     $MISSING_DEPENDENCY ;;
30650      brew)
30651        brew_help    $MISSING_DEPENDENCY ;;
30652      port)
30653        port_help    $MISSING_DEPENDENCY ;;
30654      pkgutil)
30655        pkgutil_help $MISSING_DEPENDENCY ;;
30656      pkgadd)
30657        pkgadd_help  $MISSING_DEPENDENCY ;;
30658    esac
30659
30660    if test "x$PKGHANDLER_COMMAND" != x; then
30661      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30662    fi
30663  fi
30664
30665    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30666$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30667    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30668$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30669    as_fn_error $? "Cannot continue" "$LINENO" 5
30670  fi
30671
30672
30673
30674  # Setup tools from the Boot JDK.
30675
30676  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30677
30678  # Publish this variable in the help.
30679
30680
30681  if [ -z "${JAVA+x}" ]; then
30682    # The variable is not set by user, try to locate tool using the code snippet
30683
30684      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30685$as_echo_n "checking for java in Boot JDK... " >&6; }
30686      JAVA=$BOOT_JDK/bin/java
30687      if test ! -x $JAVA; then
30688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30689$as_echo "not found" >&6; }
30690        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30691$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30692        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30693      fi
30694      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30695$as_echo "ok" >&6; }
30696
30697
30698  else
30699    # The variable is set, but is it from the command line or the environment?
30700
30701    # Try to remove the string !JAVA! from our list.
30702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30704      # If it failed, the variable was not from the command line. Ignore it,
30705      # but warn the user (except for BASH, which is always set by the calling BASH).
30706      if test "xJAVA" != xBASH; then
30707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30708$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30709      fi
30710      # Try to locate tool using the code snippet
30711
30712      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30713$as_echo_n "checking for java in Boot JDK... " >&6; }
30714      JAVA=$BOOT_JDK/bin/java
30715      if test ! -x $JAVA; then
30716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30717$as_echo "not found" >&6; }
30718        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30719$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30720        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30721      fi
30722      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30723$as_echo "ok" >&6; }
30724
30725
30726    else
30727      # If it succeeded, then it was overridden by the user. We will use it
30728      # for the tool.
30729
30730      # First remove it from the list of overridden variables, so we can test
30731      # for unknown variables in the end.
30732      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30733
30734      # Check if we try to supply an empty value
30735      if test "x$JAVA" = x; then
30736        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30737$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30738        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30739$as_echo_n "checking for JAVA... " >&6; }
30740        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30741$as_echo "disabled" >&6; }
30742      else
30743        # Check if the provided tool contains a complete path.
30744        tool_specified="$JAVA"
30745        tool_basename="${tool_specified##*/}"
30746        if test "x$tool_basename" = "x$tool_specified"; then
30747          # A command without a complete path is provided, search $PATH.
30748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30749$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30750          # Extract the first word of "$tool_basename", so it can be a program name with args.
30751set dummy $tool_basename; ac_word=$2
30752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30753$as_echo_n "checking for $ac_word... " >&6; }
30754if ${ac_cv_path_JAVA+:} false; then :
30755  $as_echo_n "(cached) " >&6
30756else
30757  case $JAVA in
30758  [\\/]* | ?:[\\/]*)
30759  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30760  ;;
30761  *)
30762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30763for as_dir in $PATH
30764do
30765  IFS=$as_save_IFS
30766  test -z "$as_dir" && as_dir=.
30767    for ac_exec_ext in '' $ac_executable_extensions; do
30768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30769    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30771    break 2
30772  fi
30773done
30774  done
30775IFS=$as_save_IFS
30776
30777  ;;
30778esac
30779fi
30780JAVA=$ac_cv_path_JAVA
30781if test -n "$JAVA"; then
30782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30783$as_echo "$JAVA" >&6; }
30784else
30785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30786$as_echo "no" >&6; }
30787fi
30788
30789
30790          if test "x$JAVA" = x; then
30791            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30792          fi
30793        else
30794          # Otherwise we believe it is a complete path. Use it as it is.
30795          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30796$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30797          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30798$as_echo_n "checking for JAVA... " >&6; }
30799          if test ! -x "$tool_specified"; then
30800            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30801$as_echo "not found" >&6; }
30802            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30803          fi
30804          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30805$as_echo "$tool_specified" >&6; }
30806        fi
30807      fi
30808    fi
30809
30810  fi
30811
30812
30813
30814  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30815
30816  # Publish this variable in the help.
30817
30818
30819  if [ -z "${JAVAC+x}" ]; then
30820    # The variable is not set by user, try to locate tool using the code snippet
30821
30822      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30823$as_echo_n "checking for javac in Boot JDK... " >&6; }
30824      JAVAC=$BOOT_JDK/bin/javac
30825      if test ! -x $JAVAC; then
30826        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30827$as_echo "not found" >&6; }
30828        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30829$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30830        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30831      fi
30832      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30833$as_echo "ok" >&6; }
30834
30835
30836  else
30837    # The variable is set, but is it from the command line or the environment?
30838
30839    # Try to remove the string !JAVAC! from our list.
30840    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30841    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30842      # If it failed, the variable was not from the command line. Ignore it,
30843      # but warn the user (except for BASH, which is always set by the calling BASH).
30844      if test "xJAVAC" != xBASH; then
30845        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30846$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30847      fi
30848      # Try to locate tool using the code snippet
30849
30850      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30851$as_echo_n "checking for javac in Boot JDK... " >&6; }
30852      JAVAC=$BOOT_JDK/bin/javac
30853      if test ! -x $JAVAC; then
30854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30855$as_echo "not found" >&6; }
30856        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30857$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30858        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30859      fi
30860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30861$as_echo "ok" >&6; }
30862
30863
30864    else
30865      # If it succeeded, then it was overridden by the user. We will use it
30866      # for the tool.
30867
30868      # First remove it from the list of overridden variables, so we can test
30869      # for unknown variables in the end.
30870      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30871
30872      # Check if we try to supply an empty value
30873      if test "x$JAVAC" = x; then
30874        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30875$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30877$as_echo_n "checking for JAVAC... " >&6; }
30878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30879$as_echo "disabled" >&6; }
30880      else
30881        # Check if the provided tool contains a complete path.
30882        tool_specified="$JAVAC"
30883        tool_basename="${tool_specified##*/}"
30884        if test "x$tool_basename" = "x$tool_specified"; then
30885          # A command without a complete path is provided, search $PATH.
30886          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30887$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30888          # Extract the first word of "$tool_basename", so it can be a program name with args.
30889set dummy $tool_basename; ac_word=$2
30890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30891$as_echo_n "checking for $ac_word... " >&6; }
30892if ${ac_cv_path_JAVAC+:} false; then :
30893  $as_echo_n "(cached) " >&6
30894else
30895  case $JAVAC in
30896  [\\/]* | ?:[\\/]*)
30897  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30898  ;;
30899  *)
30900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30901for as_dir in $PATH
30902do
30903  IFS=$as_save_IFS
30904  test -z "$as_dir" && as_dir=.
30905    for ac_exec_ext in '' $ac_executable_extensions; do
30906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30907    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30909    break 2
30910  fi
30911done
30912  done
30913IFS=$as_save_IFS
30914
30915  ;;
30916esac
30917fi
30918JAVAC=$ac_cv_path_JAVAC
30919if test -n "$JAVAC"; then
30920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30921$as_echo "$JAVAC" >&6; }
30922else
30923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30924$as_echo "no" >&6; }
30925fi
30926
30927
30928          if test "x$JAVAC" = x; then
30929            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30930          fi
30931        else
30932          # Otherwise we believe it is a complete path. Use it as it is.
30933          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30934$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30935          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30936$as_echo_n "checking for JAVAC... " >&6; }
30937          if test ! -x "$tool_specified"; then
30938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30939$as_echo "not found" >&6; }
30940            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30941          fi
30942          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30943$as_echo "$tool_specified" >&6; }
30944        fi
30945      fi
30946    fi
30947
30948  fi
30949
30950
30951
30952  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30953
30954  # Publish this variable in the help.
30955
30956
30957  if [ -z "${JAVAH+x}" ]; then
30958    # The variable is not set by user, try to locate tool using the code snippet
30959
30960      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30961$as_echo_n "checking for javah in Boot JDK... " >&6; }
30962      JAVAH=$BOOT_JDK/bin/javah
30963      if test ! -x $JAVAH; then
30964        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30965$as_echo "not found" >&6; }
30966        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30967$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30968        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30969      fi
30970      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30971$as_echo "ok" >&6; }
30972
30973
30974  else
30975    # The variable is set, but is it from the command line or the environment?
30976
30977    # Try to remove the string !JAVAH! from our list.
30978    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30979    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30980      # If it failed, the variable was not from the command line. Ignore it,
30981      # but warn the user (except for BASH, which is always set by the calling BASH).
30982      if test "xJAVAH" != xBASH; then
30983        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30984$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30985      fi
30986      # Try to locate tool using the code snippet
30987
30988      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30989$as_echo_n "checking for javah in Boot JDK... " >&6; }
30990      JAVAH=$BOOT_JDK/bin/javah
30991      if test ! -x $JAVAH; then
30992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30993$as_echo "not found" >&6; }
30994        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30995$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30996        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30997      fi
30998      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30999$as_echo "ok" >&6; }
31000
31001
31002    else
31003      # If it succeeded, then it was overridden by the user. We will use it
31004      # for the tool.
31005
31006      # First remove it from the list of overridden variables, so we can test
31007      # for unknown variables in the end.
31008      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31009
31010      # Check if we try to supply an empty value
31011      if test "x$JAVAH" = x; then
31012        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
31013$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
31014        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31015$as_echo_n "checking for JAVAH... " >&6; }
31016        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31017$as_echo "disabled" >&6; }
31018      else
31019        # Check if the provided tool contains a complete path.
31020        tool_specified="$JAVAH"
31021        tool_basename="${tool_specified##*/}"
31022        if test "x$tool_basename" = "x$tool_specified"; then
31023          # A command without a complete path is provided, search $PATH.
31024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
31025$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
31026          # Extract the first word of "$tool_basename", so it can be a program name with args.
31027set dummy $tool_basename; ac_word=$2
31028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31029$as_echo_n "checking for $ac_word... " >&6; }
31030if ${ac_cv_path_JAVAH+:} false; then :
31031  $as_echo_n "(cached) " >&6
31032else
31033  case $JAVAH in
31034  [\\/]* | ?:[\\/]*)
31035  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
31036  ;;
31037  *)
31038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31039for as_dir in $PATH
31040do
31041  IFS=$as_save_IFS
31042  test -z "$as_dir" && as_dir=.
31043    for ac_exec_ext in '' $ac_executable_extensions; do
31044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31045    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
31046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31047    break 2
31048  fi
31049done
31050  done
31051IFS=$as_save_IFS
31052
31053  ;;
31054esac
31055fi
31056JAVAH=$ac_cv_path_JAVAH
31057if test -n "$JAVAH"; then
31058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
31059$as_echo "$JAVAH" >&6; }
31060else
31061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31062$as_echo "no" >&6; }
31063fi
31064
31065
31066          if test "x$JAVAH" = x; then
31067            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31068          fi
31069        else
31070          # Otherwise we believe it is a complete path. Use it as it is.
31071          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
31072$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
31073          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31074$as_echo_n "checking for JAVAH... " >&6; }
31075          if test ! -x "$tool_specified"; then
31076            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31077$as_echo "not found" >&6; }
31078            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
31079          fi
31080          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31081$as_echo "$tool_specified" >&6; }
31082        fi
31083      fi
31084    fi
31085
31086  fi
31087
31088
31089
31090  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31091
31092  # Publish this variable in the help.
31093
31094
31095  if [ -z "${JAR+x}" ]; then
31096    # The variable is not set by user, try to locate tool using the code snippet
31097
31098      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31099$as_echo_n "checking for jar in Boot JDK... " >&6; }
31100      JAR=$BOOT_JDK/bin/jar
31101      if test ! -x $JAR; then
31102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31103$as_echo "not found" >&6; }
31104        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31105$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31106        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31107      fi
31108      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31109$as_echo "ok" >&6; }
31110
31111
31112  else
31113    # The variable is set, but is it from the command line or the environment?
31114
31115    # Try to remove the string !JAR! from our list.
31116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
31117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31118      # If it failed, the variable was not from the command line. Ignore it,
31119      # but warn the user (except for BASH, which is always set by the calling BASH).
31120      if test "xJAR" != xBASH; then
31121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
31122$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
31123      fi
31124      # Try to locate tool using the code snippet
31125
31126      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31127$as_echo_n "checking for jar in Boot JDK... " >&6; }
31128      JAR=$BOOT_JDK/bin/jar
31129      if test ! -x $JAR; then
31130        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31131$as_echo "not found" >&6; }
31132        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31133$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31134        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31135      fi
31136      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31137$as_echo "ok" >&6; }
31138
31139
31140    else
31141      # If it succeeded, then it was overridden by the user. We will use it
31142      # for the tool.
31143
31144      # First remove it from the list of overridden variables, so we can test
31145      # for unknown variables in the end.
31146      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31147
31148      # Check if we try to supply an empty value
31149      if test "x$JAR" = x; then
31150        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
31151$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
31152        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31153$as_echo_n "checking for JAR... " >&6; }
31154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31155$as_echo "disabled" >&6; }
31156      else
31157        # Check if the provided tool contains a complete path.
31158        tool_specified="$JAR"
31159        tool_basename="${tool_specified##*/}"
31160        if test "x$tool_basename" = "x$tool_specified"; then
31161          # A command without a complete path is provided, search $PATH.
31162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
31163$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
31164          # Extract the first word of "$tool_basename", so it can be a program name with args.
31165set dummy $tool_basename; ac_word=$2
31166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31167$as_echo_n "checking for $ac_word... " >&6; }
31168if ${ac_cv_path_JAR+:} false; then :
31169  $as_echo_n "(cached) " >&6
31170else
31171  case $JAR in
31172  [\\/]* | ?:[\\/]*)
31173  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31174  ;;
31175  *)
31176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31177for as_dir in $PATH
31178do
31179  IFS=$as_save_IFS
31180  test -z "$as_dir" && as_dir=.
31181    for ac_exec_ext in '' $ac_executable_extensions; do
31182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31183    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31185    break 2
31186  fi
31187done
31188  done
31189IFS=$as_save_IFS
31190
31191  ;;
31192esac
31193fi
31194JAR=$ac_cv_path_JAR
31195if test -n "$JAR"; then
31196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31197$as_echo "$JAR" >&6; }
31198else
31199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31200$as_echo "no" >&6; }
31201fi
31202
31203
31204          if test "x$JAR" = x; then
31205            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31206          fi
31207        else
31208          # Otherwise we believe it is a complete path. Use it as it is.
31209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31210$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31211          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31212$as_echo_n "checking for JAR... " >&6; }
31213          if test ! -x "$tool_specified"; then
31214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31215$as_echo "not found" >&6; }
31216            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31217          fi
31218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31219$as_echo "$tool_specified" >&6; }
31220        fi
31221      fi
31222    fi
31223
31224  fi
31225
31226
31227
31228  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31229
31230  # Publish this variable in the help.
31231
31232
31233  if [ -z "${JARSIGNER+x}" ]; then
31234    # The variable is not set by user, try to locate tool using the code snippet
31235
31236      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31237$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31238      JARSIGNER=$BOOT_JDK/bin/jarsigner
31239      if test ! -x $JARSIGNER; then
31240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31241$as_echo "not found" >&6; }
31242        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31243$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31244        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31245      fi
31246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31247$as_echo "ok" >&6; }
31248
31249
31250  else
31251    # The variable is set, but is it from the command line or the environment?
31252
31253    # Try to remove the string !JARSIGNER! from our list.
31254    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31255    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31256      # If it failed, the variable was not from the command line. Ignore it,
31257      # but warn the user (except for BASH, which is always set by the calling BASH).
31258      if test "xJARSIGNER" != xBASH; then
31259        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31260$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31261      fi
31262      # Try to locate tool using the code snippet
31263
31264      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31265$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31266      JARSIGNER=$BOOT_JDK/bin/jarsigner
31267      if test ! -x $JARSIGNER; then
31268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31269$as_echo "not found" >&6; }
31270        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31271$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31272        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31273      fi
31274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31275$as_echo "ok" >&6; }
31276
31277
31278    else
31279      # If it succeeded, then it was overridden by the user. We will use it
31280      # for the tool.
31281
31282      # First remove it from the list of overridden variables, so we can test
31283      # for unknown variables in the end.
31284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31285
31286      # Check if we try to supply an empty value
31287      if test "x$JARSIGNER" = x; then
31288        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31289$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31291$as_echo_n "checking for JARSIGNER... " >&6; }
31292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31293$as_echo "disabled" >&6; }
31294      else
31295        # Check if the provided tool contains a complete path.
31296        tool_specified="$JARSIGNER"
31297        tool_basename="${tool_specified##*/}"
31298        if test "x$tool_basename" = "x$tool_specified"; then
31299          # A command without a complete path is provided, search $PATH.
31300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31301$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31302          # Extract the first word of "$tool_basename", so it can be a program name with args.
31303set dummy $tool_basename; ac_word=$2
31304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31305$as_echo_n "checking for $ac_word... " >&6; }
31306if ${ac_cv_path_JARSIGNER+:} false; then :
31307  $as_echo_n "(cached) " >&6
31308else
31309  case $JARSIGNER in
31310  [\\/]* | ?:[\\/]*)
31311  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31312  ;;
31313  *)
31314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31315for as_dir in $PATH
31316do
31317  IFS=$as_save_IFS
31318  test -z "$as_dir" && as_dir=.
31319    for ac_exec_ext in '' $ac_executable_extensions; do
31320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31321    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31323    break 2
31324  fi
31325done
31326  done
31327IFS=$as_save_IFS
31328
31329  ;;
31330esac
31331fi
31332JARSIGNER=$ac_cv_path_JARSIGNER
31333if test -n "$JARSIGNER"; then
31334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31335$as_echo "$JARSIGNER" >&6; }
31336else
31337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31338$as_echo "no" >&6; }
31339fi
31340
31341
31342          if test "x$JARSIGNER" = x; then
31343            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31344          fi
31345        else
31346          # Otherwise we believe it is a complete path. Use it as it is.
31347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31348$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31349          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31350$as_echo_n "checking for JARSIGNER... " >&6; }
31351          if test ! -x "$tool_specified"; then
31352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31353$as_echo "not found" >&6; }
31354            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31355          fi
31356          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31357$as_echo "$tool_specified" >&6; }
31358        fi
31359      fi
31360    fi
31361
31362  fi
31363
31364
31365
31366  # Finally, set some other options...
31367
31368  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31369  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31370
31371
31372  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31373$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31374  if "$JAVA" --list-modules > /dev/null 2>&1; then
31375    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31376$as_echo "yes" >&6; }
31377    BOOT_JDK_MODULAR="true"
31378  else
31379    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31380$as_echo "no" >&6; }
31381    BOOT_JDK_MODULAR="false"
31382  fi
31383
31384
31385
31386
31387  # Check if the boot jdk is 32 or 64 bit
31388  if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
31389    BOOT_JDK_BITS="64"
31390  else
31391    BOOT_JDK_BITS="32"
31392  fi
31393  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31394$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31396$as_echo "$BOOT_JDK_BITS" >&6; }
31397
31398
31399
31400# Check whether --with-build-jdk was given.
31401if test "${with_build_jdk+set}" = set; then :
31402  withval=$with_build_jdk;
31403fi
31404
31405
31406  CREATE_BUILDJDK=false
31407  EXTERNAL_BUILDJDK=false
31408  BUILD_JDK_FOUND="no"
31409  if test "x$with_build_jdk" != "x"; then
31410
31411  if test "x$BUILD_JDK_FOUND" = xno; then
31412    # Execute the test
31413
31414       if test "x$with_build_jdk" != x; then
31415         BUILD_JDK=$with_build_jdk
31416         BUILD_JDK_FOUND=maybe
31417         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31418$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31419       fi
31420
31421    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31422    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31423      # Do we have a bin/java?
31424      if test ! -x "$BUILD_JDK/bin/java"; then
31425        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31426$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31427        BUILD_JDK_FOUND=no
31428      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31429        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31430$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31431        BUILD_JDK_FOUND=no
31432      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31433        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31434$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31435        BUILD_JDK_FOUND=no
31436      elif test ! -x "$BUILD_JDK/bin/javac"; then
31437        # Do we have a bin/javac?
31438        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31439$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31440        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31441$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31442        BUILD_JDK_FOUND=no
31443      else
31444        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31445        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31446
31447        # Extra M4 quote needed to protect [] in grep expression.
31448        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31449        if test "x$FOUND_CORRECT_VERSION" = x; then
31450          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31451$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31452          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31453$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31454          BUILD_JDK_FOUND=no
31455        else
31456          # We're done!
31457          BUILD_JDK_FOUND=yes
31458
31459  # Only process if variable expands to non-empty
31460
31461  if test "x$BUILD_JDK" != x; then
31462    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31463
31464  # Input might be given as Windows format, start by converting to
31465  # unix format.
31466  path="$BUILD_JDK"
31467  new_path=`$CYGPATH -u "$path"`
31468
31469  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31470  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31471  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31472  # "foo.exe" is OK but "foo" is an error.
31473  #
31474  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31475  # It is also a way to make sure we got the proper file name for the real test later on.
31476  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31477  if test "x$test_shortpath" = x; then
31478    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31479$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31480    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31481  fi
31482
31483  # Call helper function which possibly converts this using DOS-style short mode.
31484  # If so, the updated path is stored in $new_path.
31485
31486  input_path="$new_path"
31487  # Check if we need to convert this using DOS-style short mode. If the path
31488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31489  # take no chances and rewrite it.
31490  # Note: m4 eats our [], so we need to use [ and ] instead.
31491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31492  if test "x$has_forbidden_chars" != x; then
31493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31497      # Going to short mode and back again did indeed matter. Since short mode is
31498      # case insensitive, let's make it lowercase to improve readability.
31499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31500      # Now convert it back to Unix-style (cygpath)
31501      input_path=`$CYGPATH -u "$shortmode_path"`
31502      new_path="$input_path"
31503    fi
31504  fi
31505
31506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31507  if test "x$test_cygdrive_prefix" = x; then
31508    # As a simple fix, exclude /usr/bin since it's not a real path.
31509    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31511      # a path prefixed by /cygdrive for fixpath to work.
31512      new_path="$CYGWIN_ROOT_PATH$input_path"
31513    fi
31514  fi
31515
31516
31517  if test "x$path" != "x$new_path"; then
31518    BUILD_JDK="$new_path"
31519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31520$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31521  fi
31522
31523    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31524
31525  path="$BUILD_JDK"
31526  has_colon=`$ECHO $path | $GREP ^.:`
31527  new_path="$path"
31528  if test "x$has_colon" = x; then
31529    # Not in mixed or Windows style, start by that.
31530    new_path=`cmd //c echo $path`
31531  fi
31532
31533
31534  input_path="$new_path"
31535  # Check if we need to convert this using DOS-style short mode. If the path
31536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31537  # take no chances and rewrite it.
31538  # Note: m4 eats our [], so we need to use [ and ] instead.
31539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31540  if test "x$has_forbidden_chars" != x; then
31541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31543  fi
31544
31545
31546  windows_path="$new_path"
31547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31548    unix_path=`$CYGPATH -u "$windows_path"`
31549    new_path="$unix_path"
31550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31552    new_path="$unix_path"
31553  fi
31554
31555  if test "x$path" != "x$new_path"; then
31556    BUILD_JDK="$new_path"
31557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31558$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31559  fi
31560
31561  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31562  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31563
31564    else
31565      # We're on a unix platform. Hooray! :)
31566      path="$BUILD_JDK"
31567      has_space=`$ECHO "$path" | $GREP " "`
31568      if test "x$has_space" != x; then
31569        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31570$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31571        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31572      fi
31573
31574      # Use eval to expand a potential ~
31575      eval path="$path"
31576      if test ! -f "$path" && test ! -d "$path"; then
31577        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31578      fi
31579
31580      if test -d "$path"; then
31581        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31582      else
31583        dir="`$DIRNAME "$path"`"
31584        base="`$BASENAME "$path"`"
31585        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31586      fi
31587    fi
31588  fi
31589
31590          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31591$as_echo_n "checking for Build JDK... " >&6; }
31592          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31593$as_echo "$BUILD_JDK" >&6; }
31594          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31595$as_echo_n "checking Build JDK version... " >&6; }
31596          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31597          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31598$as_echo "$BUILD_JDK_VERSION" >&6; }
31599        fi # end check jdk version
31600      fi # end check java
31601    fi # end check build jdk found
31602  fi
31603
31604    EXTERNAL_BUILDJDK=true
31605  else
31606    if test "x$COMPILE_TYPE" = "xcross"; then
31607      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31608      BUILD_JDK_FOUND=yes
31609      CREATE_BUILDJDK=true
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 build it for the host platform" >&5
31613$as_echo "yes, will build it for the host platform" >&6; }
31614    else
31615      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31616      BUILD_JDK_FOUND=yes
31617      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31618$as_echo_n "checking for Build JDK... " >&6; }
31619      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31620$as_echo "yes, will use output dir" >&6; }
31621    fi
31622  fi
31623
31624  JMOD="$BUILD_JDK/bin/jmod"
31625  JLINK="$BUILD_JDK/bin/jlink"
31626
31627
31628
31629  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31630    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31631$as_echo_n "checking for Build JDK... " >&6; }
31632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31633$as_echo "no" >&6; }
31634    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31635  fi
31636
31637
31638
31639
31640
31641
31642###############################################################################
31643#
31644# Configure the sources to use. We can add or override individual directories.
31645#
31646###############################################################################
31647
31648
31649  # Where are the sources.
31650  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31651  CORBA_TOPDIR="$SRC_ROOT/corba"
31652  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31653  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31654  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31655  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31656  JDK_TOPDIR="$SRC_ROOT/jdk"
31657
31658
31659
31660
31661
31662
31663
31664
31665
31666  # This feature is no longer supported.
31667
31668
31669
31670# Check whether --with-add-source-root was given.
31671if test "${with_add_source_root+set}" = set; then :
31672  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
31673$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31674fi
31675
31676
31677
31678
31679# Check whether --with-override-source-root was given.
31680if test "${with_override_source_root+set}" = set; then :
31681  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
31682$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31683fi
31684
31685
31686
31687
31688# Check whether --with-adds-and-overrides was given.
31689if test "${with_adds_and_overrides+set}" = set; then :
31690  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
31691$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31692fi
31693
31694
31695
31696
31697# Check whether --with-override-langtools was given.
31698if test "${with_override_langtools+set}" = set; then :
31699  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31700$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31701fi
31702
31703
31704
31705
31706# Check whether --with-override-corba was given.
31707if test "${with_override_corba+set}" = set; then :
31708  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31709$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31710fi
31711
31712
31713
31714
31715# Check whether --with-override-jaxp was given.
31716if test "${with_override_jaxp+set}" = set; then :
31717  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31718$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31719fi
31720
31721
31722
31723
31724# Check whether --with-override-jaxws was given.
31725if test "${with_override_jaxws+set}" = set; then :
31726  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31727$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31728fi
31729
31730
31731
31732
31733# Check whether --with-override-hotspot was given.
31734if test "${with_override_hotspot+set}" = set; then :
31735  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31736$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31737fi
31738
31739
31740
31741
31742# Check whether --with-override-nashorn was given.
31743if test "${with_override_nashorn+set}" = set; then :
31744  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31745$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31746fi
31747
31748
31749
31750
31751# Check whether --with-override-jdk was given.
31752if test "${with_override_jdk+set}" = set; then :
31753  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31754$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31755fi
31756
31757
31758
31759
31760  BUILD_OUTPUT="$OUTPUT_ROOT"
31761
31762  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31763
31764
31765
31766# Check whether --with-import_hotspot was given.
31767if test "${with_import_hotspot+set}" = set; then :
31768  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31769$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31770fi
31771
31772
31773
31774
31775
31776
31777# Check whether --with-import-modules was given.
31778if test "${with_import_modules+set}" = set; then :
31779  withval=$with_import_modules;
31780fi
31781
31782
31783  if test "x$with_import_modules" != x \
31784      && test "x$with_import_modules" != "xno"; then
31785    if test -d "$with_import_modules"; then
31786      IMPORT_MODULES_TOPDIR="$with_import_modules"
31787
31788  # Only process if variable expands to non-empty
31789
31790  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31791    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31792
31793  # Input might be given as Windows format, start by converting to
31794  # unix format.
31795  path="$IMPORT_MODULES_TOPDIR"
31796  new_path=`$CYGPATH -u "$path"`
31797
31798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31801  # "foo.exe" is OK but "foo" is an error.
31802  #
31803  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31804  # It is also a way to make sure we got the proper file name for the real test later on.
31805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31806  if test "x$test_shortpath" = x; then
31807    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31808$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31809    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31810  fi
31811
31812  # Call helper function which possibly converts this using DOS-style short mode.
31813  # If so, the updated path is stored in $new_path.
31814
31815  input_path="$new_path"
31816  # Check if we need to convert this using DOS-style short mode. If the path
31817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31818  # take no chances and rewrite it.
31819  # Note: m4 eats our [], so we need to use [ and ] instead.
31820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31821  if test "x$has_forbidden_chars" != x; then
31822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31826      # Going to short mode and back again did indeed matter. Since short mode is
31827      # case insensitive, let's make it lowercase to improve readability.
31828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31829      # Now convert it back to Unix-style (cygpath)
31830      input_path=`$CYGPATH -u "$shortmode_path"`
31831      new_path="$input_path"
31832    fi
31833  fi
31834
31835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31836  if test "x$test_cygdrive_prefix" = x; then
31837    # As a simple fix, exclude /usr/bin since it's not a real path.
31838    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31840      # a path prefixed by /cygdrive for fixpath to work.
31841      new_path="$CYGWIN_ROOT_PATH$input_path"
31842    fi
31843  fi
31844
31845
31846  if test "x$path" != "x$new_path"; then
31847    IMPORT_MODULES_TOPDIR="$new_path"
31848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31849$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31850  fi
31851
31852    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31853
31854  path="$IMPORT_MODULES_TOPDIR"
31855  has_colon=`$ECHO $path | $GREP ^.:`
31856  new_path="$path"
31857  if test "x$has_colon" = x; then
31858    # Not in mixed or Windows style, start by that.
31859    new_path=`cmd //c echo $path`
31860  fi
31861
31862
31863  input_path="$new_path"
31864  # Check if we need to convert this using DOS-style short mode. If the path
31865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31866  # take no chances and rewrite it.
31867  # Note: m4 eats our [], so we need to use [ and ] instead.
31868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31869  if test "x$has_forbidden_chars" != x; then
31870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31872  fi
31873
31874
31875  windows_path="$new_path"
31876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31877    unix_path=`$CYGPATH -u "$windows_path"`
31878    new_path="$unix_path"
31879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31881    new_path="$unix_path"
31882  fi
31883
31884  if test "x$path" != "x$new_path"; then
31885    IMPORT_MODULES_TOPDIR="$new_path"
31886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31887$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31888  fi
31889
31890  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31891  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31892
31893    else
31894      # We're on a unix platform. Hooray! :)
31895      path="$IMPORT_MODULES_TOPDIR"
31896      has_space=`$ECHO "$path" | $GREP " "`
31897      if test "x$has_space" != x; then
31898        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31899$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31900        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31901      fi
31902
31903      # Use eval to expand a potential ~
31904      eval path="$path"
31905      if test ! -f "$path" && test ! -d "$path"; then
31906        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31907      fi
31908
31909      if test -d "$path"; then
31910        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31911      else
31912        dir="`$DIRNAME "$path"`"
31913        base="`$BASENAME "$path"`"
31914        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31915      fi
31916    fi
31917  fi
31918
31919    elif test -e "$with_import_modules"; then
31920      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31921      $RM -rf "$IMPORT_MODULES_TOPDIR"
31922      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31923      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31924        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31925      fi
31926    else
31927      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31928    fi
31929  fi
31930
31931  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31932    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31933  fi
31934  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31935    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31936  fi
31937  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31938    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31939  fi
31940  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31941    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31942  fi
31943  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31944    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31945  fi
31946  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31947    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31948  fi
31949  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31950    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31951  fi
31952  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31953    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31954  fi
31955
31956
31957
31958
31959
31960
31961
31962
31963
31964
31965
31966###############################################################################
31967#
31968# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31969# native code.
31970#
31971###############################################################################
31972
31973# See if we are doing a complete static build or not
31974
31975  # Check whether --enable-static-build was given.
31976if test "${enable_static_build+set}" = set; then :
31977  enableval=$enable_static_build;
31978fi
31979
31980  STATIC_BUILD=false
31981  if test "x$enable_static_build" = "xyes"; then
31982    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31983$as_echo_n "checking if static build is enabled... " >&6; }
31984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31985$as_echo "yes" >&6; }
31986    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31987      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31988    fi
31989    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31990    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31991    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31992    STATIC_BUILD=true
31993  elif test "x$enable_static_build" = "xno"; then
31994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31995$as_echo_n "checking if static build is enabled... " >&6; }
31996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31997$as_echo "no" >&6; }
31998  elif test "x$enable_static_build" != "x"; then
31999    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
32000  fi
32001
32002
32003
32004
32005# First determine the toolchain type (compiler family)
32006
32007
32008# Check whether --with-toolchain-type was given.
32009if test "${with_toolchain_type+set}" = set; then :
32010  withval=$with_toolchain_type;
32011fi
32012
32013
32014  # Use indirect variable referencing
32015  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
32016  VALID_TOOLCHAINS=${!toolchain_var_name}
32017
32018  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32019    if test -n "$XCODEBUILD"; then
32020      # On Mac OS X, default toolchain to clang after Xcode 5
32021      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
32022      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
32023      if test $? -ne 0; then
32024        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
32025      fi
32026      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
32027          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
32028          $CUT -f 1 -d .`
32029      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
32030$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
32031      if test $XCODE_MAJOR_VERSION -ge 5; then
32032          DEFAULT_TOOLCHAIN="clang"
32033      else
32034          DEFAULT_TOOLCHAIN="gcc"
32035      fi
32036    else
32037      # If Xcode is not installed, but the command line tools are
32038      # then we can't run xcodebuild. On these systems we should
32039      # default to clang
32040      DEFAULT_TOOLCHAIN="clang"
32041    fi
32042  else
32043    # First toolchain type in the list is the default
32044    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
32045  fi
32046
32047  if test "x$with_toolchain_type" = xlist; then
32048    # List all toolchains
32049    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
32050$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
32051    for toolchain in $VALID_TOOLCHAINS; do
32052      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
32053      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32054      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
32055    done
32056
32057    exit 0
32058  elif test "x$with_toolchain_type" != x; then
32059    # User override; check that it is valid
32060    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
32061      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
32062$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
32063      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
32064$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
32065      as_fn_error $? "Cannot continue." "$LINENO" 5
32066    fi
32067    TOOLCHAIN_TYPE=$with_toolchain_type
32068  else
32069    # No flag given, use default
32070    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
32071  fi
32072
32073
32074  TOOLCHAIN_CC_BINARY_clang="clang"
32075  TOOLCHAIN_CC_BINARY_gcc="gcc"
32076  TOOLCHAIN_CC_BINARY_microsoft="cl"
32077  TOOLCHAIN_CC_BINARY_solstudio="cc"
32078  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
32079
32080  TOOLCHAIN_CXX_BINARY_clang="clang++"
32081  TOOLCHAIN_CXX_BINARY_gcc="g++"
32082  TOOLCHAIN_CXX_BINARY_microsoft="cl"
32083  TOOLCHAIN_CXX_BINARY_solstudio="CC"
32084  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
32085
32086  # Use indirect variable referencing
32087  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
32088  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32089  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
32090  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
32091  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
32092  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
32093  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
32094  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
32095
32096
32097  # Define filename patterns
32098  if test "x$OPENJDK_TARGET_OS" = xwindows; then
32099    LIBRARY_PREFIX=
32100    SHARED_LIBRARY_SUFFIX='.dll'
32101    STATIC_LIBRARY_SUFFIX='.lib'
32102    SHARED_LIBRARY='$1.dll'
32103    STATIC_LIBRARY='$1.lib'
32104    OBJ_SUFFIX='.obj'
32105    EXE_SUFFIX='.exe'
32106  else
32107    LIBRARY_PREFIX=lib
32108    SHARED_LIBRARY_SUFFIX='.so'
32109    STATIC_LIBRARY_SUFFIX='.a'
32110    SHARED_LIBRARY='lib$1.so'
32111    STATIC_LIBRARY='lib$1.a'
32112    OBJ_SUFFIX='.o'
32113    EXE_SUFFIX=''
32114    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32115      # For full static builds, we're overloading the SHARED_LIBRARY
32116      # variables in order to limit the amount of changes required.
32117      # It would be better to remove SHARED and just use LIBRARY and
32118      # LIBRARY_SUFFIX for libraries that can be built either
32119      # shared or static and use STATIC_* for libraries that are
32120      # always built statically.
32121      if test "x$STATIC_BUILD" = xtrue; then
32122        SHARED_LIBRARY='lib$1.a'
32123        SHARED_LIBRARY_SUFFIX='.a'
32124      else
32125        SHARED_LIBRARY='lib$1.dylib'
32126        SHARED_LIBRARY_SUFFIX='.dylib'
32127      fi
32128    fi
32129  fi
32130
32131
32132
32133
32134
32135
32136
32137
32138
32139
32140  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
32141    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
32142$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
32143  else
32144    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
32145$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
32146  fi
32147
32148
32149# User supplied flags should be used when configure detects compilers
32150
32151  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
32152    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
32153$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
32154  fi
32155
32156  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
32157    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
32158$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
32159  fi
32160
32161  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
32162    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
32163$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
32164  fi
32165
32166
32167# Check whether --with-extra-cflags was given.
32168if test "${with_extra_cflags+set}" = set; then :
32169  withval=$with_extra_cflags;
32170fi
32171
32172
32173
32174# Check whether --with-extra-cxxflags was given.
32175if test "${with_extra_cxxflags+set}" = set; then :
32176  withval=$with_extra_cxxflags;
32177fi
32178
32179
32180
32181# Check whether --with-extra-ldflags was given.
32182if test "${with_extra_ldflags+set}" = set; then :
32183  withval=$with_extra_ldflags;
32184fi
32185
32186
32187  EXTRA_CFLAGS="$with_extra_cflags"
32188  EXTRA_CXXFLAGS="$with_extra_cxxflags"
32189  EXTRA_LDFLAGS="$with_extra_ldflags"
32190
32191
32192
32193
32194
32195  # The global CFLAGS and LDLAGS variables are used by configure tests and
32196  # should include the extra parameters
32197  CFLAGS="$EXTRA_CFLAGS"
32198  CXXFLAGS="$EXTRA_CXXFLAGS"
32199  LDFLAGS="$EXTRA_LDFLAGS"
32200  CPPFLAGS=""
32201
32202# The sysroot cflags are needed for configure to be able to run the compilers
32203
32204  if test "x$SYSROOT" != "x"; then
32205    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32206      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32207        # Solaris Studio does not have a concept of sysroot. Instead we must
32208        # make sure the default include and lib dirs are appended to each
32209        # compile and link command line. Must also add -I-xbuiltin to enable
32210        # inlining of system functions and intrinsics.
32211        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32212        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32213            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32214      fi
32215    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32216      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32217      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32218    elif test "x$TOOLCHAIN_TYPE" = xclang; then
32219      SYSROOT_CFLAGS="-isysroot $SYSROOT"
32220      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32221    fi
32222    # The global CFLAGS and LDFLAGS variables need these for configure to function
32223    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32224    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32225    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32226    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32227  fi
32228
32229  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32230    # We also need -iframework<path>/System/Library/Frameworks
32231    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32232    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32233    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32234    # set this here so it doesn't have to be peppered throughout the forest
32235    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32236    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32237  fi
32238
32239
32240
32241
32242
32243# Then detect the actual binaries needed
32244
32245  # FIXME: Is this needed?
32246  ac_ext=cpp
32247ac_cpp='$CXXCPP $CPPFLAGS'
32248ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32249ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32250ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32251
32252
32253  # Store the CFLAGS etc passed to the configure script.
32254  ORG_CFLAGS="$CFLAGS"
32255  ORG_CXXFLAGS="$CXXFLAGS"
32256
32257  # autoconf magic only relies on PATH, so update it if tools dir is specified
32258  OLD_PATH="$PATH"
32259
32260  # On Windows, we need to detect the visual studio installation first.
32261  # This will change the PATH, but we need to keep that new PATH even
32262  # after toolchain detection is done, since the compiler (on x86) uses
32263  # it for DLL resolution in runtime.
32264  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32265      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32266
32267  # Store path to cygwin link.exe to help excluding it when searching for
32268  # VS linker. This must be done before changing the PATH when looking for VS.
32269  # Extract the first word of "link", so it can be a program name with args.
32270set dummy link; ac_word=$2
32271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32272$as_echo_n "checking for $ac_word... " >&6; }
32273if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32274  $as_echo_n "(cached) " >&6
32275else
32276  case $CYGWIN_LINK in
32277  [\\/]* | ?:[\\/]*)
32278  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32279  ;;
32280  *)
32281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32282for as_dir in $PATH
32283do
32284  IFS=$as_save_IFS
32285  test -z "$as_dir" && as_dir=.
32286    for ac_exec_ext in '' $ac_executable_extensions; do
32287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32288    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32290    break 2
32291  fi
32292done
32293  done
32294IFS=$as_save_IFS
32295
32296  ;;
32297esac
32298fi
32299CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32300if test -n "$CYGWIN_LINK"; then
32301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32302$as_echo "$CYGWIN_LINK" >&6; }
32303else
32304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32305$as_echo "no" >&6; }
32306fi
32307
32308
32309  if test "x$CYGWIN_LINK" != x; then
32310    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32311$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32312    "$CYGWIN_LINK" --version > /dev/null
32313    if test $? -eq 0 ; then
32314      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32315$as_echo "yes" >&6; }
32316    else
32317      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32318$as_echo "no" >&6; }
32319      # This might be the VS linker. Don't exclude it later on.
32320      CYGWIN_LINK=""
32321    fi
32322  fi
32323
32324  # First-hand choice is to locate and run the vsvars bat file.
32325
32326
32327# Check whether --with-toolchain-version was given.
32328if test "${with_toolchain_version+set}" = set; then :
32329  withval=$with_toolchain_version;
32330fi
32331
32332
32333  if test "x$with_toolchain_version" = xlist; then
32334    # List all toolchains
32335    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32336$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32337    for version in $VALID_VS_VERSIONS; do
32338      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32339      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32340    done
32341
32342    exit 0
32343  elif test "x$DEVKIT_VS_VERSION" != x; then
32344    VS_VERSION=$DEVKIT_VS_VERSION
32345    TOOLCHAIN_VERSION=$VS_VERSION
32346    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32347    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32348    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32349    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32350    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32351    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32352
32353    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32354    # can still be exported as INCLUDE for compiler invocations without
32355    # SYSROOT_CFLAGS
32356    OLDIFS="$IFS"
32357    IFS=";"
32358    for i in $DEVKIT_VS_INCLUDE; do
32359      ipath=$i
32360
32361  unix_path="$ipath"
32362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32363    windows_path=`$CYGPATH -m "$unix_path"`
32364    ipath="$windows_path"
32365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32366    windows_path=`cmd //c echo $unix_path`
32367    ipath="$windows_path"
32368  fi
32369
32370      VS_INCLUDE="$VS_INCLUDE;$ipath"
32371    done
32372    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32373    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32374    for i in $DEVKIT_VS_LIB; do
32375      libpath=$i
32376
32377  unix_path="$libpath"
32378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32379    windows_path=`$CYGPATH -m "$unix_path"`
32380    libpath="$windows_path"
32381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32382    windows_path=`cmd //c echo $unix_path`
32383    libpath="$windows_path"
32384  fi
32385
32386      VS_LIB="$VS_LIB;$libpath"
32387    done
32388    IFS="$OLDIFS"
32389
32390    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32391$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32392
32393  elif test "x$with_toolchain_version" != x; then
32394    # User override; check that it is valid
32395    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32396      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32397$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32398      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32399$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32400      as_fn_error $? "Cannot continue." "$LINENO" 5
32401    fi
32402    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32403  else
32404    # No flag given, use default
32405    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32406  fi
32407
32408  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32409
32410  VS_VERSION="$VS_VERSION"
32411  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32412  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32413  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32414  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32415
32416  # When using --with-tools-dir, assume it points to the correct and default
32417  # version of Visual Studio or that --with-toolchain-version was also set.
32418  if test "x$with_tools_dir" != x; then
32419
32420  if test "x$VS_ENV_CMD" = x; then
32421    VS_VERSION="${VS_VERSION}"
32422    VS_BASE="$with_tools_dir/../.."
32423    METHOD="--with-tools-dir"
32424
32425    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32426      VCVARSFILE="vc/bin/vcvars32.bat"
32427    else
32428      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32429    fi
32430
32431
32432  windows_path="$VS_BASE"
32433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32434    unix_path=`$CYGPATH -u "$windows_path"`
32435    VS_BASE="$unix_path"
32436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32438    VS_BASE="$unix_path"
32439  fi
32440
32441    if test -d "$VS_BASE"; then
32442      if test -f "$VS_BASE/$VCVARSFILE"; then
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        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32446        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32447        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32448        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32449      else
32450        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32451$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32452        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32453$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32454      fi
32455    fi
32456  fi
32457
32458
32459  if test "x$VS_ENV_CMD" = x; then
32460    VS_VERSION="${VS_VERSION}"
32461    VS_BASE="$with_tools_dir/../../.."
32462    METHOD="--with-tools-dir"
32463
32464    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32465      VCVARSFILE="vc/bin/vcvars32.bat"
32466    else
32467      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32468    fi
32469
32470
32471  windows_path="$VS_BASE"
32472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32473    unix_path=`$CYGPATH -u "$windows_path"`
32474    VS_BASE="$unix_path"
32475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32477    VS_BASE="$unix_path"
32478  fi
32479
32480    if test -d "$VS_BASE"; then
32481      if test -f "$VS_BASE/$VCVARSFILE"; then
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        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32485        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32486        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32487        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32488      else
32489        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32490$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32491        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32492$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32493      fi
32494    fi
32495  fi
32496
32497    if test "x$VS_ENV_CMD" = x; then
32498      # Having specified an argument which is incorrect will produce an instant failure;
32499      # we should not go on looking
32500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32501$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32502      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32503$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32504      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32505$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32506      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32507    fi
32508  fi
32509
32510  VS_ENV_CMD=""
32511  VS_ENV_ARGS=""
32512
32513  if test "x$VS_COMNTOOLS" != x; then
32514
32515  if test "x$VS_ENV_CMD" = x; then
32516    VS_VERSION="${VS_VERSION}"
32517    VS_BASE="$VS_COMNTOOLS/../.."
32518    METHOD="$VS_COMNTOOLS_VAR variable"
32519
32520    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32521      VCVARSFILE="vc/bin/vcvars32.bat"
32522    else
32523      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32524    fi
32525
32526
32527  windows_path="$VS_BASE"
32528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32529    unix_path=`$CYGPATH -u "$windows_path"`
32530    VS_BASE="$unix_path"
32531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32533    VS_BASE="$unix_path"
32534  fi
32535
32536    if test -d "$VS_BASE"; then
32537      if test -f "$VS_BASE/$VCVARSFILE"; then
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        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32541        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32542        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32543        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32544      else
32545        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32546$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32547        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32548$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32549      fi
32550    fi
32551  fi
32552
32553  fi
32554  if test "x$PROGRAMFILES" != x; then
32555
32556  if test "x$VS_ENV_CMD" = x; then
32557    VS_VERSION="${VS_VERSION}"
32558    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32559    METHOD="well-known name"
32560
32561    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32562      VCVARSFILE="vc/bin/vcvars32.bat"
32563    else
32564      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32565    fi
32566
32567
32568  windows_path="$VS_BASE"
32569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32570    unix_path=`$CYGPATH -u "$windows_path"`
32571    VS_BASE="$unix_path"
32572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32574    VS_BASE="$unix_path"
32575  fi
32576
32577    if test -d "$VS_BASE"; then
32578      if test -f "$VS_BASE/$VCVARSFILE"; then
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        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32582        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32583        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32584        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32585      else
32586        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32587$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32588        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32589$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32590      fi
32591    fi
32592  fi
32593
32594  fi
32595  # Work around the insanely named ProgramFiles(x86) env variable
32596  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32597  if test "x$PROGRAMFILES_X86" != x; then
32598
32599  if test "x$VS_ENV_CMD" = x; then
32600    VS_VERSION="${VS_VERSION}"
32601    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32602    METHOD="well-known name"
32603
32604    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32605      VCVARSFILE="vc/bin/vcvars32.bat"
32606    else
32607      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32608    fi
32609
32610
32611  windows_path="$VS_BASE"
32612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32613    unix_path=`$CYGPATH -u "$windows_path"`
32614    VS_BASE="$unix_path"
32615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32617    VS_BASE="$unix_path"
32618  fi
32619
32620    if test -d "$VS_BASE"; then
32621      if test -f "$VS_BASE/$VCVARSFILE"; then
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        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32625        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32626        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32627        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32628      else
32629        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32630$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32631        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32632$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32633      fi
32634    fi
32635  fi
32636
32637  fi
32638
32639  if test "x$VS_ENV_CMD" = x; then
32640    VS_VERSION="${VS_VERSION}"
32641    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32642    METHOD="well-known name"
32643
32644    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32645      VCVARSFILE="vc/bin/vcvars32.bat"
32646    else
32647      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32648    fi
32649
32650
32651  windows_path="$VS_BASE"
32652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32653    unix_path=`$CYGPATH -u "$windows_path"`
32654    VS_BASE="$unix_path"
32655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32657    VS_BASE="$unix_path"
32658  fi
32659
32660    if test -d "$VS_BASE"; then
32661      if test -f "$VS_BASE/$VCVARSFILE"; then
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        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32665        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32666        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32667        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32668      else
32669        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32670$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32671        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32672$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32673      fi
32674    fi
32675  fi
32676
32677
32678  if test "x$VS_ENV_CMD" = x; then
32679    VS_VERSION="${VS_VERSION}"
32680    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32681    METHOD="well-known name"
32682
32683    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32684      VCVARSFILE="vc/bin/vcvars32.bat"
32685    else
32686      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32687    fi
32688
32689
32690  windows_path="$VS_BASE"
32691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32692    unix_path=`$CYGPATH -u "$windows_path"`
32693    VS_BASE="$unix_path"
32694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32696    VS_BASE="$unix_path"
32697  fi
32698
32699    if test -d "$VS_BASE"; then
32700      if test -f "$VS_BASE/$VCVARSFILE"; then
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        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32704        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32705        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32706        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32707      else
32708        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32709$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32710        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32711$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32712      fi
32713    fi
32714  fi
32715
32716
32717  if test "x$SDK_INSTALL_DIR" != x; then
32718    if test "x$ProgramW6432" != x; then
32719
32720  if test "x$VS_ENV_CMD" = x; then
32721    VS_VERSION="${VS_VERSION}"
32722    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32723    METHOD="well-known name"
32724
32725  windows_path="$WIN_SDK_BASE"
32726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32727    unix_path=`$CYGPATH -u "$windows_path"`
32728    WIN_SDK_BASE="$unix_path"
32729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32731    WIN_SDK_BASE="$unix_path"
32732  fi
32733
32734    if test -d "$WIN_SDK_BASE"; then
32735      # There have been cases of partial or broken SDK installations. A missing
32736      # lib dir is not going to work.
32737      if test ! -d "$WIN_SDK_BASE/lib"; then
32738        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32739$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32740        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32741$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32742      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32743        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32744$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32745        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32746        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32747          VS_ENV_ARGS="/x86"
32748        else
32749          VS_ENV_ARGS="/x64"
32750        fi
32751        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32752        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32753        # TODO: improve detection for other versions of SDK
32754        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32755      else
32756        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32757$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32758        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32759$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32760      fi
32761    fi
32762  fi
32763
32764    fi
32765    if test "x$PROGRAMW6432" != x; then
32766
32767  if test "x$VS_ENV_CMD" = x; then
32768    VS_VERSION="${VS_VERSION}"
32769    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32770    METHOD="well-known name"
32771
32772  windows_path="$WIN_SDK_BASE"
32773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32774    unix_path=`$CYGPATH -u "$windows_path"`
32775    WIN_SDK_BASE="$unix_path"
32776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32778    WIN_SDK_BASE="$unix_path"
32779  fi
32780
32781    if test -d "$WIN_SDK_BASE"; then
32782      # There have been cases of partial or broken SDK installations. A missing
32783      # lib dir is not going to work.
32784      if test ! -d "$WIN_SDK_BASE/lib"; then
32785        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32786$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32787        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32788$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32789      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32790        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32791$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32792        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32793        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32794          VS_ENV_ARGS="/x86"
32795        else
32796          VS_ENV_ARGS="/x64"
32797        fi
32798        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32799        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32800        # TODO: improve detection for other versions of SDK
32801        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32802      else
32803        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32804$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32805        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32806$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32807      fi
32808    fi
32809  fi
32810
32811    fi
32812    if test "x$PROGRAMFILES" != x; then
32813
32814  if test "x$VS_ENV_CMD" = x; then
32815    VS_VERSION="${VS_VERSION}"
32816    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32817    METHOD="well-known name"
32818
32819  windows_path="$WIN_SDK_BASE"
32820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32821    unix_path=`$CYGPATH -u "$windows_path"`
32822    WIN_SDK_BASE="$unix_path"
32823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32825    WIN_SDK_BASE="$unix_path"
32826  fi
32827
32828    if test -d "$WIN_SDK_BASE"; then
32829      # There have been cases of partial or broken SDK installations. A missing
32830      # lib dir is not going to work.
32831      if test ! -d "$WIN_SDK_BASE/lib"; then
32832        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32833$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32834        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32835$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32836      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32837        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32838$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32839        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32840        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32841          VS_ENV_ARGS="/x86"
32842        else
32843          VS_ENV_ARGS="/x64"
32844        fi
32845        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32846        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32847        # TODO: improve detection for other versions of SDK
32848        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32849      else
32850        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32851$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32852        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32853$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32854      fi
32855    fi
32856  fi
32857
32858    fi
32859
32860  if test "x$VS_ENV_CMD" = x; then
32861    VS_VERSION="${VS_VERSION}"
32862    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32863    METHOD="well-known name"
32864
32865  windows_path="$WIN_SDK_BASE"
32866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32867    unix_path=`$CYGPATH -u "$windows_path"`
32868    WIN_SDK_BASE="$unix_path"
32869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32871    WIN_SDK_BASE="$unix_path"
32872  fi
32873
32874    if test -d "$WIN_SDK_BASE"; then
32875      # There have been cases of partial or broken SDK installations. A missing
32876      # lib dir is not going to work.
32877      if test ! -d "$WIN_SDK_BASE/lib"; then
32878        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32879$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32880        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32881$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32882      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32883        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32884$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32885        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32886        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32887          VS_ENV_ARGS="/x86"
32888        else
32889          VS_ENV_ARGS="/x64"
32890        fi
32891        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32892        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32893        # TODO: improve detection for other versions of SDK
32894        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32895      else
32896        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32897$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32898        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32899$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32900      fi
32901    fi
32902  fi
32903
32904
32905  if test "x$VS_ENV_CMD" = x; then
32906    VS_VERSION="${VS_VERSION}"
32907    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32908    METHOD="well-known name"
32909
32910  windows_path="$WIN_SDK_BASE"
32911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32912    unix_path=`$CYGPATH -u "$windows_path"`
32913    WIN_SDK_BASE="$unix_path"
32914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32916    WIN_SDK_BASE="$unix_path"
32917  fi
32918
32919    if test -d "$WIN_SDK_BASE"; then
32920      # There have been cases of partial or broken SDK installations. A missing
32921      # lib dir is not going to work.
32922      if test ! -d "$WIN_SDK_BASE/lib"; then
32923        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32924$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32925        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32926$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32927      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32928        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32929$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32930        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32931        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32932          VS_ENV_ARGS="/x86"
32933        else
32934          VS_ENV_ARGS="/x64"
32935        fi
32936        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32937        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32938        # TODO: improve detection for other versions of SDK
32939        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32940      else
32941        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32942$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32943        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32944$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32945      fi
32946    fi
32947  fi
32948
32949  fi
32950
32951    if test "x$VS_ENV_CMD" != x; then
32952      TOOLCHAIN_VERSION=$VS_VERSION
32953      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32954      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32955      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32956      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32957      # The rest of the variables are already evaled while probing
32958      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32959$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32960      break
32961    fi
32962  done
32963
32964
32965  # If we have a devkit, skip all of the below.
32966  if test "x$DEVKIT_VS_VERSION" = x; then
32967    if test "x$VS_ENV_CMD" != x; then
32968      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32969
32970  # Only process if variable expands to non-empty
32971
32972  if test "x$VS_ENV_CMD" != x; then
32973    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32974
32975  # First separate the path from the arguments. This will split at the first
32976  # space.
32977  complete="$VS_ENV_CMD"
32978  path="${complete%% *}"
32979  tmp="$complete EOL"
32980  arguments="${tmp#* }"
32981
32982  # Input might be given as Windows format, start by converting to
32983  # unix format.
32984  new_path=`$CYGPATH -u "$path"`
32985
32986  # Now try to locate executable using which
32987  new_path=`$WHICH "$new_path" 2> /dev/null`
32988  # bat and cmd files are not always considered executable in cygwin causing which
32989  # to not find them
32990  if test "x$new_path" = x \
32991      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32992      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32993    new_path=`$CYGPATH -u "$path"`
32994  fi
32995  if test "x$new_path" = x; then
32996    # Oops. Which didn't find the executable.
32997    # The splitting of arguments from the executable at a space might have been incorrect,
32998    # since paths with space are more likely in Windows. Give it another try with the whole
32999    # argument.
33000    path="$complete"
33001    arguments="EOL"
33002    new_path=`$CYGPATH -u "$path"`
33003    new_path=`$WHICH "$new_path" 2> /dev/null`
33004    # bat and cmd files are not always considered executable in cygwin causing which
33005    # to not find them
33006    if test "x$new_path" = x \
33007        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33008        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33009      new_path=`$CYGPATH -u "$path"`
33010    fi
33011    if test "x$new_path" = x; then
33012      # It's still not found. Now this is an unrecoverable error.
33013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33014$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33015      has_space=`$ECHO "$complete" | $GREP " "`
33016      if test "x$has_space" != x; then
33017        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33018$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33019      fi
33020      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33021    fi
33022  fi
33023
33024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33027  # "foo.exe" is OK but "foo" is an error.
33028  #
33029  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33030  # It is also a way to make sure we got the proper file name for the real test later on.
33031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33032  if test "x$test_shortpath" = x; then
33033    # Short path failed, file does not exist as specified.
33034    # Try adding .exe or .cmd
33035    if test -f "${new_path}.exe"; then
33036      input_to_shortpath="${new_path}.exe"
33037    elif test -f "${new_path}.cmd"; then
33038      input_to_shortpath="${new_path}.cmd"
33039    else
33040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
33041$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
33042      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33043$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33044      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33045    fi
33046  else
33047    input_to_shortpath="$new_path"
33048  fi
33049
33050  # Call helper function which possibly converts this using DOS-style short mode.
33051  # If so, the updated path is stored in $new_path.
33052  new_path="$input_to_shortpath"
33053
33054  input_path="$input_to_shortpath"
33055  # Check if we need to convert this using DOS-style short mode. If the path
33056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33057  # take no chances and rewrite it.
33058  # Note: m4 eats our [], so we need to use [ and ] instead.
33059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33060  if test "x$has_forbidden_chars" != x; then
33061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33065      # Going to short mode and back again did indeed matter. Since short mode is
33066      # case insensitive, let's make it lowercase to improve readability.
33067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33068      # Now convert it back to Unix-style (cygpath)
33069      input_path=`$CYGPATH -u "$shortmode_path"`
33070      new_path="$input_path"
33071    fi
33072  fi
33073
33074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33075  if test "x$test_cygdrive_prefix" = x; then
33076    # As a simple fix, exclude /usr/bin since it's not a real path.
33077    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33079      # a path prefixed by /cygdrive for fixpath to work.
33080      new_path="$CYGWIN_ROOT_PATH$input_path"
33081    fi
33082  fi
33083
33084  # remove trailing .exe if any
33085  new_path="${new_path/%.exe/}"
33086
33087    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33088
33089  # First separate the path from the arguments. This will split at the first
33090  # space.
33091  complete="$VS_ENV_CMD"
33092  path="${complete%% *}"
33093  tmp="$complete EOL"
33094  arguments="${tmp#* }"
33095
33096  # Input might be given as Windows format, start by converting to
33097  # unix format.
33098  new_path="$path"
33099
33100  windows_path="$new_path"
33101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33102    unix_path=`$CYGPATH -u "$windows_path"`
33103    new_path="$unix_path"
33104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33106    new_path="$unix_path"
33107  fi
33108
33109
33110  # Now try to locate executable using which
33111  new_path=`$WHICH "$new_path" 2> /dev/null`
33112
33113  if test "x$new_path" = x; then
33114    # Oops. Which didn't find the executable.
33115    # The splitting of arguments from the executable at a space might have been incorrect,
33116    # since paths with space are more likely in Windows. Give it another try with the whole
33117    # argument.
33118    path="$complete"
33119    arguments="EOL"
33120    new_path="$path"
33121
33122  windows_path="$new_path"
33123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33124    unix_path=`$CYGPATH -u "$windows_path"`
33125    new_path="$unix_path"
33126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33128    new_path="$unix_path"
33129  fi
33130
33131
33132    new_path=`$WHICH "$new_path" 2> /dev/null`
33133    # bat and cmd files are not always considered executable in MSYS causing which
33134    # to not find them
33135    if test "x$new_path" = x \
33136        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33137        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33138      new_path="$path"
33139
33140  windows_path="$new_path"
33141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33142    unix_path=`$CYGPATH -u "$windows_path"`
33143    new_path="$unix_path"
33144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33146    new_path="$unix_path"
33147  fi
33148
33149    fi
33150
33151    if test "x$new_path" = x; then
33152      # It's still not found. Now this is an unrecoverable error.
33153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33154$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33155      has_space=`$ECHO "$complete" | $GREP " "`
33156      if test "x$has_space" != x; then
33157        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33158$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33159      fi
33160      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33161    fi
33162  fi
33163
33164  # Now new_path has a complete unix path to the binary
33165  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33166    # Keep paths in /bin as-is, but remove trailing .exe if any
33167    new_path="${new_path/%.exe/}"
33168    # Do not save /bin paths to all_fixpath_prefixes!
33169  else
33170    # Not in mixed or Windows style, start by that.
33171    new_path=`cmd //c echo $new_path`
33172
33173  input_path="$new_path"
33174  # Check if we need to convert this using DOS-style short mode. If the path
33175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33176  # take no chances and rewrite it.
33177  # Note: m4 eats our [], so we need to use [ and ] instead.
33178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33179  if test "x$has_forbidden_chars" != x; then
33180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33181    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33182  fi
33183
33184    # Output is in $new_path
33185
33186  windows_path="$new_path"
33187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33188    unix_path=`$CYGPATH -u "$windows_path"`
33189    new_path="$unix_path"
33190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33192    new_path="$unix_path"
33193  fi
33194
33195    # remove trailing .exe if any
33196    new_path="${new_path/%.exe/}"
33197
33198    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33199    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33200  fi
33201
33202    else
33203      # We're on a unix platform. Hooray! :)
33204      # First separate the path from the arguments. This will split at the first
33205      # space.
33206      complete="$VS_ENV_CMD"
33207      path="${complete%% *}"
33208      tmp="$complete EOL"
33209      arguments="${tmp#* }"
33210
33211      # Cannot rely on the command "which" here since it doesn't always work.
33212      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33213      if test -z "$is_absolute_path"; then
33214        # Path to executable is not absolute. Find it.
33215        IFS_save="$IFS"
33216        IFS=:
33217        for p in $PATH; do
33218          if test -f "$p/$path" && test -x "$p/$path"; then
33219            new_path="$p/$path"
33220            break
33221          fi
33222        done
33223        IFS="$IFS_save"
33224      else
33225        # This is an absolute path, we can use it without further modifications.
33226        new_path="$path"
33227      fi
33228
33229      if test "x$new_path" = x; then
33230        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33231$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33232        has_space=`$ECHO "$complete" | $GREP " "`
33233        if test "x$has_space" != x; then
33234          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33235$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33236        fi
33237        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33238      fi
33239    fi
33240
33241    # Now join together the path and the arguments once again
33242    if test "x$arguments" != xEOL; then
33243      new_complete="$new_path ${arguments% *}"
33244    else
33245      new_complete="$new_path"
33246    fi
33247
33248    if test "x$complete" != "x$new_complete"; then
33249      VS_ENV_CMD="$new_complete"
33250      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33251$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33252    fi
33253  fi
33254
33255
33256      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33257      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33258$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33259
33260      # We need to create a couple of temporary files.
33261      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33262      $MKDIR -p $VS_ENV_TMP_DIR
33263
33264      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33265      # Instead create a shell script which will set the relevant variables when run.
33266      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33267
33268  unix_path="$WINPATH_VS_ENV_CMD"
33269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33270    windows_path=`$CYGPATH -m "$unix_path"`
33271    WINPATH_VS_ENV_CMD="$windows_path"
33272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33273    windows_path=`cmd //c echo $unix_path`
33274    WINPATH_VS_ENV_CMD="$windows_path"
33275  fi
33276
33277      WINPATH_BASH="$BASH"
33278
33279  unix_path="$WINPATH_BASH"
33280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33281    windows_path=`$CYGPATH -m "$unix_path"`
33282    WINPATH_BASH="$windows_path"
33283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33284    windows_path=`cmd //c echo $unix_path`
33285    WINPATH_BASH="$windows_path"
33286  fi
33287
33288
33289      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33290      # script (executable by bash) that will setup the important variables.
33291      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33292      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33293      # This will end up something like:
33294      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33295      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33296      # These will end up something like:
33297      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33298      # The trailing space for everyone except PATH is no typo, but is needed due
33299      # to trailing \ in the Windows paths. These will be stripped later.
33300      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33301          >> $EXTRACT_VC_ENV_BAT_FILE
33302      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33303          >> $EXTRACT_VC_ENV_BAT_FILE
33304      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33305          >> $EXTRACT_VC_ENV_BAT_FILE
33306      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33307          >> $EXTRACT_VC_ENV_BAT_FILE
33308      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33309          >> $EXTRACT_VC_ENV_BAT_FILE
33310      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33311          >> $EXTRACT_VC_ENV_BAT_FILE
33312
33313      # Now execute the newly created bat file.
33314      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33315      # Change directory so we don't need to mess with Windows paths in redirects.
33316      cd $VS_ENV_TMP_DIR
33317      cmd /c extract-vs-env.bat | $CAT
33318      cd $CURDIR
33319
33320      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33321        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33322$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33323        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33324$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33325        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33326$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33327        as_fn_error $? "Cannot continue" "$LINENO" 5
33328      fi
33329
33330      # Now set all paths and other env variables. This will allow the rest of
33331      # the configure script to find and run the compiler in the proper way.
33332      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33333$as_echo "$as_me: Setting extracted environment variables" >&6;}
33334      . $VS_ENV_TMP_DIR/set-vs-env.sh
33335      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33336      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33337    else
33338      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33339      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33340$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33341    fi
33342  fi
33343
33344  # At this point, we should have correct variables in the environment, or we can't continue.
33345  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33346$as_echo_n "checking for Visual Studio variables... " >&6; }
33347
33348  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33349      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33350    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33351      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33352$as_echo "present but broken" >&6; }
33353      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33354    else
33355      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33356$as_echo "ok" >&6; }
33357      # Remove any trailing "\" ";" and " " from the variables.
33358      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33359      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33360      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33361      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33362      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33363      # Remove any paths containing # (typically F#) as that messes up make. This
33364      # is needed if visual studio was installed with F# support.
33365      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33366
33367
33368
33369
33370
33371      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33372      OLDIFS="$IFS"
33373      IFS=";"
33374      for i in $VS_INCLUDE; do
33375        ipath=$i
33376        # Only process non-empty elements
33377        if test "x$ipath" != x; then
33378          IFS="$OLDIFS"
33379          # Check that directory exists before calling fixup_path
33380          testpath=$ipath
33381
33382  windows_path="$testpath"
33383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33384    unix_path=`$CYGPATH -u "$windows_path"`
33385    testpath="$unix_path"
33386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33388    testpath="$unix_path"
33389  fi
33390
33391          if test -d "$testpath"; then
33392
33393  # Only process if variable expands to non-empty
33394
33395  if test "x$ipath" != x; then
33396    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33397
33398  # Input might be given as Windows format, start by converting to
33399  # unix format.
33400  path="$ipath"
33401  new_path=`$CYGPATH -u "$path"`
33402
33403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33406  # "foo.exe" is OK but "foo" is an error.
33407  #
33408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33409  # It is also a way to make sure we got the proper file name for the real test later on.
33410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33411  if test "x$test_shortpath" = x; then
33412    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33413$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33414    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33415  fi
33416
33417  # Call helper function which possibly converts this using DOS-style short mode.
33418  # If so, the updated path is stored in $new_path.
33419
33420  input_path="$new_path"
33421  # Check if we need to convert this using DOS-style short mode. If the path
33422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33423  # take no chances and rewrite it.
33424  # Note: m4 eats our [], so we need to use [ and ] instead.
33425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33426  if test "x$has_forbidden_chars" != x; then
33427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33431      # Going to short mode and back again did indeed matter. Since short mode is
33432      # case insensitive, let's make it lowercase to improve readability.
33433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33434      # Now convert it back to Unix-style (cygpath)
33435      input_path=`$CYGPATH -u "$shortmode_path"`
33436      new_path="$input_path"
33437    fi
33438  fi
33439
33440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33441  if test "x$test_cygdrive_prefix" = x; then
33442    # As a simple fix, exclude /usr/bin since it's not a real path.
33443    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33445      # a path prefixed by /cygdrive for fixpath to work.
33446      new_path="$CYGWIN_ROOT_PATH$input_path"
33447    fi
33448  fi
33449
33450
33451  if test "x$path" != "x$new_path"; then
33452    ipath="$new_path"
33453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33454$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33455  fi
33456
33457    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33458
33459  path="$ipath"
33460  has_colon=`$ECHO $path | $GREP ^.:`
33461  new_path="$path"
33462  if test "x$has_colon" = x; then
33463    # Not in mixed or Windows style, start by that.
33464    new_path=`cmd //c echo $path`
33465  fi
33466
33467
33468  input_path="$new_path"
33469  # Check if we need to convert this using DOS-style short mode. If the path
33470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33471  # take no chances and rewrite it.
33472  # Note: m4 eats our [], so we need to use [ and ] instead.
33473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33474  if test "x$has_forbidden_chars" != x; then
33475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33477  fi
33478
33479
33480  windows_path="$new_path"
33481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33482    unix_path=`$CYGPATH -u "$windows_path"`
33483    new_path="$unix_path"
33484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33486    new_path="$unix_path"
33487  fi
33488
33489  if test "x$path" != "x$new_path"; then
33490    ipath="$new_path"
33491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33492$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33493  fi
33494
33495  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33496  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33497
33498    else
33499      # We're on a unix platform. Hooray! :)
33500      path="$ipath"
33501      has_space=`$ECHO "$path" | $GREP " "`
33502      if test "x$has_space" != x; then
33503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33504$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33505        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33506      fi
33507
33508      # Use eval to expand a potential ~
33509      eval path="$path"
33510      if test ! -f "$path" && test ! -d "$path"; then
33511        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33512      fi
33513
33514      if test -d "$path"; then
33515        ipath="`cd "$path"; $THEPWDCMD -L`"
33516      else
33517        dir="`$DIRNAME "$path"`"
33518        base="`$BASENAME "$path"`"
33519        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33520      fi
33521    fi
33522  fi
33523
33524            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33525          fi
33526          IFS=";"
33527        fi
33528      done
33529      # Convert VS_LIB into SYSROOT_LDFLAGS
33530      for i in $VS_LIB; do
33531        libpath=$i
33532        # Only process non-empty elements
33533        if test "x$libpath" != x; then
33534          IFS="$OLDIFS"
33535          # Check that directory exists before calling fixup_path
33536          testpath=$libpath
33537
33538  windows_path="$testpath"
33539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33540    unix_path=`$CYGPATH -u "$windows_path"`
33541    testpath="$unix_path"
33542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33544    testpath="$unix_path"
33545  fi
33546
33547          if test -d "$testpath"; then
33548
33549  # Only process if variable expands to non-empty
33550
33551  if test "x$libpath" != x; then
33552    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33553
33554  # Input might be given as Windows format, start by converting to
33555  # unix format.
33556  path="$libpath"
33557  new_path=`$CYGPATH -u "$path"`
33558
33559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33562  # "foo.exe" is OK but "foo" is an error.
33563  #
33564  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33565  # It is also a way to make sure we got the proper file name for the real test later on.
33566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33567  if test "x$test_shortpath" = x; then
33568    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33569$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33570    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33571  fi
33572
33573  # Call helper function which possibly converts this using DOS-style short mode.
33574  # If so, the updated path is stored in $new_path.
33575
33576  input_path="$new_path"
33577  # Check if we need to convert this using DOS-style short mode. If the path
33578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33579  # take no chances and rewrite it.
33580  # Note: m4 eats our [], so we need to use [ and ] instead.
33581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33582  if test "x$has_forbidden_chars" != x; then
33583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33587      # Going to short mode and back again did indeed matter. Since short mode is
33588      # case insensitive, let's make it lowercase to improve readability.
33589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33590      # Now convert it back to Unix-style (cygpath)
33591      input_path=`$CYGPATH -u "$shortmode_path"`
33592      new_path="$input_path"
33593    fi
33594  fi
33595
33596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33597  if test "x$test_cygdrive_prefix" = x; then
33598    # As a simple fix, exclude /usr/bin since it's not a real path.
33599    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33601      # a path prefixed by /cygdrive for fixpath to work.
33602      new_path="$CYGWIN_ROOT_PATH$input_path"
33603    fi
33604  fi
33605
33606
33607  if test "x$path" != "x$new_path"; then
33608    libpath="$new_path"
33609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33610$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33611  fi
33612
33613    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33614
33615  path="$libpath"
33616  has_colon=`$ECHO $path | $GREP ^.:`
33617  new_path="$path"
33618  if test "x$has_colon" = x; then
33619    # Not in mixed or Windows style, start by that.
33620    new_path=`cmd //c echo $path`
33621  fi
33622
33623
33624  input_path="$new_path"
33625  # Check if we need to convert this using DOS-style short mode. If the path
33626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33627  # take no chances and rewrite it.
33628  # Note: m4 eats our [], so we need to use [ and ] instead.
33629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33630  if test "x$has_forbidden_chars" != x; then
33631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33633  fi
33634
33635
33636  windows_path="$new_path"
33637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33638    unix_path=`$CYGPATH -u "$windows_path"`
33639    new_path="$unix_path"
33640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33642    new_path="$unix_path"
33643  fi
33644
33645  if test "x$path" != "x$new_path"; then
33646    libpath="$new_path"
33647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33648$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33649  fi
33650
33651  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33652  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33653
33654    else
33655      # We're on a unix platform. Hooray! :)
33656      path="$libpath"
33657      has_space=`$ECHO "$path" | $GREP " "`
33658      if test "x$has_space" != x; then
33659        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33660$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33661        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33662      fi
33663
33664      # Use eval to expand a potential ~
33665      eval path="$path"
33666      if test ! -f "$path" && test ! -d "$path"; then
33667        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33668      fi
33669
33670      if test -d "$path"; then
33671        libpath="`cd "$path"; $THEPWDCMD -L`"
33672      else
33673        dir="`$DIRNAME "$path"`"
33674        base="`$BASENAME "$path"`"
33675        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33676      fi
33677    fi
33678  fi
33679
33680            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33681          fi
33682          IFS=";"
33683        fi
33684      done
33685      IFS="$OLDIFS"
33686    fi
33687  else
33688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33689$as_echo "not found" >&6; }
33690
33691    if test "x$VS_ENV_CMD" = x; then
33692      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33693$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33694      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33695$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33696    else
33697      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33698$as_echo "$as_me: Running the extraction script failed." >&6;}
33699    fi
33700    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33701$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33702    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33703$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33704    as_fn_error $? "Cannot continue" "$LINENO" 5
33705  fi
33706
33707    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33708    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33709    PATH="$VS_PATH"
33710    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33711    export INCLUDE="$VS_INCLUDE"
33712    export LIB="$VS_LIB"
33713  else
33714    if test "x$XCODE_VERSION_OUTPUT" != x; then
33715      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33716      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33717      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33718    else
33719      # Currently we do not define this for other toolchains. This might change as the need arise.
33720      TOOLCHAIN_VERSION=
33721    fi
33722  fi
33723
33724
33725  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33726  # override all other locations.
33727  if test "x$TOOLCHAIN_PATH" != x; then
33728    PATH=$TOOLCHAIN_PATH:$PATH
33729  fi
33730
33731
33732  #
33733  # Setup the compilers (CC and CXX)
33734  #
33735
33736  COMPILER_NAME=C
33737  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33738
33739  if test "x$CC" != x; then
33740    # User has supplied compiler name already, always let that override.
33741    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33742$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33743    if test "x`basename $CC`" = "x$CC"; then
33744      # A command without a complete path is provided, search $PATH.
33745
33746      for ac_prog in $CC
33747do
33748  # Extract the first word of "$ac_prog", so it can be a program name with args.
33749set dummy $ac_prog; ac_word=$2
33750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33751$as_echo_n "checking for $ac_word... " >&6; }
33752if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33753  $as_echo_n "(cached) " >&6
33754else
33755  case $POTENTIAL_CC in
33756  [\\/]* | ?:[\\/]*)
33757  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33758  ;;
33759  *)
33760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33761for as_dir in $PATH
33762do
33763  IFS=$as_save_IFS
33764  test -z "$as_dir" && as_dir=.
33765    for ac_exec_ext in '' $ac_executable_extensions; do
33766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33767    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33769    break 2
33770  fi
33771done
33772  done
33773IFS=$as_save_IFS
33774
33775  ;;
33776esac
33777fi
33778POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33779if test -n "$POTENTIAL_CC"; then
33780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33781$as_echo "$POTENTIAL_CC" >&6; }
33782else
33783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33784$as_echo "no" >&6; }
33785fi
33786
33787
33788  test -n "$POTENTIAL_CC" && break
33789done
33790
33791      if test "x$POTENTIAL_CC" != x; then
33792        CC=$POTENTIAL_CC
33793      else
33794        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33795      fi
33796    else
33797      # Otherwise it might already be a complete path
33798      if test ! -x "$CC"; then
33799        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33800      fi
33801    fi
33802  else
33803    # No user supplied value. Locate compiler ourselves.
33804
33805    # If we are cross compiling, assume cross compilation tools follows the
33806    # cross compilation standard where they are prefixed with the autoconf
33807    # standard name for the target. For example the binary
33808    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33809    # If we are not cross compiling, then the default compiler name will be
33810    # used.
33811
33812    CC=
33813    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33814    # before checking the rest of the PATH.
33815    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33816    # step, this should not be necessary.
33817    if test -n "$TOOLCHAIN_PATH"; then
33818      PATH_save="$PATH"
33819      PATH="$TOOLCHAIN_PATH"
33820      if test -n "$ac_tool_prefix"; then
33821  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33822set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33824$as_echo_n "checking for $ac_word... " >&6; }
33825if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33826  $as_echo_n "(cached) " >&6
33827else
33828  case $TOOLCHAIN_PATH_CC in
33829  [\\/]* | ?:[\\/]*)
33830  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33831  ;;
33832  *)
33833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33834for as_dir in $PATH
33835do
33836  IFS=$as_save_IFS
33837  test -z "$as_dir" && as_dir=.
33838    for ac_exec_ext in '' $ac_executable_extensions; do
33839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33840    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33842    break 2
33843  fi
33844done
33845  done
33846IFS=$as_save_IFS
33847
33848  ;;
33849esac
33850fi
33851TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33852if test -n "$TOOLCHAIN_PATH_CC"; then
33853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33854$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33855else
33856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33857$as_echo "no" >&6; }
33858fi
33859
33860
33861fi
33862if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33863  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33864  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33865set dummy $SEARCH_LIST; ac_word=$2
33866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33867$as_echo_n "checking for $ac_word... " >&6; }
33868if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33869  $as_echo_n "(cached) " >&6
33870else
33871  case $ac_pt_TOOLCHAIN_PATH_CC in
33872  [\\/]* | ?:[\\/]*)
33873  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33874  ;;
33875  *)
33876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33877for as_dir in $PATH
33878do
33879  IFS=$as_save_IFS
33880  test -z "$as_dir" && as_dir=.
33881    for ac_exec_ext in '' $ac_executable_extensions; do
33882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33883    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33885    break 2
33886  fi
33887done
33888  done
33889IFS=$as_save_IFS
33890
33891  ;;
33892esac
33893fi
33894ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33895if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33897$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33898else
33899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33900$as_echo "no" >&6; }
33901fi
33902
33903  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33904    TOOLCHAIN_PATH_CC=""
33905  else
33906    case $cross_compiling:$ac_tool_warned in
33907yes:)
33908{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33909$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33910ac_tool_warned=yes ;;
33911esac
33912    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33913  fi
33914else
33915  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33916fi
33917
33918      CC=$TOOLCHAIN_PATH_CC
33919      PATH="$PATH_save"
33920    fi
33921
33922    # AC_PATH_TOOL can't be run multiple times with the same variable,
33923    # so create a new name for this run.
33924    if test "x$CC" = x; then
33925      if test -n "$ac_tool_prefix"; then
33926  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33927set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33929$as_echo_n "checking for $ac_word... " >&6; }
33930if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33931  $as_echo_n "(cached) " >&6
33932else
33933  case $POTENTIAL_CC in
33934  [\\/]* | ?:[\\/]*)
33935  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33936  ;;
33937  *)
33938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33939for as_dir in $PATH
33940do
33941  IFS=$as_save_IFS
33942  test -z "$as_dir" && as_dir=.
33943    for ac_exec_ext in '' $ac_executable_extensions; do
33944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33945    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33947    break 2
33948  fi
33949done
33950  done
33951IFS=$as_save_IFS
33952
33953  ;;
33954esac
33955fi
33956POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33957if test -n "$POTENTIAL_CC"; then
33958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33959$as_echo "$POTENTIAL_CC" >&6; }
33960else
33961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33962$as_echo "no" >&6; }
33963fi
33964
33965
33966fi
33967if test -z "$ac_cv_path_POTENTIAL_CC"; then
33968  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33969  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33970set dummy $SEARCH_LIST; ac_word=$2
33971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33972$as_echo_n "checking for $ac_word... " >&6; }
33973if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33974  $as_echo_n "(cached) " >&6
33975else
33976  case $ac_pt_POTENTIAL_CC in
33977  [\\/]* | ?:[\\/]*)
33978  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33979  ;;
33980  *)
33981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33982for as_dir in $PATH
33983do
33984  IFS=$as_save_IFS
33985  test -z "$as_dir" && as_dir=.
33986    for ac_exec_ext in '' $ac_executable_extensions; do
33987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33988    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33990    break 2
33991  fi
33992done
33993  done
33994IFS=$as_save_IFS
33995
33996  ;;
33997esac
33998fi
33999ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
34000if test -n "$ac_pt_POTENTIAL_CC"; then
34001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
34002$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
34003else
34004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34005$as_echo "no" >&6; }
34006fi
34007
34008  if test "x$ac_pt_POTENTIAL_CC" = x; then
34009    POTENTIAL_CC=""
34010  else
34011    case $cross_compiling:$ac_tool_warned in
34012yes:)
34013{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34014$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34015ac_tool_warned=yes ;;
34016esac
34017    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
34018  fi
34019else
34020  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
34021fi
34022
34023      CC=$POTENTIAL_CC
34024    fi
34025
34026    if test "x$CC" = x; then
34027
34028  # Print a helpful message on how to acquire the necessary build dependency.
34029  # devkit is the help tag: freetype, cups, alsa etc
34030  MISSING_DEPENDENCY=devkit
34031
34032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34033    cygwin_help $MISSING_DEPENDENCY
34034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34035    msys_help $MISSING_DEPENDENCY
34036  else
34037    PKGHANDLER_COMMAND=
34038
34039    case $PKGHANDLER in
34040      apt-get)
34041        apt_help     $MISSING_DEPENDENCY ;;
34042      yum)
34043        yum_help     $MISSING_DEPENDENCY ;;
34044      brew)
34045        brew_help    $MISSING_DEPENDENCY ;;
34046      port)
34047        port_help    $MISSING_DEPENDENCY ;;
34048      pkgutil)
34049        pkgutil_help $MISSING_DEPENDENCY ;;
34050      pkgadd)
34051        pkgadd_help  $MISSING_DEPENDENCY ;;
34052    esac
34053
34054    if test "x$PKGHANDLER_COMMAND" != x; then
34055      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34056    fi
34057  fi
34058
34059      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34060    fi
34061  fi
34062
34063  # Now we have a compiler binary in CC. Make sure it's okay.
34064
34065  # Only process if variable expands to non-empty
34066
34067  if test "x$CC" != x; then
34068    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34069
34070  # First separate the path from the arguments. This will split at the first
34071  # space.
34072  complete="$CC"
34073  path="${complete%% *}"
34074  tmp="$complete EOL"
34075  arguments="${tmp#* }"
34076
34077  # Input might be given as Windows format, start by converting to
34078  # unix format.
34079  new_path=`$CYGPATH -u "$path"`
34080
34081  # Now try to locate executable using which
34082  new_path=`$WHICH "$new_path" 2> /dev/null`
34083  # bat and cmd files are not always considered executable in cygwin causing which
34084  # to not find them
34085  if test "x$new_path" = x \
34086      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34087      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34088    new_path=`$CYGPATH -u "$path"`
34089  fi
34090  if test "x$new_path" = x; then
34091    # Oops. Which didn't find the executable.
34092    # The splitting of arguments from the executable at a space might have been incorrect,
34093    # since paths with space are more likely in Windows. Give it another try with the whole
34094    # argument.
34095    path="$complete"
34096    arguments="EOL"
34097    new_path=`$CYGPATH -u "$path"`
34098    new_path=`$WHICH "$new_path" 2> /dev/null`
34099    # bat and cmd files are not always considered executable in cygwin causing which
34100    # to not find them
34101    if test "x$new_path" = x \
34102        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34103        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34104      new_path=`$CYGPATH -u "$path"`
34105    fi
34106    if test "x$new_path" = x; then
34107      # It's still not found. Now this is an unrecoverable error.
34108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34109$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34110      has_space=`$ECHO "$complete" | $GREP " "`
34111      if test "x$has_space" != x; then
34112        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34113$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34114      fi
34115      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34116    fi
34117  fi
34118
34119  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34120  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34121  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34122  # "foo.exe" is OK but "foo" is an error.
34123  #
34124  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34125  # It is also a way to make sure we got the proper file name for the real test later on.
34126  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34127  if test "x$test_shortpath" = x; then
34128    # Short path failed, file does not exist as specified.
34129    # Try adding .exe or .cmd
34130    if test -f "${new_path}.exe"; then
34131      input_to_shortpath="${new_path}.exe"
34132    elif test -f "${new_path}.cmd"; then
34133      input_to_shortpath="${new_path}.cmd"
34134    else
34135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
34136$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
34137      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34138$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34139      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34140    fi
34141  else
34142    input_to_shortpath="$new_path"
34143  fi
34144
34145  # Call helper function which possibly converts this using DOS-style short mode.
34146  # If so, the updated path is stored in $new_path.
34147  new_path="$input_to_shortpath"
34148
34149  input_path="$input_to_shortpath"
34150  # Check if we need to convert this using DOS-style short mode. If the path
34151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34152  # take no chances and rewrite it.
34153  # Note: m4 eats our [], so we need to use [ and ] instead.
34154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34155  if test "x$has_forbidden_chars" != x; then
34156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34157    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34158    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34159    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34160      # Going to short mode and back again did indeed matter. Since short mode is
34161      # case insensitive, let's make it lowercase to improve readability.
34162      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34163      # Now convert it back to Unix-style (cygpath)
34164      input_path=`$CYGPATH -u "$shortmode_path"`
34165      new_path="$input_path"
34166    fi
34167  fi
34168
34169  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34170  if test "x$test_cygdrive_prefix" = x; then
34171    # As a simple fix, exclude /usr/bin since it's not a real path.
34172    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34173      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34174      # a path prefixed by /cygdrive for fixpath to work.
34175      new_path="$CYGWIN_ROOT_PATH$input_path"
34176    fi
34177  fi
34178
34179  # remove trailing .exe if any
34180  new_path="${new_path/%.exe/}"
34181
34182    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34183
34184  # First separate the path from the arguments. This will split at the first
34185  # space.
34186  complete="$CC"
34187  path="${complete%% *}"
34188  tmp="$complete EOL"
34189  arguments="${tmp#* }"
34190
34191  # Input might be given as Windows format, start by converting to
34192  # unix format.
34193  new_path="$path"
34194
34195  windows_path="$new_path"
34196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34197    unix_path=`$CYGPATH -u "$windows_path"`
34198    new_path="$unix_path"
34199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34201    new_path="$unix_path"
34202  fi
34203
34204
34205  # Now try to locate executable using which
34206  new_path=`$WHICH "$new_path" 2> /dev/null`
34207
34208  if test "x$new_path" = x; then
34209    # Oops. Which didn't find the executable.
34210    # The splitting of arguments from the executable at a space might have been incorrect,
34211    # since paths with space are more likely in Windows. Give it another try with the whole
34212    # argument.
34213    path="$complete"
34214    arguments="EOL"
34215    new_path="$path"
34216
34217  windows_path="$new_path"
34218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34219    unix_path=`$CYGPATH -u "$windows_path"`
34220    new_path="$unix_path"
34221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34223    new_path="$unix_path"
34224  fi
34225
34226
34227    new_path=`$WHICH "$new_path" 2> /dev/null`
34228    # bat and cmd files are not always considered executable in MSYS causing which
34229    # to not find them
34230    if test "x$new_path" = x \
34231        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34232        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34233      new_path="$path"
34234
34235  windows_path="$new_path"
34236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34237    unix_path=`$CYGPATH -u "$windows_path"`
34238    new_path="$unix_path"
34239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34241    new_path="$unix_path"
34242  fi
34243
34244    fi
34245
34246    if test "x$new_path" = x; then
34247      # It's still not found. Now this is an unrecoverable error.
34248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34249$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34250      has_space=`$ECHO "$complete" | $GREP " "`
34251      if test "x$has_space" != x; then
34252        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34253$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34254      fi
34255      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34256    fi
34257  fi
34258
34259  # Now new_path has a complete unix path to the binary
34260  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34261    # Keep paths in /bin as-is, but remove trailing .exe if any
34262    new_path="${new_path/%.exe/}"
34263    # Do not save /bin paths to all_fixpath_prefixes!
34264  else
34265    # Not in mixed or Windows style, start by that.
34266    new_path=`cmd //c echo $new_path`
34267
34268  input_path="$new_path"
34269  # Check if we need to convert this using DOS-style short mode. If the path
34270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34271  # take no chances and rewrite it.
34272  # Note: m4 eats our [], so we need to use [ and ] instead.
34273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34274  if test "x$has_forbidden_chars" != x; then
34275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34277  fi
34278
34279    # Output is in $new_path
34280
34281  windows_path="$new_path"
34282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34283    unix_path=`$CYGPATH -u "$windows_path"`
34284    new_path="$unix_path"
34285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34287    new_path="$unix_path"
34288  fi
34289
34290    # remove trailing .exe if any
34291    new_path="${new_path/%.exe/}"
34292
34293    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34294    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34295  fi
34296
34297    else
34298      # We're on a unix platform. Hooray! :)
34299      # First separate the path from the arguments. This will split at the first
34300      # space.
34301      complete="$CC"
34302      path="${complete%% *}"
34303      tmp="$complete EOL"
34304      arguments="${tmp#* }"
34305
34306      # Cannot rely on the command "which" here since it doesn't always work.
34307      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34308      if test -z "$is_absolute_path"; then
34309        # Path to executable is not absolute. Find it.
34310        IFS_save="$IFS"
34311        IFS=:
34312        for p in $PATH; do
34313          if test -f "$p/$path" && test -x "$p/$path"; then
34314            new_path="$p/$path"
34315            break
34316          fi
34317        done
34318        IFS="$IFS_save"
34319      else
34320        # This is an absolute path, we can use it without further modifications.
34321        new_path="$path"
34322      fi
34323
34324      if test "x$new_path" = x; then
34325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34326$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34327        has_space=`$ECHO "$complete" | $GREP " "`
34328        if test "x$has_space" != x; then
34329          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34330$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34331        fi
34332        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34333      fi
34334    fi
34335
34336    # Now join together the path and the arguments once again
34337    if test "x$arguments" != xEOL; then
34338      new_complete="$new_path ${arguments% *}"
34339    else
34340      new_complete="$new_path"
34341    fi
34342
34343    if test "x$complete" != "x$new_complete"; then
34344      CC="$new_complete"
34345      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34346$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34347    fi
34348  fi
34349
34350  TEST_COMPILER="$CC"
34351
34352  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34353$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34354  SYMLINK_ORIGINAL="$TEST_COMPILER"
34355
34356  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34357    # Follow a chain of symbolic links. Use readlink
34358    # where it exists, else fall back to horribly
34359    # complicated shell code.
34360    if test "x$READLINK_TESTED" != yes; then
34361      # On MacOSX there is a readlink tool with a different
34362      # purpose than the GNU readlink tool. Check the found readlink.
34363      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34364      if test "x$ISGNU" = x; then
34365        # A readlink that we do not know how to use.
34366        # Are there other non-GNU readlinks out there?
34367        READLINK_TESTED=yes
34368        READLINK=
34369      fi
34370    fi
34371
34372    if test "x$READLINK" != x; then
34373      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34374    else
34375      # Save the current directory for restoring afterwards
34376      STARTDIR=$PWD
34377      COUNTER=0
34378      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34379      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34380      cd $sym_link_dir
34381      # Use -P flag to resolve symlinks in directories.
34382      cd `$THEPWDCMD -P`
34383      sym_link_dir=`$THEPWDCMD -P`
34384      # Resolve file symlinks
34385      while test $COUNTER -lt 20; do
34386        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34387        if test "x$ISLINK" == x; then
34388          # This is not a symbolic link! We are done!
34389          break
34390        fi
34391        # Again resolve directory symlinks since the target of the just found
34392        # link could be in a different directory
34393        cd `$DIRNAME $ISLINK`
34394        sym_link_dir=`$THEPWDCMD -P`
34395        sym_link_file=`$BASENAME $ISLINK`
34396        let COUNTER=COUNTER+1
34397      done
34398      cd $STARTDIR
34399      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34400    fi
34401  fi
34402
34403  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34404    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34405$as_echo "no symlink" >&6; }
34406  else
34407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34408$as_echo "$SYMLINK_ORIGINAL" >&6; }
34409
34410    # We can't handle ccache by gcc wrappers, since we need to know if we're
34411    # using ccache. Instead ccache usage must be controlled by a configure option.
34412    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34413    if test "x$COMPILER_BASENAME" = "xccache"; then
34414      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34415$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34416      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34417    fi
34418  fi
34419
34420
34421  COMPILER=$CC
34422  COMPILER_NAME=$COMPILER_NAME
34423
34424  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34425    # cc -V output typically looks like
34426    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34427    # or
34428    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34429    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34430    # Check that this is likely to be the Solaris Studio cc.
34431    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34432    if test $? -ne 0; then
34433      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34434      { $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
34435$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34436      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34437$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34438      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34439$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34440      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34441    fi
34442    # Remove usage instructions (if present), and
34443    # collapse compiler output into a single line
34444    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34445        $SED -e 's/ *[Uu]sage:.*//'`
34446    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34447        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34448  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34449    # xlc -qversion output typically looks like
34450    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34451    #     Version: 11.01.0000.0015
34452    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34453    # Check that this is likely to be the IBM XL C compiler.
34454    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34455    if test $? -ne 0; then
34456      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34457      { $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
34458$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34459      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34460$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34461      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34462$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34463      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34464    fi
34465    # Collapse compiler output into a single line
34466    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34467    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34468        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34469  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34470    # There is no specific version flag, but all output starts with a version string.
34471    # First line typically looks something like:
34472    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34473    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34474    # Check that this is likely to be Microsoft CL.EXE.
34475    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34476    if test $? -ne 0; then
34477      { $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
34478$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34479      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34480$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34481      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34482    fi
34483    # Collapse compiler output into a single line
34484    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34485    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34486        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34487  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34488    # gcc --version output typically looks like
34489    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34490    #     Copyright (C) 2013 Free Software Foundation, Inc.
34491    #     This is free software; see the source for copying conditions.  There is NO
34492    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34493    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34494    # Check that this is likely to be GCC.
34495    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34496    if test $? -ne 0; then
34497      { $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
34498$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34499      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34500$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34501      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34502    fi
34503    # Remove Copyright and legalese from version string, and
34504    # collapse into a single line
34505    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34506        $SED -e 's/ *Copyright .*//'`
34507    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34508        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34509  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34510    # clang --version output typically looks like
34511    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34512    #    clang version 3.3 (tags/RELEASE_33/final)
34513    # or
34514    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34515    #    Target: x86_64-pc-linux-gnu
34516    #    Thread model: posix
34517    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34518    # Check that this is likely to be clang
34519    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34520    if test $? -ne 0; then
34521      { $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
34522$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34523      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34524$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34525      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34526    fi
34527    # Collapse compiler output into a single line
34528    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34529    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34530        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34531  else
34532      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34533  fi
34534  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34535  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34536  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34537  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34538
34539  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34540$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34541
34542
34543  # Now that we have resolved CC ourself, let autoconf have its go at it
34544  ac_ext=c
34545ac_cpp='$CPP $CPPFLAGS'
34546ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34547ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34548ac_compiler_gnu=$ac_cv_c_compiler_gnu
34549if test -n "$ac_tool_prefix"; then
34550  for ac_prog in $CC
34551  do
34552    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34553set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34555$as_echo_n "checking for $ac_word... " >&6; }
34556if ${ac_cv_prog_CC+:} false; then :
34557  $as_echo_n "(cached) " >&6
34558else
34559  if test -n "$CC"; then
34560  ac_cv_prog_CC="$CC" # Let the user override the test.
34561else
34562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34563for as_dir in $PATH
34564do
34565  IFS=$as_save_IFS
34566  test -z "$as_dir" && as_dir=.
34567    for ac_exec_ext in '' $ac_executable_extensions; do
34568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34569    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34571    break 2
34572  fi
34573done
34574  done
34575IFS=$as_save_IFS
34576
34577fi
34578fi
34579CC=$ac_cv_prog_CC
34580if test -n "$CC"; then
34581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34582$as_echo "$CC" >&6; }
34583else
34584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34585$as_echo "no" >&6; }
34586fi
34587
34588
34589    test -n "$CC" && break
34590  done
34591fi
34592if test -z "$CC"; then
34593  ac_ct_CC=$CC
34594  for ac_prog in $CC
34595do
34596  # Extract the first word of "$ac_prog", so it can be a program name with args.
34597set dummy $ac_prog; ac_word=$2
34598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34599$as_echo_n "checking for $ac_word... " >&6; }
34600if ${ac_cv_prog_ac_ct_CC+:} false; then :
34601  $as_echo_n "(cached) " >&6
34602else
34603  if test -n "$ac_ct_CC"; then
34604  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34605else
34606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34607for as_dir in $PATH
34608do
34609  IFS=$as_save_IFS
34610  test -z "$as_dir" && as_dir=.
34611    for ac_exec_ext in '' $ac_executable_extensions; do
34612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34613    ac_cv_prog_ac_ct_CC="$ac_prog"
34614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34615    break 2
34616  fi
34617done
34618  done
34619IFS=$as_save_IFS
34620
34621fi
34622fi
34623ac_ct_CC=$ac_cv_prog_ac_ct_CC
34624if test -n "$ac_ct_CC"; then
34625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34626$as_echo "$ac_ct_CC" >&6; }
34627else
34628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34629$as_echo "no" >&6; }
34630fi
34631
34632
34633  test -n "$ac_ct_CC" && break
34634done
34635
34636  if test "x$ac_ct_CC" = x; then
34637    CC=""
34638  else
34639    case $cross_compiling:$ac_tool_warned in
34640yes:)
34641{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34642$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34643ac_tool_warned=yes ;;
34644esac
34645    CC=$ac_ct_CC
34646  fi
34647fi
34648
34649
34650test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34651$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34652as_fn_error $? "no acceptable C compiler found in \$PATH
34653See \`config.log' for more details" "$LINENO" 5; }
34654
34655# Provide some information about the compiler.
34656$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34657set X $ac_compile
34658ac_compiler=$2
34659for ac_option in --version -v -V -qversion; do
34660  { { ac_try="$ac_compiler $ac_option >&5"
34661case "(($ac_try" in
34662  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34663  *) ac_try_echo=$ac_try;;
34664esac
34665eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34666$as_echo "$ac_try_echo"; } >&5
34667  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34668  ac_status=$?
34669  if test -s conftest.err; then
34670    sed '10a\
34671... rest of stderr output deleted ...
34672         10q' conftest.err >conftest.er1
34673    cat conftest.er1 >&5
34674  fi
34675  rm -f conftest.er1 conftest.err
34676  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34677  test $ac_status = 0; }
34678done
34679
34680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34681/* end confdefs.h.  */
34682
34683int
34684main ()
34685{
34686
34687  ;
34688  return 0;
34689}
34690_ACEOF
34691ac_clean_files_save=$ac_clean_files
34692ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34693# Try to create an executable without -o first, disregard a.out.
34694# It will help us diagnose broken compilers, and finding out an intuition
34695# of exeext.
34696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34697$as_echo_n "checking whether the C compiler works... " >&6; }
34698ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34699
34700# The possible output files:
34701ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34702
34703ac_rmfiles=
34704for ac_file in $ac_files
34705do
34706  case $ac_file in
34707    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34708    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34709  esac
34710done
34711rm -f $ac_rmfiles
34712
34713if { { ac_try="$ac_link_default"
34714case "(($ac_try" in
34715  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34716  *) ac_try_echo=$ac_try;;
34717esac
34718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34719$as_echo "$ac_try_echo"; } >&5
34720  (eval "$ac_link_default") 2>&5
34721  ac_status=$?
34722  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34723  test $ac_status = 0; }; then :
34724  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34725# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34726# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34727# so that the user can short-circuit this test for compilers unknown to
34728# Autoconf.
34729for ac_file in $ac_files ''
34730do
34731  test -f "$ac_file" || continue
34732  case $ac_file in
34733    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34734	;;
34735    [ab].out )
34736	# We found the default executable, but exeext='' is most
34737	# certainly right.
34738	break;;
34739    *.* )
34740	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34741	then :; else
34742	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34743	fi
34744	# We set ac_cv_exeext here because the later test for it is not
34745	# safe: cross compilers may not add the suffix if given an `-o'
34746	# argument, so we may need to know it at that point already.
34747	# Even if this section looks crufty: it has the advantage of
34748	# actually working.
34749	break;;
34750    * )
34751	break;;
34752  esac
34753done
34754test "$ac_cv_exeext" = no && ac_cv_exeext=
34755
34756else
34757  ac_file=''
34758fi
34759if test -z "$ac_file"; then :
34760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34761$as_echo "no" >&6; }
34762$as_echo "$as_me: failed program was:" >&5
34763sed 's/^/| /' conftest.$ac_ext >&5
34764
34765{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34767as_fn_error 77 "C compiler cannot create executables
34768See \`config.log' for more details" "$LINENO" 5; }
34769else
34770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34771$as_echo "yes" >&6; }
34772fi
34773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34774$as_echo_n "checking for C compiler default output file name... " >&6; }
34775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34776$as_echo "$ac_file" >&6; }
34777ac_exeext=$ac_cv_exeext
34778
34779rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34780ac_clean_files=$ac_clean_files_save
34781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34782$as_echo_n "checking for suffix of executables... " >&6; }
34783if { { ac_try="$ac_link"
34784case "(($ac_try" in
34785  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34786  *) ac_try_echo=$ac_try;;
34787esac
34788eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34789$as_echo "$ac_try_echo"; } >&5
34790  (eval "$ac_link") 2>&5
34791  ac_status=$?
34792  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34793  test $ac_status = 0; }; then :
34794  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34795# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34796# work properly (i.e., refer to `conftest.exe'), while it won't with
34797# `rm'.
34798for ac_file in conftest.exe conftest conftest.*; do
34799  test -f "$ac_file" || continue
34800  case $ac_file in
34801    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34802    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34803	  break;;
34804    * ) break;;
34805  esac
34806done
34807else
34808  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34810as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34811See \`config.log' for more details" "$LINENO" 5; }
34812fi
34813rm -f conftest conftest$ac_cv_exeext
34814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34815$as_echo "$ac_cv_exeext" >&6; }
34816
34817rm -f conftest.$ac_ext
34818EXEEXT=$ac_cv_exeext
34819ac_exeext=$EXEEXT
34820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34821/* end confdefs.h.  */
34822#include <stdio.h>
34823int
34824main ()
34825{
34826FILE *f = fopen ("conftest.out", "w");
34827 return ferror (f) || fclose (f) != 0;
34828
34829  ;
34830  return 0;
34831}
34832_ACEOF
34833ac_clean_files="$ac_clean_files conftest.out"
34834# Check that the compiler produces executables we can run.  If not, either
34835# the compiler is broken, or we cross compile.
34836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34837$as_echo_n "checking whether we are cross compiling... " >&6; }
34838if test "$cross_compiling" != yes; then
34839  { { ac_try="$ac_link"
34840case "(($ac_try" in
34841  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34842  *) ac_try_echo=$ac_try;;
34843esac
34844eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34845$as_echo "$ac_try_echo"; } >&5
34846  (eval "$ac_link") 2>&5
34847  ac_status=$?
34848  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34849  test $ac_status = 0; }
34850  if { ac_try='./conftest$ac_cv_exeext'
34851  { { case "(($ac_try" in
34852  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34853  *) ac_try_echo=$ac_try;;
34854esac
34855eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34856$as_echo "$ac_try_echo"; } >&5
34857  (eval "$ac_try") 2>&5
34858  ac_status=$?
34859  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34860  test $ac_status = 0; }; }; then
34861    cross_compiling=no
34862  else
34863    if test "$cross_compiling" = maybe; then
34864	cross_compiling=yes
34865    else
34866	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34867$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34868as_fn_error $? "cannot run C compiled programs.
34869If you meant to cross compile, use \`--host'.
34870See \`config.log' for more details" "$LINENO" 5; }
34871    fi
34872  fi
34873fi
34874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34875$as_echo "$cross_compiling" >&6; }
34876
34877rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34878ac_clean_files=$ac_clean_files_save
34879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34880$as_echo_n "checking for suffix of object files... " >&6; }
34881if ${ac_cv_objext+:} false; then :
34882  $as_echo_n "(cached) " >&6
34883else
34884  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34885/* end confdefs.h.  */
34886
34887int
34888main ()
34889{
34890
34891  ;
34892  return 0;
34893}
34894_ACEOF
34895rm -f conftest.o conftest.obj
34896if { { ac_try="$ac_compile"
34897case "(($ac_try" in
34898  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34899  *) ac_try_echo=$ac_try;;
34900esac
34901eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34902$as_echo "$ac_try_echo"; } >&5
34903  (eval "$ac_compile") 2>&5
34904  ac_status=$?
34905  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34906  test $ac_status = 0; }; then :
34907  for ac_file in conftest.o conftest.obj conftest.*; do
34908  test -f "$ac_file" || continue;
34909  case $ac_file in
34910    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34911    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34912       break;;
34913  esac
34914done
34915else
34916  $as_echo "$as_me: failed program was:" >&5
34917sed 's/^/| /' conftest.$ac_ext >&5
34918
34919{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34920$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34921as_fn_error $? "cannot compute suffix of object files: cannot compile
34922See \`config.log' for more details" "$LINENO" 5; }
34923fi
34924rm -f conftest.$ac_cv_objext conftest.$ac_ext
34925fi
34926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34927$as_echo "$ac_cv_objext" >&6; }
34928OBJEXT=$ac_cv_objext
34929ac_objext=$OBJEXT
34930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34931$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34932if ${ac_cv_c_compiler_gnu+:} false; then :
34933  $as_echo_n "(cached) " >&6
34934else
34935  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34936/* end confdefs.h.  */
34937
34938int
34939main ()
34940{
34941#ifndef __GNUC__
34942       choke me
34943#endif
34944
34945  ;
34946  return 0;
34947}
34948_ACEOF
34949if ac_fn_c_try_compile "$LINENO"; then :
34950  ac_compiler_gnu=yes
34951else
34952  ac_compiler_gnu=no
34953fi
34954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34955ac_cv_c_compiler_gnu=$ac_compiler_gnu
34956
34957fi
34958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34959$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34960if test $ac_compiler_gnu = yes; then
34961  GCC=yes
34962else
34963  GCC=
34964fi
34965ac_test_CFLAGS=${CFLAGS+set}
34966ac_save_CFLAGS=$CFLAGS
34967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34968$as_echo_n "checking whether $CC accepts -g... " >&6; }
34969if ${ac_cv_prog_cc_g+:} false; then :
34970  $as_echo_n "(cached) " >&6
34971else
34972  ac_save_c_werror_flag=$ac_c_werror_flag
34973   ac_c_werror_flag=yes
34974   ac_cv_prog_cc_g=no
34975   CFLAGS="-g"
34976   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34977/* end confdefs.h.  */
34978
34979int
34980main ()
34981{
34982
34983  ;
34984  return 0;
34985}
34986_ACEOF
34987if ac_fn_c_try_compile "$LINENO"; then :
34988  ac_cv_prog_cc_g=yes
34989else
34990  CFLAGS=""
34991      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34992/* end confdefs.h.  */
34993
34994int
34995main ()
34996{
34997
34998  ;
34999  return 0;
35000}
35001_ACEOF
35002if ac_fn_c_try_compile "$LINENO"; then :
35003
35004else
35005  ac_c_werror_flag=$ac_save_c_werror_flag
35006	 CFLAGS="-g"
35007	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35008/* end confdefs.h.  */
35009
35010int
35011main ()
35012{
35013
35014  ;
35015  return 0;
35016}
35017_ACEOF
35018if ac_fn_c_try_compile "$LINENO"; then :
35019  ac_cv_prog_cc_g=yes
35020fi
35021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35022fi
35023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35024fi
35025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35026   ac_c_werror_flag=$ac_save_c_werror_flag
35027fi
35028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
35029$as_echo "$ac_cv_prog_cc_g" >&6; }
35030if test "$ac_test_CFLAGS" = set; then
35031  CFLAGS=$ac_save_CFLAGS
35032elif test $ac_cv_prog_cc_g = yes; then
35033  if test "$GCC" = yes; then
35034    CFLAGS="-g -O2"
35035  else
35036    CFLAGS="-g"
35037  fi
35038else
35039  if test "$GCC" = yes; then
35040    CFLAGS="-O2"
35041  else
35042    CFLAGS=
35043  fi
35044fi
35045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
35046$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
35047if ${ac_cv_prog_cc_c89+:} false; then :
35048  $as_echo_n "(cached) " >&6
35049else
35050  ac_cv_prog_cc_c89=no
35051ac_save_CC=$CC
35052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35053/* end confdefs.h.  */
35054#include <stdarg.h>
35055#include <stdio.h>
35056struct stat;
35057/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
35058struct buf { int x; };
35059FILE * (*rcsopen) (struct buf *, struct stat *, int);
35060static char *e (p, i)
35061     char **p;
35062     int i;
35063{
35064  return p[i];
35065}
35066static char *f (char * (*g) (char **, int), char **p, ...)
35067{
35068  char *s;
35069  va_list v;
35070  va_start (v,p);
35071  s = g (p, va_arg (v,int));
35072  va_end (v);
35073  return s;
35074}
35075
35076/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
35077   function prototypes and stuff, but not '\xHH' hex character constants.
35078   These don't provoke an error unfortunately, instead are silently treated
35079   as 'x'.  The following induces an error, until -std is added to get
35080   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
35081   array size at least.  It's necessary to write '\x00'==0 to get something
35082   that's true only with -std.  */
35083int osf4_cc_array ['\x00' == 0 ? 1 : -1];
35084
35085/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
35086   inside strings and character constants.  */
35087#define FOO(x) 'x'
35088int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
35089
35090int test (int i, double x);
35091struct s1 {int (*f) (int a);};
35092struct s2 {int (*f) (double a);};
35093int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
35094int argc;
35095char **argv;
35096int
35097main ()
35098{
35099return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
35100  ;
35101  return 0;
35102}
35103_ACEOF
35104for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
35105	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
35106do
35107  CC="$ac_save_CC $ac_arg"
35108  if ac_fn_c_try_compile "$LINENO"; then :
35109  ac_cv_prog_cc_c89=$ac_arg
35110fi
35111rm -f core conftest.err conftest.$ac_objext
35112  test "x$ac_cv_prog_cc_c89" != "xno" && break
35113done
35114rm -f conftest.$ac_ext
35115CC=$ac_save_CC
35116
35117fi
35118# AC_CACHE_VAL
35119case "x$ac_cv_prog_cc_c89" in
35120  x)
35121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
35122$as_echo "none needed" >&6; } ;;
35123  xno)
35124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
35125$as_echo "unsupported" >&6; } ;;
35126  *)
35127    CC="$CC $ac_cv_prog_cc_c89"
35128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
35129$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
35130esac
35131if test "x$ac_cv_prog_cc_c89" != xno; then :
35132
35133fi
35134
35135ac_ext=cpp
35136ac_cpp='$CXXCPP $CPPFLAGS'
35137ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35138ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35139ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35140
35141
35142
35143  COMPILER_NAME=C++
35144  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
35145
35146  if test "x$CXX" != x; then
35147    # User has supplied compiler name already, always let that override.
35148    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
35149$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
35150    if test "x`basename $CXX`" = "x$CXX"; then
35151      # A command without a complete path is provided, search $PATH.
35152
35153      for ac_prog in $CXX
35154do
35155  # Extract the first word of "$ac_prog", so it can be a program name with args.
35156set dummy $ac_prog; ac_word=$2
35157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35158$as_echo_n "checking for $ac_word... " >&6; }
35159if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35160  $as_echo_n "(cached) " >&6
35161else
35162  case $POTENTIAL_CXX in
35163  [\\/]* | ?:[\\/]*)
35164  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35165  ;;
35166  *)
35167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35168for as_dir in $PATH
35169do
35170  IFS=$as_save_IFS
35171  test -z "$as_dir" && as_dir=.
35172    for ac_exec_ext in '' $ac_executable_extensions; do
35173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35174    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35176    break 2
35177  fi
35178done
35179  done
35180IFS=$as_save_IFS
35181
35182  ;;
35183esac
35184fi
35185POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35186if test -n "$POTENTIAL_CXX"; then
35187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35188$as_echo "$POTENTIAL_CXX" >&6; }
35189else
35190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35191$as_echo "no" >&6; }
35192fi
35193
35194
35195  test -n "$POTENTIAL_CXX" && break
35196done
35197
35198      if test "x$POTENTIAL_CXX" != x; then
35199        CXX=$POTENTIAL_CXX
35200      else
35201        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35202      fi
35203    else
35204      # Otherwise it might already be a complete path
35205      if test ! -x "$CXX"; then
35206        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35207      fi
35208    fi
35209  else
35210    # No user supplied value. Locate compiler ourselves.
35211
35212    # If we are cross compiling, assume cross compilation tools follows the
35213    # cross compilation standard where they are prefixed with the autoconf
35214    # standard name for the target. For example the binary
35215    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35216    # If we are not cross compiling, then the default compiler name will be
35217    # used.
35218
35219    CXX=
35220    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35221    # before checking the rest of the PATH.
35222    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35223    # step, this should not be necessary.
35224    if test -n "$TOOLCHAIN_PATH"; then
35225      PATH_save="$PATH"
35226      PATH="$TOOLCHAIN_PATH"
35227      if test -n "$ac_tool_prefix"; then
35228  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35229set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35231$as_echo_n "checking for $ac_word... " >&6; }
35232if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35233  $as_echo_n "(cached) " >&6
35234else
35235  case $TOOLCHAIN_PATH_CXX in
35236  [\\/]* | ?:[\\/]*)
35237  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35238  ;;
35239  *)
35240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35241for as_dir in $PATH
35242do
35243  IFS=$as_save_IFS
35244  test -z "$as_dir" && as_dir=.
35245    for ac_exec_ext in '' $ac_executable_extensions; do
35246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35247    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35249    break 2
35250  fi
35251done
35252  done
35253IFS=$as_save_IFS
35254
35255  ;;
35256esac
35257fi
35258TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35259if test -n "$TOOLCHAIN_PATH_CXX"; then
35260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35261$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35262else
35263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35264$as_echo "no" >&6; }
35265fi
35266
35267
35268fi
35269if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35270  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35271  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35272set dummy $SEARCH_LIST; ac_word=$2
35273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35274$as_echo_n "checking for $ac_word... " >&6; }
35275if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35276  $as_echo_n "(cached) " >&6
35277else
35278  case $ac_pt_TOOLCHAIN_PATH_CXX in
35279  [\\/]* | ?:[\\/]*)
35280  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35281  ;;
35282  *)
35283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35284for as_dir in $PATH
35285do
35286  IFS=$as_save_IFS
35287  test -z "$as_dir" && as_dir=.
35288    for ac_exec_ext in '' $ac_executable_extensions; do
35289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35290    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35292    break 2
35293  fi
35294done
35295  done
35296IFS=$as_save_IFS
35297
35298  ;;
35299esac
35300fi
35301ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35302if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35304$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35305else
35306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35307$as_echo "no" >&6; }
35308fi
35309
35310  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35311    TOOLCHAIN_PATH_CXX=""
35312  else
35313    case $cross_compiling:$ac_tool_warned in
35314yes:)
35315{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35316$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35317ac_tool_warned=yes ;;
35318esac
35319    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35320  fi
35321else
35322  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35323fi
35324
35325      CXX=$TOOLCHAIN_PATH_CXX
35326      PATH="$PATH_save"
35327    fi
35328
35329    # AC_PATH_TOOL can't be run multiple times with the same variable,
35330    # so create a new name for this run.
35331    if test "x$CXX" = x; then
35332      if test -n "$ac_tool_prefix"; then
35333  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35334set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35336$as_echo_n "checking for $ac_word... " >&6; }
35337if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35338  $as_echo_n "(cached) " >&6
35339else
35340  case $POTENTIAL_CXX in
35341  [\\/]* | ?:[\\/]*)
35342  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35343  ;;
35344  *)
35345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35346for as_dir in $PATH
35347do
35348  IFS=$as_save_IFS
35349  test -z "$as_dir" && as_dir=.
35350    for ac_exec_ext in '' $ac_executable_extensions; do
35351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35352    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35354    break 2
35355  fi
35356done
35357  done
35358IFS=$as_save_IFS
35359
35360  ;;
35361esac
35362fi
35363POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35364if test -n "$POTENTIAL_CXX"; then
35365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35366$as_echo "$POTENTIAL_CXX" >&6; }
35367else
35368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35369$as_echo "no" >&6; }
35370fi
35371
35372
35373fi
35374if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35375  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35376  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35377set dummy $SEARCH_LIST; ac_word=$2
35378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35379$as_echo_n "checking for $ac_word... " >&6; }
35380if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35381  $as_echo_n "(cached) " >&6
35382else
35383  case $ac_pt_POTENTIAL_CXX in
35384  [\\/]* | ?:[\\/]*)
35385  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35386  ;;
35387  *)
35388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35389for as_dir in $PATH
35390do
35391  IFS=$as_save_IFS
35392  test -z "$as_dir" && as_dir=.
35393    for ac_exec_ext in '' $ac_executable_extensions; do
35394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35395    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35397    break 2
35398  fi
35399done
35400  done
35401IFS=$as_save_IFS
35402
35403  ;;
35404esac
35405fi
35406ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35407if test -n "$ac_pt_POTENTIAL_CXX"; then
35408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35409$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35410else
35411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35412$as_echo "no" >&6; }
35413fi
35414
35415  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35416    POTENTIAL_CXX=""
35417  else
35418    case $cross_compiling:$ac_tool_warned in
35419yes:)
35420{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35421$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35422ac_tool_warned=yes ;;
35423esac
35424    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35425  fi
35426else
35427  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35428fi
35429
35430      CXX=$POTENTIAL_CXX
35431    fi
35432
35433    if test "x$CXX" = x; then
35434
35435  # Print a helpful message on how to acquire the necessary build dependency.
35436  # devkit is the help tag: freetype, cups, alsa etc
35437  MISSING_DEPENDENCY=devkit
35438
35439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35440    cygwin_help $MISSING_DEPENDENCY
35441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35442    msys_help $MISSING_DEPENDENCY
35443  else
35444    PKGHANDLER_COMMAND=
35445
35446    case $PKGHANDLER in
35447      apt-get)
35448        apt_help     $MISSING_DEPENDENCY ;;
35449      yum)
35450        yum_help     $MISSING_DEPENDENCY ;;
35451      brew)
35452        brew_help    $MISSING_DEPENDENCY ;;
35453      port)
35454        port_help    $MISSING_DEPENDENCY ;;
35455      pkgutil)
35456        pkgutil_help $MISSING_DEPENDENCY ;;
35457      pkgadd)
35458        pkgadd_help  $MISSING_DEPENDENCY ;;
35459    esac
35460
35461    if test "x$PKGHANDLER_COMMAND" != x; then
35462      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35463    fi
35464  fi
35465
35466      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35467    fi
35468  fi
35469
35470  # Now we have a compiler binary in CXX. Make sure it's okay.
35471
35472  # Only process if variable expands to non-empty
35473
35474  if test "x$CXX" != x; then
35475    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35476
35477  # First separate the path from the arguments. This will split at the first
35478  # space.
35479  complete="$CXX"
35480  path="${complete%% *}"
35481  tmp="$complete EOL"
35482  arguments="${tmp#* }"
35483
35484  # Input might be given as Windows format, start by converting to
35485  # unix format.
35486  new_path=`$CYGPATH -u "$path"`
35487
35488  # Now try to locate executable using which
35489  new_path=`$WHICH "$new_path" 2> /dev/null`
35490  # bat and cmd files are not always considered executable in cygwin causing which
35491  # to not find them
35492  if test "x$new_path" = x \
35493      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35494      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35495    new_path=`$CYGPATH -u "$path"`
35496  fi
35497  if test "x$new_path" = x; then
35498    # Oops. Which didn't find the executable.
35499    # The splitting of arguments from the executable at a space might have been incorrect,
35500    # since paths with space are more likely in Windows. Give it another try with the whole
35501    # argument.
35502    path="$complete"
35503    arguments="EOL"
35504    new_path=`$CYGPATH -u "$path"`
35505    new_path=`$WHICH "$new_path" 2> /dev/null`
35506    # bat and cmd files are not always considered executable in cygwin causing which
35507    # to not find them
35508    if test "x$new_path" = x \
35509        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35510        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35511      new_path=`$CYGPATH -u "$path"`
35512    fi
35513    if test "x$new_path" = x; then
35514      # It's still not found. Now this is an unrecoverable error.
35515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35516$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35517      has_space=`$ECHO "$complete" | $GREP " "`
35518      if test "x$has_space" != x; then
35519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35521      fi
35522      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35523    fi
35524  fi
35525
35526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35529  # "foo.exe" is OK but "foo" is an error.
35530  #
35531  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35532  # It is also a way to make sure we got the proper file name for the real test later on.
35533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35534  if test "x$test_shortpath" = x; then
35535    # Short path failed, file does not exist as specified.
35536    # Try adding .exe or .cmd
35537    if test -f "${new_path}.exe"; then
35538      input_to_shortpath="${new_path}.exe"
35539    elif test -f "${new_path}.cmd"; then
35540      input_to_shortpath="${new_path}.cmd"
35541    else
35542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35543$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35544      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35545$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35546      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35547    fi
35548  else
35549    input_to_shortpath="$new_path"
35550  fi
35551
35552  # Call helper function which possibly converts this using DOS-style short mode.
35553  # If so, the updated path is stored in $new_path.
35554  new_path="$input_to_shortpath"
35555
35556  input_path="$input_to_shortpath"
35557  # Check if we need to convert this using DOS-style short mode. If the path
35558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35559  # take no chances and rewrite it.
35560  # Note: m4 eats our [], so we need to use [ and ] instead.
35561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35562  if test "x$has_forbidden_chars" != x; then
35563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35567      # Going to short mode and back again did indeed matter. Since short mode is
35568      # case insensitive, let's make it lowercase to improve readability.
35569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35570      # Now convert it back to Unix-style (cygpath)
35571      input_path=`$CYGPATH -u "$shortmode_path"`
35572      new_path="$input_path"
35573    fi
35574  fi
35575
35576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35577  if test "x$test_cygdrive_prefix" = x; then
35578    # As a simple fix, exclude /usr/bin since it's not a real path.
35579    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35581      # a path prefixed by /cygdrive for fixpath to work.
35582      new_path="$CYGWIN_ROOT_PATH$input_path"
35583    fi
35584  fi
35585
35586  # remove trailing .exe if any
35587  new_path="${new_path/%.exe/}"
35588
35589    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35590
35591  # First separate the path from the arguments. This will split at the first
35592  # space.
35593  complete="$CXX"
35594  path="${complete%% *}"
35595  tmp="$complete EOL"
35596  arguments="${tmp#* }"
35597
35598  # Input might be given as Windows format, start by converting to
35599  # unix format.
35600  new_path="$path"
35601
35602  windows_path="$new_path"
35603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35604    unix_path=`$CYGPATH -u "$windows_path"`
35605    new_path="$unix_path"
35606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35608    new_path="$unix_path"
35609  fi
35610
35611
35612  # Now try to locate executable using which
35613  new_path=`$WHICH "$new_path" 2> /dev/null`
35614
35615  if test "x$new_path" = x; then
35616    # Oops. Which didn't find the executable.
35617    # The splitting of arguments from the executable at a space might have been incorrect,
35618    # since paths with space are more likely in Windows. Give it another try with the whole
35619    # argument.
35620    path="$complete"
35621    arguments="EOL"
35622    new_path="$path"
35623
35624  windows_path="$new_path"
35625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35626    unix_path=`$CYGPATH -u "$windows_path"`
35627    new_path="$unix_path"
35628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35630    new_path="$unix_path"
35631  fi
35632
35633
35634    new_path=`$WHICH "$new_path" 2> /dev/null`
35635    # bat and cmd files are not always considered executable in MSYS causing which
35636    # to not find them
35637    if test "x$new_path" = x \
35638        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35639        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35640      new_path="$path"
35641
35642  windows_path="$new_path"
35643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35644    unix_path=`$CYGPATH -u "$windows_path"`
35645    new_path="$unix_path"
35646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35648    new_path="$unix_path"
35649  fi
35650
35651    fi
35652
35653    if test "x$new_path" = x; then
35654      # It's still not found. Now this is an unrecoverable error.
35655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35656$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35657      has_space=`$ECHO "$complete" | $GREP " "`
35658      if test "x$has_space" != x; then
35659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35661      fi
35662      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35663    fi
35664  fi
35665
35666  # Now new_path has a complete unix path to the binary
35667  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35668    # Keep paths in /bin as-is, but remove trailing .exe if any
35669    new_path="${new_path/%.exe/}"
35670    # Do not save /bin paths to all_fixpath_prefixes!
35671  else
35672    # Not in mixed or Windows style, start by that.
35673    new_path=`cmd //c echo $new_path`
35674
35675  input_path="$new_path"
35676  # Check if we need to convert this using DOS-style short mode. If the path
35677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35678  # take no chances and rewrite it.
35679  # Note: m4 eats our [], so we need to use [ and ] instead.
35680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35681  if test "x$has_forbidden_chars" != x; then
35682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35684  fi
35685
35686    # Output is in $new_path
35687
35688  windows_path="$new_path"
35689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35690    unix_path=`$CYGPATH -u "$windows_path"`
35691    new_path="$unix_path"
35692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35694    new_path="$unix_path"
35695  fi
35696
35697    # remove trailing .exe if any
35698    new_path="${new_path/%.exe/}"
35699
35700    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35701    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35702  fi
35703
35704    else
35705      # We're on a unix platform. Hooray! :)
35706      # First separate the path from the arguments. This will split at the first
35707      # space.
35708      complete="$CXX"
35709      path="${complete%% *}"
35710      tmp="$complete EOL"
35711      arguments="${tmp#* }"
35712
35713      # Cannot rely on the command "which" here since it doesn't always work.
35714      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35715      if test -z "$is_absolute_path"; then
35716        # Path to executable is not absolute. Find it.
35717        IFS_save="$IFS"
35718        IFS=:
35719        for p in $PATH; do
35720          if test -f "$p/$path" && test -x "$p/$path"; then
35721            new_path="$p/$path"
35722            break
35723          fi
35724        done
35725        IFS="$IFS_save"
35726      else
35727        # This is an absolute path, we can use it without further modifications.
35728        new_path="$path"
35729      fi
35730
35731      if test "x$new_path" = x; then
35732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35733$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35734        has_space=`$ECHO "$complete" | $GREP " "`
35735        if test "x$has_space" != x; then
35736          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35737$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35738        fi
35739        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35740      fi
35741    fi
35742
35743    # Now join together the path and the arguments once again
35744    if test "x$arguments" != xEOL; then
35745      new_complete="$new_path ${arguments% *}"
35746    else
35747      new_complete="$new_path"
35748    fi
35749
35750    if test "x$complete" != "x$new_complete"; then
35751      CXX="$new_complete"
35752      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35753$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35754    fi
35755  fi
35756
35757  TEST_COMPILER="$CXX"
35758
35759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35760$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35761  SYMLINK_ORIGINAL="$TEST_COMPILER"
35762
35763  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35764    # Follow a chain of symbolic links. Use readlink
35765    # where it exists, else fall back to horribly
35766    # complicated shell code.
35767    if test "x$READLINK_TESTED" != yes; then
35768      # On MacOSX there is a readlink tool with a different
35769      # purpose than the GNU readlink tool. Check the found readlink.
35770      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35771      if test "x$ISGNU" = x; then
35772        # A readlink that we do not know how to use.
35773        # Are there other non-GNU readlinks out there?
35774        READLINK_TESTED=yes
35775        READLINK=
35776      fi
35777    fi
35778
35779    if test "x$READLINK" != x; then
35780      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35781    else
35782      # Save the current directory for restoring afterwards
35783      STARTDIR=$PWD
35784      COUNTER=0
35785      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35786      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35787      cd $sym_link_dir
35788      # Use -P flag to resolve symlinks in directories.
35789      cd `$THEPWDCMD -P`
35790      sym_link_dir=`$THEPWDCMD -P`
35791      # Resolve file symlinks
35792      while test $COUNTER -lt 20; do
35793        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35794        if test "x$ISLINK" == x; then
35795          # This is not a symbolic link! We are done!
35796          break
35797        fi
35798        # Again resolve directory symlinks since the target of the just found
35799        # link could be in a different directory
35800        cd `$DIRNAME $ISLINK`
35801        sym_link_dir=`$THEPWDCMD -P`
35802        sym_link_file=`$BASENAME $ISLINK`
35803        let COUNTER=COUNTER+1
35804      done
35805      cd $STARTDIR
35806      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35807    fi
35808  fi
35809
35810  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35812$as_echo "no symlink" >&6; }
35813  else
35814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35815$as_echo "$SYMLINK_ORIGINAL" >&6; }
35816
35817    # We can't handle ccache by gcc wrappers, since we need to know if we're
35818    # using ccache. Instead ccache usage must be controlled by a configure option.
35819    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35820    if test "x$COMPILER_BASENAME" = "xccache"; then
35821      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35822$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35823      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35824    fi
35825  fi
35826
35827
35828  COMPILER=$CXX
35829  COMPILER_NAME=$COMPILER_NAME
35830
35831  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35832    # cc -V output typically looks like
35833    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35834    # or
35835    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35836    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35837    # Check that this is likely to be the Solaris Studio cc.
35838    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35839    if test $? -ne 0; then
35840      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35841      { $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
35842$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35843      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35844$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35845      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35846$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35847      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35848    fi
35849    # Remove usage instructions (if present), and
35850    # collapse compiler output into a single line
35851    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35852        $SED -e 's/ *[Uu]sage:.*//'`
35853    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35854        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35855  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35856    # xlc -qversion output typically looks like
35857    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35858    #     Version: 11.01.0000.0015
35859    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35860    # Check that this is likely to be the IBM XL C compiler.
35861    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35862    if test $? -ne 0; then
35863      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35864      { $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
35865$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35866      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35867$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35868      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35869$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35870      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35871    fi
35872    # Collapse compiler output into a single line
35873    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35874    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35875        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35876  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35877    # There is no specific version flag, but all output starts with a version string.
35878    # First line typically looks something like:
35879    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35880    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35881    # Check that this is likely to be Microsoft CL.EXE.
35882    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35883    if test $? -ne 0; then
35884      { $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
35885$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35886      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35887$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35888      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35889    fi
35890    # Collapse compiler output into a single line
35891    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35892    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35893        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35894  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35895    # gcc --version output typically looks like
35896    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35897    #     Copyright (C) 2013 Free Software Foundation, Inc.
35898    #     This is free software; see the source for copying conditions.  There is NO
35899    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35900    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35901    # Check that this is likely to be GCC.
35902    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35903    if test $? -ne 0; then
35904      { $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
35905$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35906      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35907$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35908      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35909    fi
35910    # Remove Copyright and legalese from version string, and
35911    # collapse into a single line
35912    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35913        $SED -e 's/ *Copyright .*//'`
35914    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35915        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35916  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35917    # clang --version output typically looks like
35918    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35919    #    clang version 3.3 (tags/RELEASE_33/final)
35920    # or
35921    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35922    #    Target: x86_64-pc-linux-gnu
35923    #    Thread model: posix
35924    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35925    # Check that this is likely to be clang
35926    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35927    if test $? -ne 0; then
35928      { $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
35929$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35930      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35931$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35932      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35933    fi
35934    # Collapse compiler output into a single line
35935    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35936    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35937        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35938  else
35939      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35940  fi
35941  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35942  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35943  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35944  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35945
35946  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35947$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35948
35949
35950  # Now that we have resolved CXX ourself, let autoconf have its go at it
35951  ac_ext=cpp
35952ac_cpp='$CXXCPP $CPPFLAGS'
35953ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35954ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35955ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35956if test -z "$CXX"; then
35957  if test -n "$CCC"; then
35958    CXX=$CCC
35959  else
35960    if test -n "$ac_tool_prefix"; then
35961  for ac_prog in $CXX
35962  do
35963    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35964set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35966$as_echo_n "checking for $ac_word... " >&6; }
35967if ${ac_cv_prog_CXX+:} false; then :
35968  $as_echo_n "(cached) " >&6
35969else
35970  if test -n "$CXX"; then
35971  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35972else
35973as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35974for as_dir in $PATH
35975do
35976  IFS=$as_save_IFS
35977  test -z "$as_dir" && as_dir=.
35978    for ac_exec_ext in '' $ac_executable_extensions; do
35979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35980    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35982    break 2
35983  fi
35984done
35985  done
35986IFS=$as_save_IFS
35987
35988fi
35989fi
35990CXX=$ac_cv_prog_CXX
35991if test -n "$CXX"; then
35992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35993$as_echo "$CXX" >&6; }
35994else
35995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35996$as_echo "no" >&6; }
35997fi
35998
35999
36000    test -n "$CXX" && break
36001  done
36002fi
36003if test -z "$CXX"; then
36004  ac_ct_CXX=$CXX
36005  for ac_prog in $CXX
36006do
36007  # Extract the first word of "$ac_prog", so it can be a program name with args.
36008set dummy $ac_prog; ac_word=$2
36009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36010$as_echo_n "checking for $ac_word... " >&6; }
36011if ${ac_cv_prog_ac_ct_CXX+:} false; then :
36012  $as_echo_n "(cached) " >&6
36013else
36014  if test -n "$ac_ct_CXX"; then
36015  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
36016else
36017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36018for as_dir in $PATH
36019do
36020  IFS=$as_save_IFS
36021  test -z "$as_dir" && as_dir=.
36022    for ac_exec_ext in '' $ac_executable_extensions; do
36023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36024    ac_cv_prog_ac_ct_CXX="$ac_prog"
36025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36026    break 2
36027  fi
36028done
36029  done
36030IFS=$as_save_IFS
36031
36032fi
36033fi
36034ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
36035if test -n "$ac_ct_CXX"; then
36036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
36037$as_echo "$ac_ct_CXX" >&6; }
36038else
36039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36040$as_echo "no" >&6; }
36041fi
36042
36043
36044  test -n "$ac_ct_CXX" && break
36045done
36046
36047  if test "x$ac_ct_CXX" = x; then
36048    CXX="g++"
36049  else
36050    case $cross_compiling:$ac_tool_warned in
36051yes:)
36052{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36053$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36054ac_tool_warned=yes ;;
36055esac
36056    CXX=$ac_ct_CXX
36057  fi
36058fi
36059
36060  fi
36061fi
36062# Provide some information about the compiler.
36063$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
36064set X $ac_compile
36065ac_compiler=$2
36066for ac_option in --version -v -V -qversion; do
36067  { { ac_try="$ac_compiler $ac_option >&5"
36068case "(($ac_try" in
36069  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36070  *) ac_try_echo=$ac_try;;
36071esac
36072eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
36073$as_echo "$ac_try_echo"; } >&5
36074  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
36075  ac_status=$?
36076  if test -s conftest.err; then
36077    sed '10a\
36078... rest of stderr output deleted ...
36079         10q' conftest.err >conftest.er1
36080    cat conftest.er1 >&5
36081  fi
36082  rm -f conftest.er1 conftest.err
36083  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36084  test $ac_status = 0; }
36085done
36086
36087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
36088$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
36089if ${ac_cv_cxx_compiler_gnu+:} false; then :
36090  $as_echo_n "(cached) " >&6
36091else
36092  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36093/* end confdefs.h.  */
36094
36095int
36096main ()
36097{
36098#ifndef __GNUC__
36099       choke me
36100#endif
36101
36102  ;
36103  return 0;
36104}
36105_ACEOF
36106if ac_fn_cxx_try_compile "$LINENO"; then :
36107  ac_compiler_gnu=yes
36108else
36109  ac_compiler_gnu=no
36110fi
36111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36112ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
36113
36114fi
36115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
36116$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
36117if test $ac_compiler_gnu = yes; then
36118  GXX=yes
36119else
36120  GXX=
36121fi
36122ac_test_CXXFLAGS=${CXXFLAGS+set}
36123ac_save_CXXFLAGS=$CXXFLAGS
36124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
36125$as_echo_n "checking whether $CXX accepts -g... " >&6; }
36126if ${ac_cv_prog_cxx_g+:} false; then :
36127  $as_echo_n "(cached) " >&6
36128else
36129  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
36130   ac_cxx_werror_flag=yes
36131   ac_cv_prog_cxx_g=no
36132   CXXFLAGS="-g"
36133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36134/* end confdefs.h.  */
36135
36136int
36137main ()
36138{
36139
36140  ;
36141  return 0;
36142}
36143_ACEOF
36144if ac_fn_cxx_try_compile "$LINENO"; then :
36145  ac_cv_prog_cxx_g=yes
36146else
36147  CXXFLAGS=""
36148      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36149/* end confdefs.h.  */
36150
36151int
36152main ()
36153{
36154
36155  ;
36156  return 0;
36157}
36158_ACEOF
36159if ac_fn_cxx_try_compile "$LINENO"; then :
36160
36161else
36162  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36163	 CXXFLAGS="-g"
36164	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36165/* end confdefs.h.  */
36166
36167int
36168main ()
36169{
36170
36171  ;
36172  return 0;
36173}
36174_ACEOF
36175if ac_fn_cxx_try_compile "$LINENO"; then :
36176  ac_cv_prog_cxx_g=yes
36177fi
36178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36179fi
36180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36181fi
36182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36183   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36184fi
36185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36186$as_echo "$ac_cv_prog_cxx_g" >&6; }
36187if test "$ac_test_CXXFLAGS" = set; then
36188  CXXFLAGS=$ac_save_CXXFLAGS
36189elif test $ac_cv_prog_cxx_g = yes; then
36190  if test "$GXX" = yes; then
36191    CXXFLAGS="-g -O2"
36192  else
36193    CXXFLAGS="-g"
36194  fi
36195else
36196  if test "$GXX" = yes; then
36197    CXXFLAGS="-O2"
36198  else
36199    CXXFLAGS=
36200  fi
36201fi
36202ac_ext=cpp
36203ac_cpp='$CXXCPP $CPPFLAGS'
36204ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36205ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36206ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36207
36208
36209  # This is the compiler version number on the form X.Y[.Z]
36210
36211
36212
36213
36214  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36215    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36216$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36217    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36218$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36219  fi
36220
36221  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36222  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36223    { $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
36224$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;}
36225  fi
36226
36227  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36228    { $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
36229$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36230  fi
36231
36232  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36233
36234
36235  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
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
36279
36280
36281
36282
36283
36284
36285    # Execute function body
36286
36287  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36288  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36289
36290  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36291    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36292  fi
36293
36294  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36295    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36296  fi
36297
36298  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36299  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36300
36301  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36302    :
36303
36304  else
36305    :
36306
36307          { $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
36308$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36309
36310
36311  fi
36312
36313
36314
36315
36316
36317
36318
36319
36320
36321
36322
36323
36324
36325
36326  fi
36327
36328  #
36329  # Setup the preprocessor (CPP and CXXCPP)
36330  #
36331  ac_ext=c
36332ac_cpp='$CPP $CPPFLAGS'
36333ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36334ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36335ac_compiler_gnu=$ac_cv_c_compiler_gnu
36336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36337$as_echo_n "checking how to run the C preprocessor... " >&6; }
36338# On Suns, sometimes $CPP names a directory.
36339if test -n "$CPP" && test -d "$CPP"; then
36340  CPP=
36341fi
36342if test -z "$CPP"; then
36343  if ${ac_cv_prog_CPP+:} false; then :
36344  $as_echo_n "(cached) " >&6
36345else
36346      # Double quotes because CPP needs to be expanded
36347    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36348    do
36349      ac_preproc_ok=false
36350for ac_c_preproc_warn_flag in '' yes
36351do
36352  # Use a header file that comes with gcc, so configuring glibc
36353  # with a fresh cross-compiler works.
36354  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36355  # <limits.h> exists even on freestanding compilers.
36356  # On the NeXT, cc -E runs the code through the compiler's parser,
36357  # not just through cpp. "Syntax error" is here to catch this case.
36358  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36359/* end confdefs.h.  */
36360#ifdef __STDC__
36361# include <limits.h>
36362#else
36363# include <assert.h>
36364#endif
36365		     Syntax error
36366_ACEOF
36367if ac_fn_c_try_cpp "$LINENO"; then :
36368
36369else
36370  # Broken: fails on valid input.
36371continue
36372fi
36373rm -f conftest.err conftest.i conftest.$ac_ext
36374
36375  # OK, works on sane cases.  Now check whether nonexistent headers
36376  # can be detected and how.
36377  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36378/* end confdefs.h.  */
36379#include <ac_nonexistent.h>
36380_ACEOF
36381if ac_fn_c_try_cpp "$LINENO"; then :
36382  # Broken: success on invalid input.
36383continue
36384else
36385  # Passes both tests.
36386ac_preproc_ok=:
36387break
36388fi
36389rm -f conftest.err conftest.i conftest.$ac_ext
36390
36391done
36392# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36393rm -f conftest.i conftest.err conftest.$ac_ext
36394if $ac_preproc_ok; then :
36395  break
36396fi
36397
36398    done
36399    ac_cv_prog_CPP=$CPP
36400
36401fi
36402  CPP=$ac_cv_prog_CPP
36403else
36404  ac_cv_prog_CPP=$CPP
36405fi
36406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36407$as_echo "$CPP" >&6; }
36408ac_preproc_ok=false
36409for ac_c_preproc_warn_flag in '' yes
36410do
36411  # Use a header file that comes with gcc, so configuring glibc
36412  # with a fresh cross-compiler works.
36413  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36414  # <limits.h> exists even on freestanding compilers.
36415  # On the NeXT, cc -E runs the code through the compiler's parser,
36416  # not just through cpp. "Syntax error" is here to catch this case.
36417  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36418/* end confdefs.h.  */
36419#ifdef __STDC__
36420# include <limits.h>
36421#else
36422# include <assert.h>
36423#endif
36424		     Syntax error
36425_ACEOF
36426if ac_fn_c_try_cpp "$LINENO"; then :
36427
36428else
36429  # Broken: fails on valid input.
36430continue
36431fi
36432rm -f conftest.err conftest.i conftest.$ac_ext
36433
36434  # OK, works on sane cases.  Now check whether nonexistent headers
36435  # can be detected and how.
36436  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36437/* end confdefs.h.  */
36438#include <ac_nonexistent.h>
36439_ACEOF
36440if ac_fn_c_try_cpp "$LINENO"; then :
36441  # Broken: success on invalid input.
36442continue
36443else
36444  # Passes both tests.
36445ac_preproc_ok=:
36446break
36447fi
36448rm -f conftest.err conftest.i conftest.$ac_ext
36449
36450done
36451# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36452rm -f conftest.i conftest.err conftest.$ac_ext
36453if $ac_preproc_ok; then :
36454
36455else
36456  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36457$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36458as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36459See \`config.log' for more details" "$LINENO" 5; }
36460fi
36461
36462ac_ext=cpp
36463ac_cpp='$CXXCPP $CPPFLAGS'
36464ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36465ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36466ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36467
36468
36469  # Only process if variable expands to non-empty
36470
36471  if test "x$CPP" != x; then
36472    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36473
36474  # First separate the path from the arguments. This will split at the first
36475  # space.
36476  complete="$CPP"
36477  path="${complete%% *}"
36478  tmp="$complete EOL"
36479  arguments="${tmp#* }"
36480
36481  # Input might be given as Windows format, start by converting to
36482  # unix format.
36483  new_path=`$CYGPATH -u "$path"`
36484
36485  # Now try to locate executable using which
36486  new_path=`$WHICH "$new_path" 2> /dev/null`
36487  # bat and cmd files are not always considered executable in cygwin causing which
36488  # to not find them
36489  if test "x$new_path" = x \
36490      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36491      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36492    new_path=`$CYGPATH -u "$path"`
36493  fi
36494  if test "x$new_path" = x; then
36495    # Oops. Which didn't find the executable.
36496    # The splitting of arguments from the executable at a space might have been incorrect,
36497    # since paths with space are more likely in Windows. Give it another try with the whole
36498    # argument.
36499    path="$complete"
36500    arguments="EOL"
36501    new_path=`$CYGPATH -u "$path"`
36502    new_path=`$WHICH "$new_path" 2> /dev/null`
36503    # bat and cmd files are not always considered executable in cygwin causing which
36504    # to not find them
36505    if test "x$new_path" = x \
36506        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36507        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36508      new_path=`$CYGPATH -u "$path"`
36509    fi
36510    if test "x$new_path" = x; then
36511      # It's still not found. Now this is an unrecoverable error.
36512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36513$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36514      has_space=`$ECHO "$complete" | $GREP " "`
36515      if test "x$has_space" != x; then
36516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36518      fi
36519      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36520    fi
36521  fi
36522
36523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36526  # "foo.exe" is OK but "foo" is an error.
36527  #
36528  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36529  # It is also a way to make sure we got the proper file name for the real test later on.
36530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36531  if test "x$test_shortpath" = x; then
36532    # Short path failed, file does not exist as specified.
36533    # Try adding .exe or .cmd
36534    if test -f "${new_path}.exe"; then
36535      input_to_shortpath="${new_path}.exe"
36536    elif test -f "${new_path}.cmd"; then
36537      input_to_shortpath="${new_path}.cmd"
36538    else
36539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36540$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36541      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36542$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36543      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36544    fi
36545  else
36546    input_to_shortpath="$new_path"
36547  fi
36548
36549  # Call helper function which possibly converts this using DOS-style short mode.
36550  # If so, the updated path is stored in $new_path.
36551  new_path="$input_to_shortpath"
36552
36553  input_path="$input_to_shortpath"
36554  # Check if we need to convert this using DOS-style short mode. If the path
36555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36556  # take no chances and rewrite it.
36557  # Note: m4 eats our [], so we need to use [ and ] instead.
36558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36559  if test "x$has_forbidden_chars" != x; then
36560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36564      # Going to short mode and back again did indeed matter. Since short mode is
36565      # case insensitive, let's make it lowercase to improve readability.
36566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36567      # Now convert it back to Unix-style (cygpath)
36568      input_path=`$CYGPATH -u "$shortmode_path"`
36569      new_path="$input_path"
36570    fi
36571  fi
36572
36573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36574  if test "x$test_cygdrive_prefix" = x; then
36575    # As a simple fix, exclude /usr/bin since it's not a real path.
36576    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36578      # a path prefixed by /cygdrive for fixpath to work.
36579      new_path="$CYGWIN_ROOT_PATH$input_path"
36580    fi
36581  fi
36582
36583  # remove trailing .exe if any
36584  new_path="${new_path/%.exe/}"
36585
36586    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36587
36588  # First separate the path from the arguments. This will split at the first
36589  # space.
36590  complete="$CPP"
36591  path="${complete%% *}"
36592  tmp="$complete EOL"
36593  arguments="${tmp#* }"
36594
36595  # Input might be given as Windows format, start by converting to
36596  # unix format.
36597  new_path="$path"
36598
36599  windows_path="$new_path"
36600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36601    unix_path=`$CYGPATH -u "$windows_path"`
36602    new_path="$unix_path"
36603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36605    new_path="$unix_path"
36606  fi
36607
36608
36609  # Now try to locate executable using which
36610  new_path=`$WHICH "$new_path" 2> /dev/null`
36611
36612  if test "x$new_path" = x; then
36613    # Oops. Which didn't find the executable.
36614    # The splitting of arguments from the executable at a space might have been incorrect,
36615    # since paths with space are more likely in Windows. Give it another try with the whole
36616    # argument.
36617    path="$complete"
36618    arguments="EOL"
36619    new_path="$path"
36620
36621  windows_path="$new_path"
36622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36623    unix_path=`$CYGPATH -u "$windows_path"`
36624    new_path="$unix_path"
36625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36627    new_path="$unix_path"
36628  fi
36629
36630
36631    new_path=`$WHICH "$new_path" 2> /dev/null`
36632    # bat and cmd files are not always considered executable in MSYS causing which
36633    # to not find them
36634    if test "x$new_path" = x \
36635        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36636        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36637      new_path="$path"
36638
36639  windows_path="$new_path"
36640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36641    unix_path=`$CYGPATH -u "$windows_path"`
36642    new_path="$unix_path"
36643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36645    new_path="$unix_path"
36646  fi
36647
36648    fi
36649
36650    if test "x$new_path" = x; then
36651      # It's still not found. Now this is an unrecoverable error.
36652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36653$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36654      has_space=`$ECHO "$complete" | $GREP " "`
36655      if test "x$has_space" != x; then
36656        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36657$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36658      fi
36659      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36660    fi
36661  fi
36662
36663  # Now new_path has a complete unix path to the binary
36664  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36665    # Keep paths in /bin as-is, but remove trailing .exe if any
36666    new_path="${new_path/%.exe/}"
36667    # Do not save /bin paths to all_fixpath_prefixes!
36668  else
36669    # Not in mixed or Windows style, start by that.
36670    new_path=`cmd //c echo $new_path`
36671
36672  input_path="$new_path"
36673  # Check if we need to convert this using DOS-style short mode. If the path
36674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36675  # take no chances and rewrite it.
36676  # Note: m4 eats our [], so we need to use [ and ] instead.
36677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36678  if test "x$has_forbidden_chars" != x; then
36679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36681  fi
36682
36683    # Output is in $new_path
36684
36685  windows_path="$new_path"
36686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36687    unix_path=`$CYGPATH -u "$windows_path"`
36688    new_path="$unix_path"
36689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36691    new_path="$unix_path"
36692  fi
36693
36694    # remove trailing .exe if any
36695    new_path="${new_path/%.exe/}"
36696
36697    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36698    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36699  fi
36700
36701    else
36702      # We're on a unix platform. Hooray! :)
36703      # First separate the path from the arguments. This will split at the first
36704      # space.
36705      complete="$CPP"
36706      path="${complete%% *}"
36707      tmp="$complete EOL"
36708      arguments="${tmp#* }"
36709
36710      # Cannot rely on the command "which" here since it doesn't always work.
36711      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36712      if test -z "$is_absolute_path"; then
36713        # Path to executable is not absolute. Find it.
36714        IFS_save="$IFS"
36715        IFS=:
36716        for p in $PATH; do
36717          if test -f "$p/$path" && test -x "$p/$path"; then
36718            new_path="$p/$path"
36719            break
36720          fi
36721        done
36722        IFS="$IFS_save"
36723      else
36724        # This is an absolute path, we can use it without further modifications.
36725        new_path="$path"
36726      fi
36727
36728      if test "x$new_path" = x; then
36729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36730$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36731        has_space=`$ECHO "$complete" | $GREP " "`
36732        if test "x$has_space" != x; then
36733          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36734$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36735        fi
36736        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36737      fi
36738    fi
36739
36740    # Now join together the path and the arguments once again
36741    if test "x$arguments" != xEOL; then
36742      new_complete="$new_path ${arguments% *}"
36743    else
36744      new_complete="$new_path"
36745    fi
36746
36747    if test "x$complete" != "x$new_complete"; then
36748      CPP="$new_complete"
36749      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36750$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36751    fi
36752  fi
36753
36754  ac_ext=cpp
36755ac_cpp='$CXXCPP $CPPFLAGS'
36756ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36757ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36758ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36760$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36761if test -z "$CXXCPP"; then
36762  if ${ac_cv_prog_CXXCPP+:} false; then :
36763  $as_echo_n "(cached) " >&6
36764else
36765      # Double quotes because CXXCPP needs to be expanded
36766    for CXXCPP in "$CXX -E" "/lib/cpp"
36767    do
36768      ac_preproc_ok=false
36769for ac_cxx_preproc_warn_flag in '' yes
36770do
36771  # Use a header file that comes with gcc, so configuring glibc
36772  # with a fresh cross-compiler works.
36773  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36774  # <limits.h> exists even on freestanding compilers.
36775  # On the NeXT, cc -E runs the code through the compiler's parser,
36776  # not just through cpp. "Syntax error" is here to catch this case.
36777  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36778/* end confdefs.h.  */
36779#ifdef __STDC__
36780# include <limits.h>
36781#else
36782# include <assert.h>
36783#endif
36784		     Syntax error
36785_ACEOF
36786if ac_fn_cxx_try_cpp "$LINENO"; then :
36787
36788else
36789  # Broken: fails on valid input.
36790continue
36791fi
36792rm -f conftest.err conftest.i conftest.$ac_ext
36793
36794  # OK, works on sane cases.  Now check whether nonexistent headers
36795  # can be detected and how.
36796  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36797/* end confdefs.h.  */
36798#include <ac_nonexistent.h>
36799_ACEOF
36800if ac_fn_cxx_try_cpp "$LINENO"; then :
36801  # Broken: success on invalid input.
36802continue
36803else
36804  # Passes both tests.
36805ac_preproc_ok=:
36806break
36807fi
36808rm -f conftest.err conftest.i conftest.$ac_ext
36809
36810done
36811# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36812rm -f conftest.i conftest.err conftest.$ac_ext
36813if $ac_preproc_ok; then :
36814  break
36815fi
36816
36817    done
36818    ac_cv_prog_CXXCPP=$CXXCPP
36819
36820fi
36821  CXXCPP=$ac_cv_prog_CXXCPP
36822else
36823  ac_cv_prog_CXXCPP=$CXXCPP
36824fi
36825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36826$as_echo "$CXXCPP" >&6; }
36827ac_preproc_ok=false
36828for ac_cxx_preproc_warn_flag in '' yes
36829do
36830  # Use a header file that comes with gcc, so configuring glibc
36831  # with a fresh cross-compiler works.
36832  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36833  # <limits.h> exists even on freestanding compilers.
36834  # On the NeXT, cc -E runs the code through the compiler's parser,
36835  # not just through cpp. "Syntax error" is here to catch this case.
36836  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36837/* end confdefs.h.  */
36838#ifdef __STDC__
36839# include <limits.h>
36840#else
36841# include <assert.h>
36842#endif
36843		     Syntax error
36844_ACEOF
36845if ac_fn_cxx_try_cpp "$LINENO"; then :
36846
36847else
36848  # Broken: fails on valid input.
36849continue
36850fi
36851rm -f conftest.err conftest.i conftest.$ac_ext
36852
36853  # OK, works on sane cases.  Now check whether nonexistent headers
36854  # can be detected and how.
36855  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36856/* end confdefs.h.  */
36857#include <ac_nonexistent.h>
36858_ACEOF
36859if ac_fn_cxx_try_cpp "$LINENO"; then :
36860  # Broken: success on invalid input.
36861continue
36862else
36863  # Passes both tests.
36864ac_preproc_ok=:
36865break
36866fi
36867rm -f conftest.err conftest.i conftest.$ac_ext
36868
36869done
36870# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36871rm -f conftest.i conftest.err conftest.$ac_ext
36872if $ac_preproc_ok; then :
36873
36874else
36875  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36876$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36877as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36878See \`config.log' for more details" "$LINENO" 5; }
36879fi
36880
36881ac_ext=cpp
36882ac_cpp='$CXXCPP $CPPFLAGS'
36883ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36884ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36885ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36886
36887
36888  # Only process if variable expands to non-empty
36889
36890  if test "x$CXXCPP" != x; then
36891    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36892
36893  # First separate the path from the arguments. This will split at the first
36894  # space.
36895  complete="$CXXCPP"
36896  path="${complete%% *}"
36897  tmp="$complete EOL"
36898  arguments="${tmp#* }"
36899
36900  # Input might be given as Windows format, start by converting to
36901  # unix format.
36902  new_path=`$CYGPATH -u "$path"`
36903
36904  # Now try to locate executable using which
36905  new_path=`$WHICH "$new_path" 2> /dev/null`
36906  # bat and cmd files are not always considered executable in cygwin causing which
36907  # to not find them
36908  if test "x$new_path" = x \
36909      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36910      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36911    new_path=`$CYGPATH -u "$path"`
36912  fi
36913  if test "x$new_path" = x; then
36914    # Oops. Which didn't find the executable.
36915    # The splitting of arguments from the executable at a space might have been incorrect,
36916    # since paths with space are more likely in Windows. Give it another try with the whole
36917    # argument.
36918    path="$complete"
36919    arguments="EOL"
36920    new_path=`$CYGPATH -u "$path"`
36921    new_path=`$WHICH "$new_path" 2> /dev/null`
36922    # bat and cmd files are not always considered executable in cygwin causing which
36923    # to not find them
36924    if test "x$new_path" = x \
36925        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36926        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36927      new_path=`$CYGPATH -u "$path"`
36928    fi
36929    if test "x$new_path" = x; then
36930      # It's still not found. Now this is an unrecoverable error.
36931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36932$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36933      has_space=`$ECHO "$complete" | $GREP " "`
36934      if test "x$has_space" != x; then
36935        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36936$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36937      fi
36938      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36939    fi
36940  fi
36941
36942  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36943  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36944  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36945  # "foo.exe" is OK but "foo" is an error.
36946  #
36947  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36948  # It is also a way to make sure we got the proper file name for the real test later on.
36949  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36950  if test "x$test_shortpath" = x; then
36951    # Short path failed, file does not exist as specified.
36952    # Try adding .exe or .cmd
36953    if test -f "${new_path}.exe"; then
36954      input_to_shortpath="${new_path}.exe"
36955    elif test -f "${new_path}.cmd"; then
36956      input_to_shortpath="${new_path}.cmd"
36957    else
36958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36959$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36960      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36961$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36962      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36963    fi
36964  else
36965    input_to_shortpath="$new_path"
36966  fi
36967
36968  # Call helper function which possibly converts this using DOS-style short mode.
36969  # If so, the updated path is stored in $new_path.
36970  new_path="$input_to_shortpath"
36971
36972  input_path="$input_to_shortpath"
36973  # Check if we need to convert this using DOS-style short mode. If the path
36974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36975  # take no chances and rewrite it.
36976  # Note: m4 eats our [], so we need to use [ and ] instead.
36977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36978  if test "x$has_forbidden_chars" != x; then
36979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36980    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36981    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36982    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36983      # Going to short mode and back again did indeed matter. Since short mode is
36984      # case insensitive, let's make it lowercase to improve readability.
36985      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36986      # Now convert it back to Unix-style (cygpath)
36987      input_path=`$CYGPATH -u "$shortmode_path"`
36988      new_path="$input_path"
36989    fi
36990  fi
36991
36992  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36993  if test "x$test_cygdrive_prefix" = x; then
36994    # As a simple fix, exclude /usr/bin since it's not a real path.
36995    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36996      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36997      # a path prefixed by /cygdrive for fixpath to work.
36998      new_path="$CYGWIN_ROOT_PATH$input_path"
36999    fi
37000  fi
37001
37002  # remove trailing .exe if any
37003  new_path="${new_path/%.exe/}"
37004
37005    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37006
37007  # First separate the path from the arguments. This will split at the first
37008  # space.
37009  complete="$CXXCPP"
37010  path="${complete%% *}"
37011  tmp="$complete EOL"
37012  arguments="${tmp#* }"
37013
37014  # Input might be given as Windows format, start by converting to
37015  # unix format.
37016  new_path="$path"
37017
37018  windows_path="$new_path"
37019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37020    unix_path=`$CYGPATH -u "$windows_path"`
37021    new_path="$unix_path"
37022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37024    new_path="$unix_path"
37025  fi
37026
37027
37028  # Now try to locate executable using which
37029  new_path=`$WHICH "$new_path" 2> /dev/null`
37030
37031  if test "x$new_path" = x; then
37032    # Oops. Which didn't find the executable.
37033    # The splitting of arguments from the executable at a space might have been incorrect,
37034    # since paths with space are more likely in Windows. Give it another try with the whole
37035    # argument.
37036    path="$complete"
37037    arguments="EOL"
37038    new_path="$path"
37039
37040  windows_path="$new_path"
37041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37042    unix_path=`$CYGPATH -u "$windows_path"`
37043    new_path="$unix_path"
37044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37046    new_path="$unix_path"
37047  fi
37048
37049
37050    new_path=`$WHICH "$new_path" 2> /dev/null`
37051    # bat and cmd files are not always considered executable in MSYS causing which
37052    # to not find them
37053    if test "x$new_path" = x \
37054        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37055        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37056      new_path="$path"
37057
37058  windows_path="$new_path"
37059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37060    unix_path=`$CYGPATH -u "$windows_path"`
37061    new_path="$unix_path"
37062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37064    new_path="$unix_path"
37065  fi
37066
37067    fi
37068
37069    if test "x$new_path" = x; then
37070      # It's still not found. Now this is an unrecoverable error.
37071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37072$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37073      has_space=`$ECHO "$complete" | $GREP " "`
37074      if test "x$has_space" != x; then
37075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37077      fi
37078      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37079    fi
37080  fi
37081
37082  # Now new_path has a complete unix path to the binary
37083  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37084    # Keep paths in /bin as-is, but remove trailing .exe if any
37085    new_path="${new_path/%.exe/}"
37086    # Do not save /bin paths to all_fixpath_prefixes!
37087  else
37088    # Not in mixed or Windows style, start by that.
37089    new_path=`cmd //c echo $new_path`
37090
37091  input_path="$new_path"
37092  # Check if we need to convert this using DOS-style short mode. If the path
37093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37094  # take no chances and rewrite it.
37095  # Note: m4 eats our [], so we need to use [ and ] instead.
37096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37097  if test "x$has_forbidden_chars" != x; then
37098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37100  fi
37101
37102    # Output is in $new_path
37103
37104  windows_path="$new_path"
37105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37106    unix_path=`$CYGPATH -u "$windows_path"`
37107    new_path="$unix_path"
37108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37110    new_path="$unix_path"
37111  fi
37112
37113    # remove trailing .exe if any
37114    new_path="${new_path/%.exe/}"
37115
37116    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37117    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37118  fi
37119
37120    else
37121      # We're on a unix platform. Hooray! :)
37122      # First separate the path from the arguments. This will split at the first
37123      # space.
37124      complete="$CXXCPP"
37125      path="${complete%% *}"
37126      tmp="$complete EOL"
37127      arguments="${tmp#* }"
37128
37129      # Cannot rely on the command "which" here since it doesn't always work.
37130      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37131      if test -z "$is_absolute_path"; then
37132        # Path to executable is not absolute. Find it.
37133        IFS_save="$IFS"
37134        IFS=:
37135        for p in $PATH; do
37136          if test -f "$p/$path" && test -x "$p/$path"; then
37137            new_path="$p/$path"
37138            break
37139          fi
37140        done
37141        IFS="$IFS_save"
37142      else
37143        # This is an absolute path, we can use it without further modifications.
37144        new_path="$path"
37145      fi
37146
37147      if test "x$new_path" = x; then
37148        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37149$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37150        has_space=`$ECHO "$complete" | $GREP " "`
37151        if test "x$has_space" != x; then
37152          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37153$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37154        fi
37155        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37156      fi
37157    fi
37158
37159    # Now join together the path and the arguments once again
37160    if test "x$arguments" != xEOL; then
37161      new_complete="$new_path ${arguments% *}"
37162    else
37163      new_complete="$new_path"
37164    fi
37165
37166    if test "x$complete" != "x$new_complete"; then
37167      CXXCPP="$new_complete"
37168      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37169$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37170    fi
37171  fi
37172
37173
37174  #
37175  # Setup the linker (LD)
37176  #
37177  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37178    # In the Microsoft toolchain we have a separate LD command "link".
37179    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37180    # a cygwin program for something completely different.
37181    # Extract the first word of "link", so it can be a program name with args.
37182set dummy link; ac_word=$2
37183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37184$as_echo_n "checking for $ac_word... " >&6; }
37185if ${ac_cv_prog_LD+:} false; then :
37186  $as_echo_n "(cached) " >&6
37187else
37188  if test -n "$LD"; then
37189  ac_cv_prog_LD="$LD" # Let the user override the test.
37190else
37191  ac_prog_rejected=no
37192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37193for as_dir in $PATH
37194do
37195  IFS=$as_save_IFS
37196  test -z "$as_dir" && as_dir=.
37197    for ac_exec_ext in '' $ac_executable_extensions; do
37198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37199    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37200       ac_prog_rejected=yes
37201       continue
37202     fi
37203    ac_cv_prog_LD="link"
37204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37205    break 2
37206  fi
37207done
37208  done
37209IFS=$as_save_IFS
37210
37211if test $ac_prog_rejected = yes; then
37212  # We found a bogon in the path, so make sure we never use it.
37213  set dummy $ac_cv_prog_LD
37214  shift
37215  if test $# != 0; then
37216    # We chose a different compiler from the bogus one.
37217    # However, it has the same basename, so the bogon will be chosen
37218    # first if we set LD to just the basename; use the full file name.
37219    shift
37220    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37221  fi
37222fi
37223fi
37224fi
37225LD=$ac_cv_prog_LD
37226if test -n "$LD"; then
37227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37228$as_echo "$LD" >&6; }
37229else
37230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37231$as_echo "no" >&6; }
37232fi
37233
37234
37235
37236  # Only process if variable expands to non-empty
37237
37238  if test "x$LD" != x; then
37239    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37240
37241  # First separate the path from the arguments. This will split at the first
37242  # space.
37243  complete="$LD"
37244  path="${complete%% *}"
37245  tmp="$complete EOL"
37246  arguments="${tmp#* }"
37247
37248  # Input might be given as Windows format, start by converting to
37249  # unix format.
37250  new_path=`$CYGPATH -u "$path"`
37251
37252  # Now try to locate executable using which
37253  new_path=`$WHICH "$new_path" 2> /dev/null`
37254  # bat and cmd files are not always considered executable in cygwin causing which
37255  # to not find them
37256  if test "x$new_path" = x \
37257      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37258      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37259    new_path=`$CYGPATH -u "$path"`
37260  fi
37261  if test "x$new_path" = x; then
37262    # Oops. Which didn't find the executable.
37263    # The splitting of arguments from the executable at a space might have been incorrect,
37264    # since paths with space are more likely in Windows. Give it another try with the whole
37265    # argument.
37266    path="$complete"
37267    arguments="EOL"
37268    new_path=`$CYGPATH -u "$path"`
37269    new_path=`$WHICH "$new_path" 2> /dev/null`
37270    # bat and cmd files are not always considered executable in cygwin causing which
37271    # to not find them
37272    if test "x$new_path" = x \
37273        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37274        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37275      new_path=`$CYGPATH -u "$path"`
37276    fi
37277    if test "x$new_path" = x; then
37278      # It's still not found. Now this is an unrecoverable error.
37279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37280$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37281      has_space=`$ECHO "$complete" | $GREP " "`
37282      if test "x$has_space" != x; then
37283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37285      fi
37286      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37287    fi
37288  fi
37289
37290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37293  # "foo.exe" is OK but "foo" is an error.
37294  #
37295  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37296  # It is also a way to make sure we got the proper file name for the real test later on.
37297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37298  if test "x$test_shortpath" = x; then
37299    # Short path failed, file does not exist as specified.
37300    # Try adding .exe or .cmd
37301    if test -f "${new_path}.exe"; then
37302      input_to_shortpath="${new_path}.exe"
37303    elif test -f "${new_path}.cmd"; then
37304      input_to_shortpath="${new_path}.cmd"
37305    else
37306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37307$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37308      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37309$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37310      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37311    fi
37312  else
37313    input_to_shortpath="$new_path"
37314  fi
37315
37316  # Call helper function which possibly converts this using DOS-style short mode.
37317  # If so, the updated path is stored in $new_path.
37318  new_path="$input_to_shortpath"
37319
37320  input_path="$input_to_shortpath"
37321  # Check if we need to convert this using DOS-style short mode. If the path
37322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37323  # take no chances and rewrite it.
37324  # Note: m4 eats our [], so we need to use [ and ] instead.
37325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37326  if test "x$has_forbidden_chars" != x; then
37327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37331      # Going to short mode and back again did indeed matter. Since short mode is
37332      # case insensitive, let's make it lowercase to improve readability.
37333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37334      # Now convert it back to Unix-style (cygpath)
37335      input_path=`$CYGPATH -u "$shortmode_path"`
37336      new_path="$input_path"
37337    fi
37338  fi
37339
37340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37341  if test "x$test_cygdrive_prefix" = x; then
37342    # As a simple fix, exclude /usr/bin since it's not a real path.
37343    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37345      # a path prefixed by /cygdrive for fixpath to work.
37346      new_path="$CYGWIN_ROOT_PATH$input_path"
37347    fi
37348  fi
37349
37350  # remove trailing .exe if any
37351  new_path="${new_path/%.exe/}"
37352
37353    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37354
37355  # First separate the path from the arguments. This will split at the first
37356  # space.
37357  complete="$LD"
37358  path="${complete%% *}"
37359  tmp="$complete EOL"
37360  arguments="${tmp#* }"
37361
37362  # Input might be given as Windows format, start by converting to
37363  # unix format.
37364  new_path="$path"
37365
37366  windows_path="$new_path"
37367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37368    unix_path=`$CYGPATH -u "$windows_path"`
37369    new_path="$unix_path"
37370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37372    new_path="$unix_path"
37373  fi
37374
37375
37376  # Now try to locate executable using which
37377  new_path=`$WHICH "$new_path" 2> /dev/null`
37378
37379  if test "x$new_path" = x; then
37380    # Oops. Which didn't find the executable.
37381    # The splitting of arguments from the executable at a space might have been incorrect,
37382    # since paths with space are more likely in Windows. Give it another try with the whole
37383    # argument.
37384    path="$complete"
37385    arguments="EOL"
37386    new_path="$path"
37387
37388  windows_path="$new_path"
37389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37390    unix_path=`$CYGPATH -u "$windows_path"`
37391    new_path="$unix_path"
37392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37394    new_path="$unix_path"
37395  fi
37396
37397
37398    new_path=`$WHICH "$new_path" 2> /dev/null`
37399    # bat and cmd files are not always considered executable in MSYS causing which
37400    # to not find them
37401    if test "x$new_path" = x \
37402        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37403        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37404      new_path="$path"
37405
37406  windows_path="$new_path"
37407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37408    unix_path=`$CYGPATH -u "$windows_path"`
37409    new_path="$unix_path"
37410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37412    new_path="$unix_path"
37413  fi
37414
37415    fi
37416
37417    if test "x$new_path" = x; then
37418      # It's still not found. Now this is an unrecoverable error.
37419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37420$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37421      has_space=`$ECHO "$complete" | $GREP " "`
37422      if test "x$has_space" != x; then
37423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37425      fi
37426      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37427    fi
37428  fi
37429
37430  # Now new_path has a complete unix path to the binary
37431  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37432    # Keep paths in /bin as-is, but remove trailing .exe if any
37433    new_path="${new_path/%.exe/}"
37434    # Do not save /bin paths to all_fixpath_prefixes!
37435  else
37436    # Not in mixed or Windows style, start by that.
37437    new_path=`cmd //c echo $new_path`
37438
37439  input_path="$new_path"
37440  # Check if we need to convert this using DOS-style short mode. If the path
37441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37442  # take no chances and rewrite it.
37443  # Note: m4 eats our [], so we need to use [ and ] instead.
37444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37445  if test "x$has_forbidden_chars" != x; then
37446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37448  fi
37449
37450    # Output is in $new_path
37451
37452  windows_path="$new_path"
37453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37454    unix_path=`$CYGPATH -u "$windows_path"`
37455    new_path="$unix_path"
37456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37458    new_path="$unix_path"
37459  fi
37460
37461    # remove trailing .exe if any
37462    new_path="${new_path/%.exe/}"
37463
37464    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37465    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37466  fi
37467
37468    else
37469      # We're on a unix platform. Hooray! :)
37470      # First separate the path from the arguments. This will split at the first
37471      # space.
37472      complete="$LD"
37473      path="${complete%% *}"
37474      tmp="$complete EOL"
37475      arguments="${tmp#* }"
37476
37477      # Cannot rely on the command "which" here since it doesn't always work.
37478      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37479      if test -z "$is_absolute_path"; then
37480        # Path to executable is not absolute. Find it.
37481        IFS_save="$IFS"
37482        IFS=:
37483        for p in $PATH; do
37484          if test -f "$p/$path" && test -x "$p/$path"; then
37485            new_path="$p/$path"
37486            break
37487          fi
37488        done
37489        IFS="$IFS_save"
37490      else
37491        # This is an absolute path, we can use it without further modifications.
37492        new_path="$path"
37493      fi
37494
37495      if test "x$new_path" = x; then
37496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37497$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37498        has_space=`$ECHO "$complete" | $GREP " "`
37499        if test "x$has_space" != x; then
37500          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37501$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37502        fi
37503        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37504      fi
37505    fi
37506
37507    # Now join together the path and the arguments once again
37508    if test "x$arguments" != xEOL; then
37509      new_complete="$new_path ${arguments% *}"
37510    else
37511      new_complete="$new_path"
37512    fi
37513
37514    if test "x$complete" != "x$new_complete"; then
37515      LD="$new_complete"
37516      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37517$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37518    fi
37519  fi
37520
37521    # Verify that we indeed succeeded with this trick.
37522    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37523$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37524    "$LD" --version > /dev/null
37525    if test $? -eq 0 ; then
37526      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37527$as_echo "no" >&6; }
37528      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37529    else
37530      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37531$as_echo "yes" >&6; }
37532    fi
37533    LDCXX="$LD"
37534  else
37535    # All other toolchains use the compiler to link.
37536    LD="$CC"
37537    LDCXX="$CXX"
37538  fi
37539
37540  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37541
37542
37543  #
37544  # Setup the assembler (AS)
37545  #
37546  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37547
37548
37549  # Publish this variable in the help.
37550
37551
37552  if [ -z "${AS+x}" ]; then
37553    # The variable is not set by user, try to locate tool using the code snippet
37554    for ac_prog in as
37555do
37556  # Extract the first word of "$ac_prog", so it can be a program name with args.
37557set dummy $ac_prog; ac_word=$2
37558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37559$as_echo_n "checking for $ac_word... " >&6; }
37560if ${ac_cv_path_AS+:} false; then :
37561  $as_echo_n "(cached) " >&6
37562else
37563  case $AS in
37564  [\\/]* | ?:[\\/]*)
37565  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37566  ;;
37567  *)
37568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37569for as_dir in $PATH
37570do
37571  IFS=$as_save_IFS
37572  test -z "$as_dir" && as_dir=.
37573    for ac_exec_ext in '' $ac_executable_extensions; do
37574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37575    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37577    break 2
37578  fi
37579done
37580  done
37581IFS=$as_save_IFS
37582
37583  ;;
37584esac
37585fi
37586AS=$ac_cv_path_AS
37587if test -n "$AS"; then
37588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37589$as_echo "$AS" >&6; }
37590else
37591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37592$as_echo "no" >&6; }
37593fi
37594
37595
37596  test -n "$AS" && break
37597done
37598
37599  else
37600    # The variable is set, but is it from the command line or the environment?
37601
37602    # Try to remove the string !AS! from our list.
37603    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37604    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37605      # If it failed, the variable was not from the command line. Ignore it,
37606      # but warn the user (except for BASH, which is always set by the calling BASH).
37607      if test "xAS" != xBASH; then
37608        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37609$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37610      fi
37611      # Try to locate tool using the code snippet
37612      for ac_prog in as
37613do
37614  # Extract the first word of "$ac_prog", so it can be a program name with args.
37615set dummy $ac_prog; ac_word=$2
37616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37617$as_echo_n "checking for $ac_word... " >&6; }
37618if ${ac_cv_path_AS+:} false; then :
37619  $as_echo_n "(cached) " >&6
37620else
37621  case $AS in
37622  [\\/]* | ?:[\\/]*)
37623  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37624  ;;
37625  *)
37626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37627for as_dir in $PATH
37628do
37629  IFS=$as_save_IFS
37630  test -z "$as_dir" && as_dir=.
37631    for ac_exec_ext in '' $ac_executable_extensions; do
37632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37633    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37635    break 2
37636  fi
37637done
37638  done
37639IFS=$as_save_IFS
37640
37641  ;;
37642esac
37643fi
37644AS=$ac_cv_path_AS
37645if test -n "$AS"; then
37646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37647$as_echo "$AS" >&6; }
37648else
37649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37650$as_echo "no" >&6; }
37651fi
37652
37653
37654  test -n "$AS" && break
37655done
37656
37657    else
37658      # If it succeeded, then it was overridden by the user. We will use it
37659      # for the tool.
37660
37661      # First remove it from the list of overridden variables, so we can test
37662      # for unknown variables in the end.
37663      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37664
37665      # Check if we try to supply an empty value
37666      if test "x$AS" = x; then
37667        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37668$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37669        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37670$as_echo_n "checking for AS... " >&6; }
37671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37672$as_echo "disabled" >&6; }
37673      else
37674        # Check if the provided tool contains a complete path.
37675        tool_specified="$AS"
37676        tool_basename="${tool_specified##*/}"
37677        if test "x$tool_basename" = "x$tool_specified"; then
37678          # A command without a complete path is provided, search $PATH.
37679          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37680$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37681          # Extract the first word of "$tool_basename", so it can be a program name with args.
37682set dummy $tool_basename; ac_word=$2
37683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37684$as_echo_n "checking for $ac_word... " >&6; }
37685if ${ac_cv_path_AS+:} false; then :
37686  $as_echo_n "(cached) " >&6
37687else
37688  case $AS in
37689  [\\/]* | ?:[\\/]*)
37690  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37691  ;;
37692  *)
37693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37694for as_dir in $PATH
37695do
37696  IFS=$as_save_IFS
37697  test -z "$as_dir" && as_dir=.
37698    for ac_exec_ext in '' $ac_executable_extensions; do
37699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37700    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37702    break 2
37703  fi
37704done
37705  done
37706IFS=$as_save_IFS
37707
37708  ;;
37709esac
37710fi
37711AS=$ac_cv_path_AS
37712if test -n "$AS"; then
37713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37714$as_echo "$AS" >&6; }
37715else
37716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37717$as_echo "no" >&6; }
37718fi
37719
37720
37721          if test "x$AS" = x; then
37722            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37723          fi
37724        else
37725          # Otherwise we believe it is a complete path. Use it as it is.
37726          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37727$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37728          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37729$as_echo_n "checking for AS... " >&6; }
37730          if test ! -x "$tool_specified"; then
37731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37732$as_echo "not found" >&6; }
37733            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37734          fi
37735          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37736$as_echo "$tool_specified" >&6; }
37737        fi
37738      fi
37739    fi
37740
37741  fi
37742
37743
37744
37745  # Only process if variable expands to non-empty
37746
37747  if test "x$AS" != x; then
37748    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37749
37750  # First separate the path from the arguments. This will split at the first
37751  # space.
37752  complete="$AS"
37753  path="${complete%% *}"
37754  tmp="$complete EOL"
37755  arguments="${tmp#* }"
37756
37757  # Input might be given as Windows format, start by converting to
37758  # unix format.
37759  new_path=`$CYGPATH -u "$path"`
37760
37761  # Now try to locate executable using which
37762  new_path=`$WHICH "$new_path" 2> /dev/null`
37763  # bat and cmd files are not always considered executable in cygwin causing which
37764  # to not find them
37765  if test "x$new_path" = x \
37766      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37767      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37768    new_path=`$CYGPATH -u "$path"`
37769  fi
37770  if test "x$new_path" = x; then
37771    # Oops. Which didn't find the executable.
37772    # The splitting of arguments from the executable at a space might have been incorrect,
37773    # since paths with space are more likely in Windows. Give it another try with the whole
37774    # argument.
37775    path="$complete"
37776    arguments="EOL"
37777    new_path=`$CYGPATH -u "$path"`
37778    new_path=`$WHICH "$new_path" 2> /dev/null`
37779    # bat and cmd files are not always considered executable in cygwin causing which
37780    # to not find them
37781    if test "x$new_path" = x \
37782        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37783        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37784      new_path=`$CYGPATH -u "$path"`
37785    fi
37786    if test "x$new_path" = x; then
37787      # It's still not found. Now this is an unrecoverable error.
37788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37789$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37790      has_space=`$ECHO "$complete" | $GREP " "`
37791      if test "x$has_space" != x; then
37792        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37793$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37794      fi
37795      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37796    fi
37797  fi
37798
37799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37802  # "foo.exe" is OK but "foo" is an error.
37803  #
37804  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37805  # It is also a way to make sure we got the proper file name for the real test later on.
37806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37807  if test "x$test_shortpath" = x; then
37808    # Short path failed, file does not exist as specified.
37809    # Try adding .exe or .cmd
37810    if test -f "${new_path}.exe"; then
37811      input_to_shortpath="${new_path}.exe"
37812    elif test -f "${new_path}.cmd"; then
37813      input_to_shortpath="${new_path}.cmd"
37814    else
37815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37816$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37817      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37818$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37819      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37820    fi
37821  else
37822    input_to_shortpath="$new_path"
37823  fi
37824
37825  # Call helper function which possibly converts this using DOS-style short mode.
37826  # If so, the updated path is stored in $new_path.
37827  new_path="$input_to_shortpath"
37828
37829  input_path="$input_to_shortpath"
37830  # Check if we need to convert this using DOS-style short mode. If the path
37831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37832  # take no chances and rewrite it.
37833  # Note: m4 eats our [], so we need to use [ and ] instead.
37834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37835  if test "x$has_forbidden_chars" != x; then
37836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37840      # Going to short mode and back again did indeed matter. Since short mode is
37841      # case insensitive, let's make it lowercase to improve readability.
37842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37843      # Now convert it back to Unix-style (cygpath)
37844      input_path=`$CYGPATH -u "$shortmode_path"`
37845      new_path="$input_path"
37846    fi
37847  fi
37848
37849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37850  if test "x$test_cygdrive_prefix" = x; then
37851    # As a simple fix, exclude /usr/bin since it's not a real path.
37852    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37854      # a path prefixed by /cygdrive for fixpath to work.
37855      new_path="$CYGWIN_ROOT_PATH$input_path"
37856    fi
37857  fi
37858
37859  # remove trailing .exe if any
37860  new_path="${new_path/%.exe/}"
37861
37862    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37863
37864  # First separate the path from the arguments. This will split at the first
37865  # space.
37866  complete="$AS"
37867  path="${complete%% *}"
37868  tmp="$complete EOL"
37869  arguments="${tmp#* }"
37870
37871  # Input might be given as Windows format, start by converting to
37872  # unix format.
37873  new_path="$path"
37874
37875  windows_path="$new_path"
37876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37877    unix_path=`$CYGPATH -u "$windows_path"`
37878    new_path="$unix_path"
37879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37881    new_path="$unix_path"
37882  fi
37883
37884
37885  # Now try to locate executable using which
37886  new_path=`$WHICH "$new_path" 2> /dev/null`
37887
37888  if test "x$new_path" = x; then
37889    # Oops. Which didn't find the executable.
37890    # The splitting of arguments from the executable at a space might have been incorrect,
37891    # since paths with space are more likely in Windows. Give it another try with the whole
37892    # argument.
37893    path="$complete"
37894    arguments="EOL"
37895    new_path="$path"
37896
37897  windows_path="$new_path"
37898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37899    unix_path=`$CYGPATH -u "$windows_path"`
37900    new_path="$unix_path"
37901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37903    new_path="$unix_path"
37904  fi
37905
37906
37907    new_path=`$WHICH "$new_path" 2> /dev/null`
37908    # bat and cmd files are not always considered executable in MSYS causing which
37909    # to not find them
37910    if test "x$new_path" = x \
37911        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37912        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37913      new_path="$path"
37914
37915  windows_path="$new_path"
37916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37917    unix_path=`$CYGPATH -u "$windows_path"`
37918    new_path="$unix_path"
37919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37921    new_path="$unix_path"
37922  fi
37923
37924    fi
37925
37926    if test "x$new_path" = x; then
37927      # It's still not found. Now this is an unrecoverable error.
37928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37929$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37930      has_space=`$ECHO "$complete" | $GREP " "`
37931      if test "x$has_space" != x; then
37932        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37933$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37934      fi
37935      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37936    fi
37937  fi
37938
37939  # Now new_path has a complete unix path to the binary
37940  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37941    # Keep paths in /bin as-is, but remove trailing .exe if any
37942    new_path="${new_path/%.exe/}"
37943    # Do not save /bin paths to all_fixpath_prefixes!
37944  else
37945    # Not in mixed or Windows style, start by that.
37946    new_path=`cmd //c echo $new_path`
37947
37948  input_path="$new_path"
37949  # Check if we need to convert this using DOS-style short mode. If the path
37950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37951  # take no chances and rewrite it.
37952  # Note: m4 eats our [], so we need to use [ and ] instead.
37953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37954  if test "x$has_forbidden_chars" != x; then
37955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37957  fi
37958
37959    # Output is in $new_path
37960
37961  windows_path="$new_path"
37962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37963    unix_path=`$CYGPATH -u "$windows_path"`
37964    new_path="$unix_path"
37965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37967    new_path="$unix_path"
37968  fi
37969
37970    # remove trailing .exe if any
37971    new_path="${new_path/%.exe/}"
37972
37973    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37974    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37975  fi
37976
37977    else
37978      # We're on a unix platform. Hooray! :)
37979      # First separate the path from the arguments. This will split at the first
37980      # space.
37981      complete="$AS"
37982      path="${complete%% *}"
37983      tmp="$complete EOL"
37984      arguments="${tmp#* }"
37985
37986      # Cannot rely on the command "which" here since it doesn't always work.
37987      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37988      if test -z "$is_absolute_path"; then
37989        # Path to executable is not absolute. Find it.
37990        IFS_save="$IFS"
37991        IFS=:
37992        for p in $PATH; do
37993          if test -f "$p/$path" && test -x "$p/$path"; then
37994            new_path="$p/$path"
37995            break
37996          fi
37997        done
37998        IFS="$IFS_save"
37999      else
38000        # This is an absolute path, we can use it without further modifications.
38001        new_path="$path"
38002      fi
38003
38004      if test "x$new_path" = x; then
38005        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
38006$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38007        has_space=`$ECHO "$complete" | $GREP " "`
38008        if test "x$has_space" != x; then
38009          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38010$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38011        fi
38012        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38013      fi
38014    fi
38015
38016    # Now join together the path and the arguments once again
38017    if test "x$arguments" != xEOL; then
38018      new_complete="$new_path ${arguments% *}"
38019    else
38020      new_complete="$new_path"
38021    fi
38022
38023    if test "x$complete" != "x$new_complete"; then
38024      AS="$new_complete"
38025      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
38026$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
38027    fi
38028  fi
38029
38030    if test "x$AS" = x; then
38031      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
38032    fi
38033  else
38034    # FIXME: is this correct for microsoft?
38035    AS="$CC -c"
38036  fi
38037
38038
38039  #
38040  # Setup the archiver (AR)
38041  #
38042  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38043    # The corresponding ar tool is lib.exe (used to create static libraries)
38044    # Extract the first word of "lib", so it can be a program name with args.
38045set dummy lib; ac_word=$2
38046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38047$as_echo_n "checking for $ac_word... " >&6; }
38048if ${ac_cv_prog_AR+:} false; then :
38049  $as_echo_n "(cached) " >&6
38050else
38051  if test -n "$AR"; then
38052  ac_cv_prog_AR="$AR" # Let the user override the test.
38053else
38054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38055for as_dir in $PATH
38056do
38057  IFS=$as_save_IFS
38058  test -z "$as_dir" && as_dir=.
38059    for ac_exec_ext in '' $ac_executable_extensions; do
38060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38061    ac_cv_prog_AR="lib"
38062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38063    break 2
38064  fi
38065done
38066  done
38067IFS=$as_save_IFS
38068
38069fi
38070fi
38071AR=$ac_cv_prog_AR
38072if test -n "$AR"; then
38073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38074$as_echo "$AR" >&6; }
38075else
38076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38077$as_echo "no" >&6; }
38078fi
38079
38080
38081  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
38082
38083
38084  # Publish this variable in the help.
38085
38086
38087  if [ -z "${AR+x}" ]; then
38088    # The variable is not set by user, try to locate tool using the code snippet
38089    if test -n "$ac_tool_prefix"; then
38090  for ac_prog in ar gcc-ar
38091  do
38092    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38093set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38095$as_echo_n "checking for $ac_word... " >&6; }
38096if ${ac_cv_prog_AR+:} false; then :
38097  $as_echo_n "(cached) " >&6
38098else
38099  if test -n "$AR"; then
38100  ac_cv_prog_AR="$AR" # Let the user override the test.
38101else
38102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38103for as_dir in $PATH
38104do
38105  IFS=$as_save_IFS
38106  test -z "$as_dir" && as_dir=.
38107    for ac_exec_ext in '' $ac_executable_extensions; do
38108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38109    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38111    break 2
38112  fi
38113done
38114  done
38115IFS=$as_save_IFS
38116
38117fi
38118fi
38119AR=$ac_cv_prog_AR
38120if test -n "$AR"; then
38121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38122$as_echo "$AR" >&6; }
38123else
38124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38125$as_echo "no" >&6; }
38126fi
38127
38128
38129    test -n "$AR" && break
38130  done
38131fi
38132if test -z "$AR"; then
38133  ac_ct_AR=$AR
38134  for ac_prog in ar gcc-ar
38135do
38136  # Extract the first word of "$ac_prog", so it can be a program name with args.
38137set dummy $ac_prog; ac_word=$2
38138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38139$as_echo_n "checking for $ac_word... " >&6; }
38140if ${ac_cv_prog_ac_ct_AR+:} false; then :
38141  $as_echo_n "(cached) " >&6
38142else
38143  if test -n "$ac_ct_AR"; then
38144  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38145else
38146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38147for as_dir in $PATH
38148do
38149  IFS=$as_save_IFS
38150  test -z "$as_dir" && as_dir=.
38151    for ac_exec_ext in '' $ac_executable_extensions; do
38152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38153    ac_cv_prog_ac_ct_AR="$ac_prog"
38154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38155    break 2
38156  fi
38157done
38158  done
38159IFS=$as_save_IFS
38160
38161fi
38162fi
38163ac_ct_AR=$ac_cv_prog_ac_ct_AR
38164if test -n "$ac_ct_AR"; then
38165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38166$as_echo "$ac_ct_AR" >&6; }
38167else
38168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38169$as_echo "no" >&6; }
38170fi
38171
38172
38173  test -n "$ac_ct_AR" && break
38174done
38175
38176  if test "x$ac_ct_AR" = x; then
38177    AR=""
38178  else
38179    case $cross_compiling:$ac_tool_warned in
38180yes:)
38181{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38182$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38183ac_tool_warned=yes ;;
38184esac
38185    AR=$ac_ct_AR
38186  fi
38187fi
38188
38189  else
38190    # The variable is set, but is it from the command line or the environment?
38191
38192    # Try to remove the string !AR! from our list.
38193    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38194    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38195      # If it failed, the variable was not from the command line. Ignore it,
38196      # but warn the user (except for BASH, which is always set by the calling BASH).
38197      if test "xAR" != xBASH; then
38198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38199$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38200      fi
38201      # Try to locate tool using the code snippet
38202      if test -n "$ac_tool_prefix"; then
38203  for ac_prog in ar gcc-ar
38204  do
38205    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38206set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38208$as_echo_n "checking for $ac_word... " >&6; }
38209if ${ac_cv_prog_AR+:} false; then :
38210  $as_echo_n "(cached) " >&6
38211else
38212  if test -n "$AR"; then
38213  ac_cv_prog_AR="$AR" # Let the user override the test.
38214else
38215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38216for as_dir in $PATH
38217do
38218  IFS=$as_save_IFS
38219  test -z "$as_dir" && as_dir=.
38220    for ac_exec_ext in '' $ac_executable_extensions; do
38221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38222    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38224    break 2
38225  fi
38226done
38227  done
38228IFS=$as_save_IFS
38229
38230fi
38231fi
38232AR=$ac_cv_prog_AR
38233if test -n "$AR"; then
38234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38235$as_echo "$AR" >&6; }
38236else
38237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38238$as_echo "no" >&6; }
38239fi
38240
38241
38242    test -n "$AR" && break
38243  done
38244fi
38245if test -z "$AR"; then
38246  ac_ct_AR=$AR
38247  for ac_prog in ar gcc-ar
38248do
38249  # Extract the first word of "$ac_prog", so it can be a program name with args.
38250set dummy $ac_prog; ac_word=$2
38251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38252$as_echo_n "checking for $ac_word... " >&6; }
38253if ${ac_cv_prog_ac_ct_AR+:} false; then :
38254  $as_echo_n "(cached) " >&6
38255else
38256  if test -n "$ac_ct_AR"; then
38257  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38258else
38259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38260for as_dir in $PATH
38261do
38262  IFS=$as_save_IFS
38263  test -z "$as_dir" && as_dir=.
38264    for ac_exec_ext in '' $ac_executable_extensions; do
38265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38266    ac_cv_prog_ac_ct_AR="$ac_prog"
38267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38268    break 2
38269  fi
38270done
38271  done
38272IFS=$as_save_IFS
38273
38274fi
38275fi
38276ac_ct_AR=$ac_cv_prog_ac_ct_AR
38277if test -n "$ac_ct_AR"; then
38278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38279$as_echo "$ac_ct_AR" >&6; }
38280else
38281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38282$as_echo "no" >&6; }
38283fi
38284
38285
38286  test -n "$ac_ct_AR" && break
38287done
38288
38289  if test "x$ac_ct_AR" = x; then
38290    AR=""
38291  else
38292    case $cross_compiling:$ac_tool_warned in
38293yes:)
38294{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38295$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38296ac_tool_warned=yes ;;
38297esac
38298    AR=$ac_ct_AR
38299  fi
38300fi
38301
38302    else
38303      # If it succeeded, then it was overridden by the user. We will use it
38304      # for the tool.
38305
38306      # First remove it from the list of overridden variables, so we can test
38307      # for unknown variables in the end.
38308      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38309
38310      # Check if we try to supply an empty value
38311      if test "x$AR" = x; then
38312        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38313$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38314        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38315$as_echo_n "checking for AR... " >&6; }
38316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38317$as_echo "disabled" >&6; }
38318      else
38319        # Check if the provided tool contains a complete path.
38320        tool_specified="$AR"
38321        tool_basename="${tool_specified##*/}"
38322        if test "x$tool_basename" = "x$tool_specified"; then
38323          # A command without a complete path is provided, search $PATH.
38324          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38325$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38326          # Extract the first word of "$tool_basename", so it can be a program name with args.
38327set dummy $tool_basename; ac_word=$2
38328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38329$as_echo_n "checking for $ac_word... " >&6; }
38330if ${ac_cv_path_AR+:} false; then :
38331  $as_echo_n "(cached) " >&6
38332else
38333  case $AR in
38334  [\\/]* | ?:[\\/]*)
38335  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38336  ;;
38337  *)
38338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38339for as_dir in $PATH
38340do
38341  IFS=$as_save_IFS
38342  test -z "$as_dir" && as_dir=.
38343    for ac_exec_ext in '' $ac_executable_extensions; do
38344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38345    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38347    break 2
38348  fi
38349done
38350  done
38351IFS=$as_save_IFS
38352
38353  ;;
38354esac
38355fi
38356AR=$ac_cv_path_AR
38357if test -n "$AR"; then
38358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38359$as_echo "$AR" >&6; }
38360else
38361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38362$as_echo "no" >&6; }
38363fi
38364
38365
38366          if test "x$AR" = x; then
38367            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38368          fi
38369        else
38370          # Otherwise we believe it is a complete path. Use it as it is.
38371          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38372$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38373          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38374$as_echo_n "checking for AR... " >&6; }
38375          if test ! -x "$tool_specified"; then
38376            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38377$as_echo "not found" >&6; }
38378            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38379          fi
38380          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38381$as_echo "$tool_specified" >&6; }
38382        fi
38383      fi
38384    fi
38385
38386  fi
38387
38388
38389  else
38390
38391
38392  # Publish this variable in the help.
38393
38394
38395  if [ -z "${AR+x}" ]; then
38396    # The variable is not set by user, try to locate tool using the code snippet
38397    if test -n "$ac_tool_prefix"; then
38398  for ac_prog in ar
38399  do
38400    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38401set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38403$as_echo_n "checking for $ac_word... " >&6; }
38404if ${ac_cv_prog_AR+:} false; then :
38405  $as_echo_n "(cached) " >&6
38406else
38407  if test -n "$AR"; then
38408  ac_cv_prog_AR="$AR" # Let the user override the test.
38409else
38410as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38411for as_dir in $PATH
38412do
38413  IFS=$as_save_IFS
38414  test -z "$as_dir" && as_dir=.
38415    for ac_exec_ext in '' $ac_executable_extensions; do
38416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38417    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38419    break 2
38420  fi
38421done
38422  done
38423IFS=$as_save_IFS
38424
38425fi
38426fi
38427AR=$ac_cv_prog_AR
38428if test -n "$AR"; then
38429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38430$as_echo "$AR" >&6; }
38431else
38432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38433$as_echo "no" >&6; }
38434fi
38435
38436
38437    test -n "$AR" && break
38438  done
38439fi
38440if test -z "$AR"; then
38441  ac_ct_AR=$AR
38442  for ac_prog in ar
38443do
38444  # Extract the first word of "$ac_prog", so it can be a program name with args.
38445set dummy $ac_prog; ac_word=$2
38446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38447$as_echo_n "checking for $ac_word... " >&6; }
38448if ${ac_cv_prog_ac_ct_AR+:} false; then :
38449  $as_echo_n "(cached) " >&6
38450else
38451  if test -n "$ac_ct_AR"; then
38452  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38453else
38454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38455for as_dir in $PATH
38456do
38457  IFS=$as_save_IFS
38458  test -z "$as_dir" && as_dir=.
38459    for ac_exec_ext in '' $ac_executable_extensions; do
38460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38461    ac_cv_prog_ac_ct_AR="$ac_prog"
38462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38463    break 2
38464  fi
38465done
38466  done
38467IFS=$as_save_IFS
38468
38469fi
38470fi
38471ac_ct_AR=$ac_cv_prog_ac_ct_AR
38472if test -n "$ac_ct_AR"; then
38473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38474$as_echo "$ac_ct_AR" >&6; }
38475else
38476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38477$as_echo "no" >&6; }
38478fi
38479
38480
38481  test -n "$ac_ct_AR" && break
38482done
38483
38484  if test "x$ac_ct_AR" = x; then
38485    AR=""
38486  else
38487    case $cross_compiling:$ac_tool_warned in
38488yes:)
38489{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38490$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38491ac_tool_warned=yes ;;
38492esac
38493    AR=$ac_ct_AR
38494  fi
38495fi
38496
38497  else
38498    # The variable is set, but is it from the command line or the environment?
38499
38500    # Try to remove the string !AR! from our list.
38501    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38502    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38503      # If it failed, the variable was not from the command line. Ignore it,
38504      # but warn the user (except for BASH, which is always set by the calling BASH).
38505      if test "xAR" != xBASH; then
38506        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38507$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38508      fi
38509      # Try to locate tool using the code snippet
38510      if test -n "$ac_tool_prefix"; then
38511  for ac_prog in ar
38512  do
38513    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38514set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38516$as_echo_n "checking for $ac_word... " >&6; }
38517if ${ac_cv_prog_AR+:} false; then :
38518  $as_echo_n "(cached) " >&6
38519else
38520  if test -n "$AR"; then
38521  ac_cv_prog_AR="$AR" # Let the user override the test.
38522else
38523as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38524for as_dir in $PATH
38525do
38526  IFS=$as_save_IFS
38527  test -z "$as_dir" && as_dir=.
38528    for ac_exec_ext in '' $ac_executable_extensions; do
38529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38530    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38532    break 2
38533  fi
38534done
38535  done
38536IFS=$as_save_IFS
38537
38538fi
38539fi
38540AR=$ac_cv_prog_AR
38541if test -n "$AR"; then
38542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38543$as_echo "$AR" >&6; }
38544else
38545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38546$as_echo "no" >&6; }
38547fi
38548
38549
38550    test -n "$AR" && break
38551  done
38552fi
38553if test -z "$AR"; then
38554  ac_ct_AR=$AR
38555  for ac_prog in ar
38556do
38557  # Extract the first word of "$ac_prog", so it can be a program name with args.
38558set dummy $ac_prog; ac_word=$2
38559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38560$as_echo_n "checking for $ac_word... " >&6; }
38561if ${ac_cv_prog_ac_ct_AR+:} false; then :
38562  $as_echo_n "(cached) " >&6
38563else
38564  if test -n "$ac_ct_AR"; then
38565  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38566else
38567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38568for as_dir in $PATH
38569do
38570  IFS=$as_save_IFS
38571  test -z "$as_dir" && as_dir=.
38572    for ac_exec_ext in '' $ac_executable_extensions; do
38573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38574    ac_cv_prog_ac_ct_AR="$ac_prog"
38575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38576    break 2
38577  fi
38578done
38579  done
38580IFS=$as_save_IFS
38581
38582fi
38583fi
38584ac_ct_AR=$ac_cv_prog_ac_ct_AR
38585if test -n "$ac_ct_AR"; then
38586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38587$as_echo "$ac_ct_AR" >&6; }
38588else
38589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38590$as_echo "no" >&6; }
38591fi
38592
38593
38594  test -n "$ac_ct_AR" && break
38595done
38596
38597  if test "x$ac_ct_AR" = x; then
38598    AR=""
38599  else
38600    case $cross_compiling:$ac_tool_warned in
38601yes:)
38602{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38603$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38604ac_tool_warned=yes ;;
38605esac
38606    AR=$ac_ct_AR
38607  fi
38608fi
38609
38610    else
38611      # If it succeeded, then it was overridden by the user. We will use it
38612      # for the tool.
38613
38614      # First remove it from the list of overridden variables, so we can test
38615      # for unknown variables in the end.
38616      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38617
38618      # Check if we try to supply an empty value
38619      if test "x$AR" = x; then
38620        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38621$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38622        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38623$as_echo_n "checking for AR... " >&6; }
38624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38625$as_echo "disabled" >&6; }
38626      else
38627        # Check if the provided tool contains a complete path.
38628        tool_specified="$AR"
38629        tool_basename="${tool_specified##*/}"
38630        if test "x$tool_basename" = "x$tool_specified"; then
38631          # A command without a complete path is provided, search $PATH.
38632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38633$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38634          # Extract the first word of "$tool_basename", so it can be a program name with args.
38635set dummy $tool_basename; ac_word=$2
38636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38637$as_echo_n "checking for $ac_word... " >&6; }
38638if ${ac_cv_path_AR+:} false; then :
38639  $as_echo_n "(cached) " >&6
38640else
38641  case $AR in
38642  [\\/]* | ?:[\\/]*)
38643  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38644  ;;
38645  *)
38646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38647for as_dir in $PATH
38648do
38649  IFS=$as_save_IFS
38650  test -z "$as_dir" && as_dir=.
38651    for ac_exec_ext in '' $ac_executable_extensions; do
38652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38653    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38655    break 2
38656  fi
38657done
38658  done
38659IFS=$as_save_IFS
38660
38661  ;;
38662esac
38663fi
38664AR=$ac_cv_path_AR
38665if test -n "$AR"; then
38666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38667$as_echo "$AR" >&6; }
38668else
38669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38670$as_echo "no" >&6; }
38671fi
38672
38673
38674          if test "x$AR" = x; then
38675            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38676          fi
38677        else
38678          # Otherwise we believe it is a complete path. Use it as it is.
38679          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38680$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38681          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38682$as_echo_n "checking for AR... " >&6; }
38683          if test ! -x "$tool_specified"; then
38684            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38685$as_echo "not found" >&6; }
38686            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38687          fi
38688          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38689$as_echo "$tool_specified" >&6; }
38690        fi
38691      fi
38692    fi
38693
38694  fi
38695
38696
38697  fi
38698
38699  # Only process if variable expands to non-empty
38700
38701  if test "x$AR" != x; then
38702    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38703
38704  # First separate the path from the arguments. This will split at the first
38705  # space.
38706  complete="$AR"
38707  path="${complete%% *}"
38708  tmp="$complete EOL"
38709  arguments="${tmp#* }"
38710
38711  # Input might be given as Windows format, start by converting to
38712  # unix format.
38713  new_path=`$CYGPATH -u "$path"`
38714
38715  # Now try to locate executable using which
38716  new_path=`$WHICH "$new_path" 2> /dev/null`
38717  # bat and cmd files are not always considered executable in cygwin causing which
38718  # to not find them
38719  if test "x$new_path" = x \
38720      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38721      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38722    new_path=`$CYGPATH -u "$path"`
38723  fi
38724  if test "x$new_path" = x; then
38725    # Oops. Which didn't find the executable.
38726    # The splitting of arguments from the executable at a space might have been incorrect,
38727    # since paths with space are more likely in Windows. Give it another try with the whole
38728    # argument.
38729    path="$complete"
38730    arguments="EOL"
38731    new_path=`$CYGPATH -u "$path"`
38732    new_path=`$WHICH "$new_path" 2> /dev/null`
38733    # bat and cmd files are not always considered executable in cygwin causing which
38734    # to not find them
38735    if test "x$new_path" = x \
38736        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38737        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38738      new_path=`$CYGPATH -u "$path"`
38739    fi
38740    if test "x$new_path" = x; then
38741      # It's still not found. Now this is an unrecoverable error.
38742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38743$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38744      has_space=`$ECHO "$complete" | $GREP " "`
38745      if test "x$has_space" != x; then
38746        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38747$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38748      fi
38749      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38750    fi
38751  fi
38752
38753  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38754  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38755  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38756  # "foo.exe" is OK but "foo" is an error.
38757  #
38758  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38759  # It is also a way to make sure we got the proper file name for the real test later on.
38760  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38761  if test "x$test_shortpath" = x; then
38762    # Short path failed, file does not exist as specified.
38763    # Try adding .exe or .cmd
38764    if test -f "${new_path}.exe"; then
38765      input_to_shortpath="${new_path}.exe"
38766    elif test -f "${new_path}.cmd"; then
38767      input_to_shortpath="${new_path}.cmd"
38768    else
38769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38770$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38771      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38772$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38773      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38774    fi
38775  else
38776    input_to_shortpath="$new_path"
38777  fi
38778
38779  # Call helper function which possibly converts this using DOS-style short mode.
38780  # If so, the updated path is stored in $new_path.
38781  new_path="$input_to_shortpath"
38782
38783  input_path="$input_to_shortpath"
38784  # Check if we need to convert this using DOS-style short mode. If the path
38785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38786  # take no chances and rewrite it.
38787  # Note: m4 eats our [], so we need to use [ and ] instead.
38788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38789  if test "x$has_forbidden_chars" != x; then
38790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38791    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38792    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38793    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38794      # Going to short mode and back again did indeed matter. Since short mode is
38795      # case insensitive, let's make it lowercase to improve readability.
38796      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38797      # Now convert it back to Unix-style (cygpath)
38798      input_path=`$CYGPATH -u "$shortmode_path"`
38799      new_path="$input_path"
38800    fi
38801  fi
38802
38803  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38804  if test "x$test_cygdrive_prefix" = x; then
38805    # As a simple fix, exclude /usr/bin since it's not a real path.
38806    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38807      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38808      # a path prefixed by /cygdrive for fixpath to work.
38809      new_path="$CYGWIN_ROOT_PATH$input_path"
38810    fi
38811  fi
38812
38813  # remove trailing .exe if any
38814  new_path="${new_path/%.exe/}"
38815
38816    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38817
38818  # First separate the path from the arguments. This will split at the first
38819  # space.
38820  complete="$AR"
38821  path="${complete%% *}"
38822  tmp="$complete EOL"
38823  arguments="${tmp#* }"
38824
38825  # Input might be given as Windows format, start by converting to
38826  # unix format.
38827  new_path="$path"
38828
38829  windows_path="$new_path"
38830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38831    unix_path=`$CYGPATH -u "$windows_path"`
38832    new_path="$unix_path"
38833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38835    new_path="$unix_path"
38836  fi
38837
38838
38839  # Now try to locate executable using which
38840  new_path=`$WHICH "$new_path" 2> /dev/null`
38841
38842  if test "x$new_path" = x; then
38843    # Oops. Which didn't find the executable.
38844    # The splitting of arguments from the executable at a space might have been incorrect,
38845    # since paths with space are more likely in Windows. Give it another try with the whole
38846    # argument.
38847    path="$complete"
38848    arguments="EOL"
38849    new_path="$path"
38850
38851  windows_path="$new_path"
38852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38853    unix_path=`$CYGPATH -u "$windows_path"`
38854    new_path="$unix_path"
38855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38857    new_path="$unix_path"
38858  fi
38859
38860
38861    new_path=`$WHICH "$new_path" 2> /dev/null`
38862    # bat and cmd files are not always considered executable in MSYS causing which
38863    # to not find them
38864    if test "x$new_path" = x \
38865        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38866        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38867      new_path="$path"
38868
38869  windows_path="$new_path"
38870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38871    unix_path=`$CYGPATH -u "$windows_path"`
38872    new_path="$unix_path"
38873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38875    new_path="$unix_path"
38876  fi
38877
38878    fi
38879
38880    if test "x$new_path" = x; then
38881      # It's still not found. Now this is an unrecoverable error.
38882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38883$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38884      has_space=`$ECHO "$complete" | $GREP " "`
38885      if test "x$has_space" != x; then
38886        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38887$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38888      fi
38889      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38890    fi
38891  fi
38892
38893  # Now new_path has a complete unix path to the binary
38894  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38895    # Keep paths in /bin as-is, but remove trailing .exe if any
38896    new_path="${new_path/%.exe/}"
38897    # Do not save /bin paths to all_fixpath_prefixes!
38898  else
38899    # Not in mixed or Windows style, start by that.
38900    new_path=`cmd //c echo $new_path`
38901
38902  input_path="$new_path"
38903  # Check if we need to convert this using DOS-style short mode. If the path
38904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38905  # take no chances and rewrite it.
38906  # Note: m4 eats our [], so we need to use [ and ] instead.
38907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38908  if test "x$has_forbidden_chars" != x; then
38909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38911  fi
38912
38913    # Output is in $new_path
38914
38915  windows_path="$new_path"
38916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38917    unix_path=`$CYGPATH -u "$windows_path"`
38918    new_path="$unix_path"
38919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38921    new_path="$unix_path"
38922  fi
38923
38924    # remove trailing .exe if any
38925    new_path="${new_path/%.exe/}"
38926
38927    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38928    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38929  fi
38930
38931    else
38932      # We're on a unix platform. Hooray! :)
38933      # First separate the path from the arguments. This will split at the first
38934      # space.
38935      complete="$AR"
38936      path="${complete%% *}"
38937      tmp="$complete EOL"
38938      arguments="${tmp#* }"
38939
38940      # Cannot rely on the command "which" here since it doesn't always work.
38941      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38942      if test -z "$is_absolute_path"; then
38943        # Path to executable is not absolute. Find it.
38944        IFS_save="$IFS"
38945        IFS=:
38946        for p in $PATH; do
38947          if test -f "$p/$path" && test -x "$p/$path"; then
38948            new_path="$p/$path"
38949            break
38950          fi
38951        done
38952        IFS="$IFS_save"
38953      else
38954        # This is an absolute path, we can use it without further modifications.
38955        new_path="$path"
38956      fi
38957
38958      if test "x$new_path" = x; then
38959        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38960$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38961        has_space=`$ECHO "$complete" | $GREP " "`
38962        if test "x$has_space" != x; then
38963          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38964$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38965        fi
38966        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38967      fi
38968    fi
38969
38970    # Now join together the path and the arguments once again
38971    if test "x$arguments" != xEOL; then
38972      new_complete="$new_path ${arguments% *}"
38973    else
38974      new_complete="$new_path"
38975    fi
38976
38977    if test "x$complete" != "x$new_complete"; then
38978      AR="$new_complete"
38979      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38980$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38981    fi
38982  fi
38983
38984
38985
38986  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38987
38988
38989  # Publish this variable in the help.
38990
38991
38992  if [ -z "${LIPO+x}" ]; then
38993    # The variable is not set by user, try to locate tool using the code snippet
38994    for ac_prog in lipo
38995do
38996  # Extract the first word of "$ac_prog", so it can be a program name with args.
38997set dummy $ac_prog; ac_word=$2
38998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38999$as_echo_n "checking for $ac_word... " >&6; }
39000if ${ac_cv_path_LIPO+:} false; then :
39001  $as_echo_n "(cached) " >&6
39002else
39003  case $LIPO in
39004  [\\/]* | ?:[\\/]*)
39005  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39006  ;;
39007  *)
39008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39009for as_dir in $PATH
39010do
39011  IFS=$as_save_IFS
39012  test -z "$as_dir" && as_dir=.
39013    for ac_exec_ext in '' $ac_executable_extensions; do
39014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39015    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39017    break 2
39018  fi
39019done
39020  done
39021IFS=$as_save_IFS
39022
39023  ;;
39024esac
39025fi
39026LIPO=$ac_cv_path_LIPO
39027if test -n "$LIPO"; then
39028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39029$as_echo "$LIPO" >&6; }
39030else
39031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39032$as_echo "no" >&6; }
39033fi
39034
39035
39036  test -n "$LIPO" && break
39037done
39038
39039  else
39040    # The variable is set, but is it from the command line or the environment?
39041
39042    # Try to remove the string !LIPO! from our list.
39043    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
39044    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39045      # If it failed, the variable was not from the command line. Ignore it,
39046      # but warn the user (except for BASH, which is always set by the calling BASH).
39047      if test "xLIPO" != xBASH; then
39048        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39049$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39050      fi
39051      # Try to locate tool using the code snippet
39052      for ac_prog in lipo
39053do
39054  # Extract the first word of "$ac_prog", so it can be a program name with args.
39055set dummy $ac_prog; ac_word=$2
39056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39057$as_echo_n "checking for $ac_word... " >&6; }
39058if ${ac_cv_path_LIPO+:} false; then :
39059  $as_echo_n "(cached) " >&6
39060else
39061  case $LIPO in
39062  [\\/]* | ?:[\\/]*)
39063  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39064  ;;
39065  *)
39066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39067for as_dir in $PATH
39068do
39069  IFS=$as_save_IFS
39070  test -z "$as_dir" && as_dir=.
39071    for ac_exec_ext in '' $ac_executable_extensions; do
39072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39073    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39075    break 2
39076  fi
39077done
39078  done
39079IFS=$as_save_IFS
39080
39081  ;;
39082esac
39083fi
39084LIPO=$ac_cv_path_LIPO
39085if test -n "$LIPO"; then
39086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39087$as_echo "$LIPO" >&6; }
39088else
39089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39090$as_echo "no" >&6; }
39091fi
39092
39093
39094  test -n "$LIPO" && break
39095done
39096
39097    else
39098      # If it succeeded, then it was overridden by the user. We will use it
39099      # for the tool.
39100
39101      # First remove it from the list of overridden variables, so we can test
39102      # for unknown variables in the end.
39103      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39104
39105      # Check if we try to supply an empty value
39106      if test "x$LIPO" = x; then
39107        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
39108$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
39109        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39110$as_echo_n "checking for LIPO... " >&6; }
39111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39112$as_echo "disabled" >&6; }
39113      else
39114        # Check if the provided tool contains a complete path.
39115        tool_specified="$LIPO"
39116        tool_basename="${tool_specified##*/}"
39117        if test "x$tool_basename" = "x$tool_specified"; then
39118          # A command without a complete path is provided, search $PATH.
39119          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39120$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39121          # Extract the first word of "$tool_basename", so it can be a program name with args.
39122set dummy $tool_basename; ac_word=$2
39123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39124$as_echo_n "checking for $ac_word... " >&6; }
39125if ${ac_cv_path_LIPO+:} false; then :
39126  $as_echo_n "(cached) " >&6
39127else
39128  case $LIPO in
39129  [\\/]* | ?:[\\/]*)
39130  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39131  ;;
39132  *)
39133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39134for as_dir in $PATH
39135do
39136  IFS=$as_save_IFS
39137  test -z "$as_dir" && as_dir=.
39138    for ac_exec_ext in '' $ac_executable_extensions; do
39139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39140    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39142    break 2
39143  fi
39144done
39145  done
39146IFS=$as_save_IFS
39147
39148  ;;
39149esac
39150fi
39151LIPO=$ac_cv_path_LIPO
39152if test -n "$LIPO"; then
39153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39154$as_echo "$LIPO" >&6; }
39155else
39156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39157$as_echo "no" >&6; }
39158fi
39159
39160
39161          if test "x$LIPO" = x; then
39162            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39163          fi
39164        else
39165          # Otherwise we believe it is a complete path. Use it as it is.
39166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39167$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39168          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39169$as_echo_n "checking for LIPO... " >&6; }
39170          if test ! -x "$tool_specified"; then
39171            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39172$as_echo "not found" >&6; }
39173            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39174          fi
39175          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39176$as_echo "$tool_specified" >&6; }
39177        fi
39178      fi
39179    fi
39180
39181  fi
39182
39183
39184
39185  # Only process if variable expands to non-empty
39186
39187  if test "x$LIPO" != x; then
39188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39189
39190  # First separate the path from the arguments. This will split at the first
39191  # space.
39192  complete="$LIPO"
39193  path="${complete%% *}"
39194  tmp="$complete EOL"
39195  arguments="${tmp#* }"
39196
39197  # Input might be given as Windows format, start by converting to
39198  # unix format.
39199  new_path=`$CYGPATH -u "$path"`
39200
39201  # Now try to locate executable using which
39202  new_path=`$WHICH "$new_path" 2> /dev/null`
39203  # bat and cmd files are not always considered executable in cygwin causing which
39204  # to not find them
39205  if test "x$new_path" = x \
39206      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39207      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39208    new_path=`$CYGPATH -u "$path"`
39209  fi
39210  if test "x$new_path" = x; then
39211    # Oops. Which didn't find the executable.
39212    # The splitting of arguments from the executable at a space might have been incorrect,
39213    # since paths with space are more likely in Windows. Give it another try with the whole
39214    # argument.
39215    path="$complete"
39216    arguments="EOL"
39217    new_path=`$CYGPATH -u "$path"`
39218    new_path=`$WHICH "$new_path" 2> /dev/null`
39219    # bat and cmd files are not always considered executable in cygwin causing which
39220    # to not find them
39221    if test "x$new_path" = x \
39222        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39223        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39224      new_path=`$CYGPATH -u "$path"`
39225    fi
39226    if test "x$new_path" = x; then
39227      # It's still not found. Now this is an unrecoverable error.
39228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39229$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39230      has_space=`$ECHO "$complete" | $GREP " "`
39231      if test "x$has_space" != x; then
39232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39234      fi
39235      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39236    fi
39237  fi
39238
39239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39242  # "foo.exe" is OK but "foo" is an error.
39243  #
39244  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39245  # It is also a way to make sure we got the proper file name for the real test later on.
39246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39247  if test "x$test_shortpath" = x; then
39248    # Short path failed, file does not exist as specified.
39249    # Try adding .exe or .cmd
39250    if test -f "${new_path}.exe"; then
39251      input_to_shortpath="${new_path}.exe"
39252    elif test -f "${new_path}.cmd"; then
39253      input_to_shortpath="${new_path}.cmd"
39254    else
39255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39256$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39257      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39258$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39259      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39260    fi
39261  else
39262    input_to_shortpath="$new_path"
39263  fi
39264
39265  # Call helper function which possibly converts this using DOS-style short mode.
39266  # If so, the updated path is stored in $new_path.
39267  new_path="$input_to_shortpath"
39268
39269  input_path="$input_to_shortpath"
39270  # Check if we need to convert this using DOS-style short mode. If the path
39271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39272  # take no chances and rewrite it.
39273  # Note: m4 eats our [], so we need to use [ and ] instead.
39274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39275  if test "x$has_forbidden_chars" != x; then
39276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39280      # Going to short mode and back again did indeed matter. Since short mode is
39281      # case insensitive, let's make it lowercase to improve readability.
39282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39283      # Now convert it back to Unix-style (cygpath)
39284      input_path=`$CYGPATH -u "$shortmode_path"`
39285      new_path="$input_path"
39286    fi
39287  fi
39288
39289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39290  if test "x$test_cygdrive_prefix" = x; then
39291    # As a simple fix, exclude /usr/bin since it's not a real path.
39292    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39294      # a path prefixed by /cygdrive for fixpath to work.
39295      new_path="$CYGWIN_ROOT_PATH$input_path"
39296    fi
39297  fi
39298
39299  # remove trailing .exe if any
39300  new_path="${new_path/%.exe/}"
39301
39302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39303
39304  # First separate the path from the arguments. This will split at the first
39305  # space.
39306  complete="$LIPO"
39307  path="${complete%% *}"
39308  tmp="$complete EOL"
39309  arguments="${tmp#* }"
39310
39311  # Input might be given as Windows format, start by converting to
39312  # unix format.
39313  new_path="$path"
39314
39315  windows_path="$new_path"
39316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39317    unix_path=`$CYGPATH -u "$windows_path"`
39318    new_path="$unix_path"
39319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39321    new_path="$unix_path"
39322  fi
39323
39324
39325  # Now try to locate executable using which
39326  new_path=`$WHICH "$new_path" 2> /dev/null`
39327
39328  if test "x$new_path" = x; then
39329    # Oops. Which didn't find the executable.
39330    # The splitting of arguments from the executable at a space might have been incorrect,
39331    # since paths with space are more likely in Windows. Give it another try with the whole
39332    # argument.
39333    path="$complete"
39334    arguments="EOL"
39335    new_path="$path"
39336
39337  windows_path="$new_path"
39338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39339    unix_path=`$CYGPATH -u "$windows_path"`
39340    new_path="$unix_path"
39341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39343    new_path="$unix_path"
39344  fi
39345
39346
39347    new_path=`$WHICH "$new_path" 2> /dev/null`
39348    # bat and cmd files are not always considered executable in MSYS causing which
39349    # to not find them
39350    if test "x$new_path" = x \
39351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39353      new_path="$path"
39354
39355  windows_path="$new_path"
39356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39357    unix_path=`$CYGPATH -u "$windows_path"`
39358    new_path="$unix_path"
39359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39361    new_path="$unix_path"
39362  fi
39363
39364    fi
39365
39366    if test "x$new_path" = x; then
39367      # It's still not found. Now this is an unrecoverable error.
39368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39369$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39370      has_space=`$ECHO "$complete" | $GREP " "`
39371      if test "x$has_space" != x; then
39372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39374      fi
39375      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39376    fi
39377  fi
39378
39379  # Now new_path has a complete unix path to the binary
39380  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39381    # Keep paths in /bin as-is, but remove trailing .exe if any
39382    new_path="${new_path/%.exe/}"
39383    # Do not save /bin paths to all_fixpath_prefixes!
39384  else
39385    # Not in mixed or Windows style, start by that.
39386    new_path=`cmd //c echo $new_path`
39387
39388  input_path="$new_path"
39389  # Check if we need to convert this using DOS-style short mode. If the path
39390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39391  # take no chances and rewrite it.
39392  # Note: m4 eats our [], so we need to use [ and ] instead.
39393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39394  if test "x$has_forbidden_chars" != x; then
39395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39397  fi
39398
39399    # Output is in $new_path
39400
39401  windows_path="$new_path"
39402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39403    unix_path=`$CYGPATH -u "$windows_path"`
39404    new_path="$unix_path"
39405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39407    new_path="$unix_path"
39408  fi
39409
39410    # remove trailing .exe if any
39411    new_path="${new_path/%.exe/}"
39412
39413    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39414    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39415  fi
39416
39417    else
39418      # We're on a unix platform. Hooray! :)
39419      # First separate the path from the arguments. This will split at the first
39420      # space.
39421      complete="$LIPO"
39422      path="${complete%% *}"
39423      tmp="$complete EOL"
39424      arguments="${tmp#* }"
39425
39426      # Cannot rely on the command "which" here since it doesn't always work.
39427      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39428      if test -z "$is_absolute_path"; then
39429        # Path to executable is not absolute. Find it.
39430        IFS_save="$IFS"
39431        IFS=:
39432        for p in $PATH; do
39433          if test -f "$p/$path" && test -x "$p/$path"; then
39434            new_path="$p/$path"
39435            break
39436          fi
39437        done
39438        IFS="$IFS_save"
39439      else
39440        # This is an absolute path, we can use it without further modifications.
39441        new_path="$path"
39442      fi
39443
39444      if test "x$new_path" = x; then
39445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39446$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39447        has_space=`$ECHO "$complete" | $GREP " "`
39448        if test "x$has_space" != x; then
39449          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39450$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39451        fi
39452        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39453      fi
39454    fi
39455
39456    # Now join together the path and the arguments once again
39457    if test "x$arguments" != xEOL; then
39458      new_complete="$new_path ${arguments% *}"
39459    else
39460      new_complete="$new_path"
39461    fi
39462
39463    if test "x$complete" != "x$new_complete"; then
39464      LIPO="$new_complete"
39465      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39466$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39467    fi
39468  fi
39469
39470  fi
39471
39472  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39473    # Extract the first word of "mt", so it can be a program name with args.
39474set dummy mt; ac_word=$2
39475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39476$as_echo_n "checking for $ac_word... " >&6; }
39477if ${ac_cv_prog_MT+:} false; then :
39478  $as_echo_n "(cached) " >&6
39479else
39480  if test -n "$MT"; then
39481  ac_cv_prog_MT="$MT" # Let the user override the test.
39482else
39483  ac_prog_rejected=no
39484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39485for as_dir in $PATH
39486do
39487  IFS=$as_save_IFS
39488  test -z "$as_dir" && as_dir=.
39489    for ac_exec_ext in '' $ac_executable_extensions; do
39490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39491    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39492       ac_prog_rejected=yes
39493       continue
39494     fi
39495    ac_cv_prog_MT="mt"
39496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39497    break 2
39498  fi
39499done
39500  done
39501IFS=$as_save_IFS
39502
39503if test $ac_prog_rejected = yes; then
39504  # We found a bogon in the path, so make sure we never use it.
39505  set dummy $ac_cv_prog_MT
39506  shift
39507  if test $# != 0; then
39508    # We chose a different compiler from the bogus one.
39509    # However, it has the same basename, so the bogon will be chosen
39510    # first if we set MT to just the basename; use the full file name.
39511    shift
39512    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39513  fi
39514fi
39515fi
39516fi
39517MT=$ac_cv_prog_MT
39518if test -n "$MT"; then
39519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39520$as_echo "$MT" >&6; }
39521else
39522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39523$as_echo "no" >&6; }
39524fi
39525
39526
39527
39528  # Only process if variable expands to non-empty
39529
39530  if test "x$MT" != x; then
39531    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39532
39533  # First separate the path from the arguments. This will split at the first
39534  # space.
39535  complete="$MT"
39536  path="${complete%% *}"
39537  tmp="$complete EOL"
39538  arguments="${tmp#* }"
39539
39540  # Input might be given as Windows format, start by converting to
39541  # unix format.
39542  new_path=`$CYGPATH -u "$path"`
39543
39544  # Now try to locate executable using which
39545  new_path=`$WHICH "$new_path" 2> /dev/null`
39546  # bat and cmd files are not always considered executable in cygwin causing which
39547  # to not find them
39548  if test "x$new_path" = x \
39549      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39550      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39551    new_path=`$CYGPATH -u "$path"`
39552  fi
39553  if test "x$new_path" = x; then
39554    # Oops. Which didn't find the executable.
39555    # The splitting of arguments from the executable at a space might have been incorrect,
39556    # since paths with space are more likely in Windows. Give it another try with the whole
39557    # argument.
39558    path="$complete"
39559    arguments="EOL"
39560    new_path=`$CYGPATH -u "$path"`
39561    new_path=`$WHICH "$new_path" 2> /dev/null`
39562    # bat and cmd files are not always considered executable in cygwin causing which
39563    # to not find them
39564    if test "x$new_path" = x \
39565        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39566        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39567      new_path=`$CYGPATH -u "$path"`
39568    fi
39569    if test "x$new_path" = x; then
39570      # It's still not found. Now this is an unrecoverable error.
39571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39572$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39573      has_space=`$ECHO "$complete" | $GREP " "`
39574      if test "x$has_space" != x; then
39575        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39576$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39577      fi
39578      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39579    fi
39580  fi
39581
39582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39585  # "foo.exe" is OK but "foo" is an error.
39586  #
39587  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39588  # It is also a way to make sure we got the proper file name for the real test later on.
39589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39590  if test "x$test_shortpath" = x; then
39591    # Short path failed, file does not exist as specified.
39592    # Try adding .exe or .cmd
39593    if test -f "${new_path}.exe"; then
39594      input_to_shortpath="${new_path}.exe"
39595    elif test -f "${new_path}.cmd"; then
39596      input_to_shortpath="${new_path}.cmd"
39597    else
39598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39599$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39600      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39601$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39602      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39603    fi
39604  else
39605    input_to_shortpath="$new_path"
39606  fi
39607
39608  # Call helper function which possibly converts this using DOS-style short mode.
39609  # If so, the updated path is stored in $new_path.
39610  new_path="$input_to_shortpath"
39611
39612  input_path="$input_to_shortpath"
39613  # Check if we need to convert this using DOS-style short mode. If the path
39614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39615  # take no chances and rewrite it.
39616  # Note: m4 eats our [], so we need to use [ and ] instead.
39617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39618  if test "x$has_forbidden_chars" != x; then
39619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39623      # Going to short mode and back again did indeed matter. Since short mode is
39624      # case insensitive, let's make it lowercase to improve readability.
39625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39626      # Now convert it back to Unix-style (cygpath)
39627      input_path=`$CYGPATH -u "$shortmode_path"`
39628      new_path="$input_path"
39629    fi
39630  fi
39631
39632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39633  if test "x$test_cygdrive_prefix" = x; then
39634    # As a simple fix, exclude /usr/bin since it's not a real path.
39635    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39637      # a path prefixed by /cygdrive for fixpath to work.
39638      new_path="$CYGWIN_ROOT_PATH$input_path"
39639    fi
39640  fi
39641
39642  # remove trailing .exe if any
39643  new_path="${new_path/%.exe/}"
39644
39645    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39646
39647  # First separate the path from the arguments. This will split at the first
39648  # space.
39649  complete="$MT"
39650  path="${complete%% *}"
39651  tmp="$complete EOL"
39652  arguments="${tmp#* }"
39653
39654  # Input might be given as Windows format, start by converting to
39655  # unix format.
39656  new_path="$path"
39657
39658  windows_path="$new_path"
39659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39660    unix_path=`$CYGPATH -u "$windows_path"`
39661    new_path="$unix_path"
39662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39664    new_path="$unix_path"
39665  fi
39666
39667
39668  # Now try to locate executable using which
39669  new_path=`$WHICH "$new_path" 2> /dev/null`
39670
39671  if test "x$new_path" = x; then
39672    # Oops. Which didn't find the executable.
39673    # The splitting of arguments from the executable at a space might have been incorrect,
39674    # since paths with space are more likely in Windows. Give it another try with the whole
39675    # argument.
39676    path="$complete"
39677    arguments="EOL"
39678    new_path="$path"
39679
39680  windows_path="$new_path"
39681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39682    unix_path=`$CYGPATH -u "$windows_path"`
39683    new_path="$unix_path"
39684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39686    new_path="$unix_path"
39687  fi
39688
39689
39690    new_path=`$WHICH "$new_path" 2> /dev/null`
39691    # bat and cmd files are not always considered executable in MSYS causing which
39692    # to not find them
39693    if test "x$new_path" = x \
39694        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39695        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39696      new_path="$path"
39697
39698  windows_path="$new_path"
39699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39700    unix_path=`$CYGPATH -u "$windows_path"`
39701    new_path="$unix_path"
39702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39704    new_path="$unix_path"
39705  fi
39706
39707    fi
39708
39709    if test "x$new_path" = x; then
39710      # It's still not found. Now this is an unrecoverable error.
39711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39712$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39713      has_space=`$ECHO "$complete" | $GREP " "`
39714      if test "x$has_space" != x; then
39715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39717      fi
39718      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39719    fi
39720  fi
39721
39722  # Now new_path has a complete unix path to the binary
39723  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39724    # Keep paths in /bin as-is, but remove trailing .exe if any
39725    new_path="${new_path/%.exe/}"
39726    # Do not save /bin paths to all_fixpath_prefixes!
39727  else
39728    # Not in mixed or Windows style, start by that.
39729    new_path=`cmd //c echo $new_path`
39730
39731  input_path="$new_path"
39732  # Check if we need to convert this using DOS-style short mode. If the path
39733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39734  # take no chances and rewrite it.
39735  # Note: m4 eats our [], so we need to use [ and ] instead.
39736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39737  if test "x$has_forbidden_chars" != x; then
39738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39740  fi
39741
39742    # Output is in $new_path
39743
39744  windows_path="$new_path"
39745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39746    unix_path=`$CYGPATH -u "$windows_path"`
39747    new_path="$unix_path"
39748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39750    new_path="$unix_path"
39751  fi
39752
39753    # remove trailing .exe if any
39754    new_path="${new_path/%.exe/}"
39755
39756    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39757    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39758  fi
39759
39760    else
39761      # We're on a unix platform. Hooray! :)
39762      # First separate the path from the arguments. This will split at the first
39763      # space.
39764      complete="$MT"
39765      path="${complete%% *}"
39766      tmp="$complete EOL"
39767      arguments="${tmp#* }"
39768
39769      # Cannot rely on the command "which" here since it doesn't always work.
39770      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39771      if test -z "$is_absolute_path"; then
39772        # Path to executable is not absolute. Find it.
39773        IFS_save="$IFS"
39774        IFS=:
39775        for p in $PATH; do
39776          if test -f "$p/$path" && test -x "$p/$path"; then
39777            new_path="$p/$path"
39778            break
39779          fi
39780        done
39781        IFS="$IFS_save"
39782      else
39783        # This is an absolute path, we can use it without further modifications.
39784        new_path="$path"
39785      fi
39786
39787      if test "x$new_path" = x; then
39788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39789$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39790        has_space=`$ECHO "$complete" | $GREP " "`
39791        if test "x$has_space" != x; then
39792          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39793$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39794        fi
39795        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39796      fi
39797    fi
39798
39799    # Now join together the path and the arguments once again
39800    if test "x$arguments" != xEOL; then
39801      new_complete="$new_path ${arguments% *}"
39802    else
39803      new_complete="$new_path"
39804    fi
39805
39806    if test "x$complete" != "x$new_complete"; then
39807      MT="$new_complete"
39808      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39809$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39810    fi
39811  fi
39812
39813    # Setup the resource compiler (RC)
39814    # Extract the first word of "rc", so it can be a program name with args.
39815set dummy rc; ac_word=$2
39816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39817$as_echo_n "checking for $ac_word... " >&6; }
39818if ${ac_cv_prog_RC+:} false; then :
39819  $as_echo_n "(cached) " >&6
39820else
39821  if test -n "$RC"; then
39822  ac_cv_prog_RC="$RC" # Let the user override the test.
39823else
39824  ac_prog_rejected=no
39825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39826for as_dir in $PATH
39827do
39828  IFS=$as_save_IFS
39829  test -z "$as_dir" && as_dir=.
39830    for ac_exec_ext in '' $ac_executable_extensions; do
39831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39832    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39833       ac_prog_rejected=yes
39834       continue
39835     fi
39836    ac_cv_prog_RC="rc"
39837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39838    break 2
39839  fi
39840done
39841  done
39842IFS=$as_save_IFS
39843
39844if test $ac_prog_rejected = yes; then
39845  # We found a bogon in the path, so make sure we never use it.
39846  set dummy $ac_cv_prog_RC
39847  shift
39848  if test $# != 0; then
39849    # We chose a different compiler from the bogus one.
39850    # However, it has the same basename, so the bogon will be chosen
39851    # first if we set RC to just the basename; use the full file name.
39852    shift
39853    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39854  fi
39855fi
39856fi
39857fi
39858RC=$ac_cv_prog_RC
39859if test -n "$RC"; then
39860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39861$as_echo "$RC" >&6; }
39862else
39863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39864$as_echo "no" >&6; }
39865fi
39866
39867
39868
39869  # Only process if variable expands to non-empty
39870
39871  if test "x$RC" != x; then
39872    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39873
39874  # First separate the path from the arguments. This will split at the first
39875  # space.
39876  complete="$RC"
39877  path="${complete%% *}"
39878  tmp="$complete EOL"
39879  arguments="${tmp#* }"
39880
39881  # Input might be given as Windows format, start by converting to
39882  # unix format.
39883  new_path=`$CYGPATH -u "$path"`
39884
39885  # Now try to locate executable using which
39886  new_path=`$WHICH "$new_path" 2> /dev/null`
39887  # bat and cmd files are not always considered executable in cygwin causing which
39888  # to not find them
39889  if test "x$new_path" = x \
39890      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39891      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39892    new_path=`$CYGPATH -u "$path"`
39893  fi
39894  if test "x$new_path" = x; then
39895    # Oops. Which didn't find the executable.
39896    # The splitting of arguments from the executable at a space might have been incorrect,
39897    # since paths with space are more likely in Windows. Give it another try with the whole
39898    # argument.
39899    path="$complete"
39900    arguments="EOL"
39901    new_path=`$CYGPATH -u "$path"`
39902    new_path=`$WHICH "$new_path" 2> /dev/null`
39903    # bat and cmd files are not always considered executable in cygwin causing which
39904    # to not find them
39905    if test "x$new_path" = x \
39906        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39907        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39908      new_path=`$CYGPATH -u "$path"`
39909    fi
39910    if test "x$new_path" = x; then
39911      # It's still not found. Now this is an unrecoverable error.
39912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39913$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39914      has_space=`$ECHO "$complete" | $GREP " "`
39915      if test "x$has_space" != x; then
39916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39918      fi
39919      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39920    fi
39921  fi
39922
39923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39926  # "foo.exe" is OK but "foo" is an error.
39927  #
39928  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39929  # It is also a way to make sure we got the proper file name for the real test later on.
39930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39931  if test "x$test_shortpath" = x; then
39932    # Short path failed, file does not exist as specified.
39933    # Try adding .exe or .cmd
39934    if test -f "${new_path}.exe"; then
39935      input_to_shortpath="${new_path}.exe"
39936    elif test -f "${new_path}.cmd"; then
39937      input_to_shortpath="${new_path}.cmd"
39938    else
39939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39940$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39941      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39942$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39943      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39944    fi
39945  else
39946    input_to_shortpath="$new_path"
39947  fi
39948
39949  # Call helper function which possibly converts this using DOS-style short mode.
39950  # If so, the updated path is stored in $new_path.
39951  new_path="$input_to_shortpath"
39952
39953  input_path="$input_to_shortpath"
39954  # Check if we need to convert this using DOS-style short mode. If the path
39955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39956  # take no chances and rewrite it.
39957  # Note: m4 eats our [], so we need to use [ and ] instead.
39958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39959  if test "x$has_forbidden_chars" != x; then
39960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39964      # Going to short mode and back again did indeed matter. Since short mode is
39965      # case insensitive, let's make it lowercase to improve readability.
39966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39967      # Now convert it back to Unix-style (cygpath)
39968      input_path=`$CYGPATH -u "$shortmode_path"`
39969      new_path="$input_path"
39970    fi
39971  fi
39972
39973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39974  if test "x$test_cygdrive_prefix" = x; then
39975    # As a simple fix, exclude /usr/bin since it's not a real path.
39976    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39978      # a path prefixed by /cygdrive for fixpath to work.
39979      new_path="$CYGWIN_ROOT_PATH$input_path"
39980    fi
39981  fi
39982
39983  # remove trailing .exe if any
39984  new_path="${new_path/%.exe/}"
39985
39986    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39987
39988  # First separate the path from the arguments. This will split at the first
39989  # space.
39990  complete="$RC"
39991  path="${complete%% *}"
39992  tmp="$complete EOL"
39993  arguments="${tmp#* }"
39994
39995  # Input might be given as Windows format, start by converting to
39996  # unix format.
39997  new_path="$path"
39998
39999  windows_path="$new_path"
40000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40001    unix_path=`$CYGPATH -u "$windows_path"`
40002    new_path="$unix_path"
40003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40005    new_path="$unix_path"
40006  fi
40007
40008
40009  # Now try to locate executable using which
40010  new_path=`$WHICH "$new_path" 2> /dev/null`
40011
40012  if test "x$new_path" = x; then
40013    # Oops. Which didn't find the executable.
40014    # The splitting of arguments from the executable at a space might have been incorrect,
40015    # since paths with space are more likely in Windows. Give it another try with the whole
40016    # argument.
40017    path="$complete"
40018    arguments="EOL"
40019    new_path="$path"
40020
40021  windows_path="$new_path"
40022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40023    unix_path=`$CYGPATH -u "$windows_path"`
40024    new_path="$unix_path"
40025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40027    new_path="$unix_path"
40028  fi
40029
40030
40031    new_path=`$WHICH "$new_path" 2> /dev/null`
40032    # bat and cmd files are not always considered executable in MSYS causing which
40033    # to not find them
40034    if test "x$new_path" = x \
40035        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40036        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40037      new_path="$path"
40038
40039  windows_path="$new_path"
40040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40041    unix_path=`$CYGPATH -u "$windows_path"`
40042    new_path="$unix_path"
40043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40045    new_path="$unix_path"
40046  fi
40047
40048    fi
40049
40050    if test "x$new_path" = x; then
40051      # It's still not found. Now this is an unrecoverable error.
40052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40053$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40054      has_space=`$ECHO "$complete" | $GREP " "`
40055      if test "x$has_space" != x; then
40056        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40057$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40058      fi
40059      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40060    fi
40061  fi
40062
40063  # Now new_path has a complete unix path to the binary
40064  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40065    # Keep paths in /bin as-is, but remove trailing .exe if any
40066    new_path="${new_path/%.exe/}"
40067    # Do not save /bin paths to all_fixpath_prefixes!
40068  else
40069    # Not in mixed or Windows style, start by that.
40070    new_path=`cmd //c echo $new_path`
40071
40072  input_path="$new_path"
40073  # Check if we need to convert this using DOS-style short mode. If the path
40074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40075  # take no chances and rewrite it.
40076  # Note: m4 eats our [], so we need to use [ and ] instead.
40077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40078  if test "x$has_forbidden_chars" != x; then
40079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40081  fi
40082
40083    # Output is in $new_path
40084
40085  windows_path="$new_path"
40086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40087    unix_path=`$CYGPATH -u "$windows_path"`
40088    new_path="$unix_path"
40089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40091    new_path="$unix_path"
40092  fi
40093
40094    # remove trailing .exe if any
40095    new_path="${new_path/%.exe/}"
40096
40097    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40098    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40099  fi
40100
40101    else
40102      # We're on a unix platform. Hooray! :)
40103      # First separate the path from the arguments. This will split at the first
40104      # space.
40105      complete="$RC"
40106      path="${complete%% *}"
40107      tmp="$complete EOL"
40108      arguments="${tmp#* }"
40109
40110      # Cannot rely on the command "which" here since it doesn't always work.
40111      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40112      if test -z "$is_absolute_path"; then
40113        # Path to executable is not absolute. Find it.
40114        IFS_save="$IFS"
40115        IFS=:
40116        for p in $PATH; do
40117          if test -f "$p/$path" && test -x "$p/$path"; then
40118            new_path="$p/$path"
40119            break
40120          fi
40121        done
40122        IFS="$IFS_save"
40123      else
40124        # This is an absolute path, we can use it without further modifications.
40125        new_path="$path"
40126      fi
40127
40128      if test "x$new_path" = x; then
40129        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40130$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40131        has_space=`$ECHO "$complete" | $GREP " "`
40132        if test "x$has_space" != x; then
40133          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40134$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40135        fi
40136        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40137      fi
40138    fi
40139
40140    # Now join together the path and the arguments once again
40141    if test "x$arguments" != xEOL; then
40142      new_complete="$new_path ${arguments% *}"
40143    else
40144      new_complete="$new_path"
40145    fi
40146
40147    if test "x$complete" != "x$new_complete"; then
40148      RC="$new_complete"
40149      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
40150$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
40151    fi
40152  fi
40153
40154    # Extract the first word of "dumpbin", so it can be a program name with args.
40155set dummy dumpbin; ac_word=$2
40156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40157$as_echo_n "checking for $ac_word... " >&6; }
40158if ${ac_cv_prog_DUMPBIN+:} false; then :
40159  $as_echo_n "(cached) " >&6
40160else
40161  if test -n "$DUMPBIN"; then
40162  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
40163else
40164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40165for as_dir in $PATH
40166do
40167  IFS=$as_save_IFS
40168  test -z "$as_dir" && as_dir=.
40169    for ac_exec_ext in '' $ac_executable_extensions; do
40170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40171    ac_cv_prog_DUMPBIN="dumpbin"
40172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40173    break 2
40174  fi
40175done
40176  done
40177IFS=$as_save_IFS
40178
40179fi
40180fi
40181DUMPBIN=$ac_cv_prog_DUMPBIN
40182if test -n "$DUMPBIN"; then
40183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40184$as_echo "$DUMPBIN" >&6; }
40185else
40186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40187$as_echo "no" >&6; }
40188fi
40189
40190
40191
40192  # Only process if variable expands to non-empty
40193
40194  if test "x$DUMPBIN" != x; then
40195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40196
40197  # First separate the path from the arguments. This will split at the first
40198  # space.
40199  complete="$DUMPBIN"
40200  path="${complete%% *}"
40201  tmp="$complete EOL"
40202  arguments="${tmp#* }"
40203
40204  # Input might be given as Windows format, start by converting to
40205  # unix format.
40206  new_path=`$CYGPATH -u "$path"`
40207
40208  # Now try to locate executable using which
40209  new_path=`$WHICH "$new_path" 2> /dev/null`
40210  # bat and cmd files are not always considered executable in cygwin causing which
40211  # to not find them
40212  if test "x$new_path" = x \
40213      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40214      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40215    new_path=`$CYGPATH -u "$path"`
40216  fi
40217  if test "x$new_path" = x; then
40218    # Oops. Which didn't find the executable.
40219    # The splitting of arguments from the executable at a space might have been incorrect,
40220    # since paths with space are more likely in Windows. Give it another try with the whole
40221    # argument.
40222    path="$complete"
40223    arguments="EOL"
40224    new_path=`$CYGPATH -u "$path"`
40225    new_path=`$WHICH "$new_path" 2> /dev/null`
40226    # bat and cmd files are not always considered executable in cygwin causing which
40227    # to not find them
40228    if test "x$new_path" = x \
40229        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40230        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40231      new_path=`$CYGPATH -u "$path"`
40232    fi
40233    if test "x$new_path" = x; then
40234      # It's still not found. Now this is an unrecoverable error.
40235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40236$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40237      has_space=`$ECHO "$complete" | $GREP " "`
40238      if test "x$has_space" != x; then
40239        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40240$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40241      fi
40242      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40243    fi
40244  fi
40245
40246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40249  # "foo.exe" is OK but "foo" is an error.
40250  #
40251  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40252  # It is also a way to make sure we got the proper file name for the real test later on.
40253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40254  if test "x$test_shortpath" = x; then
40255    # Short path failed, file does not exist as specified.
40256    # Try adding .exe or .cmd
40257    if test -f "${new_path}.exe"; then
40258      input_to_shortpath="${new_path}.exe"
40259    elif test -f "${new_path}.cmd"; then
40260      input_to_shortpath="${new_path}.cmd"
40261    else
40262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40263$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40264      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40265$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40266      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40267    fi
40268  else
40269    input_to_shortpath="$new_path"
40270  fi
40271
40272  # Call helper function which possibly converts this using DOS-style short mode.
40273  # If so, the updated path is stored in $new_path.
40274  new_path="$input_to_shortpath"
40275
40276  input_path="$input_to_shortpath"
40277  # Check if we need to convert this using DOS-style short mode. If the path
40278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40279  # take no chances and rewrite it.
40280  # Note: m4 eats our [], so we need to use [ and ] instead.
40281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40282  if test "x$has_forbidden_chars" != x; then
40283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40287      # Going to short mode and back again did indeed matter. Since short mode is
40288      # case insensitive, let's make it lowercase to improve readability.
40289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40290      # Now convert it back to Unix-style (cygpath)
40291      input_path=`$CYGPATH -u "$shortmode_path"`
40292      new_path="$input_path"
40293    fi
40294  fi
40295
40296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40297  if test "x$test_cygdrive_prefix" = x; then
40298    # As a simple fix, exclude /usr/bin since it's not a real path.
40299    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40301      # a path prefixed by /cygdrive for fixpath to work.
40302      new_path="$CYGWIN_ROOT_PATH$input_path"
40303    fi
40304  fi
40305
40306  # remove trailing .exe if any
40307  new_path="${new_path/%.exe/}"
40308
40309    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40310
40311  # First separate the path from the arguments. This will split at the first
40312  # space.
40313  complete="$DUMPBIN"
40314  path="${complete%% *}"
40315  tmp="$complete EOL"
40316  arguments="${tmp#* }"
40317
40318  # Input might be given as Windows format, start by converting to
40319  # unix format.
40320  new_path="$path"
40321
40322  windows_path="$new_path"
40323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40324    unix_path=`$CYGPATH -u "$windows_path"`
40325    new_path="$unix_path"
40326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40328    new_path="$unix_path"
40329  fi
40330
40331
40332  # Now try to locate executable using which
40333  new_path=`$WHICH "$new_path" 2> /dev/null`
40334
40335  if test "x$new_path" = x; then
40336    # Oops. Which didn't find the executable.
40337    # The splitting of arguments from the executable at a space might have been incorrect,
40338    # since paths with space are more likely in Windows. Give it another try with the whole
40339    # argument.
40340    path="$complete"
40341    arguments="EOL"
40342    new_path="$path"
40343
40344  windows_path="$new_path"
40345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40346    unix_path=`$CYGPATH -u "$windows_path"`
40347    new_path="$unix_path"
40348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40350    new_path="$unix_path"
40351  fi
40352
40353
40354    new_path=`$WHICH "$new_path" 2> /dev/null`
40355    # bat and cmd files are not always considered executable in MSYS causing which
40356    # to not find them
40357    if test "x$new_path" = x \
40358        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40359        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40360      new_path="$path"
40361
40362  windows_path="$new_path"
40363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40364    unix_path=`$CYGPATH -u "$windows_path"`
40365    new_path="$unix_path"
40366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40368    new_path="$unix_path"
40369  fi
40370
40371    fi
40372
40373    if test "x$new_path" = x; then
40374      # It's still not found. Now this is an unrecoverable error.
40375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40376$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40377      has_space=`$ECHO "$complete" | $GREP " "`
40378      if test "x$has_space" != x; then
40379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40381      fi
40382      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40383    fi
40384  fi
40385
40386  # Now new_path has a complete unix path to the binary
40387  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40388    # Keep paths in /bin as-is, but remove trailing .exe if any
40389    new_path="${new_path/%.exe/}"
40390    # Do not save /bin paths to all_fixpath_prefixes!
40391  else
40392    # Not in mixed or Windows style, start by that.
40393    new_path=`cmd //c echo $new_path`
40394
40395  input_path="$new_path"
40396  # Check if we need to convert this using DOS-style short mode. If the path
40397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40398  # take no chances and rewrite it.
40399  # Note: m4 eats our [], so we need to use [ and ] instead.
40400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40401  if test "x$has_forbidden_chars" != x; then
40402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40404  fi
40405
40406    # Output is in $new_path
40407
40408  windows_path="$new_path"
40409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40410    unix_path=`$CYGPATH -u "$windows_path"`
40411    new_path="$unix_path"
40412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40414    new_path="$unix_path"
40415  fi
40416
40417    # remove trailing .exe if any
40418    new_path="${new_path/%.exe/}"
40419
40420    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40421    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40422  fi
40423
40424    else
40425      # We're on a unix platform. Hooray! :)
40426      # First separate the path from the arguments. This will split at the first
40427      # space.
40428      complete="$DUMPBIN"
40429      path="${complete%% *}"
40430      tmp="$complete EOL"
40431      arguments="${tmp#* }"
40432
40433      # Cannot rely on the command "which" here since it doesn't always work.
40434      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40435      if test -z "$is_absolute_path"; then
40436        # Path to executable is not absolute. Find it.
40437        IFS_save="$IFS"
40438        IFS=:
40439        for p in $PATH; do
40440          if test -f "$p/$path" && test -x "$p/$path"; then
40441            new_path="$p/$path"
40442            break
40443          fi
40444        done
40445        IFS="$IFS_save"
40446      else
40447        # This is an absolute path, we can use it without further modifications.
40448        new_path="$path"
40449      fi
40450
40451      if test "x$new_path" = x; then
40452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40453$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40454        has_space=`$ECHO "$complete" | $GREP " "`
40455        if test "x$has_space" != x; then
40456          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40457$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40458        fi
40459        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40460      fi
40461    fi
40462
40463    # Now join together the path and the arguments once again
40464    if test "x$arguments" != xEOL; then
40465      new_complete="$new_path ${arguments% *}"
40466    else
40467      new_complete="$new_path"
40468    fi
40469
40470    if test "x$complete" != "x$new_complete"; then
40471      DUMPBIN="$new_complete"
40472      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40473$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40474    fi
40475  fi
40476
40477    # We need to check for 'msbuild.exe' because at the place where we expect to
40478    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40479    # won't find the 'msbuild.exe' executable in that case (and the
40480    # 'ac_executable_extensions' is unusable due to performance reasons).
40481    # Notice that we intentionally don't fix up the path to MSBUILD because we
40482    # will call it in a DOS shell during freetype detection on Windows (see
40483    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40484    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40485set dummy msbuild.exe; ac_word=$2
40486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40487$as_echo_n "checking for $ac_word... " >&6; }
40488if ${ac_cv_prog_MSBUILD+:} false; then :
40489  $as_echo_n "(cached) " >&6
40490else
40491  if test -n "$MSBUILD"; then
40492  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40493else
40494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40495for as_dir in $PATH
40496do
40497  IFS=$as_save_IFS
40498  test -z "$as_dir" && as_dir=.
40499    for ac_exec_ext in '' $ac_executable_extensions; do
40500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40501    ac_cv_prog_MSBUILD="msbuild.exe"
40502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40503    break 2
40504  fi
40505done
40506  done
40507IFS=$as_save_IFS
40508
40509fi
40510fi
40511MSBUILD=$ac_cv_prog_MSBUILD
40512if test -n "$MSBUILD"; then
40513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40514$as_echo "$MSBUILD" >&6; }
40515else
40516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40517$as_echo "no" >&6; }
40518fi
40519
40520
40521  fi
40522
40523  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40524
40525
40526  # Publish this variable in the help.
40527
40528
40529  if [ -z "${STRIP+x}" ]; then
40530    # The variable is not set by user, try to locate tool using the code snippet
40531    for ac_prog in strip
40532do
40533  # Extract the first word of "$ac_prog", so it can be a program name with args.
40534set dummy $ac_prog; ac_word=$2
40535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40536$as_echo_n "checking for $ac_word... " >&6; }
40537if ${ac_cv_path_STRIP+:} false; then :
40538  $as_echo_n "(cached) " >&6
40539else
40540  case $STRIP in
40541  [\\/]* | ?:[\\/]*)
40542  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40543  ;;
40544  *)
40545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40546for as_dir in $PATH
40547do
40548  IFS=$as_save_IFS
40549  test -z "$as_dir" && as_dir=.
40550    for ac_exec_ext in '' $ac_executable_extensions; do
40551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40552    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40554    break 2
40555  fi
40556done
40557  done
40558IFS=$as_save_IFS
40559
40560  ;;
40561esac
40562fi
40563STRIP=$ac_cv_path_STRIP
40564if test -n "$STRIP"; then
40565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40566$as_echo "$STRIP" >&6; }
40567else
40568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40569$as_echo "no" >&6; }
40570fi
40571
40572
40573  test -n "$STRIP" && break
40574done
40575
40576  else
40577    # The variable is set, but is it from the command line or the environment?
40578
40579    # Try to remove the string !STRIP! from our list.
40580    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40581    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40582      # If it failed, the variable was not from the command line. Ignore it,
40583      # but warn the user (except for BASH, which is always set by the calling BASH).
40584      if test "xSTRIP" != xBASH; then
40585        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40586$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40587      fi
40588      # Try to locate tool using the code snippet
40589      for ac_prog in strip
40590do
40591  # Extract the first word of "$ac_prog", so it can be a program name with args.
40592set dummy $ac_prog; ac_word=$2
40593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40594$as_echo_n "checking for $ac_word... " >&6; }
40595if ${ac_cv_path_STRIP+:} false; then :
40596  $as_echo_n "(cached) " >&6
40597else
40598  case $STRIP in
40599  [\\/]* | ?:[\\/]*)
40600  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40601  ;;
40602  *)
40603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40604for as_dir in $PATH
40605do
40606  IFS=$as_save_IFS
40607  test -z "$as_dir" && as_dir=.
40608    for ac_exec_ext in '' $ac_executable_extensions; do
40609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40610    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40612    break 2
40613  fi
40614done
40615  done
40616IFS=$as_save_IFS
40617
40618  ;;
40619esac
40620fi
40621STRIP=$ac_cv_path_STRIP
40622if test -n "$STRIP"; then
40623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40624$as_echo "$STRIP" >&6; }
40625else
40626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40627$as_echo "no" >&6; }
40628fi
40629
40630
40631  test -n "$STRIP" && break
40632done
40633
40634    else
40635      # If it succeeded, then it was overridden by the user. We will use it
40636      # for the tool.
40637
40638      # First remove it from the list of overridden variables, so we can test
40639      # for unknown variables in the end.
40640      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40641
40642      # Check if we try to supply an empty value
40643      if test "x$STRIP" = x; then
40644        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40645$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40646        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40647$as_echo_n "checking for STRIP... " >&6; }
40648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40649$as_echo "disabled" >&6; }
40650      else
40651        # Check if the provided tool contains a complete path.
40652        tool_specified="$STRIP"
40653        tool_basename="${tool_specified##*/}"
40654        if test "x$tool_basename" = "x$tool_specified"; then
40655          # A command without a complete path is provided, search $PATH.
40656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40657$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40658          # Extract the first word of "$tool_basename", so it can be a program name with args.
40659set dummy $tool_basename; ac_word=$2
40660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40661$as_echo_n "checking for $ac_word... " >&6; }
40662if ${ac_cv_path_STRIP+:} false; then :
40663  $as_echo_n "(cached) " >&6
40664else
40665  case $STRIP in
40666  [\\/]* | ?:[\\/]*)
40667  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40668  ;;
40669  *)
40670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40671for as_dir in $PATH
40672do
40673  IFS=$as_save_IFS
40674  test -z "$as_dir" && as_dir=.
40675    for ac_exec_ext in '' $ac_executable_extensions; do
40676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40677    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40679    break 2
40680  fi
40681done
40682  done
40683IFS=$as_save_IFS
40684
40685  ;;
40686esac
40687fi
40688STRIP=$ac_cv_path_STRIP
40689if test -n "$STRIP"; then
40690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40691$as_echo "$STRIP" >&6; }
40692else
40693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40694$as_echo "no" >&6; }
40695fi
40696
40697
40698          if test "x$STRIP" = x; then
40699            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40700          fi
40701        else
40702          # Otherwise we believe it is a complete path. Use it as it is.
40703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40704$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40705          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40706$as_echo_n "checking for STRIP... " >&6; }
40707          if test ! -x "$tool_specified"; then
40708            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40709$as_echo "not found" >&6; }
40710            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40711          fi
40712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40713$as_echo "$tool_specified" >&6; }
40714        fi
40715      fi
40716    fi
40717
40718  fi
40719
40720
40721
40722  # Only process if variable expands to non-empty
40723
40724  if test "x$STRIP" != x; then
40725    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40726
40727  # First separate the path from the arguments. This will split at the first
40728  # space.
40729  complete="$STRIP"
40730  path="${complete%% *}"
40731  tmp="$complete EOL"
40732  arguments="${tmp#* }"
40733
40734  # Input might be given as Windows format, start by converting to
40735  # unix format.
40736  new_path=`$CYGPATH -u "$path"`
40737
40738  # Now try to locate executable using which
40739  new_path=`$WHICH "$new_path" 2> /dev/null`
40740  # bat and cmd files are not always considered executable in cygwin causing which
40741  # to not find them
40742  if test "x$new_path" = x \
40743      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40744      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40745    new_path=`$CYGPATH -u "$path"`
40746  fi
40747  if test "x$new_path" = x; then
40748    # Oops. Which didn't find the executable.
40749    # The splitting of arguments from the executable at a space might have been incorrect,
40750    # since paths with space are more likely in Windows. Give it another try with the whole
40751    # argument.
40752    path="$complete"
40753    arguments="EOL"
40754    new_path=`$CYGPATH -u "$path"`
40755    new_path=`$WHICH "$new_path" 2> /dev/null`
40756    # bat and cmd files are not always considered executable in cygwin causing which
40757    # to not find them
40758    if test "x$new_path" = x \
40759        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40760        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40761      new_path=`$CYGPATH -u "$path"`
40762    fi
40763    if test "x$new_path" = x; then
40764      # It's still not found. Now this is an unrecoverable error.
40765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40766$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40767      has_space=`$ECHO "$complete" | $GREP " "`
40768      if test "x$has_space" != x; then
40769        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40770$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40771      fi
40772      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40773    fi
40774  fi
40775
40776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40779  # "foo.exe" is OK but "foo" is an error.
40780  #
40781  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40782  # It is also a way to make sure we got the proper file name for the real test later on.
40783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40784  if test "x$test_shortpath" = x; then
40785    # Short path failed, file does not exist as specified.
40786    # Try adding .exe or .cmd
40787    if test -f "${new_path}.exe"; then
40788      input_to_shortpath="${new_path}.exe"
40789    elif test -f "${new_path}.cmd"; then
40790      input_to_shortpath="${new_path}.cmd"
40791    else
40792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40793$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40794      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40795$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40796      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40797    fi
40798  else
40799    input_to_shortpath="$new_path"
40800  fi
40801
40802  # Call helper function which possibly converts this using DOS-style short mode.
40803  # If so, the updated path is stored in $new_path.
40804  new_path="$input_to_shortpath"
40805
40806  input_path="$input_to_shortpath"
40807  # Check if we need to convert this using DOS-style short mode. If the path
40808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40809  # take no chances and rewrite it.
40810  # Note: m4 eats our [], so we need to use [ and ] instead.
40811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40812  if test "x$has_forbidden_chars" != x; then
40813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40817      # Going to short mode and back again did indeed matter. Since short mode is
40818      # case insensitive, let's make it lowercase to improve readability.
40819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40820      # Now convert it back to Unix-style (cygpath)
40821      input_path=`$CYGPATH -u "$shortmode_path"`
40822      new_path="$input_path"
40823    fi
40824  fi
40825
40826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40827  if test "x$test_cygdrive_prefix" = x; then
40828    # As a simple fix, exclude /usr/bin since it's not a real path.
40829    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40831      # a path prefixed by /cygdrive for fixpath to work.
40832      new_path="$CYGWIN_ROOT_PATH$input_path"
40833    fi
40834  fi
40835
40836  # remove trailing .exe if any
40837  new_path="${new_path/%.exe/}"
40838
40839    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40840
40841  # First separate the path from the arguments. This will split at the first
40842  # space.
40843  complete="$STRIP"
40844  path="${complete%% *}"
40845  tmp="$complete EOL"
40846  arguments="${tmp#* }"
40847
40848  # Input might be given as Windows format, start by converting to
40849  # unix format.
40850  new_path="$path"
40851
40852  windows_path="$new_path"
40853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40854    unix_path=`$CYGPATH -u "$windows_path"`
40855    new_path="$unix_path"
40856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40858    new_path="$unix_path"
40859  fi
40860
40861
40862  # Now try to locate executable using which
40863  new_path=`$WHICH "$new_path" 2> /dev/null`
40864
40865  if test "x$new_path" = x; then
40866    # Oops. Which didn't find the executable.
40867    # The splitting of arguments from the executable at a space might have been incorrect,
40868    # since paths with space are more likely in Windows. Give it another try with the whole
40869    # argument.
40870    path="$complete"
40871    arguments="EOL"
40872    new_path="$path"
40873
40874  windows_path="$new_path"
40875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40876    unix_path=`$CYGPATH -u "$windows_path"`
40877    new_path="$unix_path"
40878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40880    new_path="$unix_path"
40881  fi
40882
40883
40884    new_path=`$WHICH "$new_path" 2> /dev/null`
40885    # bat and cmd files are not always considered executable in MSYS causing which
40886    # to not find them
40887    if test "x$new_path" = x \
40888        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40889        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40890      new_path="$path"
40891
40892  windows_path="$new_path"
40893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40894    unix_path=`$CYGPATH -u "$windows_path"`
40895    new_path="$unix_path"
40896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40898    new_path="$unix_path"
40899  fi
40900
40901    fi
40902
40903    if test "x$new_path" = x; then
40904      # It's still not found. Now this is an unrecoverable error.
40905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40906$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40907      has_space=`$ECHO "$complete" | $GREP " "`
40908      if test "x$has_space" != x; then
40909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40911      fi
40912      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40913    fi
40914  fi
40915
40916  # Now new_path has a complete unix path to the binary
40917  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40918    # Keep paths in /bin as-is, but remove trailing .exe if any
40919    new_path="${new_path/%.exe/}"
40920    # Do not save /bin paths to all_fixpath_prefixes!
40921  else
40922    # Not in mixed or Windows style, start by that.
40923    new_path=`cmd //c echo $new_path`
40924
40925  input_path="$new_path"
40926  # Check if we need to convert this using DOS-style short mode. If the path
40927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40928  # take no chances and rewrite it.
40929  # Note: m4 eats our [], so we need to use [ and ] instead.
40930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40931  if test "x$has_forbidden_chars" != x; then
40932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40934  fi
40935
40936    # Output is in $new_path
40937
40938  windows_path="$new_path"
40939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40940    unix_path=`$CYGPATH -u "$windows_path"`
40941    new_path="$unix_path"
40942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40944    new_path="$unix_path"
40945  fi
40946
40947    # remove trailing .exe if any
40948    new_path="${new_path/%.exe/}"
40949
40950    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40951    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40952  fi
40953
40954    else
40955      # We're on a unix platform. Hooray! :)
40956      # First separate the path from the arguments. This will split at the first
40957      # space.
40958      complete="$STRIP"
40959      path="${complete%% *}"
40960      tmp="$complete EOL"
40961      arguments="${tmp#* }"
40962
40963      # Cannot rely on the command "which" here since it doesn't always work.
40964      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40965      if test -z "$is_absolute_path"; then
40966        # Path to executable is not absolute. Find it.
40967        IFS_save="$IFS"
40968        IFS=:
40969        for p in $PATH; do
40970          if test -f "$p/$path" && test -x "$p/$path"; then
40971            new_path="$p/$path"
40972            break
40973          fi
40974        done
40975        IFS="$IFS_save"
40976      else
40977        # This is an absolute path, we can use it without further modifications.
40978        new_path="$path"
40979      fi
40980
40981      if test "x$new_path" = x; then
40982        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40983$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40984        has_space=`$ECHO "$complete" | $GREP " "`
40985        if test "x$has_space" != x; then
40986          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40987$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40988        fi
40989        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40990      fi
40991    fi
40992
40993    # Now join together the path and the arguments once again
40994    if test "x$arguments" != xEOL; then
40995      new_complete="$new_path ${arguments% *}"
40996    else
40997      new_complete="$new_path"
40998    fi
40999
41000    if test "x$complete" != "x$new_complete"; then
41001      STRIP="$new_complete"
41002      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41003$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41004    fi
41005  fi
41006
41007
41008
41009  # Publish this variable in the help.
41010
41011
41012  if [ -z "${NM+x}" ]; then
41013    # The variable is not set by user, try to locate tool using the code snippet
41014    for ac_prog in nm
41015do
41016  # Extract the first word of "$ac_prog", so it can be a program name with args.
41017set dummy $ac_prog; ac_word=$2
41018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41019$as_echo_n "checking for $ac_word... " >&6; }
41020if ${ac_cv_path_NM+:} false; then :
41021  $as_echo_n "(cached) " >&6
41022else
41023  case $NM in
41024  [\\/]* | ?:[\\/]*)
41025  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41026  ;;
41027  *)
41028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41029for as_dir in $PATH
41030do
41031  IFS=$as_save_IFS
41032  test -z "$as_dir" && as_dir=.
41033    for ac_exec_ext in '' $ac_executable_extensions; do
41034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41035    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41037    break 2
41038  fi
41039done
41040  done
41041IFS=$as_save_IFS
41042
41043  ;;
41044esac
41045fi
41046NM=$ac_cv_path_NM
41047if test -n "$NM"; then
41048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41049$as_echo "$NM" >&6; }
41050else
41051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41052$as_echo "no" >&6; }
41053fi
41054
41055
41056  test -n "$NM" && break
41057done
41058
41059  else
41060    # The variable is set, but is it from the command line or the environment?
41061
41062    # Try to remove the string !NM! from our list.
41063    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41064    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41065      # If it failed, the variable was not from the command line. Ignore it,
41066      # but warn the user (except for BASH, which is always set by the calling BASH).
41067      if test "xNM" != xBASH; then
41068        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41069$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41070      fi
41071      # Try to locate tool using the code snippet
41072      for ac_prog in nm
41073do
41074  # Extract the first word of "$ac_prog", so it can be a program name with args.
41075set dummy $ac_prog; ac_word=$2
41076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41077$as_echo_n "checking for $ac_word... " >&6; }
41078if ${ac_cv_path_NM+:} false; then :
41079  $as_echo_n "(cached) " >&6
41080else
41081  case $NM in
41082  [\\/]* | ?:[\\/]*)
41083  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41084  ;;
41085  *)
41086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41087for as_dir in $PATH
41088do
41089  IFS=$as_save_IFS
41090  test -z "$as_dir" && as_dir=.
41091    for ac_exec_ext in '' $ac_executable_extensions; do
41092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41093    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41095    break 2
41096  fi
41097done
41098  done
41099IFS=$as_save_IFS
41100
41101  ;;
41102esac
41103fi
41104NM=$ac_cv_path_NM
41105if test -n "$NM"; then
41106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41107$as_echo "$NM" >&6; }
41108else
41109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41110$as_echo "no" >&6; }
41111fi
41112
41113
41114  test -n "$NM" && break
41115done
41116
41117    else
41118      # If it succeeded, then it was overridden by the user. We will use it
41119      # for the tool.
41120
41121      # First remove it from the list of overridden variables, so we can test
41122      # for unknown variables in the end.
41123      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41124
41125      # Check if we try to supply an empty value
41126      if test "x$NM" = x; then
41127        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41128$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41129        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41130$as_echo_n "checking for NM... " >&6; }
41131        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41132$as_echo "disabled" >&6; }
41133      else
41134        # Check if the provided tool contains a complete path.
41135        tool_specified="$NM"
41136        tool_basename="${tool_specified##*/}"
41137        if test "x$tool_basename" = "x$tool_specified"; then
41138          # A command without a complete path is provided, search $PATH.
41139          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41140$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41141          # Extract the first word of "$tool_basename", so it can be a program name with args.
41142set dummy $tool_basename; ac_word=$2
41143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41144$as_echo_n "checking for $ac_word... " >&6; }
41145if ${ac_cv_path_NM+:} false; then :
41146  $as_echo_n "(cached) " >&6
41147else
41148  case $NM in
41149  [\\/]* | ?:[\\/]*)
41150  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41151  ;;
41152  *)
41153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41154for as_dir in $PATH
41155do
41156  IFS=$as_save_IFS
41157  test -z "$as_dir" && as_dir=.
41158    for ac_exec_ext in '' $ac_executable_extensions; do
41159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41160    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41162    break 2
41163  fi
41164done
41165  done
41166IFS=$as_save_IFS
41167
41168  ;;
41169esac
41170fi
41171NM=$ac_cv_path_NM
41172if test -n "$NM"; then
41173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41174$as_echo "$NM" >&6; }
41175else
41176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41177$as_echo "no" >&6; }
41178fi
41179
41180
41181          if test "x$NM" = x; then
41182            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41183          fi
41184        else
41185          # Otherwise we believe it is a complete path. Use it as it is.
41186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41187$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41188          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41189$as_echo_n "checking for NM... " >&6; }
41190          if test ! -x "$tool_specified"; then
41191            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41192$as_echo "not found" >&6; }
41193            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41194          fi
41195          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41196$as_echo "$tool_specified" >&6; }
41197        fi
41198      fi
41199    fi
41200
41201  fi
41202
41203
41204
41205  # Only process if variable expands to non-empty
41206
41207  if test "x$NM" != x; then
41208    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41209
41210  # First separate the path from the arguments. This will split at the first
41211  # space.
41212  complete="$NM"
41213  path="${complete%% *}"
41214  tmp="$complete EOL"
41215  arguments="${tmp#* }"
41216
41217  # Input might be given as Windows format, start by converting to
41218  # unix format.
41219  new_path=`$CYGPATH -u "$path"`
41220
41221  # Now try to locate executable using which
41222  new_path=`$WHICH "$new_path" 2> /dev/null`
41223  # bat and cmd files are not always considered executable in cygwin causing which
41224  # to not find them
41225  if test "x$new_path" = x \
41226      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41227      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41228    new_path=`$CYGPATH -u "$path"`
41229  fi
41230  if test "x$new_path" = x; then
41231    # Oops. Which didn't find the executable.
41232    # The splitting of arguments from the executable at a space might have been incorrect,
41233    # since paths with space are more likely in Windows. Give it another try with the whole
41234    # argument.
41235    path="$complete"
41236    arguments="EOL"
41237    new_path=`$CYGPATH -u "$path"`
41238    new_path=`$WHICH "$new_path" 2> /dev/null`
41239    # bat and cmd files are not always considered executable in cygwin causing which
41240    # to not find them
41241    if test "x$new_path" = x \
41242        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41243        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41244      new_path=`$CYGPATH -u "$path"`
41245    fi
41246    if test "x$new_path" = x; then
41247      # It's still not found. Now this is an unrecoverable error.
41248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41249$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41250      has_space=`$ECHO "$complete" | $GREP " "`
41251      if test "x$has_space" != x; then
41252        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41253$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41254      fi
41255      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41256    fi
41257  fi
41258
41259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41262  # "foo.exe" is OK but "foo" is an error.
41263  #
41264  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41265  # It is also a way to make sure we got the proper file name for the real test later on.
41266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41267  if test "x$test_shortpath" = x; then
41268    # Short path failed, file does not exist as specified.
41269    # Try adding .exe or .cmd
41270    if test -f "${new_path}.exe"; then
41271      input_to_shortpath="${new_path}.exe"
41272    elif test -f "${new_path}.cmd"; then
41273      input_to_shortpath="${new_path}.cmd"
41274    else
41275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41276$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41277      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41278$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41279      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41280    fi
41281  else
41282    input_to_shortpath="$new_path"
41283  fi
41284
41285  # Call helper function which possibly converts this using DOS-style short mode.
41286  # If so, the updated path is stored in $new_path.
41287  new_path="$input_to_shortpath"
41288
41289  input_path="$input_to_shortpath"
41290  # Check if we need to convert this using DOS-style short mode. If the path
41291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41292  # take no chances and rewrite it.
41293  # Note: m4 eats our [], so we need to use [ and ] instead.
41294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41295  if test "x$has_forbidden_chars" != x; then
41296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41300      # Going to short mode and back again did indeed matter. Since short mode is
41301      # case insensitive, let's make it lowercase to improve readability.
41302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41303      # Now convert it back to Unix-style (cygpath)
41304      input_path=`$CYGPATH -u "$shortmode_path"`
41305      new_path="$input_path"
41306    fi
41307  fi
41308
41309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41310  if test "x$test_cygdrive_prefix" = x; then
41311    # As a simple fix, exclude /usr/bin since it's not a real path.
41312    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41314      # a path prefixed by /cygdrive for fixpath to work.
41315      new_path="$CYGWIN_ROOT_PATH$input_path"
41316    fi
41317  fi
41318
41319  # remove trailing .exe if any
41320  new_path="${new_path/%.exe/}"
41321
41322    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41323
41324  # First separate the path from the arguments. This will split at the first
41325  # space.
41326  complete="$NM"
41327  path="${complete%% *}"
41328  tmp="$complete EOL"
41329  arguments="${tmp#* }"
41330
41331  # Input might be given as Windows format, start by converting to
41332  # unix format.
41333  new_path="$path"
41334
41335  windows_path="$new_path"
41336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41337    unix_path=`$CYGPATH -u "$windows_path"`
41338    new_path="$unix_path"
41339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41341    new_path="$unix_path"
41342  fi
41343
41344
41345  # Now try to locate executable using which
41346  new_path=`$WHICH "$new_path" 2> /dev/null`
41347
41348  if test "x$new_path" = x; then
41349    # Oops. Which didn't find the executable.
41350    # The splitting of arguments from the executable at a space might have been incorrect,
41351    # since paths with space are more likely in Windows. Give it another try with the whole
41352    # argument.
41353    path="$complete"
41354    arguments="EOL"
41355    new_path="$path"
41356
41357  windows_path="$new_path"
41358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41359    unix_path=`$CYGPATH -u "$windows_path"`
41360    new_path="$unix_path"
41361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41363    new_path="$unix_path"
41364  fi
41365
41366
41367    new_path=`$WHICH "$new_path" 2> /dev/null`
41368    # bat and cmd files are not always considered executable in MSYS causing which
41369    # to not find them
41370    if test "x$new_path" = x \
41371        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41372        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41373      new_path="$path"
41374
41375  windows_path="$new_path"
41376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41377    unix_path=`$CYGPATH -u "$windows_path"`
41378    new_path="$unix_path"
41379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41381    new_path="$unix_path"
41382  fi
41383
41384    fi
41385
41386    if test "x$new_path" = x; then
41387      # It's still not found. Now this is an unrecoverable error.
41388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41389$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41390      has_space=`$ECHO "$complete" | $GREP " "`
41391      if test "x$has_space" != x; then
41392        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41393$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41394      fi
41395      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41396    fi
41397  fi
41398
41399  # Now new_path has a complete unix path to the binary
41400  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41401    # Keep paths in /bin as-is, but remove trailing .exe if any
41402    new_path="${new_path/%.exe/}"
41403    # Do not save /bin paths to all_fixpath_prefixes!
41404  else
41405    # Not in mixed or Windows style, start by that.
41406    new_path=`cmd //c echo $new_path`
41407
41408  input_path="$new_path"
41409  # Check if we need to convert this using DOS-style short mode. If the path
41410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41411  # take no chances and rewrite it.
41412  # Note: m4 eats our [], so we need to use [ and ] instead.
41413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41414  if test "x$has_forbidden_chars" != x; then
41415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41417  fi
41418
41419    # Output is in $new_path
41420
41421  windows_path="$new_path"
41422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41423    unix_path=`$CYGPATH -u "$windows_path"`
41424    new_path="$unix_path"
41425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41427    new_path="$unix_path"
41428  fi
41429
41430    # remove trailing .exe if any
41431    new_path="${new_path/%.exe/}"
41432
41433    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41434    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41435  fi
41436
41437    else
41438      # We're on a unix platform. Hooray! :)
41439      # First separate the path from the arguments. This will split at the first
41440      # space.
41441      complete="$NM"
41442      path="${complete%% *}"
41443      tmp="$complete EOL"
41444      arguments="${tmp#* }"
41445
41446      # Cannot rely on the command "which" here since it doesn't always work.
41447      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41448      if test -z "$is_absolute_path"; then
41449        # Path to executable is not absolute. Find it.
41450        IFS_save="$IFS"
41451        IFS=:
41452        for p in $PATH; do
41453          if test -f "$p/$path" && test -x "$p/$path"; then
41454            new_path="$p/$path"
41455            break
41456          fi
41457        done
41458        IFS="$IFS_save"
41459      else
41460        # This is an absolute path, we can use it without further modifications.
41461        new_path="$path"
41462      fi
41463
41464      if test "x$new_path" = x; then
41465        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41466$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41467        has_space=`$ECHO "$complete" | $GREP " "`
41468        if test "x$has_space" != x; then
41469          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41470$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41471        fi
41472        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41473      fi
41474    fi
41475
41476    # Now join together the path and the arguments once again
41477    if test "x$arguments" != xEOL; then
41478      new_complete="$new_path ${arguments% *}"
41479    else
41480      new_complete="$new_path"
41481    fi
41482
41483    if test "x$complete" != "x$new_complete"; then
41484      NM="$new_complete"
41485      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41486$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41487    fi
41488  fi
41489
41490
41491
41492  # Publish this variable in the help.
41493
41494
41495  if [ -z "${GNM+x}" ]; then
41496    # The variable is not set by user, try to locate tool using the code snippet
41497    for ac_prog in gnm
41498do
41499  # Extract the first word of "$ac_prog", so it can be a program name with args.
41500set dummy $ac_prog; ac_word=$2
41501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41502$as_echo_n "checking for $ac_word... " >&6; }
41503if ${ac_cv_path_GNM+:} false; then :
41504  $as_echo_n "(cached) " >&6
41505else
41506  case $GNM in
41507  [\\/]* | ?:[\\/]*)
41508  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41509  ;;
41510  *)
41511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41512for as_dir in $PATH
41513do
41514  IFS=$as_save_IFS
41515  test -z "$as_dir" && as_dir=.
41516    for ac_exec_ext in '' $ac_executable_extensions; do
41517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41518    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41520    break 2
41521  fi
41522done
41523  done
41524IFS=$as_save_IFS
41525
41526  ;;
41527esac
41528fi
41529GNM=$ac_cv_path_GNM
41530if test -n "$GNM"; then
41531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41532$as_echo "$GNM" >&6; }
41533else
41534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41535$as_echo "no" >&6; }
41536fi
41537
41538
41539  test -n "$GNM" && break
41540done
41541
41542  else
41543    # The variable is set, but is it from the command line or the environment?
41544
41545    # Try to remove the string !GNM! from our list.
41546    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41547    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41548      # If it failed, the variable was not from the command line. Ignore it,
41549      # but warn the user (except for BASH, which is always set by the calling BASH).
41550      if test "xGNM" != xBASH; then
41551        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41552$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41553      fi
41554      # Try to locate tool using the code snippet
41555      for ac_prog in gnm
41556do
41557  # Extract the first word of "$ac_prog", so it can be a program name with args.
41558set dummy $ac_prog; ac_word=$2
41559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41560$as_echo_n "checking for $ac_word... " >&6; }
41561if ${ac_cv_path_GNM+:} false; then :
41562  $as_echo_n "(cached) " >&6
41563else
41564  case $GNM in
41565  [\\/]* | ?:[\\/]*)
41566  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41567  ;;
41568  *)
41569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41570for as_dir in $PATH
41571do
41572  IFS=$as_save_IFS
41573  test -z "$as_dir" && as_dir=.
41574    for ac_exec_ext in '' $ac_executable_extensions; do
41575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41576    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41578    break 2
41579  fi
41580done
41581  done
41582IFS=$as_save_IFS
41583
41584  ;;
41585esac
41586fi
41587GNM=$ac_cv_path_GNM
41588if test -n "$GNM"; then
41589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41590$as_echo "$GNM" >&6; }
41591else
41592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41593$as_echo "no" >&6; }
41594fi
41595
41596
41597  test -n "$GNM" && break
41598done
41599
41600    else
41601      # If it succeeded, then it was overridden by the user. We will use it
41602      # for the tool.
41603
41604      # First remove it from the list of overridden variables, so we can test
41605      # for unknown variables in the end.
41606      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41607
41608      # Check if we try to supply an empty value
41609      if test "x$GNM" = x; then
41610        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41611$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41612        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41613$as_echo_n "checking for GNM... " >&6; }
41614        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41615$as_echo "disabled" >&6; }
41616      else
41617        # Check if the provided tool contains a complete path.
41618        tool_specified="$GNM"
41619        tool_basename="${tool_specified##*/}"
41620        if test "x$tool_basename" = "x$tool_specified"; then
41621          # A command without a complete path is provided, search $PATH.
41622          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41623$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41624          # Extract the first word of "$tool_basename", so it can be a program name with args.
41625set dummy $tool_basename; ac_word=$2
41626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41627$as_echo_n "checking for $ac_word... " >&6; }
41628if ${ac_cv_path_GNM+:} false; then :
41629  $as_echo_n "(cached) " >&6
41630else
41631  case $GNM in
41632  [\\/]* | ?:[\\/]*)
41633  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41634  ;;
41635  *)
41636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41637for as_dir in $PATH
41638do
41639  IFS=$as_save_IFS
41640  test -z "$as_dir" && as_dir=.
41641    for ac_exec_ext in '' $ac_executable_extensions; do
41642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41643    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41645    break 2
41646  fi
41647done
41648  done
41649IFS=$as_save_IFS
41650
41651  ;;
41652esac
41653fi
41654GNM=$ac_cv_path_GNM
41655if test -n "$GNM"; then
41656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41657$as_echo "$GNM" >&6; }
41658else
41659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41660$as_echo "no" >&6; }
41661fi
41662
41663
41664          if test "x$GNM" = x; then
41665            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41666          fi
41667        else
41668          # Otherwise we believe it is a complete path. Use it as it is.
41669          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41670$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41671          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41672$as_echo_n "checking for GNM... " >&6; }
41673          if test ! -x "$tool_specified"; then
41674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41675$as_echo "not found" >&6; }
41676            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41677          fi
41678          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41679$as_echo "$tool_specified" >&6; }
41680        fi
41681      fi
41682    fi
41683
41684  fi
41685
41686
41687
41688  # Only process if variable expands to non-empty
41689
41690  if test "x$GNM" != x; then
41691    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41692
41693  # First separate the path from the arguments. This will split at the first
41694  # space.
41695  complete="$GNM"
41696  path="${complete%% *}"
41697  tmp="$complete EOL"
41698  arguments="${tmp#* }"
41699
41700  # Input might be given as Windows format, start by converting to
41701  # unix format.
41702  new_path=`$CYGPATH -u "$path"`
41703
41704  # Now try to locate executable using which
41705  new_path=`$WHICH "$new_path" 2> /dev/null`
41706  # bat and cmd files are not always considered executable in cygwin causing which
41707  # to not find them
41708  if test "x$new_path" = x \
41709      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41710      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41711    new_path=`$CYGPATH -u "$path"`
41712  fi
41713  if test "x$new_path" = x; then
41714    # Oops. Which didn't find the executable.
41715    # The splitting of arguments from the executable at a space might have been incorrect,
41716    # since paths with space are more likely in Windows. Give it another try with the whole
41717    # argument.
41718    path="$complete"
41719    arguments="EOL"
41720    new_path=`$CYGPATH -u "$path"`
41721    new_path=`$WHICH "$new_path" 2> /dev/null`
41722    # bat and cmd files are not always considered executable in cygwin causing which
41723    # to not find them
41724    if test "x$new_path" = x \
41725        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41726        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41727      new_path=`$CYGPATH -u "$path"`
41728    fi
41729    if test "x$new_path" = x; then
41730      # It's still not found. Now this is an unrecoverable error.
41731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41732$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41733      has_space=`$ECHO "$complete" | $GREP " "`
41734      if test "x$has_space" != x; then
41735        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41736$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41737      fi
41738      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41739    fi
41740  fi
41741
41742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41745  # "foo.exe" is OK but "foo" is an error.
41746  #
41747  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41748  # It is also a way to make sure we got the proper file name for the real test later on.
41749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41750  if test "x$test_shortpath" = x; then
41751    # Short path failed, file does not exist as specified.
41752    # Try adding .exe or .cmd
41753    if test -f "${new_path}.exe"; then
41754      input_to_shortpath="${new_path}.exe"
41755    elif test -f "${new_path}.cmd"; then
41756      input_to_shortpath="${new_path}.cmd"
41757    else
41758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41759$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41760      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41761$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41762      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41763    fi
41764  else
41765    input_to_shortpath="$new_path"
41766  fi
41767
41768  # Call helper function which possibly converts this using DOS-style short mode.
41769  # If so, the updated path is stored in $new_path.
41770  new_path="$input_to_shortpath"
41771
41772  input_path="$input_to_shortpath"
41773  # Check if we need to convert this using DOS-style short mode. If the path
41774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41775  # take no chances and rewrite it.
41776  # Note: m4 eats our [], so we need to use [ and ] instead.
41777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41778  if test "x$has_forbidden_chars" != x; then
41779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41783      # Going to short mode and back again did indeed matter. Since short mode is
41784      # case insensitive, let's make it lowercase to improve readability.
41785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41786      # Now convert it back to Unix-style (cygpath)
41787      input_path=`$CYGPATH -u "$shortmode_path"`
41788      new_path="$input_path"
41789    fi
41790  fi
41791
41792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41793  if test "x$test_cygdrive_prefix" = x; then
41794    # As a simple fix, exclude /usr/bin since it's not a real path.
41795    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41797      # a path prefixed by /cygdrive for fixpath to work.
41798      new_path="$CYGWIN_ROOT_PATH$input_path"
41799    fi
41800  fi
41801
41802  # remove trailing .exe if any
41803  new_path="${new_path/%.exe/}"
41804
41805    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41806
41807  # First separate the path from the arguments. This will split at the first
41808  # space.
41809  complete="$GNM"
41810  path="${complete%% *}"
41811  tmp="$complete EOL"
41812  arguments="${tmp#* }"
41813
41814  # Input might be given as Windows format, start by converting to
41815  # unix format.
41816  new_path="$path"
41817
41818  windows_path="$new_path"
41819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41820    unix_path=`$CYGPATH -u "$windows_path"`
41821    new_path="$unix_path"
41822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41824    new_path="$unix_path"
41825  fi
41826
41827
41828  # Now try to locate executable using which
41829  new_path=`$WHICH "$new_path" 2> /dev/null`
41830
41831  if test "x$new_path" = x; then
41832    # Oops. Which didn't find the executable.
41833    # The splitting of arguments from the executable at a space might have been incorrect,
41834    # since paths with space are more likely in Windows. Give it another try with the whole
41835    # argument.
41836    path="$complete"
41837    arguments="EOL"
41838    new_path="$path"
41839
41840  windows_path="$new_path"
41841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41842    unix_path=`$CYGPATH -u "$windows_path"`
41843    new_path="$unix_path"
41844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41846    new_path="$unix_path"
41847  fi
41848
41849
41850    new_path=`$WHICH "$new_path" 2> /dev/null`
41851    # bat and cmd files are not always considered executable in MSYS causing which
41852    # to not find them
41853    if test "x$new_path" = x \
41854        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41855        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41856      new_path="$path"
41857
41858  windows_path="$new_path"
41859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41860    unix_path=`$CYGPATH -u "$windows_path"`
41861    new_path="$unix_path"
41862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41864    new_path="$unix_path"
41865  fi
41866
41867    fi
41868
41869    if test "x$new_path" = x; then
41870      # It's still not found. Now this is an unrecoverable error.
41871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41872$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41873      has_space=`$ECHO "$complete" | $GREP " "`
41874      if test "x$has_space" != x; then
41875        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41876$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41877      fi
41878      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41879    fi
41880  fi
41881
41882  # Now new_path has a complete unix path to the binary
41883  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41884    # Keep paths in /bin as-is, but remove trailing .exe if any
41885    new_path="${new_path/%.exe/}"
41886    # Do not save /bin paths to all_fixpath_prefixes!
41887  else
41888    # Not in mixed or Windows style, start by that.
41889    new_path=`cmd //c echo $new_path`
41890
41891  input_path="$new_path"
41892  # Check if we need to convert this using DOS-style short mode. If the path
41893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41894  # take no chances and rewrite it.
41895  # Note: m4 eats our [], so we need to use [ and ] instead.
41896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41897  if test "x$has_forbidden_chars" != x; then
41898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41900  fi
41901
41902    # Output is in $new_path
41903
41904  windows_path="$new_path"
41905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41906    unix_path=`$CYGPATH -u "$windows_path"`
41907    new_path="$unix_path"
41908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41910    new_path="$unix_path"
41911  fi
41912
41913    # remove trailing .exe if any
41914    new_path="${new_path/%.exe/}"
41915
41916    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41917    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41918  fi
41919
41920    else
41921      # We're on a unix platform. Hooray! :)
41922      # First separate the path from the arguments. This will split at the first
41923      # space.
41924      complete="$GNM"
41925      path="${complete%% *}"
41926      tmp="$complete EOL"
41927      arguments="${tmp#* }"
41928
41929      # Cannot rely on the command "which" here since it doesn't always work.
41930      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41931      if test -z "$is_absolute_path"; then
41932        # Path to executable is not absolute. Find it.
41933        IFS_save="$IFS"
41934        IFS=:
41935        for p in $PATH; do
41936          if test -f "$p/$path" && test -x "$p/$path"; then
41937            new_path="$p/$path"
41938            break
41939          fi
41940        done
41941        IFS="$IFS_save"
41942      else
41943        # This is an absolute path, we can use it without further modifications.
41944        new_path="$path"
41945      fi
41946
41947      if test "x$new_path" = x; then
41948        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41949$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41950        has_space=`$ECHO "$complete" | $GREP " "`
41951        if test "x$has_space" != x; then
41952          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41953$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41954        fi
41955        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41956      fi
41957    fi
41958
41959    # Now join together the path and the arguments once again
41960    if test "x$arguments" != xEOL; then
41961      new_complete="$new_path ${arguments% *}"
41962    else
41963      new_complete="$new_path"
41964    fi
41965
41966    if test "x$complete" != "x$new_complete"; then
41967      GNM="$new_complete"
41968      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41969$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41970    fi
41971  fi
41972
41973  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41974    # FIXME: we should unify this with the solaris case above.
41975
41976
41977  # Publish this variable in the help.
41978
41979
41980  if [ -z "${STRIP+x}" ]; then
41981    # The variable is not set by user, try to locate tool using the code snippet
41982    if test -n "$ac_tool_prefix"; then
41983  for ac_prog in strip
41984  do
41985    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41986set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41988$as_echo_n "checking for $ac_word... " >&6; }
41989if ${ac_cv_prog_STRIP+:} false; then :
41990  $as_echo_n "(cached) " >&6
41991else
41992  if test -n "$STRIP"; then
41993  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41994else
41995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41996for as_dir in $PATH
41997do
41998  IFS=$as_save_IFS
41999  test -z "$as_dir" && as_dir=.
42000    for ac_exec_ext in '' $ac_executable_extensions; do
42001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42002    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42004    break 2
42005  fi
42006done
42007  done
42008IFS=$as_save_IFS
42009
42010fi
42011fi
42012STRIP=$ac_cv_prog_STRIP
42013if test -n "$STRIP"; then
42014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42015$as_echo "$STRIP" >&6; }
42016else
42017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42018$as_echo "no" >&6; }
42019fi
42020
42021
42022    test -n "$STRIP" && break
42023  done
42024fi
42025if test -z "$STRIP"; then
42026  ac_ct_STRIP=$STRIP
42027  for ac_prog in strip
42028do
42029  # Extract the first word of "$ac_prog", so it can be a program name with args.
42030set dummy $ac_prog; ac_word=$2
42031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42032$as_echo_n "checking for $ac_word... " >&6; }
42033if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42034  $as_echo_n "(cached) " >&6
42035else
42036  if test -n "$ac_ct_STRIP"; then
42037  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42038else
42039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42040for as_dir in $PATH
42041do
42042  IFS=$as_save_IFS
42043  test -z "$as_dir" && as_dir=.
42044    for ac_exec_ext in '' $ac_executable_extensions; do
42045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42046    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42048    break 2
42049  fi
42050done
42051  done
42052IFS=$as_save_IFS
42053
42054fi
42055fi
42056ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42057if test -n "$ac_ct_STRIP"; then
42058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42059$as_echo "$ac_ct_STRIP" >&6; }
42060else
42061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42062$as_echo "no" >&6; }
42063fi
42064
42065
42066  test -n "$ac_ct_STRIP" && break
42067done
42068
42069  if test "x$ac_ct_STRIP" = x; then
42070    STRIP=""
42071  else
42072    case $cross_compiling:$ac_tool_warned in
42073yes:)
42074{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42075$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42076ac_tool_warned=yes ;;
42077esac
42078    STRIP=$ac_ct_STRIP
42079  fi
42080fi
42081
42082  else
42083    # The variable is set, but is it from the command line or the environment?
42084
42085    # Try to remove the string !STRIP! from our list.
42086    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
42087    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42088      # If it failed, the variable was not from the command line. Ignore it,
42089      # but warn the user (except for BASH, which is always set by the calling BASH).
42090      if test "xSTRIP" != xBASH; then
42091        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
42092$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
42093      fi
42094      # Try to locate tool using the code snippet
42095      if test -n "$ac_tool_prefix"; then
42096  for ac_prog in strip
42097  do
42098    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42099set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42101$as_echo_n "checking for $ac_word... " >&6; }
42102if ${ac_cv_prog_STRIP+:} false; then :
42103  $as_echo_n "(cached) " >&6
42104else
42105  if test -n "$STRIP"; then
42106  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42107else
42108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42109for as_dir in $PATH
42110do
42111  IFS=$as_save_IFS
42112  test -z "$as_dir" && as_dir=.
42113    for ac_exec_ext in '' $ac_executable_extensions; do
42114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42115    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42117    break 2
42118  fi
42119done
42120  done
42121IFS=$as_save_IFS
42122
42123fi
42124fi
42125STRIP=$ac_cv_prog_STRIP
42126if test -n "$STRIP"; then
42127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42128$as_echo "$STRIP" >&6; }
42129else
42130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42131$as_echo "no" >&6; }
42132fi
42133
42134
42135    test -n "$STRIP" && break
42136  done
42137fi
42138if test -z "$STRIP"; then
42139  ac_ct_STRIP=$STRIP
42140  for ac_prog in strip
42141do
42142  # Extract the first word of "$ac_prog", so it can be a program name with args.
42143set dummy $ac_prog; ac_word=$2
42144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42145$as_echo_n "checking for $ac_word... " >&6; }
42146if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42147  $as_echo_n "(cached) " >&6
42148else
42149  if test -n "$ac_ct_STRIP"; then
42150  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42151else
42152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42153for as_dir in $PATH
42154do
42155  IFS=$as_save_IFS
42156  test -z "$as_dir" && as_dir=.
42157    for ac_exec_ext in '' $ac_executable_extensions; do
42158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42159    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42161    break 2
42162  fi
42163done
42164  done
42165IFS=$as_save_IFS
42166
42167fi
42168fi
42169ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42170if test -n "$ac_ct_STRIP"; then
42171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42172$as_echo "$ac_ct_STRIP" >&6; }
42173else
42174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42175$as_echo "no" >&6; }
42176fi
42177
42178
42179  test -n "$ac_ct_STRIP" && break
42180done
42181
42182  if test "x$ac_ct_STRIP" = x; then
42183    STRIP=""
42184  else
42185    case $cross_compiling:$ac_tool_warned in
42186yes:)
42187{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42188$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42189ac_tool_warned=yes ;;
42190esac
42191    STRIP=$ac_ct_STRIP
42192  fi
42193fi
42194
42195    else
42196      # If it succeeded, then it was overridden by the user. We will use it
42197      # for the tool.
42198
42199      # First remove it from the list of overridden variables, so we can test
42200      # for unknown variables in the end.
42201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42202
42203      # Check if we try to supply an empty value
42204      if test "x$STRIP" = x; then
42205        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42206$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42208$as_echo_n "checking for STRIP... " >&6; }
42209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42210$as_echo "disabled" >&6; }
42211      else
42212        # Check if the provided tool contains a complete path.
42213        tool_specified="$STRIP"
42214        tool_basename="${tool_specified##*/}"
42215        if test "x$tool_basename" = "x$tool_specified"; then
42216          # A command without a complete path is provided, search $PATH.
42217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42218$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42219          # Extract the first word of "$tool_basename", so it can be a program name with args.
42220set dummy $tool_basename; ac_word=$2
42221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42222$as_echo_n "checking for $ac_word... " >&6; }
42223if ${ac_cv_path_STRIP+:} false; then :
42224  $as_echo_n "(cached) " >&6
42225else
42226  case $STRIP in
42227  [\\/]* | ?:[\\/]*)
42228  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42229  ;;
42230  *)
42231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42232for as_dir in $PATH
42233do
42234  IFS=$as_save_IFS
42235  test -z "$as_dir" && as_dir=.
42236    for ac_exec_ext in '' $ac_executable_extensions; do
42237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42238    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42240    break 2
42241  fi
42242done
42243  done
42244IFS=$as_save_IFS
42245
42246  ;;
42247esac
42248fi
42249STRIP=$ac_cv_path_STRIP
42250if test -n "$STRIP"; then
42251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42252$as_echo "$STRIP" >&6; }
42253else
42254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42255$as_echo "no" >&6; }
42256fi
42257
42258
42259          if test "x$STRIP" = x; then
42260            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42261          fi
42262        else
42263          # Otherwise we believe it is a complete path. Use it as it is.
42264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42265$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42266          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42267$as_echo_n "checking for STRIP... " >&6; }
42268          if test ! -x "$tool_specified"; then
42269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42270$as_echo "not found" >&6; }
42271            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42272          fi
42273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42274$as_echo "$tool_specified" >&6; }
42275        fi
42276      fi
42277    fi
42278
42279  fi
42280
42281
42282
42283  # Only process if variable expands to non-empty
42284
42285  if test "x$STRIP" != x; then
42286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42287
42288  # First separate the path from the arguments. This will split at the first
42289  # space.
42290  complete="$STRIP"
42291  path="${complete%% *}"
42292  tmp="$complete EOL"
42293  arguments="${tmp#* }"
42294
42295  # Input might be given as Windows format, start by converting to
42296  # unix format.
42297  new_path=`$CYGPATH -u "$path"`
42298
42299  # Now try to locate executable using which
42300  new_path=`$WHICH "$new_path" 2> /dev/null`
42301  # bat and cmd files are not always considered executable in cygwin causing which
42302  # to not find them
42303  if test "x$new_path" = x \
42304      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42305      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42306    new_path=`$CYGPATH -u "$path"`
42307  fi
42308  if test "x$new_path" = x; then
42309    # Oops. Which didn't find the executable.
42310    # The splitting of arguments from the executable at a space might have been incorrect,
42311    # since paths with space are more likely in Windows. Give it another try with the whole
42312    # argument.
42313    path="$complete"
42314    arguments="EOL"
42315    new_path=`$CYGPATH -u "$path"`
42316    new_path=`$WHICH "$new_path" 2> /dev/null`
42317    # bat and cmd files are not always considered executable in cygwin causing which
42318    # to not find them
42319    if test "x$new_path" = x \
42320        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42321        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42322      new_path=`$CYGPATH -u "$path"`
42323    fi
42324    if test "x$new_path" = x; then
42325      # It's still not found. Now this is an unrecoverable error.
42326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42327$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42328      has_space=`$ECHO "$complete" | $GREP " "`
42329      if test "x$has_space" != x; then
42330        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42331$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42332      fi
42333      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42334    fi
42335  fi
42336
42337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42340  # "foo.exe" is OK but "foo" is an error.
42341  #
42342  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42343  # It is also a way to make sure we got the proper file name for the real test later on.
42344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42345  if test "x$test_shortpath" = x; then
42346    # Short path failed, file does not exist as specified.
42347    # Try adding .exe or .cmd
42348    if test -f "${new_path}.exe"; then
42349      input_to_shortpath="${new_path}.exe"
42350    elif test -f "${new_path}.cmd"; then
42351      input_to_shortpath="${new_path}.cmd"
42352    else
42353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42354$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42355      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42356$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42357      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42358    fi
42359  else
42360    input_to_shortpath="$new_path"
42361  fi
42362
42363  # Call helper function which possibly converts this using DOS-style short mode.
42364  # If so, the updated path is stored in $new_path.
42365  new_path="$input_to_shortpath"
42366
42367  input_path="$input_to_shortpath"
42368  # Check if we need to convert this using DOS-style short mode. If the path
42369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42370  # take no chances and rewrite it.
42371  # Note: m4 eats our [], so we need to use [ and ] instead.
42372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42373  if test "x$has_forbidden_chars" != x; then
42374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42378      # Going to short mode and back again did indeed matter. Since short mode is
42379      # case insensitive, let's make it lowercase to improve readability.
42380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42381      # Now convert it back to Unix-style (cygpath)
42382      input_path=`$CYGPATH -u "$shortmode_path"`
42383      new_path="$input_path"
42384    fi
42385  fi
42386
42387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42388  if test "x$test_cygdrive_prefix" = x; then
42389    # As a simple fix, exclude /usr/bin since it's not a real path.
42390    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42392      # a path prefixed by /cygdrive for fixpath to work.
42393      new_path="$CYGWIN_ROOT_PATH$input_path"
42394    fi
42395  fi
42396
42397  # remove trailing .exe if any
42398  new_path="${new_path/%.exe/}"
42399
42400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42401
42402  # First separate the path from the arguments. This will split at the first
42403  # space.
42404  complete="$STRIP"
42405  path="${complete%% *}"
42406  tmp="$complete EOL"
42407  arguments="${tmp#* }"
42408
42409  # Input might be given as Windows format, start by converting to
42410  # unix format.
42411  new_path="$path"
42412
42413  windows_path="$new_path"
42414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42415    unix_path=`$CYGPATH -u "$windows_path"`
42416    new_path="$unix_path"
42417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42419    new_path="$unix_path"
42420  fi
42421
42422
42423  # Now try to locate executable using which
42424  new_path=`$WHICH "$new_path" 2> /dev/null`
42425
42426  if test "x$new_path" = x; then
42427    # Oops. Which didn't find the executable.
42428    # The splitting of arguments from the executable at a space might have been incorrect,
42429    # since paths with space are more likely in Windows. Give it another try with the whole
42430    # argument.
42431    path="$complete"
42432    arguments="EOL"
42433    new_path="$path"
42434
42435  windows_path="$new_path"
42436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42437    unix_path=`$CYGPATH -u "$windows_path"`
42438    new_path="$unix_path"
42439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42441    new_path="$unix_path"
42442  fi
42443
42444
42445    new_path=`$WHICH "$new_path" 2> /dev/null`
42446    # bat and cmd files are not always considered executable in MSYS causing which
42447    # to not find them
42448    if test "x$new_path" = x \
42449        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42450        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42451      new_path="$path"
42452
42453  windows_path="$new_path"
42454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42455    unix_path=`$CYGPATH -u "$windows_path"`
42456    new_path="$unix_path"
42457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42459    new_path="$unix_path"
42460  fi
42461
42462    fi
42463
42464    if test "x$new_path" = x; then
42465      # It's still not found. Now this is an unrecoverable error.
42466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42467$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42468      has_space=`$ECHO "$complete" | $GREP " "`
42469      if test "x$has_space" != x; then
42470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42472      fi
42473      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42474    fi
42475  fi
42476
42477  # Now new_path has a complete unix path to the binary
42478  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42479    # Keep paths in /bin as-is, but remove trailing .exe if any
42480    new_path="${new_path/%.exe/}"
42481    # Do not save /bin paths to all_fixpath_prefixes!
42482  else
42483    # Not in mixed or Windows style, start by that.
42484    new_path=`cmd //c echo $new_path`
42485
42486  input_path="$new_path"
42487  # Check if we need to convert this using DOS-style short mode. If the path
42488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42489  # take no chances and rewrite it.
42490  # Note: m4 eats our [], so we need to use [ and ] instead.
42491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42492  if test "x$has_forbidden_chars" != x; then
42493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42495  fi
42496
42497    # Output is in $new_path
42498
42499  windows_path="$new_path"
42500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42501    unix_path=`$CYGPATH -u "$windows_path"`
42502    new_path="$unix_path"
42503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42505    new_path="$unix_path"
42506  fi
42507
42508    # remove trailing .exe if any
42509    new_path="${new_path/%.exe/}"
42510
42511    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42512    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42513  fi
42514
42515    else
42516      # We're on a unix platform. Hooray! :)
42517      # First separate the path from the arguments. This will split at the first
42518      # space.
42519      complete="$STRIP"
42520      path="${complete%% *}"
42521      tmp="$complete EOL"
42522      arguments="${tmp#* }"
42523
42524      # Cannot rely on the command "which" here since it doesn't always work.
42525      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42526      if test -z "$is_absolute_path"; then
42527        # Path to executable is not absolute. Find it.
42528        IFS_save="$IFS"
42529        IFS=:
42530        for p in $PATH; do
42531          if test -f "$p/$path" && test -x "$p/$path"; then
42532            new_path="$p/$path"
42533            break
42534          fi
42535        done
42536        IFS="$IFS_save"
42537      else
42538        # This is an absolute path, we can use it without further modifications.
42539        new_path="$path"
42540      fi
42541
42542      if test "x$new_path" = x; then
42543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42544$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42545        has_space=`$ECHO "$complete" | $GREP " "`
42546        if test "x$has_space" != x; then
42547          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42548$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42549        fi
42550        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42551      fi
42552    fi
42553
42554    # Now join together the path and the arguments once again
42555    if test "x$arguments" != xEOL; then
42556      new_complete="$new_path ${arguments% *}"
42557    else
42558      new_complete="$new_path"
42559    fi
42560
42561    if test "x$complete" != "x$new_complete"; then
42562      STRIP="$new_complete"
42563      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42564$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42565    fi
42566  fi
42567
42568    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42569
42570
42571  # Publish this variable in the help.
42572
42573
42574  if [ -z "${NM+x}" ]; then
42575    # The variable is not set by user, try to locate tool using the code snippet
42576    if test -n "$ac_tool_prefix"; then
42577  for ac_prog in nm gcc-nm
42578  do
42579    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42580set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42582$as_echo_n "checking for $ac_word... " >&6; }
42583if ${ac_cv_prog_NM+:} false; then :
42584  $as_echo_n "(cached) " >&6
42585else
42586  if test -n "$NM"; then
42587  ac_cv_prog_NM="$NM" # Let the user override the test.
42588else
42589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42590for as_dir in $PATH
42591do
42592  IFS=$as_save_IFS
42593  test -z "$as_dir" && as_dir=.
42594    for ac_exec_ext in '' $ac_executable_extensions; do
42595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42596    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42598    break 2
42599  fi
42600done
42601  done
42602IFS=$as_save_IFS
42603
42604fi
42605fi
42606NM=$ac_cv_prog_NM
42607if test -n "$NM"; then
42608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42609$as_echo "$NM" >&6; }
42610else
42611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42612$as_echo "no" >&6; }
42613fi
42614
42615
42616    test -n "$NM" && break
42617  done
42618fi
42619if test -z "$NM"; then
42620  ac_ct_NM=$NM
42621  for ac_prog in nm gcc-nm
42622do
42623  # Extract the first word of "$ac_prog", so it can be a program name with args.
42624set dummy $ac_prog; ac_word=$2
42625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42626$as_echo_n "checking for $ac_word... " >&6; }
42627if ${ac_cv_prog_ac_ct_NM+:} false; then :
42628  $as_echo_n "(cached) " >&6
42629else
42630  if test -n "$ac_ct_NM"; then
42631  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42632else
42633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42634for as_dir in $PATH
42635do
42636  IFS=$as_save_IFS
42637  test -z "$as_dir" && as_dir=.
42638    for ac_exec_ext in '' $ac_executable_extensions; do
42639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42640    ac_cv_prog_ac_ct_NM="$ac_prog"
42641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42642    break 2
42643  fi
42644done
42645  done
42646IFS=$as_save_IFS
42647
42648fi
42649fi
42650ac_ct_NM=$ac_cv_prog_ac_ct_NM
42651if test -n "$ac_ct_NM"; then
42652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42653$as_echo "$ac_ct_NM" >&6; }
42654else
42655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42656$as_echo "no" >&6; }
42657fi
42658
42659
42660  test -n "$ac_ct_NM" && break
42661done
42662
42663  if test "x$ac_ct_NM" = x; then
42664    NM=""
42665  else
42666    case $cross_compiling:$ac_tool_warned in
42667yes:)
42668{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42669$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42670ac_tool_warned=yes ;;
42671esac
42672    NM=$ac_ct_NM
42673  fi
42674fi
42675
42676  else
42677    # The variable is set, but is it from the command line or the environment?
42678
42679    # Try to remove the string !NM! from our list.
42680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42682      # If it failed, the variable was not from the command line. Ignore it,
42683      # but warn the user (except for BASH, which is always set by the calling BASH).
42684      if test "xNM" != xBASH; then
42685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42686$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42687      fi
42688      # Try to locate tool using the code snippet
42689      if test -n "$ac_tool_prefix"; then
42690  for ac_prog in nm gcc-nm
42691  do
42692    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42693set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42695$as_echo_n "checking for $ac_word... " >&6; }
42696if ${ac_cv_prog_NM+:} false; then :
42697  $as_echo_n "(cached) " >&6
42698else
42699  if test -n "$NM"; then
42700  ac_cv_prog_NM="$NM" # Let the user override the test.
42701else
42702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42703for as_dir in $PATH
42704do
42705  IFS=$as_save_IFS
42706  test -z "$as_dir" && as_dir=.
42707    for ac_exec_ext in '' $ac_executable_extensions; do
42708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42709    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42711    break 2
42712  fi
42713done
42714  done
42715IFS=$as_save_IFS
42716
42717fi
42718fi
42719NM=$ac_cv_prog_NM
42720if test -n "$NM"; then
42721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42722$as_echo "$NM" >&6; }
42723else
42724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42725$as_echo "no" >&6; }
42726fi
42727
42728
42729    test -n "$NM" && break
42730  done
42731fi
42732if test -z "$NM"; then
42733  ac_ct_NM=$NM
42734  for ac_prog in nm gcc-nm
42735do
42736  # Extract the first word of "$ac_prog", so it can be a program name with args.
42737set dummy $ac_prog; ac_word=$2
42738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42739$as_echo_n "checking for $ac_word... " >&6; }
42740if ${ac_cv_prog_ac_ct_NM+:} false; then :
42741  $as_echo_n "(cached) " >&6
42742else
42743  if test -n "$ac_ct_NM"; then
42744  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42745else
42746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42747for as_dir in $PATH
42748do
42749  IFS=$as_save_IFS
42750  test -z "$as_dir" && as_dir=.
42751    for ac_exec_ext in '' $ac_executable_extensions; do
42752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42753    ac_cv_prog_ac_ct_NM="$ac_prog"
42754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42755    break 2
42756  fi
42757done
42758  done
42759IFS=$as_save_IFS
42760
42761fi
42762fi
42763ac_ct_NM=$ac_cv_prog_ac_ct_NM
42764if test -n "$ac_ct_NM"; then
42765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42766$as_echo "$ac_ct_NM" >&6; }
42767else
42768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42769$as_echo "no" >&6; }
42770fi
42771
42772
42773  test -n "$ac_ct_NM" && break
42774done
42775
42776  if test "x$ac_ct_NM" = x; then
42777    NM=""
42778  else
42779    case $cross_compiling:$ac_tool_warned in
42780yes:)
42781{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42782$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42783ac_tool_warned=yes ;;
42784esac
42785    NM=$ac_ct_NM
42786  fi
42787fi
42788
42789    else
42790      # If it succeeded, then it was overridden by the user. We will use it
42791      # for the tool.
42792
42793      # First remove it from the list of overridden variables, so we can test
42794      # for unknown variables in the end.
42795      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42796
42797      # Check if we try to supply an empty value
42798      if test "x$NM" = x; then
42799        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42800$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42801        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42802$as_echo_n "checking for NM... " >&6; }
42803        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42804$as_echo "disabled" >&6; }
42805      else
42806        # Check if the provided tool contains a complete path.
42807        tool_specified="$NM"
42808        tool_basename="${tool_specified##*/}"
42809        if test "x$tool_basename" = "x$tool_specified"; then
42810          # A command without a complete path is provided, search $PATH.
42811          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42812$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42813          # Extract the first word of "$tool_basename", so it can be a program name with args.
42814set dummy $tool_basename; ac_word=$2
42815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42816$as_echo_n "checking for $ac_word... " >&6; }
42817if ${ac_cv_path_NM+:} false; then :
42818  $as_echo_n "(cached) " >&6
42819else
42820  case $NM in
42821  [\\/]* | ?:[\\/]*)
42822  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42823  ;;
42824  *)
42825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42826for as_dir in $PATH
42827do
42828  IFS=$as_save_IFS
42829  test -z "$as_dir" && as_dir=.
42830    for ac_exec_ext in '' $ac_executable_extensions; do
42831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42832    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42834    break 2
42835  fi
42836done
42837  done
42838IFS=$as_save_IFS
42839
42840  ;;
42841esac
42842fi
42843NM=$ac_cv_path_NM
42844if test -n "$NM"; then
42845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42846$as_echo "$NM" >&6; }
42847else
42848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42849$as_echo "no" >&6; }
42850fi
42851
42852
42853          if test "x$NM" = x; then
42854            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42855          fi
42856        else
42857          # Otherwise we believe it is a complete path. Use it as it is.
42858          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42859$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42860          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42861$as_echo_n "checking for NM... " >&6; }
42862          if test ! -x "$tool_specified"; then
42863            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42864$as_echo "not found" >&6; }
42865            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42866          fi
42867          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42868$as_echo "$tool_specified" >&6; }
42869        fi
42870      fi
42871    fi
42872
42873  fi
42874
42875
42876    else
42877
42878
42879  # Publish this variable in the help.
42880
42881
42882  if [ -z "${NM+x}" ]; then
42883    # The variable is not set by user, try to locate tool using the code snippet
42884    if test -n "$ac_tool_prefix"; then
42885  for ac_prog in nm
42886  do
42887    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42888set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42890$as_echo_n "checking for $ac_word... " >&6; }
42891if ${ac_cv_prog_NM+:} false; then :
42892  $as_echo_n "(cached) " >&6
42893else
42894  if test -n "$NM"; then
42895  ac_cv_prog_NM="$NM" # Let the user override the test.
42896else
42897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42898for as_dir in $PATH
42899do
42900  IFS=$as_save_IFS
42901  test -z "$as_dir" && as_dir=.
42902    for ac_exec_ext in '' $ac_executable_extensions; do
42903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42904    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42906    break 2
42907  fi
42908done
42909  done
42910IFS=$as_save_IFS
42911
42912fi
42913fi
42914NM=$ac_cv_prog_NM
42915if test -n "$NM"; then
42916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42917$as_echo "$NM" >&6; }
42918else
42919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42920$as_echo "no" >&6; }
42921fi
42922
42923
42924    test -n "$NM" && break
42925  done
42926fi
42927if test -z "$NM"; then
42928  ac_ct_NM=$NM
42929  for ac_prog in nm
42930do
42931  # Extract the first word of "$ac_prog", so it can be a program name with args.
42932set dummy $ac_prog; ac_word=$2
42933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42934$as_echo_n "checking for $ac_word... " >&6; }
42935if ${ac_cv_prog_ac_ct_NM+:} false; then :
42936  $as_echo_n "(cached) " >&6
42937else
42938  if test -n "$ac_ct_NM"; then
42939  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42940else
42941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42942for as_dir in $PATH
42943do
42944  IFS=$as_save_IFS
42945  test -z "$as_dir" && as_dir=.
42946    for ac_exec_ext in '' $ac_executable_extensions; do
42947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42948    ac_cv_prog_ac_ct_NM="$ac_prog"
42949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42950    break 2
42951  fi
42952done
42953  done
42954IFS=$as_save_IFS
42955
42956fi
42957fi
42958ac_ct_NM=$ac_cv_prog_ac_ct_NM
42959if test -n "$ac_ct_NM"; then
42960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42961$as_echo "$ac_ct_NM" >&6; }
42962else
42963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42964$as_echo "no" >&6; }
42965fi
42966
42967
42968  test -n "$ac_ct_NM" && break
42969done
42970
42971  if test "x$ac_ct_NM" = x; then
42972    NM=""
42973  else
42974    case $cross_compiling:$ac_tool_warned in
42975yes:)
42976{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42977$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42978ac_tool_warned=yes ;;
42979esac
42980    NM=$ac_ct_NM
42981  fi
42982fi
42983
42984  else
42985    # The variable is set, but is it from the command line or the environment?
42986
42987    # Try to remove the string !NM! from our list.
42988    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42989    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42990      # If it failed, the variable was not from the command line. Ignore it,
42991      # but warn the user (except for BASH, which is always set by the calling BASH).
42992      if test "xNM" != xBASH; then
42993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42994$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42995      fi
42996      # Try to locate tool using the code snippet
42997      if test -n "$ac_tool_prefix"; then
42998  for ac_prog in nm
42999  do
43000    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43001set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43003$as_echo_n "checking for $ac_word... " >&6; }
43004if ${ac_cv_prog_NM+:} false; then :
43005  $as_echo_n "(cached) " >&6
43006else
43007  if test -n "$NM"; then
43008  ac_cv_prog_NM="$NM" # Let the user override the test.
43009else
43010as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43011for as_dir in $PATH
43012do
43013  IFS=$as_save_IFS
43014  test -z "$as_dir" && as_dir=.
43015    for ac_exec_ext in '' $ac_executable_extensions; do
43016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43017    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43019    break 2
43020  fi
43021done
43022  done
43023IFS=$as_save_IFS
43024
43025fi
43026fi
43027NM=$ac_cv_prog_NM
43028if test -n "$NM"; then
43029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43030$as_echo "$NM" >&6; }
43031else
43032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43033$as_echo "no" >&6; }
43034fi
43035
43036
43037    test -n "$NM" && break
43038  done
43039fi
43040if test -z "$NM"; then
43041  ac_ct_NM=$NM
43042  for ac_prog in nm
43043do
43044  # Extract the first word of "$ac_prog", so it can be a program name with args.
43045set dummy $ac_prog; ac_word=$2
43046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43047$as_echo_n "checking for $ac_word... " >&6; }
43048if ${ac_cv_prog_ac_ct_NM+:} false; then :
43049  $as_echo_n "(cached) " >&6
43050else
43051  if test -n "$ac_ct_NM"; then
43052  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43053else
43054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43055for as_dir in $PATH
43056do
43057  IFS=$as_save_IFS
43058  test -z "$as_dir" && as_dir=.
43059    for ac_exec_ext in '' $ac_executable_extensions; do
43060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43061    ac_cv_prog_ac_ct_NM="$ac_prog"
43062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43063    break 2
43064  fi
43065done
43066  done
43067IFS=$as_save_IFS
43068
43069fi
43070fi
43071ac_ct_NM=$ac_cv_prog_ac_ct_NM
43072if test -n "$ac_ct_NM"; then
43073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43074$as_echo "$ac_ct_NM" >&6; }
43075else
43076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43077$as_echo "no" >&6; }
43078fi
43079
43080
43081  test -n "$ac_ct_NM" && break
43082done
43083
43084  if test "x$ac_ct_NM" = x; then
43085    NM=""
43086  else
43087    case $cross_compiling:$ac_tool_warned in
43088yes:)
43089{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43090$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43091ac_tool_warned=yes ;;
43092esac
43093    NM=$ac_ct_NM
43094  fi
43095fi
43096
43097    else
43098      # If it succeeded, then it was overridden by the user. We will use it
43099      # for the tool.
43100
43101      # First remove it from the list of overridden variables, so we can test
43102      # for unknown variables in the end.
43103      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43104
43105      # Check if we try to supply an empty value
43106      if test "x$NM" = x; then
43107        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43108$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43109        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43110$as_echo_n "checking for NM... " >&6; }
43111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43112$as_echo "disabled" >&6; }
43113      else
43114        # Check if the provided tool contains a complete path.
43115        tool_specified="$NM"
43116        tool_basename="${tool_specified##*/}"
43117        if test "x$tool_basename" = "x$tool_specified"; then
43118          # A command without a complete path is provided, search $PATH.
43119          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43120$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43121          # Extract the first word of "$tool_basename", so it can be a program name with args.
43122set dummy $tool_basename; ac_word=$2
43123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43124$as_echo_n "checking for $ac_word... " >&6; }
43125if ${ac_cv_path_NM+:} false; then :
43126  $as_echo_n "(cached) " >&6
43127else
43128  case $NM in
43129  [\\/]* | ?:[\\/]*)
43130  ac_cv_path_NM="$NM" # Let the user override the test with a path.
43131  ;;
43132  *)
43133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43134for as_dir in $PATH
43135do
43136  IFS=$as_save_IFS
43137  test -z "$as_dir" && as_dir=.
43138    for ac_exec_ext in '' $ac_executable_extensions; do
43139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43140    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
43141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43142    break 2
43143  fi
43144done
43145  done
43146IFS=$as_save_IFS
43147
43148  ;;
43149esac
43150fi
43151NM=$ac_cv_path_NM
43152if test -n "$NM"; then
43153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43154$as_echo "$NM" >&6; }
43155else
43156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43157$as_echo "no" >&6; }
43158fi
43159
43160
43161          if test "x$NM" = x; then
43162            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43163          fi
43164        else
43165          # Otherwise we believe it is a complete path. Use it as it is.
43166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43167$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43168          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43169$as_echo_n "checking for NM... " >&6; }
43170          if test ! -x "$tool_specified"; then
43171            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43172$as_echo "not found" >&6; }
43173            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43174          fi
43175          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43176$as_echo "$tool_specified" >&6; }
43177        fi
43178      fi
43179    fi
43180
43181  fi
43182
43183
43184    fi
43185
43186  # Only process if variable expands to non-empty
43187
43188  if test "x$NM" != x; then
43189    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43190
43191  # First separate the path from the arguments. This will split at the first
43192  # space.
43193  complete="$NM"
43194  path="${complete%% *}"
43195  tmp="$complete EOL"
43196  arguments="${tmp#* }"
43197
43198  # Input might be given as Windows format, start by converting to
43199  # unix format.
43200  new_path=`$CYGPATH -u "$path"`
43201
43202  # Now try to locate executable using which
43203  new_path=`$WHICH "$new_path" 2> /dev/null`
43204  # bat and cmd files are not always considered executable in cygwin causing which
43205  # to not find them
43206  if test "x$new_path" = x \
43207      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43208      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43209    new_path=`$CYGPATH -u "$path"`
43210  fi
43211  if test "x$new_path" = x; then
43212    # Oops. Which didn't find the executable.
43213    # The splitting of arguments from the executable at a space might have been incorrect,
43214    # since paths with space are more likely in Windows. Give it another try with the whole
43215    # argument.
43216    path="$complete"
43217    arguments="EOL"
43218    new_path=`$CYGPATH -u "$path"`
43219    new_path=`$WHICH "$new_path" 2> /dev/null`
43220    # bat and cmd files are not always considered executable in cygwin causing which
43221    # to not find them
43222    if test "x$new_path" = x \
43223        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43224        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43225      new_path=`$CYGPATH -u "$path"`
43226    fi
43227    if test "x$new_path" = x; then
43228      # It's still not found. Now this is an unrecoverable error.
43229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43230$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43231      has_space=`$ECHO "$complete" | $GREP " "`
43232      if test "x$has_space" != x; then
43233        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43234$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43235      fi
43236      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43237    fi
43238  fi
43239
43240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43243  # "foo.exe" is OK but "foo" is an error.
43244  #
43245  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43246  # It is also a way to make sure we got the proper file name for the real test later on.
43247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43248  if test "x$test_shortpath" = x; then
43249    # Short path failed, file does not exist as specified.
43250    # Try adding .exe or .cmd
43251    if test -f "${new_path}.exe"; then
43252      input_to_shortpath="${new_path}.exe"
43253    elif test -f "${new_path}.cmd"; then
43254      input_to_shortpath="${new_path}.cmd"
43255    else
43256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43257$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43258      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43259$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43260      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43261    fi
43262  else
43263    input_to_shortpath="$new_path"
43264  fi
43265
43266  # Call helper function which possibly converts this using DOS-style short mode.
43267  # If so, the updated path is stored in $new_path.
43268  new_path="$input_to_shortpath"
43269
43270  input_path="$input_to_shortpath"
43271  # Check if we need to convert this using DOS-style short mode. If the path
43272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43273  # take no chances and rewrite it.
43274  # Note: m4 eats our [], so we need to use [ and ] instead.
43275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43276  if test "x$has_forbidden_chars" != x; then
43277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43281      # Going to short mode and back again did indeed matter. Since short mode is
43282      # case insensitive, let's make it lowercase to improve readability.
43283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43284      # Now convert it back to Unix-style (cygpath)
43285      input_path=`$CYGPATH -u "$shortmode_path"`
43286      new_path="$input_path"
43287    fi
43288  fi
43289
43290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43291  if test "x$test_cygdrive_prefix" = x; then
43292    # As a simple fix, exclude /usr/bin since it's not a real path.
43293    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43295      # a path prefixed by /cygdrive for fixpath to work.
43296      new_path="$CYGWIN_ROOT_PATH$input_path"
43297    fi
43298  fi
43299
43300  # remove trailing .exe if any
43301  new_path="${new_path/%.exe/}"
43302
43303    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43304
43305  # First separate the path from the arguments. This will split at the first
43306  # space.
43307  complete="$NM"
43308  path="${complete%% *}"
43309  tmp="$complete EOL"
43310  arguments="${tmp#* }"
43311
43312  # Input might be given as Windows format, start by converting to
43313  # unix format.
43314  new_path="$path"
43315
43316  windows_path="$new_path"
43317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43318    unix_path=`$CYGPATH -u "$windows_path"`
43319    new_path="$unix_path"
43320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43322    new_path="$unix_path"
43323  fi
43324
43325
43326  # Now try to locate executable using which
43327  new_path=`$WHICH "$new_path" 2> /dev/null`
43328
43329  if test "x$new_path" = x; then
43330    # Oops. Which didn't find the executable.
43331    # The splitting of arguments from the executable at a space might have been incorrect,
43332    # since paths with space are more likely in Windows. Give it another try with the whole
43333    # argument.
43334    path="$complete"
43335    arguments="EOL"
43336    new_path="$path"
43337
43338  windows_path="$new_path"
43339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43340    unix_path=`$CYGPATH -u "$windows_path"`
43341    new_path="$unix_path"
43342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43344    new_path="$unix_path"
43345  fi
43346
43347
43348    new_path=`$WHICH "$new_path" 2> /dev/null`
43349    # bat and cmd files are not always considered executable in MSYS causing which
43350    # to not find them
43351    if test "x$new_path" = x \
43352        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43353        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43354      new_path="$path"
43355
43356  windows_path="$new_path"
43357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43358    unix_path=`$CYGPATH -u "$windows_path"`
43359    new_path="$unix_path"
43360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43362    new_path="$unix_path"
43363  fi
43364
43365    fi
43366
43367    if test "x$new_path" = x; then
43368      # It's still not found. Now this is an unrecoverable error.
43369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43370$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43371      has_space=`$ECHO "$complete" | $GREP " "`
43372      if test "x$has_space" != x; then
43373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43375      fi
43376      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43377    fi
43378  fi
43379
43380  # Now new_path has a complete unix path to the binary
43381  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43382    # Keep paths in /bin as-is, but remove trailing .exe if any
43383    new_path="${new_path/%.exe/}"
43384    # Do not save /bin paths to all_fixpath_prefixes!
43385  else
43386    # Not in mixed or Windows style, start by that.
43387    new_path=`cmd //c echo $new_path`
43388
43389  input_path="$new_path"
43390  # Check if we need to convert this using DOS-style short mode. If the path
43391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43392  # take no chances and rewrite it.
43393  # Note: m4 eats our [], so we need to use [ and ] instead.
43394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43395  if test "x$has_forbidden_chars" != x; then
43396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43398  fi
43399
43400    # Output is in $new_path
43401
43402  windows_path="$new_path"
43403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43404    unix_path=`$CYGPATH -u "$windows_path"`
43405    new_path="$unix_path"
43406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43408    new_path="$unix_path"
43409  fi
43410
43411    # remove trailing .exe if any
43412    new_path="${new_path/%.exe/}"
43413
43414    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43415    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43416  fi
43417
43418    else
43419      # We're on a unix platform. Hooray! :)
43420      # First separate the path from the arguments. This will split at the first
43421      # space.
43422      complete="$NM"
43423      path="${complete%% *}"
43424      tmp="$complete EOL"
43425      arguments="${tmp#* }"
43426
43427      # Cannot rely on the command "which" here since it doesn't always work.
43428      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43429      if test -z "$is_absolute_path"; then
43430        # Path to executable is not absolute. Find it.
43431        IFS_save="$IFS"
43432        IFS=:
43433        for p in $PATH; do
43434          if test -f "$p/$path" && test -x "$p/$path"; then
43435            new_path="$p/$path"
43436            break
43437          fi
43438        done
43439        IFS="$IFS_save"
43440      else
43441        # This is an absolute path, we can use it without further modifications.
43442        new_path="$path"
43443      fi
43444
43445      if test "x$new_path" = x; then
43446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43447$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43448        has_space=`$ECHO "$complete" | $GREP " "`
43449        if test "x$has_space" != x; then
43450          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43451$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43452        fi
43453        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43454      fi
43455    fi
43456
43457    # Now join together the path and the arguments once again
43458    if test "x$arguments" != xEOL; then
43459      new_complete="$new_path ${arguments% *}"
43460    else
43461      new_complete="$new_path"
43462    fi
43463
43464    if test "x$complete" != "x$new_complete"; then
43465      NM="$new_complete"
43466      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43467$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43468    fi
43469  fi
43470
43471    GNM="$NM"
43472
43473  fi
43474
43475  # objcopy is used for moving debug symbols to separate files when
43476  # full debug symbols are enabled.
43477  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43478
43479
43480  # Publish this variable in the help.
43481
43482
43483  if [ -z "${OBJCOPY+x}" ]; then
43484    # The variable is not set by user, try to locate tool using the code snippet
43485    if test -n "$ac_tool_prefix"; then
43486  for ac_prog in gobjcopy objcopy
43487  do
43488    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43489set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43491$as_echo_n "checking for $ac_word... " >&6; }
43492if ${ac_cv_prog_OBJCOPY+:} false; then :
43493  $as_echo_n "(cached) " >&6
43494else
43495  if test -n "$OBJCOPY"; then
43496  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43497else
43498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43499for as_dir in $PATH
43500do
43501  IFS=$as_save_IFS
43502  test -z "$as_dir" && as_dir=.
43503    for ac_exec_ext in '' $ac_executable_extensions; do
43504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43505    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43507    break 2
43508  fi
43509done
43510  done
43511IFS=$as_save_IFS
43512
43513fi
43514fi
43515OBJCOPY=$ac_cv_prog_OBJCOPY
43516if test -n "$OBJCOPY"; then
43517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43518$as_echo "$OBJCOPY" >&6; }
43519else
43520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43521$as_echo "no" >&6; }
43522fi
43523
43524
43525    test -n "$OBJCOPY" && break
43526  done
43527fi
43528if test -z "$OBJCOPY"; then
43529  ac_ct_OBJCOPY=$OBJCOPY
43530  for ac_prog in gobjcopy objcopy
43531do
43532  # Extract the first word of "$ac_prog", so it can be a program name with args.
43533set dummy $ac_prog; ac_word=$2
43534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43535$as_echo_n "checking for $ac_word... " >&6; }
43536if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43537  $as_echo_n "(cached) " >&6
43538else
43539  if test -n "$ac_ct_OBJCOPY"; then
43540  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43541else
43542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43543for as_dir in $PATH
43544do
43545  IFS=$as_save_IFS
43546  test -z "$as_dir" && as_dir=.
43547    for ac_exec_ext in '' $ac_executable_extensions; do
43548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43549    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43551    break 2
43552  fi
43553done
43554  done
43555IFS=$as_save_IFS
43556
43557fi
43558fi
43559ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43560if test -n "$ac_ct_OBJCOPY"; then
43561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43562$as_echo "$ac_ct_OBJCOPY" >&6; }
43563else
43564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43565$as_echo "no" >&6; }
43566fi
43567
43568
43569  test -n "$ac_ct_OBJCOPY" && break
43570done
43571
43572  if test "x$ac_ct_OBJCOPY" = x; then
43573    OBJCOPY=""
43574  else
43575    case $cross_compiling:$ac_tool_warned in
43576yes:)
43577{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43578$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43579ac_tool_warned=yes ;;
43580esac
43581    OBJCOPY=$ac_ct_OBJCOPY
43582  fi
43583fi
43584
43585  else
43586    # The variable is set, but is it from the command line or the environment?
43587
43588    # Try to remove the string !OBJCOPY! from our list.
43589    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43590    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43591      # If it failed, the variable was not from the command line. Ignore it,
43592      # but warn the user (except for BASH, which is always set by the calling BASH).
43593      if test "xOBJCOPY" != xBASH; then
43594        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43595$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43596      fi
43597      # Try to locate tool using the code snippet
43598      if test -n "$ac_tool_prefix"; then
43599  for ac_prog in gobjcopy objcopy
43600  do
43601    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43602set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43604$as_echo_n "checking for $ac_word... " >&6; }
43605if ${ac_cv_prog_OBJCOPY+:} false; then :
43606  $as_echo_n "(cached) " >&6
43607else
43608  if test -n "$OBJCOPY"; then
43609  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43610else
43611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43612for as_dir in $PATH
43613do
43614  IFS=$as_save_IFS
43615  test -z "$as_dir" && as_dir=.
43616    for ac_exec_ext in '' $ac_executable_extensions; do
43617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43618    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43620    break 2
43621  fi
43622done
43623  done
43624IFS=$as_save_IFS
43625
43626fi
43627fi
43628OBJCOPY=$ac_cv_prog_OBJCOPY
43629if test -n "$OBJCOPY"; then
43630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43631$as_echo "$OBJCOPY" >&6; }
43632else
43633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43634$as_echo "no" >&6; }
43635fi
43636
43637
43638    test -n "$OBJCOPY" && break
43639  done
43640fi
43641if test -z "$OBJCOPY"; then
43642  ac_ct_OBJCOPY=$OBJCOPY
43643  for ac_prog in gobjcopy objcopy
43644do
43645  # Extract the first word of "$ac_prog", so it can be a program name with args.
43646set dummy $ac_prog; ac_word=$2
43647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43648$as_echo_n "checking for $ac_word... " >&6; }
43649if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43650  $as_echo_n "(cached) " >&6
43651else
43652  if test -n "$ac_ct_OBJCOPY"; then
43653  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43654else
43655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43656for as_dir in $PATH
43657do
43658  IFS=$as_save_IFS
43659  test -z "$as_dir" && as_dir=.
43660    for ac_exec_ext in '' $ac_executable_extensions; do
43661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43662    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43664    break 2
43665  fi
43666done
43667  done
43668IFS=$as_save_IFS
43669
43670fi
43671fi
43672ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43673if test -n "$ac_ct_OBJCOPY"; then
43674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43675$as_echo "$ac_ct_OBJCOPY" >&6; }
43676else
43677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43678$as_echo "no" >&6; }
43679fi
43680
43681
43682  test -n "$ac_ct_OBJCOPY" && break
43683done
43684
43685  if test "x$ac_ct_OBJCOPY" = x; then
43686    OBJCOPY=""
43687  else
43688    case $cross_compiling:$ac_tool_warned in
43689yes:)
43690{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43691$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43692ac_tool_warned=yes ;;
43693esac
43694    OBJCOPY=$ac_ct_OBJCOPY
43695  fi
43696fi
43697
43698    else
43699      # If it succeeded, then it was overridden by the user. We will use it
43700      # for the tool.
43701
43702      # First remove it from the list of overridden variables, so we can test
43703      # for unknown variables in the end.
43704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43705
43706      # Check if we try to supply an empty value
43707      if test "x$OBJCOPY" = x; then
43708        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43709$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43711$as_echo_n "checking for OBJCOPY... " >&6; }
43712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43713$as_echo "disabled" >&6; }
43714      else
43715        # Check if the provided tool contains a complete path.
43716        tool_specified="$OBJCOPY"
43717        tool_basename="${tool_specified##*/}"
43718        if test "x$tool_basename" = "x$tool_specified"; then
43719          # A command without a complete path is provided, search $PATH.
43720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43721$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43722          # Extract the first word of "$tool_basename", so it can be a program name with args.
43723set dummy $tool_basename; ac_word=$2
43724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43725$as_echo_n "checking for $ac_word... " >&6; }
43726if ${ac_cv_path_OBJCOPY+:} false; then :
43727  $as_echo_n "(cached) " >&6
43728else
43729  case $OBJCOPY in
43730  [\\/]* | ?:[\\/]*)
43731  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43732  ;;
43733  *)
43734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43735for as_dir in $PATH
43736do
43737  IFS=$as_save_IFS
43738  test -z "$as_dir" && as_dir=.
43739    for ac_exec_ext in '' $ac_executable_extensions; do
43740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43741    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43743    break 2
43744  fi
43745done
43746  done
43747IFS=$as_save_IFS
43748
43749  ;;
43750esac
43751fi
43752OBJCOPY=$ac_cv_path_OBJCOPY
43753if test -n "$OBJCOPY"; then
43754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43755$as_echo "$OBJCOPY" >&6; }
43756else
43757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43758$as_echo "no" >&6; }
43759fi
43760
43761
43762          if test "x$OBJCOPY" = x; then
43763            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43764          fi
43765        else
43766          # Otherwise we believe it is a complete path. Use it as it is.
43767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43768$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43769          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43770$as_echo_n "checking for OBJCOPY... " >&6; }
43771          if test ! -x "$tool_specified"; then
43772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43773$as_echo "not found" >&6; }
43774            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43775          fi
43776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43777$as_echo "$tool_specified" >&6; }
43778        fi
43779      fi
43780    fi
43781
43782  fi
43783
43784
43785    # Only call fixup if objcopy was found.
43786    if test -n "$OBJCOPY"; then
43787
43788  # Only process if variable expands to non-empty
43789
43790  if test "x$OBJCOPY" != x; then
43791    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43792
43793  # First separate the path from the arguments. This will split at the first
43794  # space.
43795  complete="$OBJCOPY"
43796  path="${complete%% *}"
43797  tmp="$complete EOL"
43798  arguments="${tmp#* }"
43799
43800  # Input might be given as Windows format, start by converting to
43801  # unix format.
43802  new_path=`$CYGPATH -u "$path"`
43803
43804  # Now try to locate executable using which
43805  new_path=`$WHICH "$new_path" 2> /dev/null`
43806  # bat and cmd files are not always considered executable in cygwin causing which
43807  # to not find them
43808  if test "x$new_path" = x \
43809      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43810      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43811    new_path=`$CYGPATH -u "$path"`
43812  fi
43813  if test "x$new_path" = x; then
43814    # Oops. Which didn't find the executable.
43815    # The splitting of arguments from the executable at a space might have been incorrect,
43816    # since paths with space are more likely in Windows. Give it another try with the whole
43817    # argument.
43818    path="$complete"
43819    arguments="EOL"
43820    new_path=`$CYGPATH -u "$path"`
43821    new_path=`$WHICH "$new_path" 2> /dev/null`
43822    # bat and cmd files are not always considered executable in cygwin causing which
43823    # to not find them
43824    if test "x$new_path" = x \
43825        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43826        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43827      new_path=`$CYGPATH -u "$path"`
43828    fi
43829    if test "x$new_path" = x; then
43830      # It's still not found. Now this is an unrecoverable error.
43831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43832$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43833      has_space=`$ECHO "$complete" | $GREP " "`
43834      if test "x$has_space" != x; then
43835        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43836$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43837      fi
43838      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43839    fi
43840  fi
43841
43842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43845  # "foo.exe" is OK but "foo" is an error.
43846  #
43847  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43848  # It is also a way to make sure we got the proper file name for the real test later on.
43849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43850  if test "x$test_shortpath" = x; then
43851    # Short path failed, file does not exist as specified.
43852    # Try adding .exe or .cmd
43853    if test -f "${new_path}.exe"; then
43854      input_to_shortpath="${new_path}.exe"
43855    elif test -f "${new_path}.cmd"; then
43856      input_to_shortpath="${new_path}.cmd"
43857    else
43858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43859$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43860      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43861$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43862      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43863    fi
43864  else
43865    input_to_shortpath="$new_path"
43866  fi
43867
43868  # Call helper function which possibly converts this using DOS-style short mode.
43869  # If so, the updated path is stored in $new_path.
43870  new_path="$input_to_shortpath"
43871
43872  input_path="$input_to_shortpath"
43873  # Check if we need to convert this using DOS-style short mode. If the path
43874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43875  # take no chances and rewrite it.
43876  # Note: m4 eats our [], so we need to use [ and ] instead.
43877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43878  if test "x$has_forbidden_chars" != x; then
43879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43883      # Going to short mode and back again did indeed matter. Since short mode is
43884      # case insensitive, let's make it lowercase to improve readability.
43885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43886      # Now convert it back to Unix-style (cygpath)
43887      input_path=`$CYGPATH -u "$shortmode_path"`
43888      new_path="$input_path"
43889    fi
43890  fi
43891
43892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43893  if test "x$test_cygdrive_prefix" = x; then
43894    # As a simple fix, exclude /usr/bin since it's not a real path.
43895    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43897      # a path prefixed by /cygdrive for fixpath to work.
43898      new_path="$CYGWIN_ROOT_PATH$input_path"
43899    fi
43900  fi
43901
43902  # remove trailing .exe if any
43903  new_path="${new_path/%.exe/}"
43904
43905    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43906
43907  # First separate the path from the arguments. This will split at the first
43908  # space.
43909  complete="$OBJCOPY"
43910  path="${complete%% *}"
43911  tmp="$complete EOL"
43912  arguments="${tmp#* }"
43913
43914  # Input might be given as Windows format, start by converting to
43915  # unix format.
43916  new_path="$path"
43917
43918  windows_path="$new_path"
43919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43920    unix_path=`$CYGPATH -u "$windows_path"`
43921    new_path="$unix_path"
43922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43924    new_path="$unix_path"
43925  fi
43926
43927
43928  # Now try to locate executable using which
43929  new_path=`$WHICH "$new_path" 2> /dev/null`
43930
43931  if test "x$new_path" = x; then
43932    # Oops. Which didn't find the executable.
43933    # The splitting of arguments from the executable at a space might have been incorrect,
43934    # since paths with space are more likely in Windows. Give it another try with the whole
43935    # argument.
43936    path="$complete"
43937    arguments="EOL"
43938    new_path="$path"
43939
43940  windows_path="$new_path"
43941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43942    unix_path=`$CYGPATH -u "$windows_path"`
43943    new_path="$unix_path"
43944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43946    new_path="$unix_path"
43947  fi
43948
43949
43950    new_path=`$WHICH "$new_path" 2> /dev/null`
43951    # bat and cmd files are not always considered executable in MSYS causing which
43952    # to not find them
43953    if test "x$new_path" = x \
43954        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43955        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43956      new_path="$path"
43957
43958  windows_path="$new_path"
43959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43960    unix_path=`$CYGPATH -u "$windows_path"`
43961    new_path="$unix_path"
43962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43964    new_path="$unix_path"
43965  fi
43966
43967    fi
43968
43969    if test "x$new_path" = x; then
43970      # It's still not found. Now this is an unrecoverable error.
43971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43972$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43973      has_space=`$ECHO "$complete" | $GREP " "`
43974      if test "x$has_space" != x; then
43975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43977      fi
43978      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43979    fi
43980  fi
43981
43982  # Now new_path has a complete unix path to the binary
43983  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43984    # Keep paths in /bin as-is, but remove trailing .exe if any
43985    new_path="${new_path/%.exe/}"
43986    # Do not save /bin paths to all_fixpath_prefixes!
43987  else
43988    # Not in mixed or Windows style, start by that.
43989    new_path=`cmd //c echo $new_path`
43990
43991  input_path="$new_path"
43992  # Check if we need to convert this using DOS-style short mode. If the path
43993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43994  # take no chances and rewrite it.
43995  # Note: m4 eats our [], so we need to use [ and ] instead.
43996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43997  if test "x$has_forbidden_chars" != x; then
43998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44000  fi
44001
44002    # Output is in $new_path
44003
44004  windows_path="$new_path"
44005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44006    unix_path=`$CYGPATH -u "$windows_path"`
44007    new_path="$unix_path"
44008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44010    new_path="$unix_path"
44011  fi
44012
44013    # remove trailing .exe if any
44014    new_path="${new_path/%.exe/}"
44015
44016    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44017    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44018  fi
44019
44020    else
44021      # We're on a unix platform. Hooray! :)
44022      # First separate the path from the arguments. This will split at the first
44023      # space.
44024      complete="$OBJCOPY"
44025      path="${complete%% *}"
44026      tmp="$complete EOL"
44027      arguments="${tmp#* }"
44028
44029      # Cannot rely on the command "which" here since it doesn't always work.
44030      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44031      if test -z "$is_absolute_path"; then
44032        # Path to executable is not absolute. Find it.
44033        IFS_save="$IFS"
44034        IFS=:
44035        for p in $PATH; do
44036          if test -f "$p/$path" && test -x "$p/$path"; then
44037            new_path="$p/$path"
44038            break
44039          fi
44040        done
44041        IFS="$IFS_save"
44042      else
44043        # This is an absolute path, we can use it without further modifications.
44044        new_path="$path"
44045      fi
44046
44047      if test "x$new_path" = x; then
44048        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44049$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44050        has_space=`$ECHO "$complete" | $GREP " "`
44051        if test "x$has_space" != x; then
44052          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44053$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44054        fi
44055        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44056      fi
44057    fi
44058
44059    # Now join together the path and the arguments once again
44060    if test "x$arguments" != xEOL; then
44061      new_complete="$new_path ${arguments% *}"
44062    else
44063      new_complete="$new_path"
44064    fi
44065
44066    if test "x$complete" != "x$new_complete"; then
44067      OBJCOPY="$new_complete"
44068      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
44069$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
44070    fi
44071  fi
44072
44073      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
44074        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
44075        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
44076        # - version number is last blank separate word on first line
44077        # - version number formats that have been seen:
44078        #   - <major>.<minor>
44079        #   - <major>.<minor>.<micro>
44080        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
44081        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
44082         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
44083              -e 's/.* //' \
44084              -e '/^[01]\./b bad' \
44085              -e '/^2\./{' \
44086              -e '  s/^2\.//' \
44087              -e '  /^[0-9]$/b bad' \
44088              -e '  /^[0-9]\./b bad' \
44089              -e '  /^1[0-9]$/b bad' \
44090              -e '  /^1[0-9]\./b bad' \
44091              -e '  /^20\./b bad' \
44092              -e '  /^21\.0$/b bad' \
44093              -e '  /^21\.0\./b bad' \
44094              -e '}' \
44095              -e ':good' \
44096              -e 's/.*/VALID_VERSION/p' \
44097              -e 'q' \
44098              -e ':bad' \
44099              -e 's/.*/BAD_VERSION/p' \
44100              -e 'q'`
44101        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
44102          OBJCOPY=
44103          { $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
44104$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
44105          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
44106$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
44107          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
44108$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
44109          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
44110$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
44111          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
44112$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
44113        fi
44114      fi
44115    fi
44116  fi
44117
44118
44119
44120  # Publish this variable in the help.
44121
44122
44123  if [ -z "${OBJDUMP+x}" ]; then
44124    # The variable is not set by user, try to locate tool using the code snippet
44125    if test -n "$ac_tool_prefix"; then
44126  for ac_prog in gobjdump objdump
44127  do
44128    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44129set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44131$as_echo_n "checking for $ac_word... " >&6; }
44132if ${ac_cv_prog_OBJDUMP+:} false; then :
44133  $as_echo_n "(cached) " >&6
44134else
44135  if test -n "$OBJDUMP"; then
44136  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44137else
44138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44139for as_dir in $PATH
44140do
44141  IFS=$as_save_IFS
44142  test -z "$as_dir" && as_dir=.
44143    for ac_exec_ext in '' $ac_executable_extensions; do
44144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44145    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44147    break 2
44148  fi
44149done
44150  done
44151IFS=$as_save_IFS
44152
44153fi
44154fi
44155OBJDUMP=$ac_cv_prog_OBJDUMP
44156if test -n "$OBJDUMP"; then
44157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44158$as_echo "$OBJDUMP" >&6; }
44159else
44160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44161$as_echo "no" >&6; }
44162fi
44163
44164
44165    test -n "$OBJDUMP" && break
44166  done
44167fi
44168if test -z "$OBJDUMP"; then
44169  ac_ct_OBJDUMP=$OBJDUMP
44170  for ac_prog in gobjdump objdump
44171do
44172  # Extract the first word of "$ac_prog", so it can be a program name with args.
44173set dummy $ac_prog; ac_word=$2
44174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44175$as_echo_n "checking for $ac_word... " >&6; }
44176if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44177  $as_echo_n "(cached) " >&6
44178else
44179  if test -n "$ac_ct_OBJDUMP"; then
44180  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44181else
44182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44183for as_dir in $PATH
44184do
44185  IFS=$as_save_IFS
44186  test -z "$as_dir" && as_dir=.
44187    for ac_exec_ext in '' $ac_executable_extensions; do
44188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44189    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44191    break 2
44192  fi
44193done
44194  done
44195IFS=$as_save_IFS
44196
44197fi
44198fi
44199ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44200if test -n "$ac_ct_OBJDUMP"; then
44201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44202$as_echo "$ac_ct_OBJDUMP" >&6; }
44203else
44204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44205$as_echo "no" >&6; }
44206fi
44207
44208
44209  test -n "$ac_ct_OBJDUMP" && break
44210done
44211
44212  if test "x$ac_ct_OBJDUMP" = x; then
44213    OBJDUMP=""
44214  else
44215    case $cross_compiling:$ac_tool_warned in
44216yes:)
44217{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44218$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44219ac_tool_warned=yes ;;
44220esac
44221    OBJDUMP=$ac_ct_OBJDUMP
44222  fi
44223fi
44224
44225  else
44226    # The variable is set, but is it from the command line or the environment?
44227
44228    # Try to remove the string !OBJDUMP! from our list.
44229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44231      # If it failed, the variable was not from the command line. Ignore it,
44232      # but warn the user (except for BASH, which is always set by the calling BASH).
44233      if test "xOBJDUMP" != xBASH; then
44234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44235$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44236      fi
44237      # Try to locate tool using the code snippet
44238      if test -n "$ac_tool_prefix"; then
44239  for ac_prog in gobjdump objdump
44240  do
44241    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44242set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44244$as_echo_n "checking for $ac_word... " >&6; }
44245if ${ac_cv_prog_OBJDUMP+:} false; then :
44246  $as_echo_n "(cached) " >&6
44247else
44248  if test -n "$OBJDUMP"; then
44249  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44250else
44251as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44252for as_dir in $PATH
44253do
44254  IFS=$as_save_IFS
44255  test -z "$as_dir" && as_dir=.
44256    for ac_exec_ext in '' $ac_executable_extensions; do
44257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44258    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44260    break 2
44261  fi
44262done
44263  done
44264IFS=$as_save_IFS
44265
44266fi
44267fi
44268OBJDUMP=$ac_cv_prog_OBJDUMP
44269if test -n "$OBJDUMP"; then
44270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44271$as_echo "$OBJDUMP" >&6; }
44272else
44273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44274$as_echo "no" >&6; }
44275fi
44276
44277
44278    test -n "$OBJDUMP" && break
44279  done
44280fi
44281if test -z "$OBJDUMP"; then
44282  ac_ct_OBJDUMP=$OBJDUMP
44283  for ac_prog in gobjdump objdump
44284do
44285  # Extract the first word of "$ac_prog", so it can be a program name with args.
44286set dummy $ac_prog; ac_word=$2
44287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44288$as_echo_n "checking for $ac_word... " >&6; }
44289if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44290  $as_echo_n "(cached) " >&6
44291else
44292  if test -n "$ac_ct_OBJDUMP"; then
44293  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44294else
44295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44296for as_dir in $PATH
44297do
44298  IFS=$as_save_IFS
44299  test -z "$as_dir" && as_dir=.
44300    for ac_exec_ext in '' $ac_executable_extensions; do
44301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44302    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44304    break 2
44305  fi
44306done
44307  done
44308IFS=$as_save_IFS
44309
44310fi
44311fi
44312ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44313if test -n "$ac_ct_OBJDUMP"; then
44314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44315$as_echo "$ac_ct_OBJDUMP" >&6; }
44316else
44317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44318$as_echo "no" >&6; }
44319fi
44320
44321
44322  test -n "$ac_ct_OBJDUMP" && break
44323done
44324
44325  if test "x$ac_ct_OBJDUMP" = x; then
44326    OBJDUMP=""
44327  else
44328    case $cross_compiling:$ac_tool_warned in
44329yes:)
44330{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44331$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44332ac_tool_warned=yes ;;
44333esac
44334    OBJDUMP=$ac_ct_OBJDUMP
44335  fi
44336fi
44337
44338    else
44339      # If it succeeded, then it was overridden by the user. We will use it
44340      # for the tool.
44341
44342      # First remove it from the list of overridden variables, so we can test
44343      # for unknown variables in the end.
44344      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44345
44346      # Check if we try to supply an empty value
44347      if test "x$OBJDUMP" = x; then
44348        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44349$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44350        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44351$as_echo_n "checking for OBJDUMP... " >&6; }
44352        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44353$as_echo "disabled" >&6; }
44354      else
44355        # Check if the provided tool contains a complete path.
44356        tool_specified="$OBJDUMP"
44357        tool_basename="${tool_specified##*/}"
44358        if test "x$tool_basename" = "x$tool_specified"; then
44359          # A command without a complete path is provided, search $PATH.
44360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44361$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44362          # Extract the first word of "$tool_basename", so it can be a program name with args.
44363set dummy $tool_basename; ac_word=$2
44364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44365$as_echo_n "checking for $ac_word... " >&6; }
44366if ${ac_cv_path_OBJDUMP+:} false; then :
44367  $as_echo_n "(cached) " >&6
44368else
44369  case $OBJDUMP in
44370  [\\/]* | ?:[\\/]*)
44371  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44372  ;;
44373  *)
44374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44375for as_dir in $PATH
44376do
44377  IFS=$as_save_IFS
44378  test -z "$as_dir" && as_dir=.
44379    for ac_exec_ext in '' $ac_executable_extensions; do
44380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44381    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44383    break 2
44384  fi
44385done
44386  done
44387IFS=$as_save_IFS
44388
44389  ;;
44390esac
44391fi
44392OBJDUMP=$ac_cv_path_OBJDUMP
44393if test -n "$OBJDUMP"; then
44394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44395$as_echo "$OBJDUMP" >&6; }
44396else
44397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44398$as_echo "no" >&6; }
44399fi
44400
44401
44402          if test "x$OBJDUMP" = x; then
44403            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44404          fi
44405        else
44406          # Otherwise we believe it is a complete path. Use it as it is.
44407          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44408$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44409          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44410$as_echo_n "checking for OBJDUMP... " >&6; }
44411          if test ! -x "$tool_specified"; then
44412            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44413$as_echo "not found" >&6; }
44414            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44415          fi
44416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44417$as_echo "$tool_specified" >&6; }
44418        fi
44419      fi
44420    fi
44421
44422  fi
44423
44424
44425  if test "x$OBJDUMP" != x; then
44426    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44427    # bails if argument is missing.
44428
44429  # Only process if variable expands to non-empty
44430
44431  if test "x$OBJDUMP" != x; then
44432    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44433
44434  # First separate the path from the arguments. This will split at the first
44435  # space.
44436  complete="$OBJDUMP"
44437  path="${complete%% *}"
44438  tmp="$complete EOL"
44439  arguments="${tmp#* }"
44440
44441  # Input might be given as Windows format, start by converting to
44442  # unix format.
44443  new_path=`$CYGPATH -u "$path"`
44444
44445  # Now try to locate executable using which
44446  new_path=`$WHICH "$new_path" 2> /dev/null`
44447  # bat and cmd files are not always considered executable in cygwin causing which
44448  # to not find them
44449  if test "x$new_path" = x \
44450      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44451      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44452    new_path=`$CYGPATH -u "$path"`
44453  fi
44454  if test "x$new_path" = x; then
44455    # Oops. Which didn't find the executable.
44456    # The splitting of arguments from the executable at a space might have been incorrect,
44457    # since paths with space are more likely in Windows. Give it another try with the whole
44458    # argument.
44459    path="$complete"
44460    arguments="EOL"
44461    new_path=`$CYGPATH -u "$path"`
44462    new_path=`$WHICH "$new_path" 2> /dev/null`
44463    # bat and cmd files are not always considered executable in cygwin causing which
44464    # to not find them
44465    if test "x$new_path" = x \
44466        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44467        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44468      new_path=`$CYGPATH -u "$path"`
44469    fi
44470    if test "x$new_path" = x; then
44471      # It's still not found. Now this is an unrecoverable error.
44472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44473$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44474      has_space=`$ECHO "$complete" | $GREP " "`
44475      if test "x$has_space" != x; then
44476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44478      fi
44479      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44480    fi
44481  fi
44482
44483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44486  # "foo.exe" is OK but "foo" is an error.
44487  #
44488  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44489  # It is also a way to make sure we got the proper file name for the real test later on.
44490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44491  if test "x$test_shortpath" = x; then
44492    # Short path failed, file does not exist as specified.
44493    # Try adding .exe or .cmd
44494    if test -f "${new_path}.exe"; then
44495      input_to_shortpath="${new_path}.exe"
44496    elif test -f "${new_path}.cmd"; then
44497      input_to_shortpath="${new_path}.cmd"
44498    else
44499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44500$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44501      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44502$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44503      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44504    fi
44505  else
44506    input_to_shortpath="$new_path"
44507  fi
44508
44509  # Call helper function which possibly converts this using DOS-style short mode.
44510  # If so, the updated path is stored in $new_path.
44511  new_path="$input_to_shortpath"
44512
44513  input_path="$input_to_shortpath"
44514  # Check if we need to convert this using DOS-style short mode. If the path
44515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44516  # take no chances and rewrite it.
44517  # Note: m4 eats our [], so we need to use [ and ] instead.
44518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44519  if test "x$has_forbidden_chars" != x; then
44520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44524      # Going to short mode and back again did indeed matter. Since short mode is
44525      # case insensitive, let's make it lowercase to improve readability.
44526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44527      # Now convert it back to Unix-style (cygpath)
44528      input_path=`$CYGPATH -u "$shortmode_path"`
44529      new_path="$input_path"
44530    fi
44531  fi
44532
44533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44534  if test "x$test_cygdrive_prefix" = x; then
44535    # As a simple fix, exclude /usr/bin since it's not a real path.
44536    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44538      # a path prefixed by /cygdrive for fixpath to work.
44539      new_path="$CYGWIN_ROOT_PATH$input_path"
44540    fi
44541  fi
44542
44543  # remove trailing .exe if any
44544  new_path="${new_path/%.exe/}"
44545
44546    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44547
44548  # First separate the path from the arguments. This will split at the first
44549  # space.
44550  complete="$OBJDUMP"
44551  path="${complete%% *}"
44552  tmp="$complete EOL"
44553  arguments="${tmp#* }"
44554
44555  # Input might be given as Windows format, start by converting to
44556  # unix format.
44557  new_path="$path"
44558
44559  windows_path="$new_path"
44560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44561    unix_path=`$CYGPATH -u "$windows_path"`
44562    new_path="$unix_path"
44563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44565    new_path="$unix_path"
44566  fi
44567
44568
44569  # Now try to locate executable using which
44570  new_path=`$WHICH "$new_path" 2> /dev/null`
44571
44572  if test "x$new_path" = x; then
44573    # Oops. Which didn't find the executable.
44574    # The splitting of arguments from the executable at a space might have been incorrect,
44575    # since paths with space are more likely in Windows. Give it another try with the whole
44576    # argument.
44577    path="$complete"
44578    arguments="EOL"
44579    new_path="$path"
44580
44581  windows_path="$new_path"
44582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44583    unix_path=`$CYGPATH -u "$windows_path"`
44584    new_path="$unix_path"
44585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44587    new_path="$unix_path"
44588  fi
44589
44590
44591    new_path=`$WHICH "$new_path" 2> /dev/null`
44592    # bat and cmd files are not always considered executable in MSYS causing which
44593    # to not find them
44594    if test "x$new_path" = x \
44595        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44596        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44597      new_path="$path"
44598
44599  windows_path="$new_path"
44600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44601    unix_path=`$CYGPATH -u "$windows_path"`
44602    new_path="$unix_path"
44603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44605    new_path="$unix_path"
44606  fi
44607
44608    fi
44609
44610    if test "x$new_path" = x; then
44611      # It's still not found. Now this is an unrecoverable error.
44612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44613$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44614      has_space=`$ECHO "$complete" | $GREP " "`
44615      if test "x$has_space" != x; then
44616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44618      fi
44619      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44620    fi
44621  fi
44622
44623  # Now new_path has a complete unix path to the binary
44624  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44625    # Keep paths in /bin as-is, but remove trailing .exe if any
44626    new_path="${new_path/%.exe/}"
44627    # Do not save /bin paths to all_fixpath_prefixes!
44628  else
44629    # Not in mixed or Windows style, start by that.
44630    new_path=`cmd //c echo $new_path`
44631
44632  input_path="$new_path"
44633  # Check if we need to convert this using DOS-style short mode. If the path
44634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44635  # take no chances and rewrite it.
44636  # Note: m4 eats our [], so we need to use [ and ] instead.
44637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44638  if test "x$has_forbidden_chars" != x; then
44639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44641  fi
44642
44643    # Output is in $new_path
44644
44645  windows_path="$new_path"
44646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44647    unix_path=`$CYGPATH -u "$windows_path"`
44648    new_path="$unix_path"
44649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44651    new_path="$unix_path"
44652  fi
44653
44654    # remove trailing .exe if any
44655    new_path="${new_path/%.exe/}"
44656
44657    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44658    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44659  fi
44660
44661    else
44662      # We're on a unix platform. Hooray! :)
44663      # First separate the path from the arguments. This will split at the first
44664      # space.
44665      complete="$OBJDUMP"
44666      path="${complete%% *}"
44667      tmp="$complete EOL"
44668      arguments="${tmp#* }"
44669
44670      # Cannot rely on the command "which" here since it doesn't always work.
44671      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44672      if test -z "$is_absolute_path"; then
44673        # Path to executable is not absolute. Find it.
44674        IFS_save="$IFS"
44675        IFS=:
44676        for p in $PATH; do
44677          if test -f "$p/$path" && test -x "$p/$path"; then
44678            new_path="$p/$path"
44679            break
44680          fi
44681        done
44682        IFS="$IFS_save"
44683      else
44684        # This is an absolute path, we can use it without further modifications.
44685        new_path="$path"
44686      fi
44687
44688      if test "x$new_path" = x; then
44689        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44690$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44691        has_space=`$ECHO "$complete" | $GREP " "`
44692        if test "x$has_space" != x; then
44693          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44694$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44695        fi
44696        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44697      fi
44698    fi
44699
44700    # Now join together the path and the arguments once again
44701    if test "x$arguments" != xEOL; then
44702      new_complete="$new_path ${arguments% *}"
44703    else
44704      new_complete="$new_path"
44705    fi
44706
44707    if test "x$complete" != "x$new_complete"; then
44708      OBJDUMP="$new_complete"
44709      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44710$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44711    fi
44712  fi
44713
44714  fi
44715
44716
44717  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44718  # to remain in place. Otherwise the compiler will not work in some siutations
44719  # in later configure checks.
44720  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44721    PATH="$OLD_PATH"
44722  fi
44723
44724  # Restore the flags to the user specified values.
44725  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44726  CFLAGS="$ORG_CFLAGS"
44727  CXXFLAGS="$ORG_CXXFLAGS"
44728
44729
44730# Finally do some processing after the detection phase
44731
44732  if test "x$COMPILE_TYPE" = "xcross"; then
44733    # Now we need to find a C/C++ compiler that can build executables for the
44734    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44735    # used once. Also, we need to do this without adding a tools dir to the
44736    # path, otherwise we might pick up cross-compilers which don't use standard
44737    # naming.
44738
44739    OLDPATH="$PATH"
44740
44741
44742# Check whether --with-build-devkit was given.
44743if test "${with_build_devkit+set}" = set; then :
44744  withval=$with_build_devkit;
44745fi
44746
44747    if test "x$with_build_devkit" = "xyes"; then
44748      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44749    elif test -n "$with_build_devkit"; then
44750      if test ! -d "$with_build_devkit"; then
44751        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44752      else
44753
44754  # Only process if variable expands to non-empty
44755
44756  if test "x$with_build_devkit" != x; then
44757    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44758
44759  # Input might be given as Windows format, start by converting to
44760  # unix format.
44761  path="$with_build_devkit"
44762  new_path=`$CYGPATH -u "$path"`
44763
44764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44767  # "foo.exe" is OK but "foo" is an error.
44768  #
44769  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44770  # It is also a way to make sure we got the proper file name for the real test later on.
44771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44772  if test "x$test_shortpath" = x; then
44773    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44774$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44775    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44776  fi
44777
44778  # Call helper function which possibly converts this using DOS-style short mode.
44779  # If so, the updated path is stored in $new_path.
44780
44781  input_path="$new_path"
44782  # Check if we need to convert this using DOS-style short mode. If the path
44783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44784  # take no chances and rewrite it.
44785  # Note: m4 eats our [], so we need to use [ and ] instead.
44786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44787  if test "x$has_forbidden_chars" != x; then
44788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44792      # Going to short mode and back again did indeed matter. Since short mode is
44793      # case insensitive, let's make it lowercase to improve readability.
44794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44795      # Now convert it back to Unix-style (cygpath)
44796      input_path=`$CYGPATH -u "$shortmode_path"`
44797      new_path="$input_path"
44798    fi
44799  fi
44800
44801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44802  if test "x$test_cygdrive_prefix" = x; then
44803    # As a simple fix, exclude /usr/bin since it's not a real path.
44804    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44806      # a path prefixed by /cygdrive for fixpath to work.
44807      new_path="$CYGWIN_ROOT_PATH$input_path"
44808    fi
44809  fi
44810
44811
44812  if test "x$path" != "x$new_path"; then
44813    with_build_devkit="$new_path"
44814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44815$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44816  fi
44817
44818    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44819
44820  path="$with_build_devkit"
44821  has_colon=`$ECHO $path | $GREP ^.:`
44822  new_path="$path"
44823  if test "x$has_colon" = x; then
44824    # Not in mixed or Windows style, start by that.
44825    new_path=`cmd //c echo $path`
44826  fi
44827
44828
44829  input_path="$new_path"
44830  # Check if we need to convert this using DOS-style short mode. If the path
44831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44832  # take no chances and rewrite it.
44833  # Note: m4 eats our [], so we need to use [ and ] instead.
44834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44835  if test "x$has_forbidden_chars" != x; then
44836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44838  fi
44839
44840
44841  windows_path="$new_path"
44842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44843    unix_path=`$CYGPATH -u "$windows_path"`
44844    new_path="$unix_path"
44845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44847    new_path="$unix_path"
44848  fi
44849
44850  if test "x$path" != "x$new_path"; then
44851    with_build_devkit="$new_path"
44852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44853$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44854  fi
44855
44856  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44857  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44858
44859    else
44860      # We're on a unix platform. Hooray! :)
44861      path="$with_build_devkit"
44862      has_space=`$ECHO "$path" | $GREP " "`
44863      if test "x$has_space" != x; then
44864        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44865$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44866        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44867      fi
44868
44869      # Use eval to expand a potential ~
44870      eval path="$path"
44871      if test ! -f "$path" && test ! -d "$path"; then
44872        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44873      fi
44874
44875      if test -d "$path"; then
44876        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44877      else
44878        dir="`$DIRNAME "$path"`"
44879        base="`$BASENAME "$path"`"
44880        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44881      fi
44882    fi
44883  fi
44884
44885        BUILD_DEVKIT_ROOT="$with_build_devkit"
44886        # Check for a meta data info file in the root of the devkit
44887        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44888          # Process devkit.info so that existing devkit variables are not
44889          # modified by this
44890          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44891              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44892              -e "s/\$host/\$build/g" \
44893              $BUILD_DEVKIT_ROOT/devkit.info \
44894              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44895          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44896          # This potentially sets the following:
44897          # A descriptive name of the devkit
44898
44899  if test "x$BUILD_DEVKIT_NAME" = x; then
44900    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44901  fi
44902
44903          # Corresponds to --with-extra-path
44904
44905  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44906    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44907  fi
44908
44909          # Corresponds to --with-toolchain-path
44910
44911  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44912    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44913  fi
44914
44915          # Corresponds to --with-sysroot
44916
44917  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44918    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44919  fi
44920
44921          # Skip the Window specific parts
44922        fi
44923
44924        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44925$as_echo_n "checking for build platform devkit... " >&6; }
44926        if test "x$BUILD_DEVKIT_NAME" != x; then
44927          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44928$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44929        else
44930          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44931$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44932        fi
44933
44934        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44935
44936  if test "x$BUILD_SYSROOT" != "x"; then
44937    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44938      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44939        # Solaris Studio does not have a concept of sysroot. Instead we must
44940        # make sure the default include and lib dirs are appended to each
44941        # compile and link command line. Must also add -I-xbuiltin to enable
44942        # inlining of system functions and intrinsics.
44943        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44944        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44945            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44946      fi
44947    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44948      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44949      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44950    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44951      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44952      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44953    fi
44954    # The global CFLAGS and LDFLAGS variables need these for configure to function
44955    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44956    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44957    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44958    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44959  fi
44960
44961  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44962    # We also need -iframework<path>/System/Library/Frameworks
44963    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44964    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44965    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44966    # set this here so it doesn't have to be peppered throughout the forest
44967    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44968    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44969  fi
44970
44971
44972
44973
44974
44975         # Fallback default of just /bin if DEVKIT_PATH is not defined
44976        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44977          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44978        fi
44979        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44980      fi
44981    fi
44982
44983    # FIXME: we should list the discovered compilers as an exclude pattern!
44984    # If we do that, we can do this detection before POST_DETECTION, and still
44985    # find the build compilers in the tools dir, if needed.
44986
44987
44988
44989  # Publish this variable in the help.
44990
44991
44992  if [ -z "${BUILD_CC+x}" ]; then
44993    # The variable is not set by user, try to locate tool using the code snippet
44994    for ac_prog in cl cc gcc
44995do
44996  # Extract the first word of "$ac_prog", so it can be a program name with args.
44997set dummy $ac_prog; ac_word=$2
44998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44999$as_echo_n "checking for $ac_word... " >&6; }
45000if ${ac_cv_path_BUILD_CC+:} false; then :
45001  $as_echo_n "(cached) " >&6
45002else
45003  case $BUILD_CC in
45004  [\\/]* | ?:[\\/]*)
45005  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45006  ;;
45007  *)
45008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45009for as_dir in $PATH
45010do
45011  IFS=$as_save_IFS
45012  test -z "$as_dir" && as_dir=.
45013    for ac_exec_ext in '' $ac_executable_extensions; do
45014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45015    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45017    break 2
45018  fi
45019done
45020  done
45021IFS=$as_save_IFS
45022
45023  ;;
45024esac
45025fi
45026BUILD_CC=$ac_cv_path_BUILD_CC
45027if test -n "$BUILD_CC"; then
45028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45029$as_echo "$BUILD_CC" >&6; }
45030else
45031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45032$as_echo "no" >&6; }
45033fi
45034
45035
45036  test -n "$BUILD_CC" && break
45037done
45038
45039  else
45040    # The variable is set, but is it from the command line or the environment?
45041
45042    # Try to remove the string !BUILD_CC! from our list.
45043    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
45044    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45045      # If it failed, the variable was not from the command line. Ignore it,
45046      # but warn the user (except for BASH, which is always set by the calling BASH).
45047      if test "xBUILD_CC" != xBASH; then
45048        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
45049$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
45050      fi
45051      # Try to locate tool using the code snippet
45052      for ac_prog in cl cc gcc
45053do
45054  # Extract the first word of "$ac_prog", so it can be a program name with args.
45055set dummy $ac_prog; ac_word=$2
45056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45057$as_echo_n "checking for $ac_word... " >&6; }
45058if ${ac_cv_path_BUILD_CC+:} false; then :
45059  $as_echo_n "(cached) " >&6
45060else
45061  case $BUILD_CC in
45062  [\\/]* | ?:[\\/]*)
45063  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45064  ;;
45065  *)
45066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45067for as_dir in $PATH
45068do
45069  IFS=$as_save_IFS
45070  test -z "$as_dir" && as_dir=.
45071    for ac_exec_ext in '' $ac_executable_extensions; do
45072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45073    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45075    break 2
45076  fi
45077done
45078  done
45079IFS=$as_save_IFS
45080
45081  ;;
45082esac
45083fi
45084BUILD_CC=$ac_cv_path_BUILD_CC
45085if test -n "$BUILD_CC"; then
45086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45087$as_echo "$BUILD_CC" >&6; }
45088else
45089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45090$as_echo "no" >&6; }
45091fi
45092
45093
45094  test -n "$BUILD_CC" && break
45095done
45096
45097    else
45098      # If it succeeded, then it was overridden by the user. We will use it
45099      # for the tool.
45100
45101      # First remove it from the list of overridden variables, so we can test
45102      # for unknown variables in the end.
45103      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45104
45105      # Check if we try to supply an empty value
45106      if test "x$BUILD_CC" = x; then
45107        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
45108$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
45109        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45110$as_echo_n "checking for BUILD_CC... " >&6; }
45111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45112$as_echo "disabled" >&6; }
45113      else
45114        # Check if the provided tool contains a complete path.
45115        tool_specified="$BUILD_CC"
45116        tool_basename="${tool_specified##*/}"
45117        if test "x$tool_basename" = "x$tool_specified"; then
45118          # A command without a complete path is provided, search $PATH.
45119          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
45120$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
45121          # Extract the first word of "$tool_basename", so it can be a program name with args.
45122set dummy $tool_basename; ac_word=$2
45123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45124$as_echo_n "checking for $ac_word... " >&6; }
45125if ${ac_cv_path_BUILD_CC+:} false; then :
45126  $as_echo_n "(cached) " >&6
45127else
45128  case $BUILD_CC in
45129  [\\/]* | ?:[\\/]*)
45130  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45131  ;;
45132  *)
45133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45134for as_dir in $PATH
45135do
45136  IFS=$as_save_IFS
45137  test -z "$as_dir" && as_dir=.
45138    for ac_exec_ext in '' $ac_executable_extensions; do
45139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45140    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45142    break 2
45143  fi
45144done
45145  done
45146IFS=$as_save_IFS
45147
45148  ;;
45149esac
45150fi
45151BUILD_CC=$ac_cv_path_BUILD_CC
45152if test -n "$BUILD_CC"; then
45153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45154$as_echo "$BUILD_CC" >&6; }
45155else
45156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45157$as_echo "no" >&6; }
45158fi
45159
45160
45161          if test "x$BUILD_CC" = x; then
45162            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45163          fi
45164        else
45165          # Otherwise we believe it is a complete path. Use it as it is.
45166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
45167$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
45168          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45169$as_echo_n "checking for BUILD_CC... " >&6; }
45170          if test ! -x "$tool_specified"; then
45171            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45172$as_echo "not found" >&6; }
45173            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45174          fi
45175          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45176$as_echo "$tool_specified" >&6; }
45177        fi
45178      fi
45179    fi
45180
45181  fi
45182
45183
45184
45185  if test "x$BUILD_CC" = x; then
45186    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45187  fi
45188
45189
45190
45191  # Only process if variable expands to non-empty
45192
45193  if test "x$BUILD_CC" != x; then
45194    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45195
45196  # First separate the path from the arguments. This will split at the first
45197  # space.
45198  complete="$BUILD_CC"
45199  path="${complete%% *}"
45200  tmp="$complete EOL"
45201  arguments="${tmp#* }"
45202
45203  # Input might be given as Windows format, start by converting to
45204  # unix format.
45205  new_path=`$CYGPATH -u "$path"`
45206
45207  # Now try to locate executable using which
45208  new_path=`$WHICH "$new_path" 2> /dev/null`
45209  # bat and cmd files are not always considered executable in cygwin causing which
45210  # to not find them
45211  if test "x$new_path" = x \
45212      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45213      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45214    new_path=`$CYGPATH -u "$path"`
45215  fi
45216  if test "x$new_path" = x; then
45217    # Oops. Which didn't find the executable.
45218    # The splitting of arguments from the executable at a space might have been incorrect,
45219    # since paths with space are more likely in Windows. Give it another try with the whole
45220    # argument.
45221    path="$complete"
45222    arguments="EOL"
45223    new_path=`$CYGPATH -u "$path"`
45224    new_path=`$WHICH "$new_path" 2> /dev/null`
45225    # bat and cmd files are not always considered executable in cygwin causing which
45226    # to not find them
45227    if test "x$new_path" = x \
45228        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45229        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45230      new_path=`$CYGPATH -u "$path"`
45231    fi
45232    if test "x$new_path" = x; then
45233      # It's still not found. Now this is an unrecoverable error.
45234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45235$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45236      has_space=`$ECHO "$complete" | $GREP " "`
45237      if test "x$has_space" != x; then
45238        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45239$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45240      fi
45241      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45242    fi
45243  fi
45244
45245  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45246  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45247  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45248  # "foo.exe" is OK but "foo" is an error.
45249  #
45250  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45251  # It is also a way to make sure we got the proper file name for the real test later on.
45252  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45253  if test "x$test_shortpath" = x; then
45254    # Short path failed, file does not exist as specified.
45255    # Try adding .exe or .cmd
45256    if test -f "${new_path}.exe"; then
45257      input_to_shortpath="${new_path}.exe"
45258    elif test -f "${new_path}.cmd"; then
45259      input_to_shortpath="${new_path}.cmd"
45260    else
45261      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45262$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45263      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45264$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45265      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45266    fi
45267  else
45268    input_to_shortpath="$new_path"
45269  fi
45270
45271  # Call helper function which possibly converts this using DOS-style short mode.
45272  # If so, the updated path is stored in $new_path.
45273  new_path="$input_to_shortpath"
45274
45275  input_path="$input_to_shortpath"
45276  # Check if we need to convert this using DOS-style short mode. If the path
45277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45278  # take no chances and rewrite it.
45279  # Note: m4 eats our [], so we need to use [ and ] instead.
45280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45281  if test "x$has_forbidden_chars" != x; then
45282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45283    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45284    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45285    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45286      # Going to short mode and back again did indeed matter. Since short mode is
45287      # case insensitive, let's make it lowercase to improve readability.
45288      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45289      # Now convert it back to Unix-style (cygpath)
45290      input_path=`$CYGPATH -u "$shortmode_path"`
45291      new_path="$input_path"
45292    fi
45293  fi
45294
45295  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45296  if test "x$test_cygdrive_prefix" = x; then
45297    # As a simple fix, exclude /usr/bin since it's not a real path.
45298    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45299      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45300      # a path prefixed by /cygdrive for fixpath to work.
45301      new_path="$CYGWIN_ROOT_PATH$input_path"
45302    fi
45303  fi
45304
45305  # remove trailing .exe if any
45306  new_path="${new_path/%.exe/}"
45307
45308    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45309
45310  # First separate the path from the arguments. This will split at the first
45311  # space.
45312  complete="$BUILD_CC"
45313  path="${complete%% *}"
45314  tmp="$complete EOL"
45315  arguments="${tmp#* }"
45316
45317  # Input might be given as Windows format, start by converting to
45318  # unix format.
45319  new_path="$path"
45320
45321  windows_path="$new_path"
45322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45323    unix_path=`$CYGPATH -u "$windows_path"`
45324    new_path="$unix_path"
45325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45327    new_path="$unix_path"
45328  fi
45329
45330
45331  # Now try to locate executable using which
45332  new_path=`$WHICH "$new_path" 2> /dev/null`
45333
45334  if test "x$new_path" = x; then
45335    # Oops. Which didn't find the executable.
45336    # The splitting of arguments from the executable at a space might have been incorrect,
45337    # since paths with space are more likely in Windows. Give it another try with the whole
45338    # argument.
45339    path="$complete"
45340    arguments="EOL"
45341    new_path="$path"
45342
45343  windows_path="$new_path"
45344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45345    unix_path=`$CYGPATH -u "$windows_path"`
45346    new_path="$unix_path"
45347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45349    new_path="$unix_path"
45350  fi
45351
45352
45353    new_path=`$WHICH "$new_path" 2> /dev/null`
45354    # bat and cmd files are not always considered executable in MSYS causing which
45355    # to not find them
45356    if test "x$new_path" = x \
45357        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45358        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45359      new_path="$path"
45360
45361  windows_path="$new_path"
45362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45363    unix_path=`$CYGPATH -u "$windows_path"`
45364    new_path="$unix_path"
45365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45367    new_path="$unix_path"
45368  fi
45369
45370    fi
45371
45372    if test "x$new_path" = x; then
45373      # It's still not found. Now this is an unrecoverable error.
45374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45375$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45376      has_space=`$ECHO "$complete" | $GREP " "`
45377      if test "x$has_space" != x; then
45378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45380      fi
45381      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45382    fi
45383  fi
45384
45385  # Now new_path has a complete unix path to the binary
45386  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45387    # Keep paths in /bin as-is, but remove trailing .exe if any
45388    new_path="${new_path/%.exe/}"
45389    # Do not save /bin paths to all_fixpath_prefixes!
45390  else
45391    # Not in mixed or Windows style, start by that.
45392    new_path=`cmd //c echo $new_path`
45393
45394  input_path="$new_path"
45395  # Check if we need to convert this using DOS-style short mode. If the path
45396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45397  # take no chances and rewrite it.
45398  # Note: m4 eats our [], so we need to use [ and ] instead.
45399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45400  if test "x$has_forbidden_chars" != x; then
45401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45403  fi
45404
45405    # Output is in $new_path
45406
45407  windows_path="$new_path"
45408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45409    unix_path=`$CYGPATH -u "$windows_path"`
45410    new_path="$unix_path"
45411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45413    new_path="$unix_path"
45414  fi
45415
45416    # remove trailing .exe if any
45417    new_path="${new_path/%.exe/}"
45418
45419    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45420    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45421  fi
45422
45423    else
45424      # We're on a unix platform. Hooray! :)
45425      # First separate the path from the arguments. This will split at the first
45426      # space.
45427      complete="$BUILD_CC"
45428      path="${complete%% *}"
45429      tmp="$complete EOL"
45430      arguments="${tmp#* }"
45431
45432      # Cannot rely on the command "which" here since it doesn't always work.
45433      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45434      if test -z "$is_absolute_path"; then
45435        # Path to executable is not absolute. Find it.
45436        IFS_save="$IFS"
45437        IFS=:
45438        for p in $PATH; do
45439          if test -f "$p/$path" && test -x "$p/$path"; then
45440            new_path="$p/$path"
45441            break
45442          fi
45443        done
45444        IFS="$IFS_save"
45445      else
45446        # This is an absolute path, we can use it without further modifications.
45447        new_path="$path"
45448      fi
45449
45450      if test "x$new_path" = x; then
45451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45452$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45453        has_space=`$ECHO "$complete" | $GREP " "`
45454        if test "x$has_space" != x; then
45455          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45456$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45457        fi
45458        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45459      fi
45460    fi
45461
45462    # Now join together the path and the arguments once again
45463    if test "x$arguments" != xEOL; then
45464      new_complete="$new_path ${arguments% *}"
45465    else
45466      new_complete="$new_path"
45467    fi
45468
45469    if test "x$complete" != "x$new_complete"; then
45470      BUILD_CC="$new_complete"
45471      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45472$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45473    fi
45474  fi
45475
45476
45477
45478
45479  # Publish this variable in the help.
45480
45481
45482  if [ -z "${BUILD_CXX+x}" ]; then
45483    # The variable is not set by user, try to locate tool using the code snippet
45484    for ac_prog in cl CC g++
45485do
45486  # Extract the first word of "$ac_prog", so it can be a program name with args.
45487set dummy $ac_prog; ac_word=$2
45488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45489$as_echo_n "checking for $ac_word... " >&6; }
45490if ${ac_cv_path_BUILD_CXX+:} false; then :
45491  $as_echo_n "(cached) " >&6
45492else
45493  case $BUILD_CXX in
45494  [\\/]* | ?:[\\/]*)
45495  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45496  ;;
45497  *)
45498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45499for as_dir in $PATH
45500do
45501  IFS=$as_save_IFS
45502  test -z "$as_dir" && as_dir=.
45503    for ac_exec_ext in '' $ac_executable_extensions; do
45504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45505    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45507    break 2
45508  fi
45509done
45510  done
45511IFS=$as_save_IFS
45512
45513  ;;
45514esac
45515fi
45516BUILD_CXX=$ac_cv_path_BUILD_CXX
45517if test -n "$BUILD_CXX"; then
45518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45519$as_echo "$BUILD_CXX" >&6; }
45520else
45521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45522$as_echo "no" >&6; }
45523fi
45524
45525
45526  test -n "$BUILD_CXX" && break
45527done
45528
45529  else
45530    # The variable is set, but is it from the command line or the environment?
45531
45532    # Try to remove the string !BUILD_CXX! from our list.
45533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45535      # If it failed, the variable was not from the command line. Ignore it,
45536      # but warn the user (except for BASH, which is always set by the calling BASH).
45537      if test "xBUILD_CXX" != xBASH; then
45538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45539$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45540      fi
45541      # Try to locate tool using the code snippet
45542      for ac_prog in cl CC g++
45543do
45544  # Extract the first word of "$ac_prog", so it can be a program name with args.
45545set dummy $ac_prog; ac_word=$2
45546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45547$as_echo_n "checking for $ac_word... " >&6; }
45548if ${ac_cv_path_BUILD_CXX+:} false; then :
45549  $as_echo_n "(cached) " >&6
45550else
45551  case $BUILD_CXX in
45552  [\\/]* | ?:[\\/]*)
45553  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45554  ;;
45555  *)
45556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45557for as_dir in $PATH
45558do
45559  IFS=$as_save_IFS
45560  test -z "$as_dir" && as_dir=.
45561    for ac_exec_ext in '' $ac_executable_extensions; do
45562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45563    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45565    break 2
45566  fi
45567done
45568  done
45569IFS=$as_save_IFS
45570
45571  ;;
45572esac
45573fi
45574BUILD_CXX=$ac_cv_path_BUILD_CXX
45575if test -n "$BUILD_CXX"; then
45576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45577$as_echo "$BUILD_CXX" >&6; }
45578else
45579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45580$as_echo "no" >&6; }
45581fi
45582
45583
45584  test -n "$BUILD_CXX" && break
45585done
45586
45587    else
45588      # If it succeeded, then it was overridden by the user. We will use it
45589      # for the tool.
45590
45591      # First remove it from the list of overridden variables, so we can test
45592      # for unknown variables in the end.
45593      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45594
45595      # Check if we try to supply an empty value
45596      if test "x$BUILD_CXX" = x; then
45597        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45598$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45599        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45600$as_echo_n "checking for BUILD_CXX... " >&6; }
45601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45602$as_echo "disabled" >&6; }
45603      else
45604        # Check if the provided tool contains a complete path.
45605        tool_specified="$BUILD_CXX"
45606        tool_basename="${tool_specified##*/}"
45607        if test "x$tool_basename" = "x$tool_specified"; then
45608          # A command without a complete path is provided, search $PATH.
45609          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45610$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45611          # Extract the first word of "$tool_basename", so it can be a program name with args.
45612set dummy $tool_basename; ac_word=$2
45613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45614$as_echo_n "checking for $ac_word... " >&6; }
45615if ${ac_cv_path_BUILD_CXX+:} false; then :
45616  $as_echo_n "(cached) " >&6
45617else
45618  case $BUILD_CXX in
45619  [\\/]* | ?:[\\/]*)
45620  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45621  ;;
45622  *)
45623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45624for as_dir in $PATH
45625do
45626  IFS=$as_save_IFS
45627  test -z "$as_dir" && as_dir=.
45628    for ac_exec_ext in '' $ac_executable_extensions; do
45629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45630    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45632    break 2
45633  fi
45634done
45635  done
45636IFS=$as_save_IFS
45637
45638  ;;
45639esac
45640fi
45641BUILD_CXX=$ac_cv_path_BUILD_CXX
45642if test -n "$BUILD_CXX"; then
45643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45644$as_echo "$BUILD_CXX" >&6; }
45645else
45646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45647$as_echo "no" >&6; }
45648fi
45649
45650
45651          if test "x$BUILD_CXX" = x; then
45652            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45653          fi
45654        else
45655          # Otherwise we believe it is a complete path. Use it as it is.
45656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45657$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45658          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45659$as_echo_n "checking for BUILD_CXX... " >&6; }
45660          if test ! -x "$tool_specified"; then
45661            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45662$as_echo "not found" >&6; }
45663            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45664          fi
45665          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45666$as_echo "$tool_specified" >&6; }
45667        fi
45668      fi
45669    fi
45670
45671  fi
45672
45673
45674
45675  if test "x$BUILD_CXX" = x; then
45676    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45677  fi
45678
45679
45680
45681  # Only process if variable expands to non-empty
45682
45683  if test "x$BUILD_CXX" != x; then
45684    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45685
45686  # First separate the path from the arguments. This will split at the first
45687  # space.
45688  complete="$BUILD_CXX"
45689  path="${complete%% *}"
45690  tmp="$complete EOL"
45691  arguments="${tmp#* }"
45692
45693  # Input might be given as Windows format, start by converting to
45694  # unix format.
45695  new_path=`$CYGPATH -u "$path"`
45696
45697  # Now try to locate executable using which
45698  new_path=`$WHICH "$new_path" 2> /dev/null`
45699  # bat and cmd files are not always considered executable in cygwin causing which
45700  # to not find them
45701  if test "x$new_path" = x \
45702      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45703      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45704    new_path=`$CYGPATH -u "$path"`
45705  fi
45706  if test "x$new_path" = x; then
45707    # Oops. Which didn't find the executable.
45708    # The splitting of arguments from the executable at a space might have been incorrect,
45709    # since paths with space are more likely in Windows. Give it another try with the whole
45710    # argument.
45711    path="$complete"
45712    arguments="EOL"
45713    new_path=`$CYGPATH -u "$path"`
45714    new_path=`$WHICH "$new_path" 2> /dev/null`
45715    # bat and cmd files are not always considered executable in cygwin causing which
45716    # to not find them
45717    if test "x$new_path" = x \
45718        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45719        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45720      new_path=`$CYGPATH -u "$path"`
45721    fi
45722    if test "x$new_path" = x; then
45723      # It's still not found. Now this is an unrecoverable error.
45724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45725$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45726      has_space=`$ECHO "$complete" | $GREP " "`
45727      if test "x$has_space" != x; then
45728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45730      fi
45731      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45732    fi
45733  fi
45734
45735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45738  # "foo.exe" is OK but "foo" is an error.
45739  #
45740  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45741  # It is also a way to make sure we got the proper file name for the real test later on.
45742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45743  if test "x$test_shortpath" = x; then
45744    # Short path failed, file does not exist as specified.
45745    # Try adding .exe or .cmd
45746    if test -f "${new_path}.exe"; then
45747      input_to_shortpath="${new_path}.exe"
45748    elif test -f "${new_path}.cmd"; then
45749      input_to_shortpath="${new_path}.cmd"
45750    else
45751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45752$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45753      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45754$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45755      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45756    fi
45757  else
45758    input_to_shortpath="$new_path"
45759  fi
45760
45761  # Call helper function which possibly converts this using DOS-style short mode.
45762  # If so, the updated path is stored in $new_path.
45763  new_path="$input_to_shortpath"
45764
45765  input_path="$input_to_shortpath"
45766  # Check if we need to convert this using DOS-style short mode. If the path
45767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45768  # take no chances and rewrite it.
45769  # Note: m4 eats our [], so we need to use [ and ] instead.
45770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45771  if test "x$has_forbidden_chars" != x; then
45772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45776      # Going to short mode and back again did indeed matter. Since short mode is
45777      # case insensitive, let's make it lowercase to improve readability.
45778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45779      # Now convert it back to Unix-style (cygpath)
45780      input_path=`$CYGPATH -u "$shortmode_path"`
45781      new_path="$input_path"
45782    fi
45783  fi
45784
45785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45786  if test "x$test_cygdrive_prefix" = x; then
45787    # As a simple fix, exclude /usr/bin since it's not a real path.
45788    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45790      # a path prefixed by /cygdrive for fixpath to work.
45791      new_path="$CYGWIN_ROOT_PATH$input_path"
45792    fi
45793  fi
45794
45795  # remove trailing .exe if any
45796  new_path="${new_path/%.exe/}"
45797
45798    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45799
45800  # First separate the path from the arguments. This will split at the first
45801  # space.
45802  complete="$BUILD_CXX"
45803  path="${complete%% *}"
45804  tmp="$complete EOL"
45805  arguments="${tmp#* }"
45806
45807  # Input might be given as Windows format, start by converting to
45808  # unix format.
45809  new_path="$path"
45810
45811  windows_path="$new_path"
45812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45813    unix_path=`$CYGPATH -u "$windows_path"`
45814    new_path="$unix_path"
45815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45817    new_path="$unix_path"
45818  fi
45819
45820
45821  # Now try to locate executable using which
45822  new_path=`$WHICH "$new_path" 2> /dev/null`
45823
45824  if test "x$new_path" = x; then
45825    # Oops. Which didn't find the executable.
45826    # The splitting of arguments from the executable at a space might have been incorrect,
45827    # since paths with space are more likely in Windows. Give it another try with the whole
45828    # argument.
45829    path="$complete"
45830    arguments="EOL"
45831    new_path="$path"
45832
45833  windows_path="$new_path"
45834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45835    unix_path=`$CYGPATH -u "$windows_path"`
45836    new_path="$unix_path"
45837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45839    new_path="$unix_path"
45840  fi
45841
45842
45843    new_path=`$WHICH "$new_path" 2> /dev/null`
45844    # bat and cmd files are not always considered executable in MSYS causing which
45845    # to not find them
45846    if test "x$new_path" = x \
45847        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45848        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45849      new_path="$path"
45850
45851  windows_path="$new_path"
45852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45853    unix_path=`$CYGPATH -u "$windows_path"`
45854    new_path="$unix_path"
45855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45857    new_path="$unix_path"
45858  fi
45859
45860    fi
45861
45862    if test "x$new_path" = x; then
45863      # It's still not found. Now this is an unrecoverable error.
45864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45865$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45866      has_space=`$ECHO "$complete" | $GREP " "`
45867      if test "x$has_space" != x; then
45868        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45869$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45870      fi
45871      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45872    fi
45873  fi
45874
45875  # Now new_path has a complete unix path to the binary
45876  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45877    # Keep paths in /bin as-is, but remove trailing .exe if any
45878    new_path="${new_path/%.exe/}"
45879    # Do not save /bin paths to all_fixpath_prefixes!
45880  else
45881    # Not in mixed or Windows style, start by that.
45882    new_path=`cmd //c echo $new_path`
45883
45884  input_path="$new_path"
45885  # Check if we need to convert this using DOS-style short mode. If the path
45886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45887  # take no chances and rewrite it.
45888  # Note: m4 eats our [], so we need to use [ and ] instead.
45889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45890  if test "x$has_forbidden_chars" != x; then
45891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45893  fi
45894
45895    # Output is in $new_path
45896
45897  windows_path="$new_path"
45898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45899    unix_path=`$CYGPATH -u "$windows_path"`
45900    new_path="$unix_path"
45901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45903    new_path="$unix_path"
45904  fi
45905
45906    # remove trailing .exe if any
45907    new_path="${new_path/%.exe/}"
45908
45909    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45910    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45911  fi
45912
45913    else
45914      # We're on a unix platform. Hooray! :)
45915      # First separate the path from the arguments. This will split at the first
45916      # space.
45917      complete="$BUILD_CXX"
45918      path="${complete%% *}"
45919      tmp="$complete EOL"
45920      arguments="${tmp#* }"
45921
45922      # Cannot rely on the command "which" here since it doesn't always work.
45923      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45924      if test -z "$is_absolute_path"; then
45925        # Path to executable is not absolute. Find it.
45926        IFS_save="$IFS"
45927        IFS=:
45928        for p in $PATH; do
45929          if test -f "$p/$path" && test -x "$p/$path"; then
45930            new_path="$p/$path"
45931            break
45932          fi
45933        done
45934        IFS="$IFS_save"
45935      else
45936        # This is an absolute path, we can use it without further modifications.
45937        new_path="$path"
45938      fi
45939
45940      if test "x$new_path" = x; then
45941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45942$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45943        has_space=`$ECHO "$complete" | $GREP " "`
45944        if test "x$has_space" != x; then
45945          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45946$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45947        fi
45948        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45949      fi
45950    fi
45951
45952    # Now join together the path and the arguments once again
45953    if test "x$arguments" != xEOL; then
45954      new_complete="$new_path ${arguments% *}"
45955    else
45956      new_complete="$new_path"
45957    fi
45958
45959    if test "x$complete" != "x$new_complete"; then
45960      BUILD_CXX="$new_complete"
45961      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45962$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45963    fi
45964  fi
45965
45966
45967
45968  # Publish this variable in the help.
45969
45970
45971  if [ -z "${BUILD_NM+x}" ]; then
45972    # The variable is not set by user, try to locate tool using the code snippet
45973    for ac_prog in nm gcc-nm
45974do
45975  # Extract the first word of "$ac_prog", so it can be a program name with args.
45976set dummy $ac_prog; ac_word=$2
45977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45978$as_echo_n "checking for $ac_word... " >&6; }
45979if ${ac_cv_path_BUILD_NM+:} false; then :
45980  $as_echo_n "(cached) " >&6
45981else
45982  case $BUILD_NM in
45983  [\\/]* | ?:[\\/]*)
45984  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45985  ;;
45986  *)
45987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45988for as_dir in $PATH
45989do
45990  IFS=$as_save_IFS
45991  test -z "$as_dir" && as_dir=.
45992    for ac_exec_ext in '' $ac_executable_extensions; do
45993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45994    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45996    break 2
45997  fi
45998done
45999  done
46000IFS=$as_save_IFS
46001
46002  ;;
46003esac
46004fi
46005BUILD_NM=$ac_cv_path_BUILD_NM
46006if test -n "$BUILD_NM"; then
46007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46008$as_echo "$BUILD_NM" >&6; }
46009else
46010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46011$as_echo "no" >&6; }
46012fi
46013
46014
46015  test -n "$BUILD_NM" && break
46016done
46017
46018  else
46019    # The variable is set, but is it from the command line or the environment?
46020
46021    # Try to remove the string !BUILD_NM! from our list.
46022    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
46023    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46024      # If it failed, the variable was not from the command line. Ignore it,
46025      # but warn the user (except for BASH, which is always set by the calling BASH).
46026      if test "xBUILD_NM" != xBASH; then
46027        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
46028$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
46029      fi
46030      # Try to locate tool using the code snippet
46031      for ac_prog in nm gcc-nm
46032do
46033  # Extract the first word of "$ac_prog", so it can be a program name with args.
46034set dummy $ac_prog; ac_word=$2
46035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46036$as_echo_n "checking for $ac_word... " >&6; }
46037if ${ac_cv_path_BUILD_NM+:} false; then :
46038  $as_echo_n "(cached) " >&6
46039else
46040  case $BUILD_NM in
46041  [\\/]* | ?:[\\/]*)
46042  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46043  ;;
46044  *)
46045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46046for as_dir in $PATH
46047do
46048  IFS=$as_save_IFS
46049  test -z "$as_dir" && as_dir=.
46050    for ac_exec_ext in '' $ac_executable_extensions; do
46051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46052    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46054    break 2
46055  fi
46056done
46057  done
46058IFS=$as_save_IFS
46059
46060  ;;
46061esac
46062fi
46063BUILD_NM=$ac_cv_path_BUILD_NM
46064if test -n "$BUILD_NM"; then
46065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46066$as_echo "$BUILD_NM" >&6; }
46067else
46068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46069$as_echo "no" >&6; }
46070fi
46071
46072
46073  test -n "$BUILD_NM" && break
46074done
46075
46076    else
46077      # If it succeeded, then it was overridden by the user. We will use it
46078      # for the tool.
46079
46080      # First remove it from the list of overridden variables, so we can test
46081      # for unknown variables in the end.
46082      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46083
46084      # Check if we try to supply an empty value
46085      if test "x$BUILD_NM" = x; then
46086        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
46087$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
46088        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46089$as_echo_n "checking for BUILD_NM... " >&6; }
46090        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46091$as_echo "disabled" >&6; }
46092      else
46093        # Check if the provided tool contains a complete path.
46094        tool_specified="$BUILD_NM"
46095        tool_basename="${tool_specified##*/}"
46096        if test "x$tool_basename" = "x$tool_specified"; then
46097          # A command without a complete path is provided, search $PATH.
46098          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
46099$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
46100          # Extract the first word of "$tool_basename", so it can be a program name with args.
46101set dummy $tool_basename; ac_word=$2
46102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46103$as_echo_n "checking for $ac_word... " >&6; }
46104if ${ac_cv_path_BUILD_NM+:} false; then :
46105  $as_echo_n "(cached) " >&6
46106else
46107  case $BUILD_NM in
46108  [\\/]* | ?:[\\/]*)
46109  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46110  ;;
46111  *)
46112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46113for as_dir in $PATH
46114do
46115  IFS=$as_save_IFS
46116  test -z "$as_dir" && as_dir=.
46117    for ac_exec_ext in '' $ac_executable_extensions; do
46118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46119    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46121    break 2
46122  fi
46123done
46124  done
46125IFS=$as_save_IFS
46126
46127  ;;
46128esac
46129fi
46130BUILD_NM=$ac_cv_path_BUILD_NM
46131if test -n "$BUILD_NM"; then
46132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46133$as_echo "$BUILD_NM" >&6; }
46134else
46135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46136$as_echo "no" >&6; }
46137fi
46138
46139
46140          if test "x$BUILD_NM" = x; then
46141            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46142          fi
46143        else
46144          # Otherwise we believe it is a complete path. Use it as it is.
46145          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
46146$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
46147          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46148$as_echo_n "checking for BUILD_NM... " >&6; }
46149          if test ! -x "$tool_specified"; then
46150            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46151$as_echo "not found" >&6; }
46152            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
46153          fi
46154          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46155$as_echo "$tool_specified" >&6; }
46156        fi
46157      fi
46158    fi
46159
46160  fi
46161
46162
46163
46164  # Only process if variable expands to non-empty
46165
46166  if test "x$BUILD_NM" != x; then
46167    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46168
46169  # First separate the path from the arguments. This will split at the first
46170  # space.
46171  complete="$BUILD_NM"
46172  path="${complete%% *}"
46173  tmp="$complete EOL"
46174  arguments="${tmp#* }"
46175
46176  # Input might be given as Windows format, start by converting to
46177  # unix format.
46178  new_path=`$CYGPATH -u "$path"`
46179
46180  # Now try to locate executable using which
46181  new_path=`$WHICH "$new_path" 2> /dev/null`
46182  # bat and cmd files are not always considered executable in cygwin causing which
46183  # to not find them
46184  if test "x$new_path" = x \
46185      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46186      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46187    new_path=`$CYGPATH -u "$path"`
46188  fi
46189  if test "x$new_path" = x; then
46190    # Oops. Which didn't find the executable.
46191    # The splitting of arguments from the executable at a space might have been incorrect,
46192    # since paths with space are more likely in Windows. Give it another try with the whole
46193    # argument.
46194    path="$complete"
46195    arguments="EOL"
46196    new_path=`$CYGPATH -u "$path"`
46197    new_path=`$WHICH "$new_path" 2> /dev/null`
46198    # bat and cmd files are not always considered executable in cygwin causing which
46199    # to not find them
46200    if test "x$new_path" = x \
46201        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46202        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46203      new_path=`$CYGPATH -u "$path"`
46204    fi
46205    if test "x$new_path" = x; then
46206      # It's still not found. Now this is an unrecoverable error.
46207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46208$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46209      has_space=`$ECHO "$complete" | $GREP " "`
46210      if test "x$has_space" != x; then
46211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46213      fi
46214      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46215    fi
46216  fi
46217
46218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46221  # "foo.exe" is OK but "foo" is an error.
46222  #
46223  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46224  # It is also a way to make sure we got the proper file name for the real test later on.
46225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46226  if test "x$test_shortpath" = x; then
46227    # Short path failed, file does not exist as specified.
46228    # Try adding .exe or .cmd
46229    if test -f "${new_path}.exe"; then
46230      input_to_shortpath="${new_path}.exe"
46231    elif test -f "${new_path}.cmd"; then
46232      input_to_shortpath="${new_path}.cmd"
46233    else
46234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46235$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46236      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46237$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46238      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46239    fi
46240  else
46241    input_to_shortpath="$new_path"
46242  fi
46243
46244  # Call helper function which possibly converts this using DOS-style short mode.
46245  # If so, the updated path is stored in $new_path.
46246  new_path="$input_to_shortpath"
46247
46248  input_path="$input_to_shortpath"
46249  # Check if we need to convert this using DOS-style short mode. If the path
46250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46251  # take no chances and rewrite it.
46252  # Note: m4 eats our [], so we need to use [ and ] instead.
46253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46254  if test "x$has_forbidden_chars" != x; then
46255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46259      # Going to short mode and back again did indeed matter. Since short mode is
46260      # case insensitive, let's make it lowercase to improve readability.
46261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46262      # Now convert it back to Unix-style (cygpath)
46263      input_path=`$CYGPATH -u "$shortmode_path"`
46264      new_path="$input_path"
46265    fi
46266  fi
46267
46268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46269  if test "x$test_cygdrive_prefix" = x; then
46270    # As a simple fix, exclude /usr/bin since it's not a real path.
46271    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46273      # a path prefixed by /cygdrive for fixpath to work.
46274      new_path="$CYGWIN_ROOT_PATH$input_path"
46275    fi
46276  fi
46277
46278  # remove trailing .exe if any
46279  new_path="${new_path/%.exe/}"
46280
46281    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46282
46283  # First separate the path from the arguments. This will split at the first
46284  # space.
46285  complete="$BUILD_NM"
46286  path="${complete%% *}"
46287  tmp="$complete EOL"
46288  arguments="${tmp#* }"
46289
46290  # Input might be given as Windows format, start by converting to
46291  # unix format.
46292  new_path="$path"
46293
46294  windows_path="$new_path"
46295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46296    unix_path=`$CYGPATH -u "$windows_path"`
46297    new_path="$unix_path"
46298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46300    new_path="$unix_path"
46301  fi
46302
46303
46304  # Now try to locate executable using which
46305  new_path=`$WHICH "$new_path" 2> /dev/null`
46306
46307  if test "x$new_path" = x; then
46308    # Oops. Which didn't find the executable.
46309    # The splitting of arguments from the executable at a space might have been incorrect,
46310    # since paths with space are more likely in Windows. Give it another try with the whole
46311    # argument.
46312    path="$complete"
46313    arguments="EOL"
46314    new_path="$path"
46315
46316  windows_path="$new_path"
46317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46318    unix_path=`$CYGPATH -u "$windows_path"`
46319    new_path="$unix_path"
46320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46322    new_path="$unix_path"
46323  fi
46324
46325
46326    new_path=`$WHICH "$new_path" 2> /dev/null`
46327    # bat and cmd files are not always considered executable in MSYS causing which
46328    # to not find them
46329    if test "x$new_path" = x \
46330        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46331        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46332      new_path="$path"
46333
46334  windows_path="$new_path"
46335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46336    unix_path=`$CYGPATH -u "$windows_path"`
46337    new_path="$unix_path"
46338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46340    new_path="$unix_path"
46341  fi
46342
46343    fi
46344
46345    if test "x$new_path" = x; then
46346      # It's still not found. Now this is an unrecoverable error.
46347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46348$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46349      has_space=`$ECHO "$complete" | $GREP " "`
46350      if test "x$has_space" != x; then
46351        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46352$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46353      fi
46354      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46355    fi
46356  fi
46357
46358  # Now new_path has a complete unix path to the binary
46359  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46360    # Keep paths in /bin as-is, but remove trailing .exe if any
46361    new_path="${new_path/%.exe/}"
46362    # Do not save /bin paths to all_fixpath_prefixes!
46363  else
46364    # Not in mixed or Windows style, start by that.
46365    new_path=`cmd //c echo $new_path`
46366
46367  input_path="$new_path"
46368  # Check if we need to convert this using DOS-style short mode. If the path
46369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46370  # take no chances and rewrite it.
46371  # Note: m4 eats our [], so we need to use [ and ] instead.
46372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46373  if test "x$has_forbidden_chars" != x; then
46374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46376  fi
46377
46378    # Output is in $new_path
46379
46380  windows_path="$new_path"
46381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46382    unix_path=`$CYGPATH -u "$windows_path"`
46383    new_path="$unix_path"
46384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46386    new_path="$unix_path"
46387  fi
46388
46389    # remove trailing .exe if any
46390    new_path="${new_path/%.exe/}"
46391
46392    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46393    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46394  fi
46395
46396    else
46397      # We're on a unix platform. Hooray! :)
46398      # First separate the path from the arguments. This will split at the first
46399      # space.
46400      complete="$BUILD_NM"
46401      path="${complete%% *}"
46402      tmp="$complete EOL"
46403      arguments="${tmp#* }"
46404
46405      # Cannot rely on the command "which" here since it doesn't always work.
46406      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46407      if test -z "$is_absolute_path"; then
46408        # Path to executable is not absolute. Find it.
46409        IFS_save="$IFS"
46410        IFS=:
46411        for p in $PATH; do
46412          if test -f "$p/$path" && test -x "$p/$path"; then
46413            new_path="$p/$path"
46414            break
46415          fi
46416        done
46417        IFS="$IFS_save"
46418      else
46419        # This is an absolute path, we can use it without further modifications.
46420        new_path="$path"
46421      fi
46422
46423      if test "x$new_path" = x; then
46424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46425$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46426        has_space=`$ECHO "$complete" | $GREP " "`
46427        if test "x$has_space" != x; then
46428          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46429$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46430        fi
46431        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46432      fi
46433    fi
46434
46435    # Now join together the path and the arguments once again
46436    if test "x$arguments" != xEOL; then
46437      new_complete="$new_path ${arguments% *}"
46438    else
46439      new_complete="$new_path"
46440    fi
46441
46442    if test "x$complete" != "x$new_complete"; then
46443      BUILD_NM="$new_complete"
46444      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46445$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46446    fi
46447  fi
46448
46449
46450
46451  # Publish this variable in the help.
46452
46453
46454  if [ -z "${BUILD_AR+x}" ]; then
46455    # The variable is not set by user, try to locate tool using the code snippet
46456    for ac_prog in ar gcc-ar
46457do
46458  # Extract the first word of "$ac_prog", so it can be a program name with args.
46459set dummy $ac_prog; ac_word=$2
46460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46461$as_echo_n "checking for $ac_word... " >&6; }
46462if ${ac_cv_path_BUILD_AR+:} false; then :
46463  $as_echo_n "(cached) " >&6
46464else
46465  case $BUILD_AR in
46466  [\\/]* | ?:[\\/]*)
46467  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46468  ;;
46469  *)
46470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46471for as_dir in $PATH
46472do
46473  IFS=$as_save_IFS
46474  test -z "$as_dir" && as_dir=.
46475    for ac_exec_ext in '' $ac_executable_extensions; do
46476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46477    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46479    break 2
46480  fi
46481done
46482  done
46483IFS=$as_save_IFS
46484
46485  ;;
46486esac
46487fi
46488BUILD_AR=$ac_cv_path_BUILD_AR
46489if test -n "$BUILD_AR"; then
46490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46491$as_echo "$BUILD_AR" >&6; }
46492else
46493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46494$as_echo "no" >&6; }
46495fi
46496
46497
46498  test -n "$BUILD_AR" && break
46499done
46500
46501  else
46502    # The variable is set, but is it from the command line or the environment?
46503
46504    # Try to remove the string !BUILD_AR! from our list.
46505    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46506    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46507      # If it failed, the variable was not from the command line. Ignore it,
46508      # but warn the user (except for BASH, which is always set by the calling BASH).
46509      if test "xBUILD_AR" != xBASH; then
46510        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46511$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46512      fi
46513      # Try to locate tool using the code snippet
46514      for ac_prog in ar gcc-ar
46515do
46516  # Extract the first word of "$ac_prog", so it can be a program name with args.
46517set dummy $ac_prog; ac_word=$2
46518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46519$as_echo_n "checking for $ac_word... " >&6; }
46520if ${ac_cv_path_BUILD_AR+:} false; then :
46521  $as_echo_n "(cached) " >&6
46522else
46523  case $BUILD_AR in
46524  [\\/]* | ?:[\\/]*)
46525  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46526  ;;
46527  *)
46528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46529for as_dir in $PATH
46530do
46531  IFS=$as_save_IFS
46532  test -z "$as_dir" && as_dir=.
46533    for ac_exec_ext in '' $ac_executable_extensions; do
46534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46535    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46537    break 2
46538  fi
46539done
46540  done
46541IFS=$as_save_IFS
46542
46543  ;;
46544esac
46545fi
46546BUILD_AR=$ac_cv_path_BUILD_AR
46547if test -n "$BUILD_AR"; then
46548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46549$as_echo "$BUILD_AR" >&6; }
46550else
46551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46552$as_echo "no" >&6; }
46553fi
46554
46555
46556  test -n "$BUILD_AR" && break
46557done
46558
46559    else
46560      # If it succeeded, then it was overridden by the user. We will use it
46561      # for the tool.
46562
46563      # First remove it from the list of overridden variables, so we can test
46564      # for unknown variables in the end.
46565      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46566
46567      # Check if we try to supply an empty value
46568      if test "x$BUILD_AR" = x; then
46569        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46570$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46571        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46572$as_echo_n "checking for BUILD_AR... " >&6; }
46573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46574$as_echo "disabled" >&6; }
46575      else
46576        # Check if the provided tool contains a complete path.
46577        tool_specified="$BUILD_AR"
46578        tool_basename="${tool_specified##*/}"
46579        if test "x$tool_basename" = "x$tool_specified"; then
46580          # A command without a complete path is provided, search $PATH.
46581          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46582$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46583          # Extract the first word of "$tool_basename", so it can be a program name with args.
46584set dummy $tool_basename; ac_word=$2
46585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46586$as_echo_n "checking for $ac_word... " >&6; }
46587if ${ac_cv_path_BUILD_AR+:} false; then :
46588  $as_echo_n "(cached) " >&6
46589else
46590  case $BUILD_AR in
46591  [\\/]* | ?:[\\/]*)
46592  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46593  ;;
46594  *)
46595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46596for as_dir in $PATH
46597do
46598  IFS=$as_save_IFS
46599  test -z "$as_dir" && as_dir=.
46600    for ac_exec_ext in '' $ac_executable_extensions; do
46601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46602    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46604    break 2
46605  fi
46606done
46607  done
46608IFS=$as_save_IFS
46609
46610  ;;
46611esac
46612fi
46613BUILD_AR=$ac_cv_path_BUILD_AR
46614if test -n "$BUILD_AR"; then
46615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46616$as_echo "$BUILD_AR" >&6; }
46617else
46618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46619$as_echo "no" >&6; }
46620fi
46621
46622
46623          if test "x$BUILD_AR" = x; then
46624            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46625          fi
46626        else
46627          # Otherwise we believe it is a complete path. Use it as it is.
46628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46629$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46630          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46631$as_echo_n "checking for BUILD_AR... " >&6; }
46632          if test ! -x "$tool_specified"; then
46633            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46634$as_echo "not found" >&6; }
46635            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46636          fi
46637          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46638$as_echo "$tool_specified" >&6; }
46639        fi
46640      fi
46641    fi
46642
46643  fi
46644
46645
46646
46647  # Only process if variable expands to non-empty
46648
46649  if test "x$BUILD_AR" != x; then
46650    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46651
46652  # First separate the path from the arguments. This will split at the first
46653  # space.
46654  complete="$BUILD_AR"
46655  path="${complete%% *}"
46656  tmp="$complete EOL"
46657  arguments="${tmp#* }"
46658
46659  # Input might be given as Windows format, start by converting to
46660  # unix format.
46661  new_path=`$CYGPATH -u "$path"`
46662
46663  # Now try to locate executable using which
46664  new_path=`$WHICH "$new_path" 2> /dev/null`
46665  # bat and cmd files are not always considered executable in cygwin causing which
46666  # to not find them
46667  if test "x$new_path" = x \
46668      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46669      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46670    new_path=`$CYGPATH -u "$path"`
46671  fi
46672  if test "x$new_path" = x; then
46673    # Oops. Which didn't find the executable.
46674    # The splitting of arguments from the executable at a space might have been incorrect,
46675    # since paths with space are more likely in Windows. Give it another try with the whole
46676    # argument.
46677    path="$complete"
46678    arguments="EOL"
46679    new_path=`$CYGPATH -u "$path"`
46680    new_path=`$WHICH "$new_path" 2> /dev/null`
46681    # bat and cmd files are not always considered executable in cygwin causing which
46682    # to not find them
46683    if test "x$new_path" = x \
46684        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46685        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46686      new_path=`$CYGPATH -u "$path"`
46687    fi
46688    if test "x$new_path" = x; then
46689      # It's still not found. Now this is an unrecoverable error.
46690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46691$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46692      has_space=`$ECHO "$complete" | $GREP " "`
46693      if test "x$has_space" != x; then
46694        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46695$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46696      fi
46697      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46698    fi
46699  fi
46700
46701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46704  # "foo.exe" is OK but "foo" is an error.
46705  #
46706  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46707  # It is also a way to make sure we got the proper file name for the real test later on.
46708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46709  if test "x$test_shortpath" = x; then
46710    # Short path failed, file does not exist as specified.
46711    # Try adding .exe or .cmd
46712    if test -f "${new_path}.exe"; then
46713      input_to_shortpath="${new_path}.exe"
46714    elif test -f "${new_path}.cmd"; then
46715      input_to_shortpath="${new_path}.cmd"
46716    else
46717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46718$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46719      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46720$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46721      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46722    fi
46723  else
46724    input_to_shortpath="$new_path"
46725  fi
46726
46727  # Call helper function which possibly converts this using DOS-style short mode.
46728  # If so, the updated path is stored in $new_path.
46729  new_path="$input_to_shortpath"
46730
46731  input_path="$input_to_shortpath"
46732  # Check if we need to convert this using DOS-style short mode. If the path
46733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46734  # take no chances and rewrite it.
46735  # Note: m4 eats our [], so we need to use [ and ] instead.
46736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46737  if test "x$has_forbidden_chars" != x; then
46738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46742      # Going to short mode and back again did indeed matter. Since short mode is
46743      # case insensitive, let's make it lowercase to improve readability.
46744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46745      # Now convert it back to Unix-style (cygpath)
46746      input_path=`$CYGPATH -u "$shortmode_path"`
46747      new_path="$input_path"
46748    fi
46749  fi
46750
46751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46752  if test "x$test_cygdrive_prefix" = x; then
46753    # As a simple fix, exclude /usr/bin since it's not a real path.
46754    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46756      # a path prefixed by /cygdrive for fixpath to work.
46757      new_path="$CYGWIN_ROOT_PATH$input_path"
46758    fi
46759  fi
46760
46761  # remove trailing .exe if any
46762  new_path="${new_path/%.exe/}"
46763
46764    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46765
46766  # First separate the path from the arguments. This will split at the first
46767  # space.
46768  complete="$BUILD_AR"
46769  path="${complete%% *}"
46770  tmp="$complete EOL"
46771  arguments="${tmp#* }"
46772
46773  # Input might be given as Windows format, start by converting to
46774  # unix format.
46775  new_path="$path"
46776
46777  windows_path="$new_path"
46778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46779    unix_path=`$CYGPATH -u "$windows_path"`
46780    new_path="$unix_path"
46781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46783    new_path="$unix_path"
46784  fi
46785
46786
46787  # Now try to locate executable using which
46788  new_path=`$WHICH "$new_path" 2> /dev/null`
46789
46790  if test "x$new_path" = x; then
46791    # Oops. Which didn't find the executable.
46792    # The splitting of arguments from the executable at a space might have been incorrect,
46793    # since paths with space are more likely in Windows. Give it another try with the whole
46794    # argument.
46795    path="$complete"
46796    arguments="EOL"
46797    new_path="$path"
46798
46799  windows_path="$new_path"
46800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46801    unix_path=`$CYGPATH -u "$windows_path"`
46802    new_path="$unix_path"
46803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46805    new_path="$unix_path"
46806  fi
46807
46808
46809    new_path=`$WHICH "$new_path" 2> /dev/null`
46810    # bat and cmd files are not always considered executable in MSYS causing which
46811    # to not find them
46812    if test "x$new_path" = x \
46813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46815      new_path="$path"
46816
46817  windows_path="$new_path"
46818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46819    unix_path=`$CYGPATH -u "$windows_path"`
46820    new_path="$unix_path"
46821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46823    new_path="$unix_path"
46824  fi
46825
46826    fi
46827
46828    if test "x$new_path" = x; then
46829      # It's still not found. Now this is an unrecoverable error.
46830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46831$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46832      has_space=`$ECHO "$complete" | $GREP " "`
46833      if test "x$has_space" != x; then
46834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46836      fi
46837      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46838    fi
46839  fi
46840
46841  # Now new_path has a complete unix path to the binary
46842  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46843    # Keep paths in /bin as-is, but remove trailing .exe if any
46844    new_path="${new_path/%.exe/}"
46845    # Do not save /bin paths to all_fixpath_prefixes!
46846  else
46847    # Not in mixed or Windows style, start by that.
46848    new_path=`cmd //c echo $new_path`
46849
46850  input_path="$new_path"
46851  # Check if we need to convert this using DOS-style short mode. If the path
46852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46853  # take no chances and rewrite it.
46854  # Note: m4 eats our [], so we need to use [ and ] instead.
46855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46856  if test "x$has_forbidden_chars" != x; then
46857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46859  fi
46860
46861    # Output is in $new_path
46862
46863  windows_path="$new_path"
46864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46865    unix_path=`$CYGPATH -u "$windows_path"`
46866    new_path="$unix_path"
46867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46869    new_path="$unix_path"
46870  fi
46871
46872    # remove trailing .exe if any
46873    new_path="${new_path/%.exe/}"
46874
46875    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46876    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46877  fi
46878
46879    else
46880      # We're on a unix platform. Hooray! :)
46881      # First separate the path from the arguments. This will split at the first
46882      # space.
46883      complete="$BUILD_AR"
46884      path="${complete%% *}"
46885      tmp="$complete EOL"
46886      arguments="${tmp#* }"
46887
46888      # Cannot rely on the command "which" here since it doesn't always work.
46889      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46890      if test -z "$is_absolute_path"; then
46891        # Path to executable is not absolute. Find it.
46892        IFS_save="$IFS"
46893        IFS=:
46894        for p in $PATH; do
46895          if test -f "$p/$path" && test -x "$p/$path"; then
46896            new_path="$p/$path"
46897            break
46898          fi
46899        done
46900        IFS="$IFS_save"
46901      else
46902        # This is an absolute path, we can use it without further modifications.
46903        new_path="$path"
46904      fi
46905
46906      if test "x$new_path" = x; then
46907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46908$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46909        has_space=`$ECHO "$complete" | $GREP " "`
46910        if test "x$has_space" != x; then
46911          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46912$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46913        fi
46914        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46915      fi
46916    fi
46917
46918    # Now join together the path and the arguments once again
46919    if test "x$arguments" != xEOL; then
46920      new_complete="$new_path ${arguments% *}"
46921    else
46922      new_complete="$new_path"
46923    fi
46924
46925    if test "x$complete" != "x$new_complete"; then
46926      BUILD_AR="$new_complete"
46927      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46928$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46929    fi
46930  fi
46931
46932
46933
46934  # Publish this variable in the help.
46935
46936
46937  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46938    # The variable is not set by user, try to locate tool using the code snippet
46939    for ac_prog in objcopy
46940do
46941  # Extract the first word of "$ac_prog", so it can be a program name with args.
46942set dummy $ac_prog; ac_word=$2
46943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46944$as_echo_n "checking for $ac_word... " >&6; }
46945if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46946  $as_echo_n "(cached) " >&6
46947else
46948  case $BUILD_OBJCOPY in
46949  [\\/]* | ?:[\\/]*)
46950  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46951  ;;
46952  *)
46953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46954for as_dir in $PATH
46955do
46956  IFS=$as_save_IFS
46957  test -z "$as_dir" && as_dir=.
46958    for ac_exec_ext in '' $ac_executable_extensions; do
46959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46960    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46962    break 2
46963  fi
46964done
46965  done
46966IFS=$as_save_IFS
46967
46968  ;;
46969esac
46970fi
46971BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46972if test -n "$BUILD_OBJCOPY"; then
46973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46974$as_echo "$BUILD_OBJCOPY" >&6; }
46975else
46976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46977$as_echo "no" >&6; }
46978fi
46979
46980
46981  test -n "$BUILD_OBJCOPY" && break
46982done
46983
46984  else
46985    # The variable is set, but is it from the command line or the environment?
46986
46987    # Try to remove the string !BUILD_OBJCOPY! from our list.
46988    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46989    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46990      # If it failed, the variable was not from the command line. Ignore it,
46991      # but warn the user (except for BASH, which is always set by the calling BASH).
46992      if test "xBUILD_OBJCOPY" != xBASH; then
46993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46994$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46995      fi
46996      # Try to locate tool using the code snippet
46997      for ac_prog in objcopy
46998do
46999  # Extract the first word of "$ac_prog", so it can be a program name with args.
47000set dummy $ac_prog; ac_word=$2
47001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47002$as_echo_n "checking for $ac_word... " >&6; }
47003if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47004  $as_echo_n "(cached) " >&6
47005else
47006  case $BUILD_OBJCOPY in
47007  [\\/]* | ?:[\\/]*)
47008  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47009  ;;
47010  *)
47011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47012for as_dir in $PATH
47013do
47014  IFS=$as_save_IFS
47015  test -z "$as_dir" && as_dir=.
47016    for ac_exec_ext in '' $ac_executable_extensions; do
47017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47018    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47020    break 2
47021  fi
47022done
47023  done
47024IFS=$as_save_IFS
47025
47026  ;;
47027esac
47028fi
47029BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47030if test -n "$BUILD_OBJCOPY"; then
47031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47032$as_echo "$BUILD_OBJCOPY" >&6; }
47033else
47034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47035$as_echo "no" >&6; }
47036fi
47037
47038
47039  test -n "$BUILD_OBJCOPY" && break
47040done
47041
47042    else
47043      # If it succeeded, then it was overridden by the user. We will use it
47044      # for the tool.
47045
47046      # First remove it from the list of overridden variables, so we can test
47047      # for unknown variables in the end.
47048      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47049
47050      # Check if we try to supply an empty value
47051      if test "x$BUILD_OBJCOPY" = x; then
47052        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
47053$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
47054        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47055$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47056        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47057$as_echo "disabled" >&6; }
47058      else
47059        # Check if the provided tool contains a complete path.
47060        tool_specified="$BUILD_OBJCOPY"
47061        tool_basename="${tool_specified##*/}"
47062        if test "x$tool_basename" = "x$tool_specified"; then
47063          # A command without a complete path is provided, search $PATH.
47064          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
47065$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
47066          # Extract the first word of "$tool_basename", so it can be a program name with args.
47067set dummy $tool_basename; ac_word=$2
47068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47069$as_echo_n "checking for $ac_word... " >&6; }
47070if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47071  $as_echo_n "(cached) " >&6
47072else
47073  case $BUILD_OBJCOPY in
47074  [\\/]* | ?:[\\/]*)
47075  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47076  ;;
47077  *)
47078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47079for as_dir in $PATH
47080do
47081  IFS=$as_save_IFS
47082  test -z "$as_dir" && as_dir=.
47083    for ac_exec_ext in '' $ac_executable_extensions; do
47084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47085    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47087    break 2
47088  fi
47089done
47090  done
47091IFS=$as_save_IFS
47092
47093  ;;
47094esac
47095fi
47096BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47097if test -n "$BUILD_OBJCOPY"; then
47098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47099$as_echo "$BUILD_OBJCOPY" >&6; }
47100else
47101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47102$as_echo "no" >&6; }
47103fi
47104
47105
47106          if test "x$BUILD_OBJCOPY" = x; then
47107            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47108          fi
47109        else
47110          # Otherwise we believe it is a complete path. Use it as it is.
47111          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
47112$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
47113          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47114$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47115          if test ! -x "$tool_specified"; then
47116            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47117$as_echo "not found" >&6; }
47118            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
47119          fi
47120          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47121$as_echo "$tool_specified" >&6; }
47122        fi
47123      fi
47124    fi
47125
47126  fi
47127
47128
47129
47130  # Only process if variable expands to non-empty
47131
47132  if test "x$BUILD_OBJCOPY" != x; then
47133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47134
47135  # First separate the path from the arguments. This will split at the first
47136  # space.
47137  complete="$BUILD_OBJCOPY"
47138  path="${complete%% *}"
47139  tmp="$complete EOL"
47140  arguments="${tmp#* }"
47141
47142  # Input might be given as Windows format, start by converting to
47143  # unix format.
47144  new_path=`$CYGPATH -u "$path"`
47145
47146  # Now try to locate executable using which
47147  new_path=`$WHICH "$new_path" 2> /dev/null`
47148  # bat and cmd files are not always considered executable in cygwin causing which
47149  # to not find them
47150  if test "x$new_path" = x \
47151      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47152      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47153    new_path=`$CYGPATH -u "$path"`
47154  fi
47155  if test "x$new_path" = x; then
47156    # Oops. Which didn't find the executable.
47157    # The splitting of arguments from the executable at a space might have been incorrect,
47158    # since paths with space are more likely in Windows. Give it another try with the whole
47159    # argument.
47160    path="$complete"
47161    arguments="EOL"
47162    new_path=`$CYGPATH -u "$path"`
47163    new_path=`$WHICH "$new_path" 2> /dev/null`
47164    # bat and cmd files are not always considered executable in cygwin causing which
47165    # to not find them
47166    if test "x$new_path" = x \
47167        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47168        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47169      new_path=`$CYGPATH -u "$path"`
47170    fi
47171    if test "x$new_path" = x; then
47172      # It's still not found. Now this is an unrecoverable error.
47173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47174$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47175      has_space=`$ECHO "$complete" | $GREP " "`
47176      if test "x$has_space" != x; then
47177        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47178$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47179      fi
47180      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47181    fi
47182  fi
47183
47184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47187  # "foo.exe" is OK but "foo" is an error.
47188  #
47189  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47190  # It is also a way to make sure we got the proper file name for the real test later on.
47191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47192  if test "x$test_shortpath" = x; then
47193    # Short path failed, file does not exist as specified.
47194    # Try adding .exe or .cmd
47195    if test -f "${new_path}.exe"; then
47196      input_to_shortpath="${new_path}.exe"
47197    elif test -f "${new_path}.cmd"; then
47198      input_to_shortpath="${new_path}.cmd"
47199    else
47200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47201$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47202      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47203$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47204      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47205    fi
47206  else
47207    input_to_shortpath="$new_path"
47208  fi
47209
47210  # Call helper function which possibly converts this using DOS-style short mode.
47211  # If so, the updated path is stored in $new_path.
47212  new_path="$input_to_shortpath"
47213
47214  input_path="$input_to_shortpath"
47215  # Check if we need to convert this using DOS-style short mode. If the path
47216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47217  # take no chances and rewrite it.
47218  # Note: m4 eats our [], so we need to use [ and ] instead.
47219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47220  if test "x$has_forbidden_chars" != x; then
47221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47222    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47223    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47224    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47225      # Going to short mode and back again did indeed matter. Since short mode is
47226      # case insensitive, let's make it lowercase to improve readability.
47227      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47228      # Now convert it back to Unix-style (cygpath)
47229      input_path=`$CYGPATH -u "$shortmode_path"`
47230      new_path="$input_path"
47231    fi
47232  fi
47233
47234  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47235  if test "x$test_cygdrive_prefix" = x; then
47236    # As a simple fix, exclude /usr/bin since it's not a real path.
47237    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47238      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47239      # a path prefixed by /cygdrive for fixpath to work.
47240      new_path="$CYGWIN_ROOT_PATH$input_path"
47241    fi
47242  fi
47243
47244  # remove trailing .exe if any
47245  new_path="${new_path/%.exe/}"
47246
47247    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47248
47249  # First separate the path from the arguments. This will split at the first
47250  # space.
47251  complete="$BUILD_OBJCOPY"
47252  path="${complete%% *}"
47253  tmp="$complete EOL"
47254  arguments="${tmp#* }"
47255
47256  # Input might be given as Windows format, start by converting to
47257  # unix format.
47258  new_path="$path"
47259
47260  windows_path="$new_path"
47261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47262    unix_path=`$CYGPATH -u "$windows_path"`
47263    new_path="$unix_path"
47264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47266    new_path="$unix_path"
47267  fi
47268
47269
47270  # Now try to locate executable using which
47271  new_path=`$WHICH "$new_path" 2> /dev/null`
47272
47273  if test "x$new_path" = x; then
47274    # Oops. Which didn't find the executable.
47275    # The splitting of arguments from the executable at a space might have been incorrect,
47276    # since paths with space are more likely in Windows. Give it another try with the whole
47277    # argument.
47278    path="$complete"
47279    arguments="EOL"
47280    new_path="$path"
47281
47282  windows_path="$new_path"
47283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47284    unix_path=`$CYGPATH -u "$windows_path"`
47285    new_path="$unix_path"
47286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47288    new_path="$unix_path"
47289  fi
47290
47291
47292    new_path=`$WHICH "$new_path" 2> /dev/null`
47293    # bat and cmd files are not always considered executable in MSYS causing which
47294    # to not find them
47295    if test "x$new_path" = x \
47296        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47297        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47298      new_path="$path"
47299
47300  windows_path="$new_path"
47301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47302    unix_path=`$CYGPATH -u "$windows_path"`
47303    new_path="$unix_path"
47304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47306    new_path="$unix_path"
47307  fi
47308
47309    fi
47310
47311    if test "x$new_path" = x; then
47312      # It's still not found. Now this is an unrecoverable error.
47313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47314$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47315      has_space=`$ECHO "$complete" | $GREP " "`
47316      if test "x$has_space" != x; then
47317        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47318$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47319      fi
47320      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47321    fi
47322  fi
47323
47324  # Now new_path has a complete unix path to the binary
47325  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47326    # Keep paths in /bin as-is, but remove trailing .exe if any
47327    new_path="${new_path/%.exe/}"
47328    # Do not save /bin paths to all_fixpath_prefixes!
47329  else
47330    # Not in mixed or Windows style, start by that.
47331    new_path=`cmd //c echo $new_path`
47332
47333  input_path="$new_path"
47334  # Check if we need to convert this using DOS-style short mode. If the path
47335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47336  # take no chances and rewrite it.
47337  # Note: m4 eats our [], so we need to use [ and ] instead.
47338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47339  if test "x$has_forbidden_chars" != x; then
47340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47341    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47342  fi
47343
47344    # Output is in $new_path
47345
47346  windows_path="$new_path"
47347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47348    unix_path=`$CYGPATH -u "$windows_path"`
47349    new_path="$unix_path"
47350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47352    new_path="$unix_path"
47353  fi
47354
47355    # remove trailing .exe if any
47356    new_path="${new_path/%.exe/}"
47357
47358    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47359    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47360  fi
47361
47362    else
47363      # We're on a unix platform. Hooray! :)
47364      # First separate the path from the arguments. This will split at the first
47365      # space.
47366      complete="$BUILD_OBJCOPY"
47367      path="${complete%% *}"
47368      tmp="$complete EOL"
47369      arguments="${tmp#* }"
47370
47371      # Cannot rely on the command "which" here since it doesn't always work.
47372      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47373      if test -z "$is_absolute_path"; then
47374        # Path to executable is not absolute. Find it.
47375        IFS_save="$IFS"
47376        IFS=:
47377        for p in $PATH; do
47378          if test -f "$p/$path" && test -x "$p/$path"; then
47379            new_path="$p/$path"
47380            break
47381          fi
47382        done
47383        IFS="$IFS_save"
47384      else
47385        # This is an absolute path, we can use it without further modifications.
47386        new_path="$path"
47387      fi
47388
47389      if test "x$new_path" = x; then
47390        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47391$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47392        has_space=`$ECHO "$complete" | $GREP " "`
47393        if test "x$has_space" != x; then
47394          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47395$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47396        fi
47397        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47398      fi
47399    fi
47400
47401    # Now join together the path and the arguments once again
47402    if test "x$arguments" != xEOL; then
47403      new_complete="$new_path ${arguments% *}"
47404    else
47405      new_complete="$new_path"
47406    fi
47407
47408    if test "x$complete" != "x$new_complete"; then
47409      BUILD_OBJCOPY="$new_complete"
47410      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47411$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47412    fi
47413  fi
47414
47415
47416
47417  # Publish this variable in the help.
47418
47419
47420  if [ -z "${BUILD_STRIP+x}" ]; then
47421    # The variable is not set by user, try to locate tool using the code snippet
47422    for ac_prog in strip
47423do
47424  # Extract the first word of "$ac_prog", so it can be a program name with args.
47425set dummy $ac_prog; ac_word=$2
47426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47427$as_echo_n "checking for $ac_word... " >&6; }
47428if ${ac_cv_path_BUILD_STRIP+:} false; then :
47429  $as_echo_n "(cached) " >&6
47430else
47431  case $BUILD_STRIP in
47432  [\\/]* | ?:[\\/]*)
47433  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47434  ;;
47435  *)
47436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47437for as_dir in $PATH
47438do
47439  IFS=$as_save_IFS
47440  test -z "$as_dir" && as_dir=.
47441    for ac_exec_ext in '' $ac_executable_extensions; do
47442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47443    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47445    break 2
47446  fi
47447done
47448  done
47449IFS=$as_save_IFS
47450
47451  ;;
47452esac
47453fi
47454BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47455if test -n "$BUILD_STRIP"; then
47456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47457$as_echo "$BUILD_STRIP" >&6; }
47458else
47459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47460$as_echo "no" >&6; }
47461fi
47462
47463
47464  test -n "$BUILD_STRIP" && break
47465done
47466
47467  else
47468    # The variable is set, but is it from the command line or the environment?
47469
47470    # Try to remove the string !BUILD_STRIP! from our list.
47471    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47472    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47473      # If it failed, the variable was not from the command line. Ignore it,
47474      # but warn the user (except for BASH, which is always set by the calling BASH).
47475      if test "xBUILD_STRIP" != xBASH; then
47476        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47477$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47478      fi
47479      # Try to locate tool using the code snippet
47480      for ac_prog in strip
47481do
47482  # Extract the first word of "$ac_prog", so it can be a program name with args.
47483set dummy $ac_prog; ac_word=$2
47484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47485$as_echo_n "checking for $ac_word... " >&6; }
47486if ${ac_cv_path_BUILD_STRIP+:} false; then :
47487  $as_echo_n "(cached) " >&6
47488else
47489  case $BUILD_STRIP in
47490  [\\/]* | ?:[\\/]*)
47491  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47492  ;;
47493  *)
47494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47495for as_dir in $PATH
47496do
47497  IFS=$as_save_IFS
47498  test -z "$as_dir" && as_dir=.
47499    for ac_exec_ext in '' $ac_executable_extensions; do
47500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47501    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47503    break 2
47504  fi
47505done
47506  done
47507IFS=$as_save_IFS
47508
47509  ;;
47510esac
47511fi
47512BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47513if test -n "$BUILD_STRIP"; then
47514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47515$as_echo "$BUILD_STRIP" >&6; }
47516else
47517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47518$as_echo "no" >&6; }
47519fi
47520
47521
47522  test -n "$BUILD_STRIP" && break
47523done
47524
47525    else
47526      # If it succeeded, then it was overridden by the user. We will use it
47527      # for the tool.
47528
47529      # First remove it from the list of overridden variables, so we can test
47530      # for unknown variables in the end.
47531      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47532
47533      # Check if we try to supply an empty value
47534      if test "x$BUILD_STRIP" = x; then
47535        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47536$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47537        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47538$as_echo_n "checking for BUILD_STRIP... " >&6; }
47539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47540$as_echo "disabled" >&6; }
47541      else
47542        # Check if the provided tool contains a complete path.
47543        tool_specified="$BUILD_STRIP"
47544        tool_basename="${tool_specified##*/}"
47545        if test "x$tool_basename" = "x$tool_specified"; then
47546          # A command without a complete path is provided, search $PATH.
47547          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47548$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47549          # Extract the first word of "$tool_basename", so it can be a program name with args.
47550set dummy $tool_basename; ac_word=$2
47551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47552$as_echo_n "checking for $ac_word... " >&6; }
47553if ${ac_cv_path_BUILD_STRIP+:} false; then :
47554  $as_echo_n "(cached) " >&6
47555else
47556  case $BUILD_STRIP in
47557  [\\/]* | ?:[\\/]*)
47558  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47559  ;;
47560  *)
47561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47562for as_dir in $PATH
47563do
47564  IFS=$as_save_IFS
47565  test -z "$as_dir" && as_dir=.
47566    for ac_exec_ext in '' $ac_executable_extensions; do
47567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47568    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47570    break 2
47571  fi
47572done
47573  done
47574IFS=$as_save_IFS
47575
47576  ;;
47577esac
47578fi
47579BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47580if test -n "$BUILD_STRIP"; then
47581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47582$as_echo "$BUILD_STRIP" >&6; }
47583else
47584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47585$as_echo "no" >&6; }
47586fi
47587
47588
47589          if test "x$BUILD_STRIP" = x; then
47590            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47591          fi
47592        else
47593          # Otherwise we believe it is a complete path. Use it as it is.
47594          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47595$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47596          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47597$as_echo_n "checking for BUILD_STRIP... " >&6; }
47598          if test ! -x "$tool_specified"; then
47599            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47600$as_echo "not found" >&6; }
47601            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47602          fi
47603          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47604$as_echo "$tool_specified" >&6; }
47605        fi
47606      fi
47607    fi
47608
47609  fi
47610
47611
47612
47613  # Only process if variable expands to non-empty
47614
47615  if test "x$BUILD_STRIP" != x; then
47616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47617
47618  # First separate the path from the arguments. This will split at the first
47619  # space.
47620  complete="$BUILD_STRIP"
47621  path="${complete%% *}"
47622  tmp="$complete EOL"
47623  arguments="${tmp#* }"
47624
47625  # Input might be given as Windows format, start by converting to
47626  # unix format.
47627  new_path=`$CYGPATH -u "$path"`
47628
47629  # Now try to locate executable using which
47630  new_path=`$WHICH "$new_path" 2> /dev/null`
47631  # bat and cmd files are not always considered executable in cygwin causing which
47632  # to not find them
47633  if test "x$new_path" = x \
47634      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47635      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47636    new_path=`$CYGPATH -u "$path"`
47637  fi
47638  if test "x$new_path" = x; then
47639    # Oops. Which didn't find the executable.
47640    # The splitting of arguments from the executable at a space might have been incorrect,
47641    # since paths with space are more likely in Windows. Give it another try with the whole
47642    # argument.
47643    path="$complete"
47644    arguments="EOL"
47645    new_path=`$CYGPATH -u "$path"`
47646    new_path=`$WHICH "$new_path" 2> /dev/null`
47647    # bat and cmd files are not always considered executable in cygwin causing which
47648    # to not find them
47649    if test "x$new_path" = x \
47650        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47651        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47652      new_path=`$CYGPATH -u "$path"`
47653    fi
47654    if test "x$new_path" = x; then
47655      # It's still not found. Now this is an unrecoverable error.
47656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47657$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47658      has_space=`$ECHO "$complete" | $GREP " "`
47659      if test "x$has_space" != x; then
47660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47662      fi
47663      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47664    fi
47665  fi
47666
47667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47670  # "foo.exe" is OK but "foo" is an error.
47671  #
47672  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47673  # It is also a way to make sure we got the proper file name for the real test later on.
47674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47675  if test "x$test_shortpath" = x; then
47676    # Short path failed, file does not exist as specified.
47677    # Try adding .exe or .cmd
47678    if test -f "${new_path}.exe"; then
47679      input_to_shortpath="${new_path}.exe"
47680    elif test -f "${new_path}.cmd"; then
47681      input_to_shortpath="${new_path}.cmd"
47682    else
47683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47684$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47685      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47686$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47687      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47688    fi
47689  else
47690    input_to_shortpath="$new_path"
47691  fi
47692
47693  # Call helper function which possibly converts this using DOS-style short mode.
47694  # If so, the updated path is stored in $new_path.
47695  new_path="$input_to_shortpath"
47696
47697  input_path="$input_to_shortpath"
47698  # Check if we need to convert this using DOS-style short mode. If the path
47699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47700  # take no chances and rewrite it.
47701  # Note: m4 eats our [], so we need to use [ and ] instead.
47702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47703  if test "x$has_forbidden_chars" != x; then
47704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47705    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47706    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47707    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47708      # Going to short mode and back again did indeed matter. Since short mode is
47709      # case insensitive, let's make it lowercase to improve readability.
47710      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47711      # Now convert it back to Unix-style (cygpath)
47712      input_path=`$CYGPATH -u "$shortmode_path"`
47713      new_path="$input_path"
47714    fi
47715  fi
47716
47717  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47718  if test "x$test_cygdrive_prefix" = x; then
47719    # As a simple fix, exclude /usr/bin since it's not a real path.
47720    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47721      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47722      # a path prefixed by /cygdrive for fixpath to work.
47723      new_path="$CYGWIN_ROOT_PATH$input_path"
47724    fi
47725  fi
47726
47727  # remove trailing .exe if any
47728  new_path="${new_path/%.exe/}"
47729
47730    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47731
47732  # First separate the path from the arguments. This will split at the first
47733  # space.
47734  complete="$BUILD_STRIP"
47735  path="${complete%% *}"
47736  tmp="$complete EOL"
47737  arguments="${tmp#* }"
47738
47739  # Input might be given as Windows format, start by converting to
47740  # unix format.
47741  new_path="$path"
47742
47743  windows_path="$new_path"
47744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47745    unix_path=`$CYGPATH -u "$windows_path"`
47746    new_path="$unix_path"
47747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47749    new_path="$unix_path"
47750  fi
47751
47752
47753  # Now try to locate executable using which
47754  new_path=`$WHICH "$new_path" 2> /dev/null`
47755
47756  if test "x$new_path" = x; then
47757    # Oops. Which didn't find the executable.
47758    # The splitting of arguments from the executable at a space might have been incorrect,
47759    # since paths with space are more likely in Windows. Give it another try with the whole
47760    # argument.
47761    path="$complete"
47762    arguments="EOL"
47763    new_path="$path"
47764
47765  windows_path="$new_path"
47766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47767    unix_path=`$CYGPATH -u "$windows_path"`
47768    new_path="$unix_path"
47769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47771    new_path="$unix_path"
47772  fi
47773
47774
47775    new_path=`$WHICH "$new_path" 2> /dev/null`
47776    # bat and cmd files are not always considered executable in MSYS causing which
47777    # to not find them
47778    if test "x$new_path" = x \
47779        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47780        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47781      new_path="$path"
47782
47783  windows_path="$new_path"
47784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47785    unix_path=`$CYGPATH -u "$windows_path"`
47786    new_path="$unix_path"
47787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47789    new_path="$unix_path"
47790  fi
47791
47792    fi
47793
47794    if test "x$new_path" = x; then
47795      # It's still not found. Now this is an unrecoverable error.
47796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47797$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47798      has_space=`$ECHO "$complete" | $GREP " "`
47799      if test "x$has_space" != x; then
47800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47802      fi
47803      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47804    fi
47805  fi
47806
47807  # Now new_path has a complete unix path to the binary
47808  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47809    # Keep paths in /bin as-is, but remove trailing .exe if any
47810    new_path="${new_path/%.exe/}"
47811    # Do not save /bin paths to all_fixpath_prefixes!
47812  else
47813    # Not in mixed or Windows style, start by that.
47814    new_path=`cmd //c echo $new_path`
47815
47816  input_path="$new_path"
47817  # Check if we need to convert this using DOS-style short mode. If the path
47818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47819  # take no chances and rewrite it.
47820  # Note: m4 eats our [], so we need to use [ and ] instead.
47821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47822  if test "x$has_forbidden_chars" != x; then
47823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47825  fi
47826
47827    # Output is in $new_path
47828
47829  windows_path="$new_path"
47830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47831    unix_path=`$CYGPATH -u "$windows_path"`
47832    new_path="$unix_path"
47833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47835    new_path="$unix_path"
47836  fi
47837
47838    # remove trailing .exe if any
47839    new_path="${new_path/%.exe/}"
47840
47841    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47842    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47843  fi
47844
47845    else
47846      # We're on a unix platform. Hooray! :)
47847      # First separate the path from the arguments. This will split at the first
47848      # space.
47849      complete="$BUILD_STRIP"
47850      path="${complete%% *}"
47851      tmp="$complete EOL"
47852      arguments="${tmp#* }"
47853
47854      # Cannot rely on the command "which" here since it doesn't always work.
47855      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47856      if test -z "$is_absolute_path"; then
47857        # Path to executable is not absolute. Find it.
47858        IFS_save="$IFS"
47859        IFS=:
47860        for p in $PATH; do
47861          if test -f "$p/$path" && test -x "$p/$path"; then
47862            new_path="$p/$path"
47863            break
47864          fi
47865        done
47866        IFS="$IFS_save"
47867      else
47868        # This is an absolute path, we can use it without further modifications.
47869        new_path="$path"
47870      fi
47871
47872      if test "x$new_path" = x; then
47873        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47874$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47875        has_space=`$ECHO "$complete" | $GREP " "`
47876        if test "x$has_space" != x; then
47877          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47878$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47879        fi
47880        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47881      fi
47882    fi
47883
47884    # Now join together the path and the arguments once again
47885    if test "x$arguments" != xEOL; then
47886      new_complete="$new_path ${arguments% *}"
47887    else
47888      new_complete="$new_path"
47889    fi
47890
47891    if test "x$complete" != "x$new_complete"; then
47892      BUILD_STRIP="$new_complete"
47893      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47894$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47895    fi
47896  fi
47897
47898    # Assume the C compiler is the assembler
47899    BUILD_AS="$BUILD_CC -c"
47900    # Just like for the target compiler, use the compiler as linker
47901    BUILD_LD="$BUILD_CC"
47902    BUILD_LDCXX="$BUILD_CXX"
47903
47904    PATH="$OLDPATH"
47905
47906
47907  COMPILER=$BUILD_CC
47908  COMPILER_NAME=BuildC
47909
47910  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47911    # cc -V output typically looks like
47912    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47913    # or
47914    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47915    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47916    # Check that this is likely to be the Solaris Studio cc.
47917    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47918    if test $? -ne 0; then
47919      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47920      { $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
47921$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47922      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47923$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47924      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47925$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47926      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47927    fi
47928    # Remove usage instructions (if present), and
47929    # collapse compiler output into a single line
47930    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47931        $SED -e 's/ *[Uu]sage:.*//'`
47932    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47933        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47934  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47935    # xlc -qversion output typically looks like
47936    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47937    #     Version: 11.01.0000.0015
47938    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47939    # Check that this is likely to be the IBM XL C compiler.
47940    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47941    if test $? -ne 0; then
47942      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47943      { $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
47944$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47945      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47946$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47947      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47948$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47949      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47950    fi
47951    # Collapse compiler output into a single line
47952    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47953    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47954        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47955  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47956    # There is no specific version flag, but all output starts with a version string.
47957    # First line typically looks something like:
47958    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47959    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47960    # Check that this is likely to be Microsoft CL.EXE.
47961    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47962    if test $? -ne 0; then
47963      { $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
47964$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47965      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47966$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47967      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47968    fi
47969    # Collapse compiler output into a single line
47970    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47971    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47972        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47973  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47974    # gcc --version output typically looks like
47975    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47976    #     Copyright (C) 2013 Free Software Foundation, Inc.
47977    #     This is free software; see the source for copying conditions.  There is NO
47978    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47979    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47980    # Check that this is likely to be GCC.
47981    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47982    if test $? -ne 0; then
47983      { $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
47984$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47985      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47986$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47987      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47988    fi
47989    # Remove Copyright and legalese from version string, and
47990    # collapse into a single line
47991    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47992        $SED -e 's/ *Copyright .*//'`
47993    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47994        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47995  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47996    # clang --version output typically looks like
47997    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47998    #    clang version 3.3 (tags/RELEASE_33/final)
47999    # or
48000    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48001    #    Target: x86_64-pc-linux-gnu
48002    #    Thread model: posix
48003    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48004    # Check that this is likely to be clang
48005    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48006    if test $? -ne 0; then
48007      { $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
48008$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48009      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48010$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48011      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48012    fi
48013    # Collapse compiler output into a single line
48014    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48015    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48016        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48017  else
48018      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48019  fi
48020  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48021  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48022  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48023  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
48024
48025  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48026$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48027
48028
48029  COMPILER=$BUILD_CXX
48030  COMPILER_NAME=BuildC++
48031
48032  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48033    # cc -V output typically looks like
48034    #     cc: Sun C 5.12 Linux_i386 2011/11/16
48035    # or
48036    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48037    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48038    # Check that this is likely to be the Solaris Studio cc.
48039    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48040    if test $? -ne 0; then
48041      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48042      { $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
48043$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48044      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48045$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48046      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48047$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48048      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48049    fi
48050    # Remove usage instructions (if present), and
48051    # collapse compiler output into a single line
48052    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48053        $SED -e 's/ *[Uu]sage:.*//'`
48054    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48055        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48056  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48057    # xlc -qversion output typically looks like
48058    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48059    #     Version: 11.01.0000.0015
48060    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48061    # Check that this is likely to be the IBM XL C compiler.
48062    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48063    if test $? -ne 0; then
48064      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48065      { $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
48066$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48067      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48068$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48069      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48070$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48071      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48072    fi
48073    # Collapse compiler output into a single line
48074    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48075    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48076        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48077  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48078    # There is no specific version flag, but all output starts with a version string.
48079    # First line typically looks something like:
48080    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48081    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48082    # Check that this is likely to be Microsoft CL.EXE.
48083    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48084    if test $? -ne 0; then
48085      { $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
48086$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48087      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48088$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48089      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48090    fi
48091    # Collapse compiler output into a single line
48092    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48093    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48094        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48095  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48096    # gcc --version output typically looks like
48097    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48098    #     Copyright (C) 2013 Free Software Foundation, Inc.
48099    #     This is free software; see the source for copying conditions.  There is NO
48100    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48101    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48102    # Check that this is likely to be GCC.
48103    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48104    if test $? -ne 0; then
48105      { $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
48106$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48107      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48108$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48109      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48110    fi
48111    # Remove Copyright and legalese from version string, and
48112    # collapse into a single line
48113    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48114        $SED -e 's/ *Copyright .*//'`
48115    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48116        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48117  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48118    # clang --version output typically looks like
48119    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48120    #    clang version 3.3 (tags/RELEASE_33/final)
48121    # or
48122    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48123    #    Target: x86_64-pc-linux-gnu
48124    #    Thread model: posix
48125    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48126    # Check that this is likely to be clang
48127    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48128    if test $? -ne 0; then
48129      { $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
48130$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48131      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48132$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48133      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48134    fi
48135    # Collapse compiler output into a single line
48136    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48137    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48138        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48139  else
48140      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48141  fi
48142  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48143  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48144  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48145  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
48146
48147  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48148$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48149
48150
48151  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
48152    { $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
48153$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
48154    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48155$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48156  fi
48157
48158  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48159  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48160    { $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
48161$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;}
48162  fi
48163
48164  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48165    { $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
48166$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48167  fi
48168
48169  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48170
48171  else
48172    # If we are not cross compiling, use the normal target compilers for
48173    # building the build platform executables.
48174    BUILD_CC="$CC"
48175    BUILD_CXX="$CXX"
48176    BUILD_LD="$LD"
48177    BUILD_LDCXX="$LDCXX"
48178    BUILD_NM="$NM"
48179    BUILD_AS="$AS"
48180    BUILD_OBJCOPY="$OBJCOPY"
48181    BUILD_STRIP="$STRIP"
48182    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48183    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48184    BUILD_AR="$AR"
48185
48186
48187  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48188    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48189$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48190    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48191$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48192  fi
48193
48194  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48195  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48196    { $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
48197$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;}
48198  fi
48199
48200  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48201    { $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
48202$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48203  fi
48204
48205  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48206
48207  fi
48208
48209
48210
48211
48212
48213
48214
48215
48216
48217
48218
48219
48220
48221
48222  # The package path is used only on macosx?
48223  # FIXME: clean this up, and/or move it elsewhere.
48224  PACKAGE_PATH=/opt/local
48225
48226
48227  # Check for extra potential brokenness.
48228  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48229    # On Windows, double-check that we got the right compiler.
48230    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48231    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48232    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48233      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48234        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
48235      fi
48236    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48237      if test "x$COMPILER_CPU_TEST" != "xx64"; then
48238        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48239      fi
48240    fi
48241  fi
48242
48243  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48244    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48245    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48246    # This is later checked when setting flags.
48247
48248    # "-Og" suppported for GCC 4.8 and later
48249    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
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
48291
48292
48293
48294
48295
48296
48297    # Execute function body
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
48340
48341
48342
48343
48344
48345
48346    # Execute function body
48347
48348  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48349$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48350  supports=yes
48351
48352  saved_cflags="$CFLAGS"
48353  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48354  ac_ext=c
48355ac_cpp='$CPP $CPPFLAGS'
48356ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48357ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48358ac_compiler_gnu=$ac_cv_c_compiler_gnu
48359
48360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48361/* end confdefs.h.  */
48362int i;
48363_ACEOF
48364if ac_fn_c_try_compile "$LINENO"; then :
48365
48366else
48367  supports=no
48368fi
48369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48370  ac_ext=cpp
48371ac_cpp='$CXXCPP $CPPFLAGS'
48372ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48373ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48374ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48375
48376  CFLAGS="$saved_cflags"
48377
48378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48379$as_echo "$supports" >&6; }
48380  if test "x$supports" = "xyes" ; then
48381    :
48382    C_COMP_SUPPORTS="yes"
48383  else
48384    :
48385    C_COMP_SUPPORTS="no"
48386  fi
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
48440
48441
48442
48443
48444
48445
48446    # Execute function body
48447
48448  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48449$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48450  supports=yes
48451
48452  saved_cxxflags="$CXXFLAGS"
48453  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48454  ac_ext=cpp
48455ac_cpp='$CXXCPP $CPPFLAGS'
48456ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48457ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48458ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48459
48460  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48461/* end confdefs.h.  */
48462int i;
48463_ACEOF
48464if ac_fn_cxx_try_compile "$LINENO"; then :
48465
48466else
48467  supports=no
48468fi
48469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48470  ac_ext=cpp
48471ac_cpp='$CXXCPP $CPPFLAGS'
48472ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48473ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48474ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48475
48476  CXXFLAGS="$saved_cxxflags"
48477
48478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48479$as_echo "$supports" >&6; }
48480  if test "x$supports" = "xyes" ; then
48481    :
48482    CXX_COMP_SUPPORTS="yes"
48483  else
48484    :
48485    CXX_COMP_SUPPORTS="no"
48486  fi
48487
48488
48489
48490
48491
48492
48493
48494
48495
48496
48497
48498
48499
48500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48501$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48502  supports=no
48503  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48504
48505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48506$as_echo "$supports" >&6; }
48507  if test "x$supports" = "xyes" ; then
48508    :
48509    HAS_CFLAG_OPTIMIZE_DEBUG=true
48510  else
48511    :
48512    HAS_CFLAG_OPTIMIZE_DEBUG=false
48513  fi
48514
48515
48516
48517
48518
48519
48520
48521    # "-z relro" supported in GNU binutils 2.17 and later
48522    LINKER_RELRO_FLAG="-Wl,-z,relro"
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
48564
48565
48566
48567
48568
48569
48570    # Execute function body
48571
48572  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48573$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48574  supports=yes
48575
48576  saved_ldflags="$LDFLAGS"
48577  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48578  ac_ext=c
48579ac_cpp='$CPP $CPPFLAGS'
48580ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48581ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48582ac_compiler_gnu=$ac_cv_c_compiler_gnu
48583
48584  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48585/* end confdefs.h.  */
48586
48587int
48588main ()
48589{
48590
48591  ;
48592  return 0;
48593}
48594_ACEOF
48595if ac_fn_c_try_link "$LINENO"; then :
48596
48597else
48598  supports=no
48599fi
48600rm -f core conftest.err conftest.$ac_objext \
48601    conftest$ac_exeext conftest.$ac_ext
48602  ac_ext=cpp
48603ac_cpp='$CXXCPP $CPPFLAGS'
48604ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48605ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48606ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48607
48608  LDFLAGS="$saved_ldflags"
48609
48610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48611$as_echo "$supports" >&6; }
48612  if test "x$supports" = "xyes" ; then
48613    :
48614    HAS_LINKER_RELRO=true
48615  else
48616    :
48617    HAS_LINKER_RELRO=false
48618  fi
48619
48620
48621
48622
48623
48624
48625
48626
48627
48628
48629
48630
48631
48632    # "-z now" supported in GNU binutils 2.11 and later
48633    LINKER_NOW_FLAG="-Wl,-z,now"
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
48675
48676
48677
48678
48679
48680
48681    # Execute function body
48682
48683  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48684$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48685  supports=yes
48686
48687  saved_ldflags="$LDFLAGS"
48688  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48689  ac_ext=c
48690ac_cpp='$CPP $CPPFLAGS'
48691ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48692ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48693ac_compiler_gnu=$ac_cv_c_compiler_gnu
48694
48695  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48696/* end confdefs.h.  */
48697
48698int
48699main ()
48700{
48701
48702  ;
48703  return 0;
48704}
48705_ACEOF
48706if ac_fn_c_try_link "$LINENO"; then :
48707
48708else
48709  supports=no
48710fi
48711rm -f core conftest.err conftest.$ac_objext \
48712    conftest$ac_exeext conftest.$ac_ext
48713  ac_ext=cpp
48714ac_cpp='$CXXCPP $CPPFLAGS'
48715ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48716ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48717ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48718
48719  LDFLAGS="$saved_ldflags"
48720
48721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48722$as_echo "$supports" >&6; }
48723  if test "x$supports" = "xyes" ; then
48724    :
48725    HAS_LINKER_NOW=true
48726  else
48727    :
48728    HAS_LINKER_NOW=false
48729  fi
48730
48731
48732
48733
48734
48735
48736
48737
48738
48739
48740
48741
48742  fi
48743
48744  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48745  # in executable.'
48746  USING_BROKEN_SUSE_LD=no
48747  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48748    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48749$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48750    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48751    $ECHO "int main() { }" > main.c
48752    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48754$as_echo "no" >&6; }
48755      USING_BROKEN_SUSE_LD=no
48756    else
48757      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48758$as_echo "yes" >&6; }
48759      USING_BROKEN_SUSE_LD=yes
48760    fi
48761    $RM version-script.map main.c a.out
48762  fi
48763
48764
48765  # Setup hotspot lecagy names for toolchains
48766  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48767  if test "x$TOOLCHAIN_TYPE" = xclang; then
48768    HOTSPOT_TOOLCHAIN_TYPE=gcc
48769  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48770    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48771  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48772    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48773  fi
48774
48775
48776
48777# Setup the JTReg Regression Test Harness.
48778
48779
48780# Check whether --with-jtreg was given.
48781if test "${with_jtreg+set}" = set; then :
48782  withval=$with_jtreg;
48783fi
48784
48785
48786  if test "x$with_jtreg" = xno; then
48787    # jtreg disabled
48788    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48789$as_echo_n "checking for jtreg test harness... " >&6; }
48790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5
48791$as_echo "no, disabled" >&6; }
48792  elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
48793    # An explicit path is specified, use it.
48794    JT_HOME="$with_jtreg"
48795    if test ! -d "$JT_HOME"; then
48796      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5
48797    fi
48798
48799    if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48800      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5
48801    fi
48802
48803    JTREGEXE="$JT_HOME/bin/jtreg"
48804    if test ! -x "$JTREGEXE"; then
48805      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5
48806    fi
48807
48808    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48809$as_echo_n "checking for jtreg test harness... " >&6; }
48810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48811$as_echo "$JT_HOME" >&6; }
48812  else
48813    # Try to locate jtreg
48814    if test "x$JT_HOME" != x; then
48815      # JT_HOME set in environment, use it
48816      if test ! -d "$JT_HOME"; then
48817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5
48818$as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;}
48819        JT_HOME=
48820      else
48821        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48822          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5
48823$as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;}
48824          JT_HOME=
48825        elif test ! -x "$JT_HOME/bin/jtreg"; then
48826          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5
48827$as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;}
48828          JT_HOME=
48829        else
48830          JTREGEXE="$JT_HOME/bin/jtreg"
48831          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5
48832$as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;}
48833        fi
48834      fi
48835    fi
48836
48837    if test "x$JT_HOME" = x; then
48838      # JT_HOME is not set in environment, or was deemed invalid.
48839      # Try to find jtreg on path
48840
48841
48842  # Publish this variable in the help.
48843
48844
48845  if [ -z "${JTREGEXE+x}" ]; then
48846    # The variable is not set by user, try to locate tool using the code snippet
48847    for ac_prog in jtreg
48848do
48849  # Extract the first word of "$ac_prog", so it can be a program name with args.
48850set dummy $ac_prog; ac_word=$2
48851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48852$as_echo_n "checking for $ac_word... " >&6; }
48853if ${ac_cv_path_JTREGEXE+:} false; then :
48854  $as_echo_n "(cached) " >&6
48855else
48856  case $JTREGEXE in
48857  [\\/]* | ?:[\\/]*)
48858  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48859  ;;
48860  *)
48861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48862for as_dir in $PATH
48863do
48864  IFS=$as_save_IFS
48865  test -z "$as_dir" && as_dir=.
48866    for ac_exec_ext in '' $ac_executable_extensions; do
48867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48868    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48870    break 2
48871  fi
48872done
48873  done
48874IFS=$as_save_IFS
48875
48876  ;;
48877esac
48878fi
48879JTREGEXE=$ac_cv_path_JTREGEXE
48880if test -n "$JTREGEXE"; then
48881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48882$as_echo "$JTREGEXE" >&6; }
48883else
48884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48885$as_echo "no" >&6; }
48886fi
48887
48888
48889  test -n "$JTREGEXE" && break
48890done
48891
48892  else
48893    # The variable is set, but is it from the command line or the environment?
48894
48895    # Try to remove the string !JTREGEXE! from our list.
48896    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48897    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48898      # If it failed, the variable was not from the command line. Ignore it,
48899      # but warn the user (except for BASH, which is always set by the calling BASH).
48900      if test "xJTREGEXE" != xBASH; then
48901        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48902$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48903      fi
48904      # Try to locate tool using the code snippet
48905      for ac_prog in jtreg
48906do
48907  # Extract the first word of "$ac_prog", so it can be a program name with args.
48908set dummy $ac_prog; ac_word=$2
48909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48910$as_echo_n "checking for $ac_word... " >&6; }
48911if ${ac_cv_path_JTREGEXE+:} false; then :
48912  $as_echo_n "(cached) " >&6
48913else
48914  case $JTREGEXE in
48915  [\\/]* | ?:[\\/]*)
48916  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48917  ;;
48918  *)
48919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48920for as_dir in $PATH
48921do
48922  IFS=$as_save_IFS
48923  test -z "$as_dir" && as_dir=.
48924    for ac_exec_ext in '' $ac_executable_extensions; do
48925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48926    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48928    break 2
48929  fi
48930done
48931  done
48932IFS=$as_save_IFS
48933
48934  ;;
48935esac
48936fi
48937JTREGEXE=$ac_cv_path_JTREGEXE
48938if test -n "$JTREGEXE"; then
48939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48940$as_echo "$JTREGEXE" >&6; }
48941else
48942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48943$as_echo "no" >&6; }
48944fi
48945
48946
48947  test -n "$JTREGEXE" && break
48948done
48949
48950    else
48951      # If it succeeded, then it was overridden by the user. We will use it
48952      # for the tool.
48953
48954      # First remove it from the list of overridden variables, so we can test
48955      # for unknown variables in the end.
48956      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48957
48958      # Check if we try to supply an empty value
48959      if test "x$JTREGEXE" = x; then
48960        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48961$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48962        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48963$as_echo_n "checking for JTREGEXE... " >&6; }
48964        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48965$as_echo "disabled" >&6; }
48966      else
48967        # Check if the provided tool contains a complete path.
48968        tool_specified="$JTREGEXE"
48969        tool_basename="${tool_specified##*/}"
48970        if test "x$tool_basename" = "x$tool_specified"; then
48971          # A command without a complete path is provided, search $PATH.
48972          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48973$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48974          # Extract the first word of "$tool_basename", so it can be a program name with args.
48975set dummy $tool_basename; ac_word=$2
48976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48977$as_echo_n "checking for $ac_word... " >&6; }
48978if ${ac_cv_path_JTREGEXE+:} false; then :
48979  $as_echo_n "(cached) " >&6
48980else
48981  case $JTREGEXE in
48982  [\\/]* | ?:[\\/]*)
48983  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48984  ;;
48985  *)
48986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48987for as_dir in $PATH
48988do
48989  IFS=$as_save_IFS
48990  test -z "$as_dir" && as_dir=.
48991    for ac_exec_ext in '' $ac_executable_extensions; do
48992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48993    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48995    break 2
48996  fi
48997done
48998  done
48999IFS=$as_save_IFS
49000
49001  ;;
49002esac
49003fi
49004JTREGEXE=$ac_cv_path_JTREGEXE
49005if test -n "$JTREGEXE"; then
49006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49007$as_echo "$JTREGEXE" >&6; }
49008else
49009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49010$as_echo "no" >&6; }
49011fi
49012
49013
49014          if test "x$JTREGEXE" = x; then
49015            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49016          fi
49017        else
49018          # Otherwise we believe it is a complete path. Use it as it is.
49019          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
49020$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
49021          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49022$as_echo_n "checking for JTREGEXE... " >&6; }
49023          if test ! -x "$tool_specified"; then
49024            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49025$as_echo "not found" >&6; }
49026            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
49027          fi
49028          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49029$as_echo "$tool_specified" >&6; }
49030        fi
49031      fi
49032    fi
49033
49034  fi
49035
49036
49037      if test "x$JTREGEXE" != x; then
49038        # That's good, now try to derive JT_HOME
49039        JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
49040        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
49041          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5
49042$as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;}
49043          JT_HOME=
49044          JTREGEXE=
49045        else
49046          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5
49047$as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;}
49048        fi
49049      fi
49050    fi
49051
49052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
49053$as_echo_n "checking for jtreg test harness... " >&6; }
49054    if test "x$JT_HOME" != x; then
49055      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
49056$as_echo "$JT_HOME" >&6; }
49057    else
49058      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5
49059$as_echo "no, not found" >&6; }
49060
49061      if test "x$with_jtreg" = xyes; then
49062        as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5
49063      fi
49064    fi
49065  fi
49066
49067
49068  # Only process if variable expands to non-empty
49069
49070  if test "x$JTREGEXE" != x; then
49071    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49072
49073  # First separate the path from the arguments. This will split at the first
49074  # space.
49075  complete="$JTREGEXE"
49076  path="${complete%% *}"
49077  tmp="$complete EOL"
49078  arguments="${tmp#* }"
49079
49080  # Input might be given as Windows format, start by converting to
49081  # unix format.
49082  new_path=`$CYGPATH -u "$path"`
49083
49084  # Now try to locate executable using which
49085  new_path=`$WHICH "$new_path" 2> /dev/null`
49086  # bat and cmd files are not always considered executable in cygwin causing which
49087  # to not find them
49088  if test "x$new_path" = x \
49089      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49090      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49091    new_path=`$CYGPATH -u "$path"`
49092  fi
49093  if test "x$new_path" = x; then
49094    # Oops. Which didn't find the executable.
49095    # The splitting of arguments from the executable at a space might have been incorrect,
49096    # since paths with space are more likely in Windows. Give it another try with the whole
49097    # argument.
49098    path="$complete"
49099    arguments="EOL"
49100    new_path=`$CYGPATH -u "$path"`
49101    new_path=`$WHICH "$new_path" 2> /dev/null`
49102    # bat and cmd files are not always considered executable in cygwin causing which
49103    # to not find them
49104    if test "x$new_path" = x \
49105        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49106        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49107      new_path=`$CYGPATH -u "$path"`
49108    fi
49109    if test "x$new_path" = x; then
49110      # It's still not found. Now this is an unrecoverable error.
49111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49112$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49113      has_space=`$ECHO "$complete" | $GREP " "`
49114      if test "x$has_space" != x; then
49115        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49116$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49117      fi
49118      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49119    fi
49120  fi
49121
49122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49125  # "foo.exe" is OK but "foo" is an error.
49126  #
49127  # This test is therefore slightly more accurate than "test -f" to check for file presence.
49128  # It is also a way to make sure we got the proper file name for the real test later on.
49129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49130  if test "x$test_shortpath" = x; then
49131    # Short path failed, file does not exist as specified.
49132    # Try adding .exe or .cmd
49133    if test -f "${new_path}.exe"; then
49134      input_to_shortpath="${new_path}.exe"
49135    elif test -f "${new_path}.cmd"; then
49136      input_to_shortpath="${new_path}.cmd"
49137    else
49138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&5
49139$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&6;}
49140      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
49141$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
49142      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49143    fi
49144  else
49145    input_to_shortpath="$new_path"
49146  fi
49147
49148  # Call helper function which possibly converts this using DOS-style short mode.
49149  # If so, the updated path is stored in $new_path.
49150  new_path="$input_to_shortpath"
49151
49152  input_path="$input_to_shortpath"
49153  # Check if we need to convert this using DOS-style short mode. If the path
49154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49155  # take no chances and rewrite it.
49156  # Note: m4 eats our [], so we need to use [ and ] instead.
49157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49158  if test "x$has_forbidden_chars" != x; then
49159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49163      # Going to short mode and back again did indeed matter. Since short mode is
49164      # case insensitive, let's make it lowercase to improve readability.
49165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49166      # Now convert it back to Unix-style (cygpath)
49167      input_path=`$CYGPATH -u "$shortmode_path"`
49168      new_path="$input_path"
49169    fi
49170  fi
49171
49172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49173  if test "x$test_cygdrive_prefix" = x; then
49174    # As a simple fix, exclude /usr/bin since it's not a real path.
49175    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
49176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49177      # a path prefixed by /cygdrive for fixpath to work.
49178      new_path="$CYGWIN_ROOT_PATH$input_path"
49179    fi
49180  fi
49181
49182  # remove trailing .exe if any
49183  new_path="${new_path/%.exe/}"
49184
49185    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49186
49187  # First separate the path from the arguments. This will split at the first
49188  # space.
49189  complete="$JTREGEXE"
49190  path="${complete%% *}"
49191  tmp="$complete EOL"
49192  arguments="${tmp#* }"
49193
49194  # Input might be given as Windows format, start by converting to
49195  # unix format.
49196  new_path="$path"
49197
49198  windows_path="$new_path"
49199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49200    unix_path=`$CYGPATH -u "$windows_path"`
49201    new_path="$unix_path"
49202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49204    new_path="$unix_path"
49205  fi
49206
49207
49208  # Now try to locate executable using which
49209  new_path=`$WHICH "$new_path" 2> /dev/null`
49210
49211  if test "x$new_path" = x; then
49212    # Oops. Which didn't find the executable.
49213    # The splitting of arguments from the executable at a space might have been incorrect,
49214    # since paths with space are more likely in Windows. Give it another try with the whole
49215    # argument.
49216    path="$complete"
49217    arguments="EOL"
49218    new_path="$path"
49219
49220  windows_path="$new_path"
49221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49222    unix_path=`$CYGPATH -u "$windows_path"`
49223    new_path="$unix_path"
49224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49226    new_path="$unix_path"
49227  fi
49228
49229
49230    new_path=`$WHICH "$new_path" 2> /dev/null`
49231    # bat and cmd files are not always considered executable in MSYS causing which
49232    # to not find them
49233    if test "x$new_path" = x \
49234        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49235        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49236      new_path="$path"
49237
49238  windows_path="$new_path"
49239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49240    unix_path=`$CYGPATH -u "$windows_path"`
49241    new_path="$unix_path"
49242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49244    new_path="$unix_path"
49245  fi
49246
49247    fi
49248
49249    if test "x$new_path" = x; then
49250      # It's still not found. Now this is an unrecoverable error.
49251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49252$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49253      has_space=`$ECHO "$complete" | $GREP " "`
49254      if test "x$has_space" != x; then
49255        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49256$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49257      fi
49258      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49259    fi
49260  fi
49261
49262  # Now new_path has a complete unix path to the binary
49263  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
49264    # Keep paths in /bin as-is, but remove trailing .exe if any
49265    new_path="${new_path/%.exe/}"
49266    # Do not save /bin paths to all_fixpath_prefixes!
49267  else
49268    # Not in mixed or Windows style, start by that.
49269    new_path=`cmd //c echo $new_path`
49270
49271  input_path="$new_path"
49272  # Check if we need to convert this using DOS-style short mode. If the path
49273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49274  # take no chances and rewrite it.
49275  # Note: m4 eats our [], so we need to use [ and ] instead.
49276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49277  if test "x$has_forbidden_chars" != x; then
49278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49280  fi
49281
49282    # Output is in $new_path
49283
49284  windows_path="$new_path"
49285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49286    unix_path=`$CYGPATH -u "$windows_path"`
49287    new_path="$unix_path"
49288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49290    new_path="$unix_path"
49291  fi
49292
49293    # remove trailing .exe if any
49294    new_path="${new_path/%.exe/}"
49295
49296    # Save the first 10 bytes of this path to the storage, so fixpath can work.
49297    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49298  fi
49299
49300    else
49301      # We're on a unix platform. Hooray! :)
49302      # First separate the path from the arguments. This will split at the first
49303      # space.
49304      complete="$JTREGEXE"
49305      path="${complete%% *}"
49306      tmp="$complete EOL"
49307      arguments="${tmp#* }"
49308
49309      # Cannot rely on the command "which" here since it doesn't always work.
49310      is_absolute_path=`$ECHO "$path" | $GREP ^/`
49311      if test -z "$is_absolute_path"; then
49312        # Path to executable is not absolute. Find it.
49313        IFS_save="$IFS"
49314        IFS=:
49315        for p in $PATH; do
49316          if test -f "$p/$path" && test -x "$p/$path"; then
49317            new_path="$p/$path"
49318            break
49319          fi
49320        done
49321        IFS="$IFS_save"
49322      else
49323        # This is an absolute path, we can use it without further modifications.
49324        new_path="$path"
49325      fi
49326
49327      if test "x$new_path" = x; then
49328        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49329$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49330        has_space=`$ECHO "$complete" | $GREP " "`
49331        if test "x$has_space" != x; then
49332          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
49333$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
49334        fi
49335        as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49336      fi
49337    fi
49338
49339    # Now join together the path and the arguments once again
49340    if test "x$arguments" != xEOL; then
49341      new_complete="$new_path ${arguments% *}"
49342    else
49343      new_complete="$new_path"
49344    fi
49345
49346    if test "x$complete" != "x$new_complete"; then
49347      JTREGEXE="$new_complete"
49348      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JTREGEXE to \"$new_complete\"" >&5
49349$as_echo "$as_me: Rewriting JTREGEXE to \"$new_complete\"" >&6;}
49350    fi
49351  fi
49352
49353
49354  # Only process if variable expands to non-empty
49355
49356  if test "x$JT_HOME" != x; then
49357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49358
49359  # Input might be given as Windows format, start by converting to
49360  # unix format.
49361  path="$JT_HOME"
49362  new_path=`$CYGPATH -u "$path"`
49363
49364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49367  # "foo.exe" is OK but "foo" is an error.
49368  #
49369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49370  # It is also a way to make sure we got the proper file name for the real test later on.
49371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49372  if test "x$test_shortpath" = x; then
49373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49374$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49375    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
49376  fi
49377
49378  # Call helper function which possibly converts this using DOS-style short mode.
49379  # If so, the updated path is stored in $new_path.
49380
49381  input_path="$new_path"
49382  # Check if we need to convert this using DOS-style short mode. If the path
49383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49384  # take no chances and rewrite it.
49385  # Note: m4 eats our [], so we need to use [ and ] instead.
49386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49387  if test "x$has_forbidden_chars" != x; then
49388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49392      # Going to short mode and back again did indeed matter. Since short mode is
49393      # case insensitive, let's make it lowercase to improve readability.
49394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49395      # Now convert it back to Unix-style (cygpath)
49396      input_path=`$CYGPATH -u "$shortmode_path"`
49397      new_path="$input_path"
49398    fi
49399  fi
49400
49401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49402  if test "x$test_cygdrive_prefix" = x; then
49403    # As a simple fix, exclude /usr/bin since it's not a real path.
49404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49406      # a path prefixed by /cygdrive for fixpath to work.
49407      new_path="$CYGWIN_ROOT_PATH$input_path"
49408    fi
49409  fi
49410
49411
49412  if test "x$path" != "x$new_path"; then
49413    JT_HOME="$new_path"
49414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49415$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49416  fi
49417
49418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49419
49420  path="$JT_HOME"
49421  has_colon=`$ECHO $path | $GREP ^.:`
49422  new_path="$path"
49423  if test "x$has_colon" = x; then
49424    # Not in mixed or Windows style, start by that.
49425    new_path=`cmd //c echo $path`
49426  fi
49427
49428
49429  input_path="$new_path"
49430  # Check if we need to convert this using DOS-style short mode. If the path
49431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49432  # take no chances and rewrite it.
49433  # Note: m4 eats our [], so we need to use [ and ] instead.
49434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49435  if test "x$has_forbidden_chars" != x; then
49436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49438  fi
49439
49440
49441  windows_path="$new_path"
49442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49443    unix_path=`$CYGPATH -u "$windows_path"`
49444    new_path="$unix_path"
49445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49447    new_path="$unix_path"
49448  fi
49449
49450  if test "x$path" != "x$new_path"; then
49451    JT_HOME="$new_path"
49452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49453$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49454  fi
49455
49456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49458
49459    else
49460      # We're on a unix platform. Hooray! :)
49461      path="$JT_HOME"
49462      has_space=`$ECHO "$path" | $GREP " "`
49463      if test "x$has_space" != x; then
49464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49465$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49466        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49467      fi
49468
49469      # Use eval to expand a potential ~
49470      eval path="$path"
49471      if test ! -f "$path" && test ! -d "$path"; then
49472        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
49473      fi
49474
49475      if test -d "$path"; then
49476        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
49477      else
49478        dir="`$DIRNAME "$path"`"
49479        base="`$BASENAME "$path"`"
49480        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
49481      fi
49482    fi
49483  fi
49484
49485
49486
49487
49488
49489# Setup Jib dependency tool
49490
49491
49492# Check whether --with-jib was given.
49493if test "${with_jib+set}" = set; then :
49494  withval=$with_jib;
49495fi
49496
49497
49498  if test "x$with_jib" = xno || test "x$with_jib" = x; then
49499    # jib disabled
49500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49501$as_echo_n "checking for jib... " >&6; }
49502    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49503$as_echo "no" >&6; }
49504  elif test "x$with_jib" = xyes; then
49505    as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
49506  else
49507    JIB_HOME="${with_jib}"
49508    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49509$as_echo_n "checking for jib... " >&6; }
49510    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
49511$as_echo "${JIB_HOME}" >&6; }
49512    if test ! -d "${JIB_HOME}"; then
49513      as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
49514    fi
49515    JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
49516    if test ! -f "${JIB_JAR}"; then
49517      as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
49518    fi
49519  fi
49520
49521
49522
49523
49524
49525  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
49526  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
49527  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
49528  #                              commands produced by the link step (currently AIX only)
49529  if test "x$TOOLCHAIN_TYPE" = xxlc; then
49530    COMPILER_TARGET_BITS_FLAG="-q"
49531    COMPILER_COMMAND_FILE_FLAG="-f"
49532    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
49533  else
49534    COMPILER_TARGET_BITS_FLAG="-m"
49535    COMPILER_COMMAND_FILE_FLAG="@"
49536    COMPILER_BINDCMD_FILE_FLAG=""
49537
49538    # The solstudio linker does not support @-files.
49539    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49540      COMPILER_COMMAND_FILE_FLAG=
49541    fi
49542
49543    # Check if @file is supported by gcc
49544    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49545      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
49546$as_echo_n "checking if @file is supported by gcc... " >&6; }
49547      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
49548      $ECHO "" "--version" > command.file
49549      if $CXX @command.file 2>&5 >&5; then
49550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49551$as_echo "yes" >&6; }
49552        COMPILER_COMMAND_FILE_FLAG="@"
49553      else
49554        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49555$as_echo "no" >&6; }
49556        COMPILER_COMMAND_FILE_FLAG=
49557      fi
49558      $RM command.file
49559    fi
49560  fi
49561
49562
49563
49564
49565  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49566  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49567    ARFLAGS="-r"
49568  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49569    ARFLAGS="-X64"
49570  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49571    # lib.exe is used as AR to create static libraries.
49572    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49573  else
49574    ARFLAGS=""
49575  fi
49576
49577
49578  ## Setup strip.
49579  # FIXME: should this really be per platform, or should it be per toolchain type?
49580  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49581  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49582  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49583    STRIPFLAGS="-g"
49584  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49585    STRIPFLAGS="-x"
49586  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49587    STRIPFLAGS="-S"
49588  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49589    STRIPFLAGS="-X32_64"
49590  fi
49591
49592
49593
49594  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49595    CC_OUT_OPTION=-Fo
49596    EXE_OUT_OPTION=-out:
49597    LD_OUT_OPTION=-out:
49598    AR_OUT_OPTION=-out:
49599  else
49600    # The option used to specify the target .o,.a or .so file.
49601    # When compiling, how to specify the to be created object file.
49602    CC_OUT_OPTION='-o$(SPACE)'
49603    # When linking, how to specify the to be created executable.
49604    EXE_OUT_OPTION='-o$(SPACE)'
49605    # When linking, how to specify the to be created dynamically linkable library.
49606    LD_OUT_OPTION='-o$(SPACE)'
49607    # When archiving, how to specify the to be create static archive for object files.
49608    AR_OUT_OPTION='rcs$(SPACE)'
49609  fi
49610
49611
49612
49613
49614
49615  # On Windows, we need to set RC flags.
49616  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49617    RC_FLAGS="-nologo -l0x409"
49618    JVM_RCFLAGS="-nologo"
49619    if test "x$DEBUG_LEVEL" = xrelease; then
49620      RC_FLAGS="$RC_FLAGS -DNDEBUG"
49621      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49622    fi
49623
49624    # The version variables used to create RC_FLAGS may be overridden
49625    # in a custom configure script, or possibly the command line.
49626    # Let those variables be expanded at make time in spec.gmk.
49627    # The \$ are escaped to the shell, and the $(...) variables
49628    # are evaluated by make.
49629    RC_FLAGS="$RC_FLAGS \
49630        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49631        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49632        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49633        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49634        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49635        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49636        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49637
49638    JVM_RCFLAGS="$JVM_RCFLAGS \
49639        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49640        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49641        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49642        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49643        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49644        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49645        -D\"HS_FNAME=jvm.dll\" \
49646        -D\"HS_INTERNAL_NAME=jvm\""
49647  fi
49648
49649
49650
49651  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49652    # silence copyright notice and other headers.
49653    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49654  fi
49655
49656
49657# Now we can test some aspects on the target using configure macros.
49658
49659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49660$as_echo_n "checking for ANSI C header files... " >&6; }
49661if ${ac_cv_header_stdc+:} false; then :
49662  $as_echo_n "(cached) " >&6
49663else
49664  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49665/* end confdefs.h.  */
49666#include <stdlib.h>
49667#include <stdarg.h>
49668#include <string.h>
49669#include <float.h>
49670
49671int
49672main ()
49673{
49674
49675  ;
49676  return 0;
49677}
49678_ACEOF
49679if ac_fn_cxx_try_compile "$LINENO"; then :
49680  ac_cv_header_stdc=yes
49681else
49682  ac_cv_header_stdc=no
49683fi
49684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49685
49686if test $ac_cv_header_stdc = yes; then
49687  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49688  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49689/* end confdefs.h.  */
49690#include <string.h>
49691
49692_ACEOF
49693if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49694  $EGREP "memchr" >/dev/null 2>&1; then :
49695
49696else
49697  ac_cv_header_stdc=no
49698fi
49699rm -f conftest*
49700
49701fi
49702
49703if test $ac_cv_header_stdc = yes; then
49704  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49705  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49706/* end confdefs.h.  */
49707#include <stdlib.h>
49708
49709_ACEOF
49710if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49711  $EGREP "free" >/dev/null 2>&1; then :
49712
49713else
49714  ac_cv_header_stdc=no
49715fi
49716rm -f conftest*
49717
49718fi
49719
49720if test $ac_cv_header_stdc = yes; then
49721  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49722  if test "$cross_compiling" = yes; then :
49723  :
49724else
49725  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49726/* end confdefs.h.  */
49727#include <ctype.h>
49728#include <stdlib.h>
49729#if ((' ' & 0x0FF) == 0x020)
49730# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49731# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49732#else
49733# define ISLOWER(c) \
49734		   (('a' <= (c) && (c) <= 'i') \
49735		     || ('j' <= (c) && (c) <= 'r') \
49736		     || ('s' <= (c) && (c) <= 'z'))
49737# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49738#endif
49739
49740#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49741int
49742main ()
49743{
49744  int i;
49745  for (i = 0; i < 256; i++)
49746    if (XOR (islower (i), ISLOWER (i))
49747	|| toupper (i) != TOUPPER (i))
49748      return 2;
49749  return 0;
49750}
49751_ACEOF
49752if ac_fn_cxx_try_run "$LINENO"; then :
49753
49754else
49755  ac_cv_header_stdc=no
49756fi
49757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49758  conftest.$ac_objext conftest.beam conftest.$ac_ext
49759fi
49760
49761fi
49762fi
49763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49764$as_echo "$ac_cv_header_stdc" >&6; }
49765if test $ac_cv_header_stdc = yes; then
49766
49767$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49768
49769fi
49770
49771# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49772for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49773		  inttypes.h stdint.h unistd.h
49774do :
49775  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49776ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49777"
49778if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49779  cat >>confdefs.h <<_ACEOF
49780#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49781_ACEOF
49782
49783fi
49784
49785done
49786
49787
49788
49789  ###############################################################################
49790  #
49791  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49792  # (The JVM can use 32 or 64 bit Java pointers but that decision
49793  # is made at runtime.)
49794  #
49795
49796  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49797    # Always specify -m flag on Solaris
49798    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49799
49800  # When we add flags to the "official" CFLAGS etc, we need to
49801  # keep track of these additions in ADDED_CFLAGS etc. These
49802  # will later be checked to make sure only controlled additions
49803  # have been made to CFLAGS etc.
49804  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49805  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49806  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49807
49808  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49809  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49810  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49811
49812  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49813  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49814  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49815
49816  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49817  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49818  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49819
49820  elif test "x$COMPILE_TYPE" = xreduced; then
49821    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49822      # Specify -m if running reduced on unix platforms
49823
49824  # When we add flags to the "official" CFLAGS etc, we need to
49825  # keep track of these additions in ADDED_CFLAGS etc. These
49826  # will later be checked to make sure only controlled additions
49827  # have been made to CFLAGS etc.
49828  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49829  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49830  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49831
49832  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49833  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49834  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49835
49836  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49837  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49838  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49839
49840  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49841  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49842  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49843
49844    fi
49845  fi
49846  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49847    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49848    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49849    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49850  fi
49851
49852  # Make compilation sanity check
49853  for ac_header in stdio.h
49854do :
49855  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49856if test "x$ac_cv_header_stdio_h" = xyes; then :
49857  cat >>confdefs.h <<_ACEOF
49858#define HAVE_STDIO_H 1
49859_ACEOF
49860
49861else
49862
49863    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49864$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49865    if test "x$COMPILE_TYPE" = xreduced; then
49866
49867  # Print a helpful message on how to acquire the necessary build dependency.
49868  # reduced is the help tag: freetype, cups, alsa etc
49869  MISSING_DEPENDENCY=reduced
49870
49871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49872    cygwin_help $MISSING_DEPENDENCY
49873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49874    msys_help $MISSING_DEPENDENCY
49875  else
49876    PKGHANDLER_COMMAND=
49877
49878    case $PKGHANDLER in
49879      apt-get)
49880        apt_help     $MISSING_DEPENDENCY ;;
49881      yum)
49882        yum_help     $MISSING_DEPENDENCY ;;
49883      brew)
49884        brew_help    $MISSING_DEPENDENCY ;;
49885      port)
49886        port_help    $MISSING_DEPENDENCY ;;
49887      pkgutil)
49888        pkgutil_help $MISSING_DEPENDENCY ;;
49889      pkgadd)
49890        pkgadd_help  $MISSING_DEPENDENCY ;;
49891    esac
49892
49893    if test "x$PKGHANDLER_COMMAND" != x; then
49894      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49895    fi
49896  fi
49897
49898      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49899$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49900    elif test "x$COMPILE_TYPE" = xcross; then
49901      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49902$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49903    fi
49904    as_fn_error $? "Cannot continue." "$LINENO" 5
49905
49906fi
49907
49908done
49909
49910
49911  # The cast to long int works around a bug in the HP C Compiler
49912# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49913# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49914# This bug is HP SR number 8606223364.
49915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49916$as_echo_n "checking size of int *... " >&6; }
49917if ${ac_cv_sizeof_int_p+:} false; then :
49918  $as_echo_n "(cached) " >&6
49919else
49920  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49921
49922else
49923  if test "$ac_cv_type_int_p" = yes; then
49924     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49925$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49926as_fn_error 77 "cannot compute sizeof (int *)
49927See \`config.log' for more details" "$LINENO" 5; }
49928   else
49929     ac_cv_sizeof_int_p=0
49930   fi
49931fi
49932
49933fi
49934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49935$as_echo "$ac_cv_sizeof_int_p" >&6; }
49936
49937
49938
49939cat >>confdefs.h <<_ACEOF
49940#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49941_ACEOF
49942
49943
49944
49945  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49946  if test "x$ac_cv_sizeof_int_p" = x; then
49947    # The test failed, lets stick to the assumed value.
49948    { $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
49949$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49950  else
49951    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49952
49953    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49954      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49955      # Let's try to implicitely set the compilers target architecture and retry the test
49956      { $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
49957$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;}
49958      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49959$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49960
49961  # When we add flags to the "official" CFLAGS etc, we need to
49962  # keep track of these additions in ADDED_CFLAGS etc. These
49963  # will later be checked to make sure only controlled additions
49964  # have been made to CFLAGS etc.
49965  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49966  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49967  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49968
49969  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49970  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49971  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49972
49973  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49974  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49975  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49976
49977  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49978  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49979  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49980
49981
49982      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49983      unset ac_cv_sizeof_int_p
49984      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49985      cat >>confdefs.h <<_ACEOF
49986#undef SIZEOF_INT_P
49987_ACEOF
49988
49989      # The cast to long int works around a bug in the HP C Compiler
49990# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49991# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49992# This bug is HP SR number 8606223364.
49993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49994$as_echo_n "checking size of int *... " >&6; }
49995if ${ac_cv_sizeof_int_p+:} false; then :
49996  $as_echo_n "(cached) " >&6
49997else
49998  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49999
50000else
50001  if test "$ac_cv_type_int_p" = yes; then
50002     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50004as_fn_error 77 "cannot compute sizeof (int *)
50005See \`config.log' for more details" "$LINENO" 5; }
50006   else
50007     ac_cv_sizeof_int_p=0
50008   fi
50009fi
50010
50011fi
50012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50013$as_echo "$ac_cv_sizeof_int_p" >&6; }
50014
50015
50016
50017cat >>confdefs.h <<_ACEOF
50018#define SIZEOF_INT_P $ac_cv_sizeof_int_p
50019_ACEOF
50020
50021
50022
50023      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50024
50025      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50026        { $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
50027$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;}
50028        if test "x$COMPILE_TYPE" = xreduced; then
50029
50030  # Print a helpful message on how to acquire the necessary build dependency.
50031  # reduced is the help tag: freetype, cups, alsa etc
50032  MISSING_DEPENDENCY=reduced
50033
50034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50035    cygwin_help $MISSING_DEPENDENCY
50036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50037    msys_help $MISSING_DEPENDENCY
50038  else
50039    PKGHANDLER_COMMAND=
50040
50041    case $PKGHANDLER in
50042      apt-get)
50043        apt_help     $MISSING_DEPENDENCY ;;
50044      yum)
50045        yum_help     $MISSING_DEPENDENCY ;;
50046      brew)
50047        brew_help    $MISSING_DEPENDENCY ;;
50048      port)
50049        port_help    $MISSING_DEPENDENCY ;;
50050      pkgutil)
50051        pkgutil_help $MISSING_DEPENDENCY ;;
50052      pkgadd)
50053        pkgadd_help  $MISSING_DEPENDENCY ;;
50054    esac
50055
50056    if test "x$PKGHANDLER_COMMAND" != x; then
50057      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50058    fi
50059  fi
50060
50061          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
50062$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
50063        elif test "x$COMPILE_TYPE" = xcross; then
50064          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
50065$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
50066        fi
50067        as_fn_error $? "Cannot continue." "$LINENO" 5
50068      fi
50069    fi
50070  fi
50071
50072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
50073$as_echo_n "checking for target address size... " >&6; }
50074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
50075$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
50076
50077
50078  ###############################################################################
50079  #
50080  # Is the target little of big endian?
50081  #
50082   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
50083$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
50084if ${ac_cv_c_bigendian+:} false; then :
50085  $as_echo_n "(cached) " >&6
50086else
50087  ac_cv_c_bigendian=unknown
50088    # See if we're dealing with a universal compiler.
50089    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50090/* end confdefs.h.  */
50091#ifndef __APPLE_CC__
50092	       not a universal capable compiler
50093	     #endif
50094	     typedef int dummy;
50095
50096_ACEOF
50097if ac_fn_cxx_try_compile "$LINENO"; then :
50098
50099	# Check for potential -arch flags.  It is not universal unless
50100	# there are at least two -arch flags with different values.
50101	ac_arch=
50102	ac_prev=
50103	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
50104	 if test -n "$ac_prev"; then
50105	   case $ac_word in
50106	     i?86 | x86_64 | ppc | ppc64)
50107	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
50108		 ac_arch=$ac_word
50109	       else
50110		 ac_cv_c_bigendian=universal
50111		 break
50112	       fi
50113	       ;;
50114	   esac
50115	   ac_prev=
50116	 elif test "x$ac_word" = "x-arch"; then
50117	   ac_prev=arch
50118	 fi
50119       done
50120fi
50121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50122    if test $ac_cv_c_bigendian = unknown; then
50123      # See if sys/param.h defines the BYTE_ORDER macro.
50124      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50125/* end confdefs.h.  */
50126#include <sys/types.h>
50127	     #include <sys/param.h>
50128
50129int
50130main ()
50131{
50132#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
50133		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
50134		     && LITTLE_ENDIAN)
50135	      bogus endian macros
50136	     #endif
50137
50138  ;
50139  return 0;
50140}
50141_ACEOF
50142if ac_fn_cxx_try_compile "$LINENO"; then :
50143  # It does; now see whether it defined to BIG_ENDIAN or not.
50144	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50145/* end confdefs.h.  */
50146#include <sys/types.h>
50147		#include <sys/param.h>
50148
50149int
50150main ()
50151{
50152#if BYTE_ORDER != BIG_ENDIAN
50153		 not big endian
50154		#endif
50155
50156  ;
50157  return 0;
50158}
50159_ACEOF
50160if ac_fn_cxx_try_compile "$LINENO"; then :
50161  ac_cv_c_bigendian=yes
50162else
50163  ac_cv_c_bigendian=no
50164fi
50165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50166fi
50167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50168    fi
50169    if test $ac_cv_c_bigendian = unknown; then
50170      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
50171      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50172/* end confdefs.h.  */
50173#include <limits.h>
50174
50175int
50176main ()
50177{
50178#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
50179	      bogus endian macros
50180	     #endif
50181
50182  ;
50183  return 0;
50184}
50185_ACEOF
50186if ac_fn_cxx_try_compile "$LINENO"; then :
50187  # It does; now see whether it defined to _BIG_ENDIAN or not.
50188	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50189/* end confdefs.h.  */
50190#include <limits.h>
50191
50192int
50193main ()
50194{
50195#ifndef _BIG_ENDIAN
50196		 not big endian
50197		#endif
50198
50199  ;
50200  return 0;
50201}
50202_ACEOF
50203if ac_fn_cxx_try_compile "$LINENO"; then :
50204  ac_cv_c_bigendian=yes
50205else
50206  ac_cv_c_bigendian=no
50207fi
50208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50209fi
50210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50211    fi
50212    if test $ac_cv_c_bigendian = unknown; then
50213      # Compile a test program.
50214      if test "$cross_compiling" = yes; then :
50215  # Try to guess by grepping values from an object file.
50216	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50217/* end confdefs.h.  */
50218short int ascii_mm[] =
50219		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
50220		short int ascii_ii[] =
50221		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
50222		int use_ascii (int i) {
50223		  return ascii_mm[i] + ascii_ii[i];
50224		}
50225		short int ebcdic_ii[] =
50226		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
50227		short int ebcdic_mm[] =
50228		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
50229		int use_ebcdic (int i) {
50230		  return ebcdic_mm[i] + ebcdic_ii[i];
50231		}
50232		extern int foo;
50233
50234int
50235main ()
50236{
50237return use_ascii (foo) == use_ebcdic (foo);
50238  ;
50239  return 0;
50240}
50241_ACEOF
50242if ac_fn_cxx_try_compile "$LINENO"; then :
50243  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
50244	      ac_cv_c_bigendian=yes
50245	    fi
50246	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
50247	      if test "$ac_cv_c_bigendian" = unknown; then
50248		ac_cv_c_bigendian=no
50249	      else
50250		# finding both strings is unlikely to happen, but who knows?
50251		ac_cv_c_bigendian=unknown
50252	      fi
50253	    fi
50254fi
50255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50256else
50257  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50258/* end confdefs.h.  */
50259$ac_includes_default
50260int
50261main ()
50262{
50263
50264	     /* Are we little or big endian?  From Harbison&Steele.  */
50265	     union
50266	     {
50267	       long int l;
50268	       char c[sizeof (long int)];
50269	     } u;
50270	     u.l = 1;
50271	     return u.c[sizeof (long int) - 1] == 1;
50272
50273  ;
50274  return 0;
50275}
50276_ACEOF
50277if ac_fn_cxx_try_run "$LINENO"; then :
50278  ac_cv_c_bigendian=no
50279else
50280  ac_cv_c_bigendian=yes
50281fi
50282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50283  conftest.$ac_objext conftest.beam conftest.$ac_ext
50284fi
50285
50286    fi
50287fi
50288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
50289$as_echo "$ac_cv_c_bigendian" >&6; }
50290 case $ac_cv_c_bigendian in #(
50291   yes)
50292     ENDIAN="big";; #(
50293   no)
50294     ENDIAN="little" ;; #(
50295   universal)
50296     ENDIAN="universal_endianness"
50297     ;; #(
50298   *)
50299     ENDIAN="unknown" ;;
50300 esac
50301
50302
50303  if test "x$ENDIAN" = xuniversal_endianness; then
50304    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
50305  fi
50306  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
50307    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
50308  fi
50309
50310
50311# Configure flags for the tools
50312
50313  ###############################################################################
50314  #
50315  # How to compile shared libraries.
50316  #
50317
50318  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50319    PICFLAG="-fPIC"
50320    C_FLAG_REORDER=''
50321    CXX_FLAG_REORDER=''
50322
50323    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50324      # Linking is different on MacOSX
50325      if test "x$STATIC_BUILD" = xtrue; then
50326        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
50327      else
50328        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50329        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50330      fi
50331      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50332      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50333      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50334      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50335    else
50336      # Default works for linux, might work on other platforms as well.
50337      SHARED_LIBRARY_FLAGS='-shared'
50338      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50339      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50340      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50341      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50342    fi
50343  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50344    C_FLAG_REORDER=''
50345    CXX_FLAG_REORDER=''
50346
50347    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50348      # Linking is different on MacOSX
50349      PICFLAG=''
50350      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50351      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50352      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50353      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50354      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50355
50356      if test "x$STATIC_BUILD" = xfalse; then
50357        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
50358      fi
50359    else
50360      # Default works for linux, might work on other platforms as well.
50361      PICFLAG='-fPIC'
50362      SHARED_LIBRARY_FLAGS='-shared'
50363      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50364      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50365      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50366
50367      # arm specific settings
50368      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
50369        # '-Wl,-z,origin' isn't used on arm.
50370        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
50371      else
50372        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50373      fi
50374
50375    fi
50376  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50377    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50378      PICFLAG="-xcode=pic32"
50379    else
50380      PICFLAG="-KPIC"
50381    fi
50382    C_FLAG_REORDER='-xF'
50383    CXX_FLAG_REORDER='-xF'
50384    SHARED_LIBRARY_FLAGS="-G"
50385    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
50386    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50387    SET_SHARED_LIBRARY_NAME='-h $1'
50388    SET_SHARED_LIBRARY_MAPFILE='-M$1'
50389  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50390    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
50391    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
50392    # will have to patch this single instruction with a call to some out-of-order code which
50393    # does the load from the TOC. This is of course slow. But in that case we also would have
50394    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
50395    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
50396    # can be patched directly by the linker and does not require a jump to out-of-order code.
50397    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
50398    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
50399    # loads for accessing a global variable). But there are rumors that this may be seen as a
50400    # 'performance feature' because of improved code locality of the symbols used in a
50401    # compilation unit.
50402    PICFLAG="-qpic"
50403    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50404    C_FLAG_REORDER=''
50405    CXX_FLAG_REORDER=''
50406    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
50407    SET_EXECUTABLE_ORIGIN=""
50408    SET_SHARED_LIBRARY_ORIGIN=''
50409    SET_SHARED_LIBRARY_NAME=''
50410    SET_SHARED_LIBRARY_MAPFILE=''
50411  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50412    PICFLAG=""
50413    C_FLAG_REORDER=''
50414    CXX_FLAG_REORDER=''
50415    SHARED_LIBRARY_FLAGS="-dll"
50416    SET_EXECUTABLE_ORIGIN=''
50417    SET_SHARED_LIBRARY_ORIGIN=''
50418    SET_SHARED_LIBRARY_NAME=''
50419    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
50420  fi
50421
50422
50423
50424
50425
50426
50427
50428
50429
50430  # The (cross) compiler is now configured, we can now test capabilities
50431  # of the target platform.
50432
50433
50434
50435  ###############################################################################
50436  #
50437  # Setup the opt flags for different compilers
50438  # and different operating systems.
50439  #
50440
50441  # FIXME: this was indirectly the old default, but just inherited.
50442  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50443  #   C_FLAG_DEPS="-MMD -MF"
50444  # fi
50445
50446  # Generate make dependency files
50447  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50448    C_FLAG_DEPS="-MMD -MF"
50449  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50450    C_FLAG_DEPS="-MMD -MF"
50451  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50452    C_FLAG_DEPS="-xMMD -xMF"
50453  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50454    C_FLAG_DEPS="-qmakedep=gcc -MF"
50455  fi
50456  CXX_FLAG_DEPS="$C_FLAG_DEPS"
50457
50458
50459
50460  # Debug symbols
50461  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50462    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
50463      # reduce from default "-g2" option to save space
50464      CFLAGS_DEBUG_SYMBOLS="-g1"
50465      CXXFLAGS_DEBUG_SYMBOLS="-g1"
50466    else
50467      CFLAGS_DEBUG_SYMBOLS="-g"
50468      CXXFLAGS_DEBUG_SYMBOLS="-g"
50469    fi
50470  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50471    CFLAGS_DEBUG_SYMBOLS="-g"
50472    CXXFLAGS_DEBUG_SYMBOLS="-g"
50473  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50474    CFLAGS_DEBUG_SYMBOLS="-g -xs"
50475    # -g0 enables debug symbols without disabling inlining.
50476    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
50477  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50478    CFLAGS_DEBUG_SYMBOLS="-g"
50479    CXXFLAGS_DEBUG_SYMBOLS="-g"
50480  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50481    CFLAGS_DEBUG_SYMBOLS="-Zi"
50482    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
50483  fi
50484
50485
50486
50487  # Debug symbols for JVM_CFLAGS
50488  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50489    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
50490    if test "x$DEBUG_LEVEL" = xslowdebug; then
50491      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50492    else
50493      # -g0 does not disable inlining, which -g does.
50494      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
50495    fi
50496  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50497    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
50498  else
50499    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50500  fi
50501
50502
50503  # bounds, memory and behavior checking options
50504  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50505    case $DEBUG_LEVEL in
50506    release )
50507      # no adjustment
50508      ;;
50509    fastdebug )
50510      # no adjustment
50511      ;;
50512    slowdebug )
50513      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
50514      # get's added conditionally on whether we produce debug symbols or not.
50515      # This is most likely not really correct.
50516
50517      # Add runtime stack smashing and undefined behavior checks.
50518      # Not all versions of gcc support -fstack-protector
50519      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
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
50556
50557
50558
50559
50560
50561
50562    # Execute function body
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
50605
50606
50607
50608
50609
50610
50611    # Execute function body
50612
50613  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50614$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50615  supports=yes
50616
50617  saved_cflags="$CFLAGS"
50618  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50619  ac_ext=c
50620ac_cpp='$CPP $CPPFLAGS'
50621ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50622ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50623ac_compiler_gnu=$ac_cv_c_compiler_gnu
50624
50625  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50626/* end confdefs.h.  */
50627int i;
50628_ACEOF
50629if ac_fn_c_try_compile "$LINENO"; then :
50630
50631else
50632  supports=no
50633fi
50634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50635  ac_ext=cpp
50636ac_cpp='$CXXCPP $CPPFLAGS'
50637ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50638ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50639ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50640
50641  CFLAGS="$saved_cflags"
50642
50643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50644$as_echo "$supports" >&6; }
50645  if test "x$supports" = "xyes" ; then
50646    :
50647    C_COMP_SUPPORTS="yes"
50648  else
50649    :
50650    C_COMP_SUPPORTS="no"
50651  fi
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
50705
50706
50707
50708
50709
50710
50711    # Execute function body
50712
50713  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50714$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50715  supports=yes
50716
50717  saved_cxxflags="$CXXFLAGS"
50718  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50719  ac_ext=cpp
50720ac_cpp='$CXXCPP $CPPFLAGS'
50721ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50722ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50723ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50724
50725  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50726/* end confdefs.h.  */
50727int i;
50728_ACEOF
50729if ac_fn_cxx_try_compile "$LINENO"; then :
50730
50731else
50732  supports=no
50733fi
50734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50735  ac_ext=cpp
50736ac_cpp='$CXXCPP $CPPFLAGS'
50737ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50738ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50739ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50740
50741  CXXFLAGS="$saved_cxxflags"
50742
50743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50744$as_echo "$supports" >&6; }
50745  if test "x$supports" = "xyes" ; then
50746    :
50747    CXX_COMP_SUPPORTS="yes"
50748  else
50749    :
50750    CXX_COMP_SUPPORTS="no"
50751  fi
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761
50762
50763
50764
50765  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50766$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50767  supports=no
50768  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50769
50770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50771$as_echo "$supports" >&6; }
50772  if test "x$supports" = "xyes" ; then
50773    :
50774
50775  else
50776    :
50777    STACK_PROTECTOR_CFLAG=""
50778  fi
50779
50780
50781
50782
50783
50784
50785
50786      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50787      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50788      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50789        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50790      fi
50791      ;;
50792    esac
50793  fi
50794
50795  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50796    if test "x$DEBUG_LEVEL" != xrelease; then
50797      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50798        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50799      fi
50800    fi
50801  fi
50802
50803  # Optimization levels
50804  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50805    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50806
50807    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50808      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50809      C_O_FLAG_HIGHEST_JVM="-xO4"
50810      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50811      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50812      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50813      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50814      C_O_FLAG_DEBUG_JVM=""
50815      C_O_FLAG_NONE="-xregs=no%frameptr"
50816      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50817      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50818      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50819      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50820      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50821      CXX_O_FLAG_DEBUG_JVM=""
50822      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50823      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50824        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50825        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50826      fi
50827    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50828      C_O_FLAG_HIGHEST_JVM="-xO4"
50829      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50830      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50831      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50832      C_O_FLAG_DEBUG=""
50833      C_O_FLAG_DEBUG_JVM=""
50834      C_O_FLAG_NONE=""
50835      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50836      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50837      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50838      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50839      CXX_O_FLAG_DEBUG=""
50840      CXX_O_FLAG_DEBUG_JVM=""
50841      CXX_O_FLAG_NONE=""
50842    fi
50843  else
50844    # The remaining toolchains share opt flags between CC and CXX;
50845    # setup for C and duplicate afterwards.
50846    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50847      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50848        # On MacOSX we optimize for size, something
50849        # we should do for all platforms?
50850        C_O_FLAG_HIGHEST_JVM="-Os"
50851        C_O_FLAG_HIGHEST="-Os"
50852        C_O_FLAG_HI="-Os"
50853        C_O_FLAG_NORM="-Os"
50854        C_O_FLAG_SIZE="-Os"
50855      else
50856        C_O_FLAG_HIGHEST_JVM="-O3"
50857        C_O_FLAG_HIGHEST="-O3"
50858        C_O_FLAG_HI="-O3"
50859        C_O_FLAG_NORM="-O2"
50860        C_O_FLAG_SIZE="-Os"
50861      fi
50862      C_O_FLAG_DEBUG="-O0"
50863      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50864        C_O_FLAG_DEBUG_JVM=""
50865      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50866        C_O_FLAG_DEBUG_JVM="-O0"
50867      fi
50868      C_O_FLAG_NONE="-O0"
50869    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50870      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50871        # On MacOSX we optimize for size, something
50872        # we should do for all platforms?
50873        C_O_FLAG_HIGHEST_JVM="-Os"
50874        C_O_FLAG_HIGHEST="-Os"
50875        C_O_FLAG_HI="-Os"
50876        C_O_FLAG_NORM="-Os"
50877        C_O_FLAG_SIZE="-Os"
50878      else
50879        C_O_FLAG_HIGHEST_JVM="-O3"
50880        C_O_FLAG_HIGHEST="-O3"
50881        C_O_FLAG_HI="-O3"
50882        C_O_FLAG_NORM="-O2"
50883        C_O_FLAG_SIZE="-Os"
50884      fi
50885      C_O_FLAG_DEBUG="-O0"
50886      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50887        C_O_FLAG_DEBUG_JVM=""
50888      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50889        C_O_FLAG_DEBUG_JVM="-O0"
50890      fi
50891      C_O_FLAG_NONE="-O0"
50892    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50893      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50894      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50895      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50896      C_O_FLAG_NORM="-O2"
50897      C_O_FLAG_DEBUG="-qnoopt"
50898      # FIXME: Value below not verified.
50899      C_O_FLAG_DEBUG_JVM=""
50900      C_O_FLAG_NONE="-qnoopt"
50901    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50902      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50903      C_O_FLAG_HIGHEST="-O2"
50904      C_O_FLAG_HI="-O1"
50905      C_O_FLAG_NORM="-O1"
50906      C_O_FLAG_DEBUG="-Od"
50907      C_O_FLAG_DEBUG_JVM=""
50908      C_O_FLAG_NONE="-Od"
50909      C_O_FLAG_SIZE="-Os"
50910    fi
50911    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50912    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50913    CXX_O_FLAG_HI="$C_O_FLAG_HI"
50914    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50915    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50916    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50917    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50918    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50919  fi
50920
50921  # Adjust optimization flags according to debug level.
50922  case $DEBUG_LEVEL in
50923    release )
50924      # no adjustment
50925      ;;
50926    fastdebug )
50927      # Not quite so much optimization
50928      C_O_FLAG_HI="$C_O_FLAG_NORM"
50929      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50930      ;;
50931    slowdebug )
50932      # Disable optimization
50933      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50934      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50935      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50936      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50937      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50938      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50939      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50940      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50941      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50942      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50943      ;;
50944  esac
50945
50946
50947
50948
50949
50950
50951
50952
50953
50954
50955
50956
50957
50958
50959
50960
50961
50962
50963
50964
50965# Check whether --with-abi-profile was given.
50966if test "${with_abi_profile+set}" = set; then :
50967  withval=$with_abi_profile;
50968fi
50969
50970
50971  if test "x$with_abi_profile" != x; then
50972    if test "x$OPENJDK_TARGET_CPU" != xarm && \
50973        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50974      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50975    fi
50976
50977    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50979$as_echo_n "checking for ABI profle... " >&6; }
50980    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50981$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50982
50983    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50984      ARM_FLOAT_TYPE=vfp-sflt
50985      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50986    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50987      ARM_FLOAT_TYPE=vfp-hflt
50988      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50989    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50990      ARM_FLOAT_TYPE=sflt
50991      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50992    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50993      ARM_FLOAT_TYPE=vfp-sflt
50994      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50995    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50996      ARM_FLOAT_TYPE=vfp-hflt
50997      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50998    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50999      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
51000      ARM_FLOAT_TYPE=
51001      ARM_ARCH_TYPE_FLAGS=
51002    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
51003      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
51004      ARM_FLOAT_TYPE=
51005      ARM_ARCH_TYPE_FLAGS=
51006    else
51007      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
51008    fi
51009
51010    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
51011      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
51012    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
51013      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
51014    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
51015      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
51016    fi
51017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
51018$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
51019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
51020$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
51021
51022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
51023$as_echo_n "checking for arch type flags... " >&6; }
51024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
51025$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
51026
51027    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
51028    # autoconf target triplet.
51029     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
51030    # Sanity check that it is a known ABI.
51031    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
51032        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
51033        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
51034          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
51035$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
51036    fi
51037    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
51038$as_echo_n "checking for ABI property name... " >&6; }
51039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
51040$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
51041
51042
51043    # Pass these on to the open part of configure as if they were set using
51044    # --with-extra-c[xx]flags.
51045    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51046    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51047    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
51048    # FIXME: This should not really be set using extra_cflags.
51049    if test "x$OPENJDK_TARGET_CPU" = xarm; then
51050        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
51051        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
51052    fi
51053    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
51054    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
51055    # And pass the architecture flags to the linker as well
51056    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51057  fi
51058
51059  # When building with an abi profile, the name of that profile is appended on the
51060  # bundle platform, which is used in bundle names.
51061  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
51062    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
51063  fi
51064
51065
51066  # Optional POSIX functionality needed by the JVM
51067  #
51068  # Check if clock_gettime is available and in which library. This indicates
51069  # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
51070  # don't let it update LIBS.
51071  save_LIBS="$LIBS"
51072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
51073$as_echo_n "checking for library containing clock_gettime... " >&6; }
51074if ${ac_cv_search_clock_gettime+:} false; then :
51075  $as_echo_n "(cached) " >&6
51076else
51077  ac_func_search_save_LIBS=$LIBS
51078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51079/* end confdefs.h.  */
51080
51081/* Override any GCC internal prototype to avoid an error.
51082   Use char because int might match the return type of a GCC
51083   builtin and then its argument prototype would still apply.  */
51084#ifdef __cplusplus
51085extern "C"
51086#endif
51087char clock_gettime ();
51088int
51089main ()
51090{
51091return clock_gettime ();
51092  ;
51093  return 0;
51094}
51095_ACEOF
51096for ac_lib in '' rt; do
51097  if test -z "$ac_lib"; then
51098    ac_res="none required"
51099  else
51100    ac_res=-l$ac_lib
51101    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
51102  fi
51103  if ac_fn_cxx_try_link "$LINENO"; then :
51104  ac_cv_search_clock_gettime=$ac_res
51105fi
51106rm -f core conftest.err conftest.$ac_objext \
51107    conftest$ac_exeext
51108  if ${ac_cv_search_clock_gettime+:} false; then :
51109  break
51110fi
51111done
51112if ${ac_cv_search_clock_gettime+:} false; then :
51113
51114else
51115  ac_cv_search_clock_gettime=no
51116fi
51117rm conftest.$ac_ext
51118LIBS=$ac_func_search_save_LIBS
51119fi
51120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
51121$as_echo "$ac_cv_search_clock_gettime" >&6; }
51122ac_res=$ac_cv_search_clock_gettime
51123if test "$ac_res" != no; then :
51124  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
51125  HAS_CLOCK_GETTIME=true
51126fi
51127
51128  if test "x$LIBS" = "x-lrt "; then
51129    CLOCK_GETTIME_IN_LIBRT=true
51130  fi
51131  LIBS="$save_LIBS"
51132
51133
51134  # Special extras...
51135  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51136    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51137      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51138      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51139    fi
51140    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51141    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51142  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51143    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51144    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51145  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51146    CXXSTD_CXXFLAG="-std=gnu++98"
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
51183
51184
51185
51186
51187
51188
51189    # Execute function body
51190
51191  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
51192$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
51193  supports=yes
51194
51195  saved_cxxflags="$CXXFLAGS"
51196  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
51197  ac_ext=cpp
51198ac_cpp='$CXXCPP $CPPFLAGS'
51199ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51200ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51201ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51202
51203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51204/* end confdefs.h.  */
51205int i;
51206_ACEOF
51207if ac_fn_cxx_try_compile "$LINENO"; then :
51208
51209else
51210  supports=no
51211fi
51212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51213  ac_ext=cpp
51214ac_cpp='$CXXCPP $CPPFLAGS'
51215ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51216ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51217ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51218
51219  CXXFLAGS="$saved_cxxflags"
51220
51221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51222$as_echo "$supports" >&6; }
51223  if test "x$supports" = "xyes" ; then
51224    :
51225
51226  else
51227    :
51228    CXXSTD_CXXFLAG=""
51229  fi
51230
51231
51232
51233
51234
51235
51236
51237
51238
51239
51240
51241
51242    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
51243    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
51244
51245  fi
51246  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51247    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
51248    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
51249  fi
51250
51251  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
51252  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
51253  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
51254
51255  ###############################################################################
51256  #
51257  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51258  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51259  #
51260
51261  # Setup compiler/platform specific flags into
51262  #    CFLAGS_JDK    - C Compiler flags
51263  #    CXXFLAGS_JDK  - C++ Compiler flags
51264  #    COMMON_CCXXFLAGS_JDK - common to C and C++
51265  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51266    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51267    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51268    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
51269    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51270      # Force compatibility with i586 on 32 bit intel platforms.
51271      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51272      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51273    fi
51274    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51275        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51276    case $OPENJDK_TARGET_CPU_ARCH in
51277      arm )
51278        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51279        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51280        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
51281        ;;
51282      ppc )
51283        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51284        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51285        ;;
51286      s390 )
51287        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51288        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51289        ;;
51290      * )
51291        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51292        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51293        ;;
51294    esac
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
51343
51344
51345
51346
51347
51348
51349    # Execute function body
51350
51351  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51352  REFERENCE_VERSION=6
51353
51354  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51355    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51356  fi
51357
51358  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51359    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51360  fi
51361
51362  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51363  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51364
51365  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51366    :
51367
51368  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51369  # runs afoul of the more aggressive versions of these optimisations.
51370  # Notably, value range propagation now assumes that the this pointer of C++
51371  # member functions is non-null.
51372  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51373        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51374        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51375$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51376  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51377  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51378
51379  else
51380    :
51381
51382  fi
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51398    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51399
51400    # Restrict the debug information created by Clang to avoid
51401    # too big object files and speed the build up a little bit
51402    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51403    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
51404    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51405      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51406        # Force compatibility with i586 on 32 bit intel platforms.
51407        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51408        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51409      fi
51410      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
51411      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51412          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51413      case $OPENJDK_TARGET_CPU_ARCH in
51414        ppc )
51415          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51416          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51417          ;;
51418        * )
51419          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51420          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51421          ;;
51422      esac
51423    fi
51424  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51425    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
51426    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51427    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
51428      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
51429    fi
51430
51431    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51432    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51433  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51434    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51435    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51436    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51437  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51438    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
51439        -MD -Zc:wchar_t- -W3 -wd4800 \
51440        -DWIN32_LEAN_AND_MEAN \
51441        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51442        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51443        -DWIN32 -DIAL"
51444    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51445      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51446    else
51447      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51448    fi
51449    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51450    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51451    # studio.
51452    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51453      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51454      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51455      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51456    fi
51457  fi
51458
51459  ###############################################################################
51460
51461  # Adjust flags according to debug level.
51462  case $DEBUG_LEVEL in
51463    fastdebug | slowdebug )
51464      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51465      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51466      ;;
51467    release )
51468      ;;
51469    * )
51470      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51471      ;;
51472  esac
51473
51474  # Set some common defines. These works for all compilers, but assume
51475  # -D is universally accepted.
51476
51477  # Setup endianness
51478  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51479    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51480    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51481    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51482    #   Note: -Dmacro         is the same as    #define macro 1
51483    #         -Dmacro=        is the same as    #define macro
51484    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51485      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51486    else
51487      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51488    fi
51489  else
51490    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51491    # are defined in the system?
51492    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51493      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51494    else
51495      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51496    fi
51497  fi
51498
51499  # Always enable optional macros for VM.
51500  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_FORMAT_MACROS"
51501  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_LIMIT_MACROS"
51502  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
51503
51504  # Setup target OS define. Use OS target name but in upper case.
51505  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51506  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
51507
51508  # Setup target CPU
51509  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51510      $OPENJDK_TARGET_ADD_LP64 \
51511      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
51512
51513  # Setup debug/release defines
51514  if test "x$DEBUG_LEVEL" = xrelease; then
51515    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
51516    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51517      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
51518    fi
51519  else
51520    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
51521  fi
51522
51523  # Optional POSIX functionality needed by the VM
51524
51525  if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
51526    JVM_CFLAGS="$JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
51527    if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
51528      JVM_CFLAGS="$JVM_CFLAGS -DNEEDS_LIBRT"
51529    fi
51530  fi
51531
51532
51533  # Set some additional per-OS defines.
51534  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51535    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
51536    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51537        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51538  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51539    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
51540    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
51541        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
51542  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51543    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51544    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
51545    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51546    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51547        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51548        -fno-omit-frame-pointer"
51549  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51550    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
51551    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
51552        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51553        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51554    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51555    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
51556    # so for slowdebug we build with '-qpic=large -bbigtoc'.
51557    if test "x$DEBUG_LEVEL" = xslowdebug; then
51558      JVM_CFLAGS="$JVM_CFLAGS -qpic=large"
51559    fi
51560  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51561    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51562  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51563    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51564    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
51565  fi
51566
51567  # Set some additional per-CPU defines.
51568  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
51569    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
51570  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51571    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
51572  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
51573    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51574      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51575      # fixes `relocation truncated to fit' error for gcc 4.1.
51576      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
51577      # Use ppc64 instructions, but schedule for power5
51578      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51579    elif test "x$OPENJDK_TARGET_OS" = xaix; then
51580      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
51581    fi
51582  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
51583    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51584      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51585      # Little endian machine uses ELFv2 ABI.
51586      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
51587      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51588      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
51589    fi
51590  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
51591    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51592      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
51593    fi
51594  fi
51595
51596  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51597    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51598  fi
51599
51600  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51601    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
51602      # Solaris does not have _LP64=1 in the old build.
51603      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51604      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
51605    fi
51606  fi
51607
51608  # Set JVM_CFLAGS warning handling
51609  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51610    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51611        -Wunused-value -Woverloaded-virtual"
51612
51613    if test "x$TOOLCHAIN_TYPE" = xgcc; then
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
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668    # Execute function body
51669
51670  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51671  REFERENCE_VERSION=4.8
51672
51673  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51674    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51675  fi
51676
51677  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51678    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51679  fi
51680
51681  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51682  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51683
51684  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51685    :
51686
51687            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51688            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51689
51690
51691  else
51692    :
51693
51694  fi
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709    fi
51710    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51711      # Non-zero builds have stricter warnings
51712      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51713    else
51714      if test "x$TOOLCHAIN_TYPE" = xclang; then
51715        # Some versions of llvm do not like -Wundef
51716        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51717      fi
51718    fi
51719  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51720    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51721        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51722  fi
51723
51724  # Additional macosx handling
51725  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51726    # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
51727    # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
51728    # JDK can be built and makes the linked binaries compatible even if built on
51729    # a newer version of the OS.
51730    MACOSX_VERSION_MIN=10.7.0
51731
51732
51733    # Setting --with-macosx-version-max=<version> makes it an error to build or
51734    # link to macosx APIs that are newer than the given OS version. The expected
51735    # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
51736
51737# Check whether --with-macosx-version-max was given.
51738if test "${with_macosx_version_max+set}" = set; then :
51739  withval=$with_macosx_version_max;
51740          if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
51741              MACOSX_VERSION_MAX=$with_macosx_version_max
51742          elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
51743              MACOSX_VERSION_MAX=$with_macosx_version_max
51744          elif test "x$with_macosx_version_max" = "xno"; then
51745              # Use build system default
51746              MACOSX_VERSION_MAX=
51747          else
51748              as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
51749          fi
51750
51751else
51752  MACOSX_VERSION_MAX=
51753
51754fi
51755
51756
51757
51758    # Let the flags variables get resolved in make for easier override on make
51759    # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
51760    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51761        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
51762        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51763    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51764    JVM_CFLAGS="$JVM_CFLAGS \
51765        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
51766        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51767
51768    if test -n "$MACOSX_VERSION_MAX"; then
51769        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51770            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
51771        JVM_CFLAGS="$JVM_CFLAGS \
51772            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
51773    fi
51774  fi
51775
51776  # Setup some hard coded includes
51777  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51778      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51779      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51780      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51781      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51782      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51783      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51784
51785  # The shared libraries are compiled using the picflag.
51786  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51787      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51788  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51789      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51790
51791  # Executable flags
51792  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51793  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51794
51795
51796
51797
51798
51799
51800  # Setup LDFLAGS et al.
51801  #
51802
51803  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51804    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51805    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51806    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51807    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51808      LDFLAGS_SAFESH="-safeseh"
51809      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51810      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51811      # NOTE: Old build added -machine. Probably not needed.
51812      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51813    else
51814      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51815    fi
51816  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51817      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51818      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51819        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51820        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51821    fi
51822  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51823    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51824    # We have previously set HAS_GNU_HASH if this is the case
51825    if test -n "$HAS_GNU_HASH"; then
51826      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51827      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51828      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51829    fi
51830      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51831        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51832    fi
51833    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51834      # And since we now know that the linker is gnu, then add -z defs, to forbid
51835      # undefined symbols in object files.
51836      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51837      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51838      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51839      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51840      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51841      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51842        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51843      fi
51844      case $DEBUG_LEVEL in
51845        release )
51846          # tell linker to optimize libraries.
51847          # Should this be supplied to the OSS linker as well?
51848          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51849          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51850          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51851          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51852            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51853          fi
51854          ;;
51855        slowdebug )
51856          # Hotspot always let the linker optimize
51857          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51858          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51859            # do relocations at load
51860            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51861            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51862            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51863          fi
51864          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51865            # mark relocations read only
51866            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51867            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51868            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51869          fi
51870          ;;
51871        fastdebug )
51872          # Hotspot always let the linker optimize
51873          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51874          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51875            # mark relocations read only
51876            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51877            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51878            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51879          fi
51880          ;;
51881        * )
51882          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51883          ;;
51884        esac
51885    fi
51886  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51887    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51888    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51889    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51890    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51891    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51892    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51893      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51894    fi
51895  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51896    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51897    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51898    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51899    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51900    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
51901    # so for slowdebug we build with '-qpic=large -bbigtoc'.
51902    if test "x$DEBUG_LEVEL" = xslowdebug; then
51903      JVM_LDFLAGS="$JVM_LDFLAGS -bbigtoc"
51904    fi
51905  fi
51906
51907  # Customize LDFLAGS for executables
51908
51909  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51910
51911  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51912    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51913      LDFLAGS_STACK_SIZE=1048576
51914    else
51915      LDFLAGS_STACK_SIZE=327680
51916    fi
51917    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51918  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51919    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51920  fi
51921
51922  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51923
51924  # Customize LDFLAGS for libs
51925  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51926
51927  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51928  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51929    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51930        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51931    JDKLIB_LIBS=""
51932  else
51933    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51934        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51935
51936    if test "xTARGET" = "xTARGET"; then
51937      # On some platforms (mac) the linker warns about non existing -L dirs.
51938      # For any of the variants server, client or minimal, the dir matches the
51939      # variant name. The "main" variant should be used for linking. For the
51940      # rest, the dir is just server.
51941      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51942          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51943        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51944            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51945      else
51946        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51947            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51948      fi
51949    elif test "xTARGET" = "xBUILD"; then
51950      # When building a buildjdk, it's always only the server variant
51951      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51952          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51953    fi
51954
51955    JDKLIB_LIBS="-ljava -ljvm"
51956    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51957      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51958    fi
51959
51960  fi
51961
51962LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51963
51964  # Set JVM_LIBS (per os)
51965  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51966    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51967  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51968    # FIXME: This hard-coded path is not really proper.
51969    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51970      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51971    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51972      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51973    fi
51974    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51975        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51976  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51977    JVM_LIBS="$JVM_LIBS -lm"
51978  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51979    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51980  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51981    JVM_LIBS="$JVM_LIBS -lm"
51982  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51983    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51984        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51985        wsock32.lib winmm.lib version.lib psapi.lib"
51986    fi
51987
51988  # Set JVM_ASFLAGS
51989  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51990    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51991      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51992    fi
51993  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51994    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51995  fi
51996
51997  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013  # Special extras...
52014  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52015    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52016      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52017      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52018    fi
52019    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52020    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52021  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52022    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52023    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52024  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52025    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068    # Execute function body
52069
52070  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
52071$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
52072  supports=yes
52073
52074  saved_cxxflags="$CXXFLAGS"
52075  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
52076  ac_ext=cpp
52077ac_cpp='$CXXCPP $CPPFLAGS'
52078ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52079ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52080ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52081
52082  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52083/* end confdefs.h.  */
52084int i;
52085_ACEOF
52086if ac_fn_cxx_try_compile "$LINENO"; then :
52087
52088else
52089  supports=no
52090fi
52091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52092  ac_ext=cpp
52093ac_cpp='$CXXCPP $CPPFLAGS'
52094ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52095ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52096ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52097
52098  CXXFLAGS="$saved_cxxflags"
52099
52100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52101$as_echo "$supports" >&6; }
52102  if test "x$supports" = "xyes" ; then
52103    :
52104
52105  else
52106    :
52107    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
52108  fi
52109
52110
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52122    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52123
52124  fi
52125  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52126    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
52127    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
52128  fi
52129
52130  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
52131  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
52132  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
52133
52134  ###############################################################################
52135  #
52136  # Now setup the CFLAGS and LDFLAGS for the JDK build.
52137  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
52138  #
52139
52140  # Setup compiler/platform specific flags into
52141  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
52142  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
52143  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
52144  if test "x$TOOLCHAIN_TYPE" = xgcc; then
52145    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52146    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52147    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
52148    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52149      # Force compatibility with i586 on 32 bit intel platforms.
52150      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52151      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52152    fi
52153    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52154        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52155    case $OPENJDK_BUILD_CPU_ARCH in
52156      arm )
52157        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52158        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52159        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
52160        ;;
52161      ppc )
52162        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52163        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52164        ;;
52165      s390 )
52166        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
52167        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52168        ;;
52169      * )
52170        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52171        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52172        ;;
52173    esac
52174
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228    # Execute function body
52229
52230  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52231  REFERENCE_VERSION=6
52232
52233  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52234    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52235  fi
52236
52237  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52238    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
52239  fi
52240
52241  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52242  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52243
52244  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52245    :
52246
52247  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
52248  # runs afoul of the more aggressive versions of these optimisations.
52249  # Notably, value range propagation now assumes that the this pointer of C++
52250  # member functions is non-null.
52251  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
52252        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
52253        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
52254$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
52255  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52256  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52257
52258  else
52259    :
52260
52261  fi
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52277    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52278
52279    # Restrict the debug information created by Clang to avoid
52280    # too big object files and speed the build up a little bit
52281    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
52282    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
52283    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52284      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52285        # Force compatibility with i586 on 32 bit intel platforms.
52286        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52287        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52288      fi
52289      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
52290      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52291          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52292      case $OPENJDK_BUILD_CPU_ARCH in
52293        ppc )
52294          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52295          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52296          ;;
52297        * )
52298          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52299          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52300          ;;
52301      esac
52302    fi
52303  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52304    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
52305    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
52306    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
52307      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
52308    fi
52309
52310    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
52311    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
52312  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52313    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52314    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52315    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52316  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52317    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52318        -MD -Zc:wchar_t- -W3 -wd4800 \
52319        -DWIN32_LEAN_AND_MEAN \
52320        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
52321        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
52322        -DWIN32 -DIAL"
52323    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52324      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
52325    else
52326      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
52327    fi
52328    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
52329    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
52330    # studio.
52331    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
52332      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
52333      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
52334      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
52335    fi
52336  fi
52337
52338  ###############################################################################
52339
52340  # Adjust flags according to debug level.
52341  case $DEBUG_LEVEL in
52342    fastdebug | slowdebug )
52343      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
52344      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
52345      ;;
52346    release )
52347      ;;
52348    * )
52349      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52350      ;;
52351  esac
52352
52353  # Set some common defines. These works for all compilers, but assume
52354  # -D is universally accepted.
52355
52356  # Setup endianness
52357  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52358    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
52359    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
52360    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
52361    #   Note: -Dmacro         is the same as    #define macro 1
52362    #         -Dmacro=        is the same as    #define macro
52363    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52364      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
52365    else
52366      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
52367    fi
52368  else
52369    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
52370    # are defined in the system?
52371    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52372      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
52373    else
52374      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
52375    fi
52376  fi
52377
52378  # Always enable optional macros for VM.
52379  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_FORMAT_MACROS"
52380  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_LIMIT_MACROS"
52381  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
52382
52383  # Setup target OS define. Use OS target name but in upper case.
52384  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
52385  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
52386
52387  # Setup target CPU
52388  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52389      $OPENJDK_BUILD_ADD_LP64 \
52390      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
52391
52392  # Setup debug/release defines
52393  if test "x$DEBUG_LEVEL" = xrelease; then
52394    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
52395    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52396      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
52397    fi
52398  else
52399    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
52400  fi
52401
52402  # Optional POSIX functionality needed by the VM
52403
52404  if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
52405    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
52406    if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
52407      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DNEEDS_LIBRT"
52408    fi
52409  fi
52410
52411
52412  # Set some additional per-OS defines.
52413  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52414    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
52415    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
52416        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
52417  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52418    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
52419    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
52420        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
52421  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52422    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
52423    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
52424    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
52425    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
52426        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
52427        -fno-omit-frame-pointer"
52428  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52429    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
52430    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
52431        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
52432        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
52433    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52434    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52435    # so for slowdebug we build with '-qpic=large -bbigtoc'.
52436    if test "x$DEBUG_LEVEL" = xslowdebug; then
52437      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qpic=large"
52438    fi
52439  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52440    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
52441  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52442    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
52443    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
52444  fi
52445
52446  # Set some additional per-CPU defines.
52447  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
52448    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
52449  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52450    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
52451  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
52452    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52453      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52454      # fixes `relocation truncated to fit' error for gcc 4.1.
52455      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
52456      # Use ppc64 instructions, but schedule for power5
52457      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
52458    elif test "x$OPENJDK_BUILD_OS" = xaix; then
52459      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
52460    fi
52461  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
52462    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52463      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52464      # Little endian machine uses ELFv2 ABI.
52465      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
52466      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
52467      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
52468    fi
52469  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
52470    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52471      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
52472    fi
52473  fi
52474
52475  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52476    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
52477  fi
52478
52479  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
52480    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
52481      # Solaris does not have _LP64=1 in the old build.
52482      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52483      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
52484    fi
52485  fi
52486
52487  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
52488  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52489    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52490        -Wunused-value -Woverloaded-virtual"
52491
52492    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52493
52494
52495
52496
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507
52508
52509
52510
52511
52512
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547    # Execute function body
52548
52549  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52550  REFERENCE_VERSION=4.8
52551
52552  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52553    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52554  fi
52555
52556  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52557    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52558  fi
52559
52560  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52561  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52562
52563  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52564    :
52565
52566            # These flags either do not work or give spurious warnings prior to gcc 4.8.
52567            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52568
52569
52570  else
52571    :
52572
52573  fi
52574
52575
52576
52577
52578
52579
52580
52581
52582
52583
52584
52585
52586
52587
52588    fi
52589    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52590      # Non-zero builds have stricter warnings
52591      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52592    else
52593      if test "x$TOOLCHAIN_TYPE" = xclang; then
52594        # Some versions of llvm do not like -Wundef
52595        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52596      fi
52597    fi
52598  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52599    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52600        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52601  fi
52602
52603  # Additional macosx handling
52604  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52605    # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
52606    # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
52607    # JDK can be built and makes the linked binaries compatible even if built on
52608    # a newer version of the OS.
52609    MACOSX_VERSION_MIN=10.7.0
52610
52611
52612    # Setting --with-macosx-version-max=<version> makes it an error to build or
52613    # link to macosx APIs that are newer than the given OS version. The expected
52614    # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
52615
52616# Check whether --with-macosx-version-max was given.
52617if test "${with_macosx_version_max+set}" = set; then :
52618  withval=$with_macosx_version_max;
52619          if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
52620              MACOSX_VERSION_MAX=$with_macosx_version_max
52621          elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
52622              MACOSX_VERSION_MAX=$with_macosx_version_max
52623          elif test "x$with_macosx_version_max" = "xno"; then
52624              # Use build system default
52625              MACOSX_VERSION_MAX=
52626          else
52627              as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
52628          fi
52629
52630else
52631  MACOSX_VERSION_MAX=
52632
52633fi
52634
52635
52636
52637    # Let the flags variables get resolved in make for easier override on make
52638    # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
52639    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52640        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52641        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52642    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52643    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
52644        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52645        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52646
52647    if test -n "$MACOSX_VERSION_MAX"; then
52648        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52649            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52650        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
52651            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52652    fi
52653  fi
52654
52655  # Setup some hard coded includes
52656  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52657      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52658      -I${JDK_TOPDIR}/src/java.base/share/native/include \
52659      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
52660      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
52661      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
52662      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
52663
52664  # The shared libraries are compiled using the picflag.
52665  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52666      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
52667  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52668      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
52669
52670  # Executable flags
52671  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
52672  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
52673
52674
52675
52676
52677
52678
52679  # Setup LDFLAGS et al.
52680  #
52681
52682  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52683    LDFLAGS_MICROSOFT="-nologo -opt:ref"
52684    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52685    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52686    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
52687      LDFLAGS_SAFESH="-safeseh"
52688      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
52689      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
52690      # NOTE: Old build added -machine. Probably not needed.
52691      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
52692    else
52693      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
52694    fi
52695  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52696      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52697      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52698        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52699        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52700    fi
52701  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52702    # If this is a --hash-style=gnu system, use --hash-style=both, why?
52703    # We have previously set HAS_GNU_HASH if this is the case
52704    if test -n "$HAS_GNU_HASH"; then
52705      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52706      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52707      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52708    fi
52709      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52710        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52711    fi
52712    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52713      # And since we now know that the linker is gnu, then add -z defs, to forbid
52714      # undefined symbols in object files.
52715      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52716      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52717      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52718      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52719      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52720      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52721        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
52722      fi
52723      case $DEBUG_LEVEL in
52724        release )
52725          # tell linker to optimize libraries.
52726          # Should this be supplied to the OSS linker as well?
52727          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52728          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52729          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52730          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52731            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52732          fi
52733          ;;
52734        slowdebug )
52735          # Hotspot always let the linker optimize
52736          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52737          if test "x$HAS_LINKER_NOW" = "xtrue"; then
52738            # do relocations at load
52739            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52740            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52741            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52742          fi
52743          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52744            # mark relocations read only
52745            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52746            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52747            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52748          fi
52749          ;;
52750        fastdebug )
52751          # Hotspot always let the linker optimize
52752          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52753          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52754            # mark relocations read only
52755            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52756            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52757            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52758          fi
52759          ;;
52760        * )
52761          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52762          ;;
52763        esac
52764    fi
52765  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52766    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52767    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52768    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52769    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52770    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52771    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52772      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52773    fi
52774  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52775    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52776    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52777    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52778    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52779    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52780    # so for slowdebug we build with '-qpic=large -bbigtoc'.
52781    if test "x$DEBUG_LEVEL" = xslowdebug; then
52782      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -bbigtoc"
52783    fi
52784  fi
52785
52786  # Customize LDFLAGS for executables
52787
52788  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52789
52790  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52791    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52792      LDFLAGS_STACK_SIZE=1048576
52793    else
52794      LDFLAGS_STACK_SIZE=327680
52795    fi
52796    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52797  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52798    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52799  fi
52800
52801  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52802
52803  # Customize LDFLAGS for libs
52804  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52805
52806  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52807  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52808    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52809        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52810    OPENJDK_BUILD_JDKLIB_LIBS=""
52811  else
52812    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52813        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52814
52815    if test "xBUILD" = "xTARGET"; then
52816      # On some platforms (mac) the linker warns about non existing -L dirs.
52817      # For any of the variants server, client or minimal, the dir matches the
52818      # variant name. The "main" variant should be used for linking. For the
52819      # rest, the dir is just server.
52820      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52821          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52822        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52823            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52824      else
52825        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52826            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52827      fi
52828    elif test "xBUILD" = "xBUILD"; then
52829      # When building a buildjdk, it's always only the server variant
52830      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52831          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52832    fi
52833
52834    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52835    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52836      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52837    fi
52838
52839  fi
52840
52841OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52842
52843  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52844  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52845    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52846  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52847    # FIXME: This hard-coded path is not really proper.
52848    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52849      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52850    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52851      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52852    fi
52853    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52854        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52855  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52856    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52857  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52858    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52859  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52860    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52861  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52862    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52863        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52864        wsock32.lib winmm.lib version.lib psapi.lib"
52865    fi
52866
52867  # Set OPENJDK_BUILD_JVM_ASFLAGS
52868  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52869    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52870      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52871    fi
52872  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52873    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52874  fi
52875
52876  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52877
52878
52879
52880
52881
52882
52883
52884
52885
52886
52887
52888
52889
52890
52891
52892  # Tests are only ever compiled for TARGET
52893  # Flags for compiling test libraries
52894  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52895  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52896
52897  # Flags for compiling test executables
52898  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52899  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52900
52901
52902
52903
52904
52905
52906  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52907  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52908
52909
52910
52911
52912
52913
52914  # Check that the compiler supports -mX (or -qX on AIX) flags
52915  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52916
52917
52918
52919
52920
52921
52922
52923
52924
52925
52926
52927
52928
52929
52930
52931
52932
52933
52934
52935
52936
52937
52938
52939
52940
52941
52942
52943
52944
52945
52946
52947
52948
52949
52950
52951
52952
52953
52954
52955
52956
52957
52958
52959
52960
52961
52962
52963    # Execute function body
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    # Execute function body
53013
53014  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53015$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53016  supports=yes
53017
53018  saved_cflags="$CFLAGS"
53019  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53020  ac_ext=c
53021ac_cpp='$CPP $CPPFLAGS'
53022ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53023ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53024ac_compiler_gnu=$ac_cv_c_compiler_gnu
53025
53026  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53027/* end confdefs.h.  */
53028int i;
53029_ACEOF
53030if ac_fn_c_try_compile "$LINENO"; then :
53031
53032else
53033  supports=no
53034fi
53035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53036  ac_ext=cpp
53037ac_cpp='$CXXCPP $CPPFLAGS'
53038ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53039ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53040ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53041
53042  CFLAGS="$saved_cflags"
53043
53044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53045$as_echo "$supports" >&6; }
53046  if test "x$supports" = "xyes" ; then
53047    :
53048    C_COMP_SUPPORTS="yes"
53049  else
53050    :
53051    C_COMP_SUPPORTS="no"
53052  fi
53053
53054
53055
53056
53057
53058
53059
53060
53061
53062
53063
53064
53065
53066
53067
53068
53069
53070
53071
53072
53073
53074
53075
53076
53077
53078
53079
53080
53081
53082
53083
53084
53085
53086
53087
53088
53089
53090
53091
53092
53093
53094
53095
53096
53097
53098
53099
53100
53101
53102
53103
53104
53105
53106
53107
53108
53109
53110
53111
53112    # Execute function body
53113
53114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53115$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53116  supports=yes
53117
53118  saved_cxxflags="$CXXFLAGS"
53119  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53120  ac_ext=cpp
53121ac_cpp='$CXXCPP $CPPFLAGS'
53122ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53123ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53124ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53125
53126  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53127/* end confdefs.h.  */
53128int i;
53129_ACEOF
53130if ac_fn_cxx_try_compile "$LINENO"; then :
53131
53132else
53133  supports=no
53134fi
53135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53136  ac_ext=cpp
53137ac_cpp='$CXXCPP $CPPFLAGS'
53138ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53139ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53140ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53141
53142  CXXFLAGS="$saved_cxxflags"
53143
53144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53145$as_echo "$supports" >&6; }
53146  if test "x$supports" = "xyes" ; then
53147    :
53148    CXX_COMP_SUPPORTS="yes"
53149  else
53150    :
53151    CXX_COMP_SUPPORTS="no"
53152  fi
53153
53154
53155
53156
53157
53158
53159
53160
53161
53162
53163
53164
53165
53166  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53167$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53168  supports=no
53169  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53170
53171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53172$as_echo "$supports" >&6; }
53173  if test "x$supports" = "xyes" ; then
53174    :
53175    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
53176  else
53177    :
53178    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
53179  fi
53180
53181
53182
53183
53184
53185
53186
53187
53188  # Check whether --enable-warnings-as-errors was given.
53189if test "${enable_warnings_as_errors+set}" = set; then :
53190  enableval=$enable_warnings_as_errors;
53191fi
53192
53193
53194  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
53195$as_echo_n "checking if native warnings are errors... " >&6; }
53196  if test "x$enable_warnings_as_errors" = "xyes"; then
53197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
53198$as_echo "yes (explicitly set)" >&6; }
53199    WARNINGS_AS_ERRORS=true
53200  elif test "x$enable_warnings_as_errors" = "xno"; then
53201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53202$as_echo "no" >&6; }
53203    WARNINGS_AS_ERRORS=false
53204  elif test "x$enable_warnings_as_errors" = "x"; then
53205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
53206$as_echo "yes (default)" >&6; }
53207    WARNINGS_AS_ERRORS=true
53208  else
53209    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
53210  fi
53211
53212
53213
53214  case "${TOOLCHAIN_TYPE}" in
53215    microsoft)
53216      DISABLE_WARNING_PREFIX="-wd"
53217      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
53218      ;;
53219    solstudio)
53220      DISABLE_WARNING_PREFIX="-erroff="
53221      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
53222      ;;
53223    gcc)
53224      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
53225
53226
53227
53228
53229
53230
53231
53232
53233
53234
53235
53236
53237
53238
53239
53240
53241
53242
53243
53244
53245
53246
53247
53248
53249
53250
53251
53252
53253
53254
53255
53256
53257
53258
53259
53260
53261
53262
53263
53264
53265
53266
53267
53268
53269
53270
53271
53272    # Execute function body
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    # Execute function body
53322
53323  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53324$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53325  supports=yes
53326
53327  saved_cflags="$CFLAGS"
53328  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53329  ac_ext=c
53330ac_cpp='$CPP $CPPFLAGS'
53331ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53332ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53333ac_compiler_gnu=$ac_cv_c_compiler_gnu
53334
53335  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53336/* end confdefs.h.  */
53337int i;
53338_ACEOF
53339if ac_fn_c_try_compile "$LINENO"; then :
53340
53341else
53342  supports=no
53343fi
53344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53345  ac_ext=cpp
53346ac_cpp='$CXXCPP $CPPFLAGS'
53347ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53348ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53349ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53350
53351  CFLAGS="$saved_cflags"
53352
53353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53354$as_echo "$supports" >&6; }
53355  if test "x$supports" = "xyes" ; then
53356    :
53357    C_COMP_SUPPORTS="yes"
53358  else
53359    :
53360    C_COMP_SUPPORTS="no"
53361  fi
53362
53363
53364
53365
53366
53367
53368
53369
53370
53371
53372
53373
53374
53375
53376
53377
53378
53379
53380
53381
53382
53383
53384
53385
53386
53387
53388
53389
53390
53391
53392
53393
53394
53395
53396
53397
53398
53399
53400
53401
53402
53403
53404
53405
53406
53407
53408
53409
53410
53411
53412
53413
53414
53415
53416
53417
53418
53419
53420
53421    # Execute function body
53422
53423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53424$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53425  supports=yes
53426
53427  saved_cxxflags="$CXXFLAGS"
53428  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53429  ac_ext=cpp
53430ac_cpp='$CXXCPP $CPPFLAGS'
53431ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53432ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53433ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53434
53435  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53436/* end confdefs.h.  */
53437int i;
53438_ACEOF
53439if ac_fn_cxx_try_compile "$LINENO"; then :
53440
53441else
53442  supports=no
53443fi
53444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53445  ac_ext=cpp
53446ac_cpp='$CXXCPP $CPPFLAGS'
53447ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53448ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53449ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53450
53451  CXXFLAGS="$saved_cxxflags"
53452
53453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53454$as_echo "$supports" >&6; }
53455  if test "x$supports" = "xyes" ; then
53456    :
53457    CXX_COMP_SUPPORTS="yes"
53458  else
53459    :
53460    CXX_COMP_SUPPORTS="no"
53461  fi
53462
53463
53464
53465
53466
53467
53468
53469
53470
53471
53472
53473
53474
53475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53476$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53477  supports=no
53478  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53479
53480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53481$as_echo "$supports" >&6; }
53482  if test "x$supports" = "xyes" ; then
53483    :
53484    GCC_CAN_DISABLE_WARNINGS=true
53485  else
53486    :
53487    GCC_CAN_DISABLE_WARNINGS=false
53488
53489  fi
53490
53491
53492
53493
53494
53495
53496      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53497        DISABLE_WARNING_PREFIX="-Wno-"
53498      else
53499        DISABLE_WARNING_PREFIX=
53500      fi
53501      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53502      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
53503      # CFLAGS since any target specific flags will likely not work with the
53504      # build compiler
53505      CC_OLD="$CC"
53506      CXX_OLD="$CXX"
53507      CC="$BUILD_CC"
53508      CXX="$BUILD_CXX"
53509      CFLAGS_OLD="$CFLAGS"
53510      CFLAGS=""
53511
53512
53513
53514
53515
53516
53517
53518
53519
53520
53521
53522
53523
53524
53525
53526
53527
53528
53529
53530
53531
53532
53533
53534
53535
53536
53537
53538
53539
53540
53541
53542
53543
53544
53545
53546
53547
53548
53549
53550
53551
53552
53553
53554
53555
53556
53557
53558    # Execute function body
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    # Execute function body
53608
53609  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53610$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53611  supports=yes
53612
53613  saved_cflags="$CFLAGS"
53614  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53615  ac_ext=c
53616ac_cpp='$CPP $CPPFLAGS'
53617ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53618ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53619ac_compiler_gnu=$ac_cv_c_compiler_gnu
53620
53621  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53622/* end confdefs.h.  */
53623int i;
53624_ACEOF
53625if ac_fn_c_try_compile "$LINENO"; then :
53626
53627else
53628  supports=no
53629fi
53630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53631  ac_ext=cpp
53632ac_cpp='$CXXCPP $CPPFLAGS'
53633ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53634ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53635ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53636
53637  CFLAGS="$saved_cflags"
53638
53639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53640$as_echo "$supports" >&6; }
53641  if test "x$supports" = "xyes" ; then
53642    :
53643    C_COMP_SUPPORTS="yes"
53644  else
53645    :
53646    C_COMP_SUPPORTS="no"
53647  fi
53648
53649
53650
53651
53652
53653
53654
53655
53656
53657
53658
53659
53660
53661
53662
53663
53664
53665
53666
53667
53668
53669
53670
53671
53672
53673
53674
53675
53676
53677
53678
53679
53680
53681
53682
53683
53684
53685
53686
53687
53688
53689
53690
53691
53692
53693
53694
53695
53696
53697
53698
53699
53700
53701
53702
53703
53704
53705
53706
53707    # Execute function body
53708
53709  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53710$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53711  supports=yes
53712
53713  saved_cxxflags="$CXXFLAGS"
53714  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53715  ac_ext=cpp
53716ac_cpp='$CXXCPP $CPPFLAGS'
53717ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53718ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53719ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53720
53721  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53722/* end confdefs.h.  */
53723int i;
53724_ACEOF
53725if ac_fn_cxx_try_compile "$LINENO"; then :
53726
53727else
53728  supports=no
53729fi
53730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53731  ac_ext=cpp
53732ac_cpp='$CXXCPP $CPPFLAGS'
53733ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53734ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53735ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53736
53737  CXXFLAGS="$saved_cxxflags"
53738
53739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53740$as_echo "$supports" >&6; }
53741  if test "x$supports" = "xyes" ; then
53742    :
53743    CXX_COMP_SUPPORTS="yes"
53744  else
53745    :
53746    CXX_COMP_SUPPORTS="no"
53747  fi
53748
53749
53750
53751
53752
53753
53754
53755
53756
53757
53758
53759
53760
53761  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53762$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53763  supports=no
53764  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53765
53766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53767$as_echo "$supports" >&6; }
53768  if test "x$supports" = "xyes" ; then
53769    :
53770    BUILD_CC_CAN_DISABLE_WARNINGS=true
53771  else
53772    :
53773    BUILD_CC_CAN_DISABLE_WARNINGS=false
53774
53775  fi
53776
53777
53778
53779
53780
53781
53782      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53783        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53784      else
53785        BUILD_CC_DISABLE_WARNING_PREFIX=
53786      fi
53787      CC="$CC_OLD"
53788      CXX="$CXX_OLD"
53789      CFLAGS="$CFLAGS_OLD"
53790      ;;
53791    clang)
53792      DISABLE_WARNING_PREFIX="-Wno-"
53793      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53794      ;;
53795    xlc)
53796      DISABLE_WARNING_PREFIX="-qsuppress="
53797      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53798      ;;
53799  esac
53800
53801
53802
53803
53804
53805# Setup debug symbols (need objcopy from the toolchain for that)
53806
53807  #
53808  # NATIVE_DEBUG_SYMBOLS
53809  # This must be done after the toolchain is setup, since we're looking at objcopy.
53810  #
53811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53812$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53813
53814# Check whether --with-native-debug-symbols was given.
53815if test "${with_native_debug_symbols+set}" = set; then :
53816  withval=$with_native_debug_symbols;
53817        if test "x$OPENJDK_TARGET_OS" = xaix; then
53818          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53819            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53820          fi
53821        fi
53822
53823else
53824
53825        if test "x$OPENJDK_TARGET_OS" = xaix; then
53826          # AIX doesn't support 'zipped' so use 'internal' as default
53827          with_native_debug_symbols="internal"
53828        else
53829          if test "x$STATIC_BUILD" = xtrue; then
53830            with_native_debug_symbols="none"
53831          else
53832            with_native_debug_symbols="zipped"
53833          fi
53834        fi
53835
53836fi
53837
53838  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53840$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53841
53842  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53843
53844    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53845      if test "x$OBJCOPY" = x; then
53846        # enabling of enable-debug-symbols and can't find objcopy
53847        # this is an error
53848        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53849      fi
53850    fi
53851
53852    COMPILE_WITH_DEBUG_SYMBOLS=true
53853    COPY_DEBUG_SYMBOLS=true
53854    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53855  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53856    COMPILE_WITH_DEBUG_SYMBOLS=false
53857    COPY_DEBUG_SYMBOLS=false
53858    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53859  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53860    COMPILE_WITH_DEBUG_SYMBOLS=true
53861    COPY_DEBUG_SYMBOLS=false
53862    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53863  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53864
53865    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53866      if test "x$OBJCOPY" = x; then
53867        # enabling of enable-debug-symbols and can't find objcopy
53868        # this is an error
53869        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53870      fi
53871    fi
53872
53873    COMPILE_WITH_DEBUG_SYMBOLS=true
53874    COPY_DEBUG_SYMBOLS=true
53875    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53876  else
53877    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53878  fi
53879
53880  # --enable-debug-symbols is deprecated.
53881  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53882
53883  # Check whether --enable-debug-symbols was given.
53884if test "${enable_debug_symbols+set}" = set; then :
53885  enableval=$enable_debug_symbols;
53886fi
53887
53888  if test "x$enable_debug_symbols" != x; then
53889    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53890$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53891
53892    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53893      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53894$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53895    fi
53896
53897  fi
53898
53899
53900  # --enable-zip-debug-info is deprecated.
53901  # Please use --with-native-debug-symbols=zipped .
53902
53903  # Check whether --enable-zip-debug-info was given.
53904if test "${enable_zip_debug_info+set}" = set; then :
53905  enableval=$enable_zip_debug_info;
53906fi
53907
53908  if test "x$enable_zip_debug_info" != x; then
53909    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53910$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53911
53912    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53913      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53914$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53915    fi
53916
53917  fi
53918
53919
53920
53921
53922
53923
53924
53925  # Check whether --enable-native-coverage was given.
53926if test "${enable_native_coverage+set}" = set; then :
53927  enableval=$enable_native_coverage;
53928fi
53929
53930  GCOV_ENABLED="false"
53931  if test "x$enable_native_coverage" = "xyes"; then
53932    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53933      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53934$as_echo_n "checking if native coverage is enabled... " >&6; }
53935      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53936$as_echo "yes" >&6; }
53937      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53938      GCOV_LDFLAGS="-fprofile-arcs"
53939      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53940      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53941      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53942      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53943      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53944      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53945      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53946      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53947      GCOV_ENABLED="true"
53948    else
53949      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53950    fi
53951  elif test "x$enable_native_coverage" = "xno"; then
53952    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53953$as_echo_n "checking if native coverage is enabled... " >&6; }
53954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53955$as_echo "no" >&6; }
53956  elif test "x$enable_native_coverage" != "x"; then
53957    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53958  fi
53959
53960
53961
53962
53963# Need toolchain to setup dtrace
53964
53965  # Test for dtrace dependencies
53966  # Check whether --enable-dtrace was given.
53967if test "${enable_dtrace+set}" = set; then :
53968  enableval=$enable_dtrace;
53969fi
53970
53971
53972  DTRACE_DEP_MISSING=false
53973
53974  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53975$as_echo_n "checking for dtrace tool... " >&6; }
53976  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53978$as_echo "$DTRACE" >&6; }
53979  else
53980    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53981$as_echo "not found, cannot build dtrace" >&6; }
53982    DTRACE_DEP_MISSING=true
53983  fi
53984
53985  for ac_header in sys/sdt.h
53986do :
53987  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53988if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53989  cat >>confdefs.h <<_ACEOF
53990#define HAVE_SYS_SDT_H 1
53991_ACEOF
53992 DTRACE_HEADERS_OK=yes
53993else
53994  DTRACE_HEADERS_OK=no
53995fi
53996
53997done
53998
53999  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
54000    DTRACE_DEP_MISSING=true
54001  fi
54002
54003  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
54004$as_echo_n "checking if dtrace should be built... " >&6; }
54005  if test "x$enable_dtrace" = "xyes"; then
54006    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
54007      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
54008$as_echo "no, missing dependencies" >&6; }
54009
54010  # Print a helpful message on how to acquire the necessary build dependency.
54011  # dtrace is the help tag: freetype, cups, alsa etc
54012  MISSING_DEPENDENCY=dtrace
54013
54014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54015    cygwin_help $MISSING_DEPENDENCY
54016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54017    msys_help $MISSING_DEPENDENCY
54018  else
54019    PKGHANDLER_COMMAND=
54020
54021    case $PKGHANDLER in
54022      apt-get)
54023        apt_help     $MISSING_DEPENDENCY ;;
54024      yum)
54025        yum_help     $MISSING_DEPENDENCY ;;
54026      brew)
54027        brew_help    $MISSING_DEPENDENCY ;;
54028      port)
54029        port_help    $MISSING_DEPENDENCY ;;
54030      pkgutil)
54031        pkgutil_help $MISSING_DEPENDENCY ;;
54032      pkgadd)
54033        pkgadd_help  $MISSING_DEPENDENCY ;;
54034    esac
54035
54036    if test "x$PKGHANDLER_COMMAND" != x; then
54037      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54038    fi
54039  fi
54040
54041      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
54042    else
54043      INCLUDE_DTRACE=true
54044      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54045$as_echo "yes, forced" >&6; }
54046    fi
54047  elif test "x$enable_dtrace" = "xno"; then
54048    INCLUDE_DTRACE=false
54049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54050$as_echo "no, forced" >&6; }
54051  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
54052    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
54053      INCLUDE_DTRACE=false
54054      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
54055$as_echo "no, missing dependencies" >&6; }
54056    else
54057      INCLUDE_DTRACE=true
54058      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
54059$as_echo "yes, dependencies present" >&6; }
54060    fi
54061  else
54062    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
54063  fi
54064
54065
54066  # Check whether --enable-aot was given.
54067if test "${enable_aot+set}" = set; then :
54068  enableval=$enable_aot;
54069fi
54070
54071
54072  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
54073    ENABLE_AOT="true"
54074  elif test "x$enable_aot" = "xyes"; then
54075    ENABLE_AOT="true"
54076  elif test "x$enable_aot" = "xno"; then
54077    ENABLE_AOT="false"
54078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
54079$as_echo_n "checking if aot should be enabled... " >&6; }
54080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54081$as_echo "no, forced" >&6; }
54082  else
54083    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
54084  fi
54085
54086  if test "x$ENABLE_AOT" = "xtrue"; then
54087    # Only enable AOT on X64 platforms.
54088    if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
54089      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
54090        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
54091          ENABLE_AOT="true"
54092        else
54093          ENABLE_AOT="false"
54094          if test "x$enable_aot" = "xyes"; then
54095            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
54096          fi
54097        fi
54098      else
54099        ENABLE_AOT="false"
54100        if test "x$enable_aot" = "xyes"; then
54101          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
54102        fi
54103      fi
54104    else
54105      ENABLE_AOT="false"
54106      if test "x$enable_aot" = "xyes"; then
54107        as_fn_error $? "AOT is currently only supported on x86_64. Remove --enable-aot." "$LINENO" 5
54108      fi
54109    fi
54110  fi
54111
54112
54113
54114
54115  # Check whether --enable-hotspot-gtest was given.
54116if test "${enable_hotspot_gtest+set}" = set; then :
54117  enableval=$enable_hotspot_gtest;
54118fi
54119
54120
54121  if test -e "$HOTSPOT_TOPDIR/test/native"; then
54122    GTEST_DIR_EXISTS="true"
54123  else
54124    GTEST_DIR_EXISTS="false"
54125  fi
54126
54127  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
54128$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
54129  if test "x$enable_hotspot_gtest" = "xyes"; then
54130    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54132$as_echo "yes, forced" >&6; }
54133      BUILD_GTEST="true"
54134    else
54135      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
54136    fi
54137  elif test "x$enable_hotspot_gtest" = "xno"; then
54138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54139$as_echo "no, forced" >&6; }
54140    BUILD_GTEST="false"
54141  elif test "x$enable_hotspot_gtest" = "x"; then
54142    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54143      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54144$as_echo "yes" >&6; }
54145      BUILD_GTEST="true"
54146    else
54147      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54148$as_echo "no" >&6; }
54149      BUILD_GTEST="false"
54150    fi
54151  else
54152    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
54153  fi
54154
54155
54156
54157
54158###############################################################################
54159#
54160# Check dependencies for external and internal libraries.
54161#
54162###############################################################################
54163
54164# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
54165
54166  # When using cygwin or msys, we need a wrapper binary that renames
54167  # /cygdrive/c/ arguments into c:/ arguments and peeks into
54168  # @files and rewrites these too! This wrapper binary is
54169  # called fixpath.
54170  FIXPATH=
54171  if test "x$OPENJDK_BUILD_OS" = xwindows; then
54172    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
54173$as_echo_n "checking if fixpath can be created... " >&6; }
54174    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
54175    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
54176    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
54177    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
54178      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
54179      FIXPATH="$FIXPATH_BIN -c"
54180    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
54181      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
54182      # @ was chosen as separator to minimize risk of other tools messing around with it
54183      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
54184          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
54185      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
54186      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
54187    fi
54188    FIXPATH_SRC_W="$FIXPATH_SRC"
54189    FIXPATH_BIN_W="$FIXPATH_BIN"
54190
54191  unix_path="$FIXPATH_SRC_W"
54192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54193    windows_path=`$CYGPATH -m "$unix_path"`
54194    FIXPATH_SRC_W="$windows_path"
54195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54196    windows_path=`cmd //c echo $unix_path`
54197    FIXPATH_SRC_W="$windows_path"
54198  fi
54199
54200
54201  unix_path="$FIXPATH_BIN_W"
54202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54203    windows_path=`$CYGPATH -m "$unix_path"`
54204    FIXPATH_BIN_W="$windows_path"
54205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54206    windows_path=`cmd //c echo $unix_path`
54207    FIXPATH_BIN_W="$windows_path"
54208  fi
54209
54210    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
54211    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
54212    cd $FIXPATH_DIR
54213    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
54214    cd $CURDIR
54215
54216    if test ! -x $FIXPATH_BIN; then
54217      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54218$as_echo "no" >&6; }
54219      cat $FIXPATH_DIR/fixpath1.log
54220      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
54221    fi
54222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54223$as_echo "yes" >&6; }
54224    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
54225$as_echo_n "checking if fixpath.exe works... " >&6; }
54226    cd $FIXPATH_DIR
54227    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
54228        > $FIXPATH_DIR/fixpath2.log 2>&1
54229    cd $CURDIR
54230    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
54231      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54232$as_echo "no" >&6; }
54233      cat $FIXPATH_DIR/fixpath2.log
54234      as_fn_error $? "fixpath did not work!" "$LINENO" 5
54235    fi
54236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54237$as_echo "yes" >&6; }
54238
54239    FIXPATH_DETACH_FLAG="--detach"
54240  fi
54241
54242
54243
54244
54245
54246
54247  # Check if X11 is needed
54248  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
54249    # No X11 support on windows or macosx
54250    NEEDS_LIB_X11=false
54251  else
54252    # All other instances need X11, even if building headless only, libawt still
54253    # needs X11 headers.
54254    NEEDS_LIB_X11=true
54255  fi
54256
54257  # Check if cups is needed
54258  if test "x$OPENJDK_TARGET_OS" = xwindows; then
54259    # Windows have a separate print system
54260    NEEDS_LIB_CUPS=false
54261  else
54262    NEEDS_LIB_CUPS=true
54263  fi
54264
54265  # A custom hook may have set this already
54266  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
54267    NEEDS_LIB_FREETYPE=true
54268  fi
54269
54270  # Check if alsa is needed
54271  if test "x$OPENJDK_TARGET_OS" = xlinux; then
54272    NEEDS_LIB_ALSA=true
54273  else
54274    NEEDS_LIB_ALSA=false
54275  fi
54276
54277  # Check if ffi is needed
54278  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54279    NEEDS_LIB_FFI=true
54280  else
54281    NEEDS_LIB_FFI=false
54282  fi
54283
54284
54285  # statically link libstdc++ before C++ ABI is stablized on Linux unless
54286  # dynamic build is configured on command line.
54287
54288# Check whether --with-stdc++lib was given.
54289if test "${with_stdc__lib+set}" = set; then :
54290  withval=$with_stdc__lib;
54291        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
54292                && test "x$with_stdc__lib" != xdefault; then
54293          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
54294        fi
54295
54296else
54297  with_stdc__lib=default
54298
54299fi
54300
54301
54302  if test "x$OPENJDK_TARGET_OS" = xlinux; then
54303    # Test if stdc++ can be linked statically.
54304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
54305$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
54306    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
54307    ac_ext=cpp
54308ac_cpp='$CXXCPP $CPPFLAGS'
54309ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54310ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54311ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54312
54313    OLD_LIBS="$LIBS"
54314    LIBS="$STATIC_STDCXX_FLAGS"
54315    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54316/* end confdefs.h.  */
54317
54318int
54319main ()
54320{
54321return 0;
54322  ;
54323  return 0;
54324}
54325_ACEOF
54326if ac_fn_cxx_try_link "$LINENO"; then :
54327  has_static_libstdcxx=yes
54328else
54329  has_static_libstdcxx=no
54330fi
54331rm -f core conftest.err conftest.$ac_objext \
54332    conftest$ac_exeext conftest.$ac_ext
54333    LIBS="$OLD_LIBS"
54334    ac_ext=cpp
54335ac_cpp='$CXXCPP $CPPFLAGS'
54336ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54337ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54338ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54339
54340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
54341$as_echo "$has_static_libstdcxx" >&6; }
54342
54343    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
54344      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
54345    fi
54346
54347    # If dynamic was requested, it's available since it would fail above otherwise.
54348    # If dynamic wasn't requested, go with static unless it isn't available.
54349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
54350$as_echo_n "checking how to link with libstdc++... " >&6; }
54351    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
54352        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54353      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
54354$as_echo "dynamic" >&6; }
54355    else
54356      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
54357      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54358      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
54359      # just use the same setting as for the TARGET toolchain.
54360      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54361      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
54362$as_echo "static" >&6; }
54363    fi
54364  fi
54365
54366  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
54367  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
54368    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
54369  fi
54370
54371
54372
54373  # Setup Windows runtime dlls
54374  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54375
54376
54377# Check whether --with-msvcr-dll was given.
54378if test "${with_msvcr_dll+set}" = set; then :
54379  withval=$with_msvcr_dll;
54380fi
54381
54382
54383  if test "x$with_msvcr_dll" != x; then
54384    # If given explicitly by user, do not probe. If not present, fail directly.
54385
54386  DLL_NAME="$MSVCR_NAME"
54387  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
54388  METHOD="--with-msvcr-dll"
54389  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54390    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54391$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54392
54393    # Need to check if the found msvcr is correct architecture
54394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54395$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54396    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54398      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54399      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54400      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54401        CORRECT_MSVCR_ARCH="PE32 executable"
54402      else
54403        CORRECT_MSVCR_ARCH="PE32+ executable"
54404      fi
54405    else
54406      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54407        CORRECT_MSVCR_ARCH=386
54408      else
54409        CORRECT_MSVCR_ARCH=x86-64
54410      fi
54411    fi
54412    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54413      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54414$as_echo "ok" >&6; }
54415      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54416
54417  # Only process if variable expands to non-empty
54418
54419  if test "x$MSVC_DLL" != x; then
54420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54421
54422  # Input might be given as Windows format, start by converting to
54423  # unix format.
54424  path="$MSVC_DLL"
54425  new_path=`$CYGPATH -u "$path"`
54426
54427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54430  # "foo.exe" is OK but "foo" is an error.
54431  #
54432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54433  # It is also a way to make sure we got the proper file name for the real test later on.
54434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54435  if test "x$test_shortpath" = x; then
54436    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54437$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54438    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54439  fi
54440
54441  # Call helper function which possibly converts this using DOS-style short mode.
54442  # If so, the updated path is stored in $new_path.
54443
54444  input_path="$new_path"
54445  # Check if we need to convert this using DOS-style short mode. If the path
54446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54447  # take no chances and rewrite it.
54448  # Note: m4 eats our [], so we need to use [ and ] instead.
54449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54450  if test "x$has_forbidden_chars" != x; then
54451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54455      # Going to short mode and back again did indeed matter. Since short mode is
54456      # case insensitive, let's make it lowercase to improve readability.
54457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54458      # Now convert it back to Unix-style (cygpath)
54459      input_path=`$CYGPATH -u "$shortmode_path"`
54460      new_path="$input_path"
54461    fi
54462  fi
54463
54464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54465  if test "x$test_cygdrive_prefix" = x; then
54466    # As a simple fix, exclude /usr/bin since it's not a real path.
54467    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54469      # a path prefixed by /cygdrive for fixpath to work.
54470      new_path="$CYGWIN_ROOT_PATH$input_path"
54471    fi
54472  fi
54473
54474
54475  if test "x$path" != "x$new_path"; then
54476    MSVC_DLL="$new_path"
54477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54478$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54479  fi
54480
54481    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54482
54483  path="$MSVC_DLL"
54484  has_colon=`$ECHO $path | $GREP ^.:`
54485  new_path="$path"
54486  if test "x$has_colon" = x; then
54487    # Not in mixed or Windows style, start by that.
54488    new_path=`cmd //c echo $path`
54489  fi
54490
54491
54492  input_path="$new_path"
54493  # Check if we need to convert this using DOS-style short mode. If the path
54494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54495  # take no chances and rewrite it.
54496  # Note: m4 eats our [], so we need to use [ and ] instead.
54497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54498  if test "x$has_forbidden_chars" != x; then
54499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54501  fi
54502
54503
54504  windows_path="$new_path"
54505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54506    unix_path=`$CYGPATH -u "$windows_path"`
54507    new_path="$unix_path"
54508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54510    new_path="$unix_path"
54511  fi
54512
54513  if test "x$path" != "x$new_path"; then
54514    MSVC_DLL="$new_path"
54515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54516$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54517  fi
54518
54519  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54520  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54521
54522    else
54523      # We're on a unix platform. Hooray! :)
54524      path="$MSVC_DLL"
54525      has_space=`$ECHO "$path" | $GREP " "`
54526      if test "x$has_space" != x; then
54527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54528$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54529        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54530      fi
54531
54532      # Use eval to expand a potential ~
54533      eval path="$path"
54534      if test ! -f "$path" && test ! -d "$path"; then
54535        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54536      fi
54537
54538      if test -d "$path"; then
54539        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54540      else
54541        dir="`$DIRNAME "$path"`"
54542        base="`$BASENAME "$path"`"
54543        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54544      fi
54545    fi
54546  fi
54547
54548      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54549$as_echo_n "checking for $DLL_NAME... " >&6; }
54550      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54551$as_echo "$MSVC_DLL" >&6; }
54552    else
54553      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54554$as_echo "incorrect, ignoring" >&6; }
54555      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54556$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54557    fi
54558  fi
54559
54560    if test "x$MSVC_DLL" = x; then
54561      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
54562    fi
54563    MSVCR_DLL="$MSVC_DLL"
54564  elif test "x$DEVKIT_MSVCR_DLL" != x; then
54565
54566  DLL_NAME="$MSVCR_NAME"
54567  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
54568  METHOD="devkit"
54569  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54570    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54571$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54572
54573    # Need to check if the found msvcr is correct architecture
54574    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54575$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54576    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54577    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54578      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54579      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54580      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54581        CORRECT_MSVCR_ARCH="PE32 executable"
54582      else
54583        CORRECT_MSVCR_ARCH="PE32+ executable"
54584      fi
54585    else
54586      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54587        CORRECT_MSVCR_ARCH=386
54588      else
54589        CORRECT_MSVCR_ARCH=x86-64
54590      fi
54591    fi
54592    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54594$as_echo "ok" >&6; }
54595      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54596
54597  # Only process if variable expands to non-empty
54598
54599  if test "x$MSVC_DLL" != x; then
54600    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54601
54602  # Input might be given as Windows format, start by converting to
54603  # unix format.
54604  path="$MSVC_DLL"
54605  new_path=`$CYGPATH -u "$path"`
54606
54607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54610  # "foo.exe" is OK but "foo" is an error.
54611  #
54612  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54613  # It is also a way to make sure we got the proper file name for the real test later on.
54614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54615  if test "x$test_shortpath" = x; then
54616    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54617$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54618    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54619  fi
54620
54621  # Call helper function which possibly converts this using DOS-style short mode.
54622  # If so, the updated path is stored in $new_path.
54623
54624  input_path="$new_path"
54625  # Check if we need to convert this using DOS-style short mode. If the path
54626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54627  # take no chances and rewrite it.
54628  # Note: m4 eats our [], so we need to use [ and ] instead.
54629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54630  if test "x$has_forbidden_chars" != x; then
54631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54635      # Going to short mode and back again did indeed matter. Since short mode is
54636      # case insensitive, let's make it lowercase to improve readability.
54637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54638      # Now convert it back to Unix-style (cygpath)
54639      input_path=`$CYGPATH -u "$shortmode_path"`
54640      new_path="$input_path"
54641    fi
54642  fi
54643
54644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54645  if test "x$test_cygdrive_prefix" = x; then
54646    # As a simple fix, exclude /usr/bin since it's not a real path.
54647    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54649      # a path prefixed by /cygdrive for fixpath to work.
54650      new_path="$CYGWIN_ROOT_PATH$input_path"
54651    fi
54652  fi
54653
54654
54655  if test "x$path" != "x$new_path"; then
54656    MSVC_DLL="$new_path"
54657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54658$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54659  fi
54660
54661    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54662
54663  path="$MSVC_DLL"
54664  has_colon=`$ECHO $path | $GREP ^.:`
54665  new_path="$path"
54666  if test "x$has_colon" = x; then
54667    # Not in mixed or Windows style, start by that.
54668    new_path=`cmd //c echo $path`
54669  fi
54670
54671
54672  input_path="$new_path"
54673  # Check if we need to convert this using DOS-style short mode. If the path
54674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54675  # take no chances and rewrite it.
54676  # Note: m4 eats our [], so we need to use [ and ] instead.
54677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54678  if test "x$has_forbidden_chars" != x; then
54679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54681  fi
54682
54683
54684  windows_path="$new_path"
54685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54686    unix_path=`$CYGPATH -u "$windows_path"`
54687    new_path="$unix_path"
54688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54690    new_path="$unix_path"
54691  fi
54692
54693  if test "x$path" != "x$new_path"; then
54694    MSVC_DLL="$new_path"
54695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54696$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54697  fi
54698
54699  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54700  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54701
54702    else
54703      # We're on a unix platform. Hooray! :)
54704      path="$MSVC_DLL"
54705      has_space=`$ECHO "$path" | $GREP " "`
54706      if test "x$has_space" != x; then
54707        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54708$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54709        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54710      fi
54711
54712      # Use eval to expand a potential ~
54713      eval path="$path"
54714      if test ! -f "$path" && test ! -d "$path"; then
54715        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54716      fi
54717
54718      if test -d "$path"; then
54719        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54720      else
54721        dir="`$DIRNAME "$path"`"
54722        base="`$BASENAME "$path"`"
54723        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54724      fi
54725    fi
54726  fi
54727
54728      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54729$as_echo_n "checking for $DLL_NAME... " >&6; }
54730      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54731$as_echo "$MSVC_DLL" >&6; }
54732    else
54733      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54734$as_echo "incorrect, ignoring" >&6; }
54735      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54736$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54737    fi
54738  fi
54739
54740    if test "x$MSVC_DLL" = x; then
54741      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54742    fi
54743    MSVCR_DLL="$MSVC_DLL"
54744  else
54745
54746  DLL_NAME="${MSVCR_NAME}"
54747  MSVC_DLL=
54748
54749  if test "x$MSVC_DLL" = x; then
54750    # Probe: Using well-known location from Visual Studio 10.0
54751    if test "x$VCINSTALLDIR" != x; then
54752      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54753
54754  windows_path="$CYGWIN_VC_INSTALL_DIR"
54755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54756    unix_path=`$CYGPATH -u "$windows_path"`
54757    CYGWIN_VC_INSTALL_DIR="$unix_path"
54758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54760    CYGWIN_VC_INSTALL_DIR="$unix_path"
54761  fi
54762
54763      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54764        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54765      else
54766        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54767      fi
54768      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54769
54770  DLL_NAME="$DLL_NAME"
54771  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54772  METHOD="well-known location in VCINSTALLDIR"
54773  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54774    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54775$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54776
54777    # Need to check if the found msvcr is correct architecture
54778    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54779$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54780    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54781    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54782      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54783      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54784      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54785        CORRECT_MSVCR_ARCH="PE32 executable"
54786      else
54787        CORRECT_MSVCR_ARCH="PE32+ executable"
54788      fi
54789    else
54790      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54791        CORRECT_MSVCR_ARCH=386
54792      else
54793        CORRECT_MSVCR_ARCH=x86-64
54794      fi
54795    fi
54796    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54798$as_echo "ok" >&6; }
54799      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54800
54801  # Only process if variable expands to non-empty
54802
54803  if test "x$MSVC_DLL" != x; then
54804    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54805
54806  # Input might be given as Windows format, start by converting to
54807  # unix format.
54808  path="$MSVC_DLL"
54809  new_path=`$CYGPATH -u "$path"`
54810
54811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54814  # "foo.exe" is OK but "foo" is an error.
54815  #
54816  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54817  # It is also a way to make sure we got the proper file name for the real test later on.
54818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54819  if test "x$test_shortpath" = x; then
54820    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54821$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54822    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54823  fi
54824
54825  # Call helper function which possibly converts this using DOS-style short mode.
54826  # If so, the updated path is stored in $new_path.
54827
54828  input_path="$new_path"
54829  # Check if we need to convert this using DOS-style short mode. If the path
54830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54831  # take no chances and rewrite it.
54832  # Note: m4 eats our [], so we need to use [ and ] instead.
54833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54834  if test "x$has_forbidden_chars" != x; then
54835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54836    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54837    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54838    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54839      # Going to short mode and back again did indeed matter. Since short mode is
54840      # case insensitive, let's make it lowercase to improve readability.
54841      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54842      # Now convert it back to Unix-style (cygpath)
54843      input_path=`$CYGPATH -u "$shortmode_path"`
54844      new_path="$input_path"
54845    fi
54846  fi
54847
54848  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54849  if test "x$test_cygdrive_prefix" = x; then
54850    # As a simple fix, exclude /usr/bin since it's not a real path.
54851    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54852      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54853      # a path prefixed by /cygdrive for fixpath to work.
54854      new_path="$CYGWIN_ROOT_PATH$input_path"
54855    fi
54856  fi
54857
54858
54859  if test "x$path" != "x$new_path"; then
54860    MSVC_DLL="$new_path"
54861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54862$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54863  fi
54864
54865    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54866
54867  path="$MSVC_DLL"
54868  has_colon=`$ECHO $path | $GREP ^.:`
54869  new_path="$path"
54870  if test "x$has_colon" = x; then
54871    # Not in mixed or Windows style, start by that.
54872    new_path=`cmd //c echo $path`
54873  fi
54874
54875
54876  input_path="$new_path"
54877  # Check if we need to convert this using DOS-style short mode. If the path
54878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54879  # take no chances and rewrite it.
54880  # Note: m4 eats our [], so we need to use [ and ] instead.
54881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54882  if test "x$has_forbidden_chars" != x; then
54883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54884    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54885  fi
54886
54887
54888  windows_path="$new_path"
54889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54890    unix_path=`$CYGPATH -u "$windows_path"`
54891    new_path="$unix_path"
54892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54894    new_path="$unix_path"
54895  fi
54896
54897  if test "x$path" != "x$new_path"; then
54898    MSVC_DLL="$new_path"
54899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54900$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54901  fi
54902
54903  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54904  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54905
54906    else
54907      # We're on a unix platform. Hooray! :)
54908      path="$MSVC_DLL"
54909      has_space=`$ECHO "$path" | $GREP " "`
54910      if test "x$has_space" != x; then
54911        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54912$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54913        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54914      fi
54915
54916      # Use eval to expand a potential ~
54917      eval path="$path"
54918      if test ! -f "$path" && test ! -d "$path"; then
54919        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54920      fi
54921
54922      if test -d "$path"; then
54923        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54924      else
54925        dir="`$DIRNAME "$path"`"
54926        base="`$BASENAME "$path"`"
54927        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54928      fi
54929    fi
54930  fi
54931
54932      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54933$as_echo_n "checking for $DLL_NAME... " >&6; }
54934      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54935$as_echo "$MSVC_DLL" >&6; }
54936    else
54937      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54938$as_echo "incorrect, ignoring" >&6; }
54939      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54940$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54941    fi
54942  fi
54943
54944    fi
54945  fi
54946
54947  if test "x$MSVC_DLL" = x; then
54948    # Probe: Check in the Boot JDK directory.
54949    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54950
54951  DLL_NAME="$DLL_NAME"
54952  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54953  METHOD="well-known location in Boot JDK"
54954  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54955    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54956$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54957
54958    # Need to check if the found msvcr is correct architecture
54959    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54960$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54961    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54962    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54963      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54964      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54965      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54966        CORRECT_MSVCR_ARCH="PE32 executable"
54967      else
54968        CORRECT_MSVCR_ARCH="PE32+ executable"
54969      fi
54970    else
54971      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54972        CORRECT_MSVCR_ARCH=386
54973      else
54974        CORRECT_MSVCR_ARCH=x86-64
54975      fi
54976    fi
54977    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54978      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54979$as_echo "ok" >&6; }
54980      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54981
54982  # Only process if variable expands to non-empty
54983
54984  if test "x$MSVC_DLL" != x; then
54985    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54986
54987  # Input might be given as Windows format, start by converting to
54988  # unix format.
54989  path="$MSVC_DLL"
54990  new_path=`$CYGPATH -u "$path"`
54991
54992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54995  # "foo.exe" is OK but "foo" is an error.
54996  #
54997  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54998  # It is also a way to make sure we got the proper file name for the real test later on.
54999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55000  if test "x$test_shortpath" = x; then
55001    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55002$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55003    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55004  fi
55005
55006  # Call helper function which possibly converts this using DOS-style short mode.
55007  # If so, the updated path is stored in $new_path.
55008
55009  input_path="$new_path"
55010  # Check if we need to convert this using DOS-style short mode. If the path
55011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55012  # take no chances and rewrite it.
55013  # Note: m4 eats our [], so we need to use [ and ] instead.
55014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55015  if test "x$has_forbidden_chars" != x; then
55016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55020      # Going to short mode and back again did indeed matter. Since short mode is
55021      # case insensitive, let's make it lowercase to improve readability.
55022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55023      # Now convert it back to Unix-style (cygpath)
55024      input_path=`$CYGPATH -u "$shortmode_path"`
55025      new_path="$input_path"
55026    fi
55027  fi
55028
55029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55030  if test "x$test_cygdrive_prefix" = x; then
55031    # As a simple fix, exclude /usr/bin since it's not a real path.
55032    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55034      # a path prefixed by /cygdrive for fixpath to work.
55035      new_path="$CYGWIN_ROOT_PATH$input_path"
55036    fi
55037  fi
55038
55039
55040  if test "x$path" != "x$new_path"; then
55041    MSVC_DLL="$new_path"
55042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55043$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55044  fi
55045
55046    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55047
55048  path="$MSVC_DLL"
55049  has_colon=`$ECHO $path | $GREP ^.:`
55050  new_path="$path"
55051  if test "x$has_colon" = x; then
55052    # Not in mixed or Windows style, start by that.
55053    new_path=`cmd //c echo $path`
55054  fi
55055
55056
55057  input_path="$new_path"
55058  # Check if we need to convert this using DOS-style short mode. If the path
55059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55060  # take no chances and rewrite it.
55061  # Note: m4 eats our [], so we need to use [ and ] instead.
55062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55063  if test "x$has_forbidden_chars" != x; then
55064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55066  fi
55067
55068
55069  windows_path="$new_path"
55070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55071    unix_path=`$CYGPATH -u "$windows_path"`
55072    new_path="$unix_path"
55073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55075    new_path="$unix_path"
55076  fi
55077
55078  if test "x$path" != "x$new_path"; then
55079    MSVC_DLL="$new_path"
55080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55081$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55082  fi
55083
55084  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55085  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55086
55087    else
55088      # We're on a unix platform. Hooray! :)
55089      path="$MSVC_DLL"
55090      has_space=`$ECHO "$path" | $GREP " "`
55091      if test "x$has_space" != x; then
55092        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55093$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55094        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55095      fi
55096
55097      # Use eval to expand a potential ~
55098      eval path="$path"
55099      if test ! -f "$path" && test ! -d "$path"; then
55100        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55101      fi
55102
55103      if test -d "$path"; then
55104        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55105      else
55106        dir="`$DIRNAME "$path"`"
55107        base="`$BASENAME "$path"`"
55108        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55109      fi
55110    fi
55111  fi
55112
55113      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55114$as_echo_n "checking for $DLL_NAME... " >&6; }
55115      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55116$as_echo "$MSVC_DLL" >&6; }
55117    else
55118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55119$as_echo "incorrect, ignoring" >&6; }
55120      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55121$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55122    fi
55123  fi
55124
55125  fi
55126
55127  if test "x$MSVC_DLL" = x; then
55128    # Probe: Look in the Windows system32 directory
55129    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55130
55131  windows_path="$CYGWIN_SYSTEMROOT"
55132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55133    unix_path=`$CYGPATH -u "$windows_path"`
55134    CYGWIN_SYSTEMROOT="$unix_path"
55135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55137    CYGWIN_SYSTEMROOT="$unix_path"
55138  fi
55139
55140    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55141
55142  DLL_NAME="$DLL_NAME"
55143  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55144  METHOD="well-known location in SYSTEMROOT"
55145  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55146    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55147$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55148
55149    # Need to check if the found msvcr is correct architecture
55150    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55151$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55152    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55154      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55155      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55156      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55157        CORRECT_MSVCR_ARCH="PE32 executable"
55158      else
55159        CORRECT_MSVCR_ARCH="PE32+ executable"
55160      fi
55161    else
55162      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55163        CORRECT_MSVCR_ARCH=386
55164      else
55165        CORRECT_MSVCR_ARCH=x86-64
55166      fi
55167    fi
55168    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55169      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55170$as_echo "ok" >&6; }
55171      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55172
55173  # Only process if variable expands to non-empty
55174
55175  if test "x$MSVC_DLL" != x; then
55176    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55177
55178  # Input might be given as Windows format, start by converting to
55179  # unix format.
55180  path="$MSVC_DLL"
55181  new_path=`$CYGPATH -u "$path"`
55182
55183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55186  # "foo.exe" is OK but "foo" is an error.
55187  #
55188  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55189  # It is also a way to make sure we got the proper file name for the real test later on.
55190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55191  if test "x$test_shortpath" = x; then
55192    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55193$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55194    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55195  fi
55196
55197  # Call helper function which possibly converts this using DOS-style short mode.
55198  # If so, the updated path is stored in $new_path.
55199
55200  input_path="$new_path"
55201  # Check if we need to convert this using DOS-style short mode. If the path
55202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55203  # take no chances and rewrite it.
55204  # Note: m4 eats our [], so we need to use [ and ] instead.
55205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55206  if test "x$has_forbidden_chars" != x; then
55207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55211      # Going to short mode and back again did indeed matter. Since short mode is
55212      # case insensitive, let's make it lowercase to improve readability.
55213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55214      # Now convert it back to Unix-style (cygpath)
55215      input_path=`$CYGPATH -u "$shortmode_path"`
55216      new_path="$input_path"
55217    fi
55218  fi
55219
55220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55221  if test "x$test_cygdrive_prefix" = x; then
55222    # As a simple fix, exclude /usr/bin since it's not a real path.
55223    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55225      # a path prefixed by /cygdrive for fixpath to work.
55226      new_path="$CYGWIN_ROOT_PATH$input_path"
55227    fi
55228  fi
55229
55230
55231  if test "x$path" != "x$new_path"; then
55232    MSVC_DLL="$new_path"
55233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55234$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55235  fi
55236
55237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55238
55239  path="$MSVC_DLL"
55240  has_colon=`$ECHO $path | $GREP ^.:`
55241  new_path="$path"
55242  if test "x$has_colon" = x; then
55243    # Not in mixed or Windows style, start by that.
55244    new_path=`cmd //c echo $path`
55245  fi
55246
55247
55248  input_path="$new_path"
55249  # Check if we need to convert this using DOS-style short mode. If the path
55250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55251  # take no chances and rewrite it.
55252  # Note: m4 eats our [], so we need to use [ and ] instead.
55253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55254  if test "x$has_forbidden_chars" != x; then
55255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55257  fi
55258
55259
55260  windows_path="$new_path"
55261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55262    unix_path=`$CYGPATH -u "$windows_path"`
55263    new_path="$unix_path"
55264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55266    new_path="$unix_path"
55267  fi
55268
55269  if test "x$path" != "x$new_path"; then
55270    MSVC_DLL="$new_path"
55271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55272$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55273  fi
55274
55275  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55276  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55277
55278    else
55279      # We're on a unix platform. Hooray! :)
55280      path="$MSVC_DLL"
55281      has_space=`$ECHO "$path" | $GREP " "`
55282      if test "x$has_space" != x; then
55283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55284$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55285        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55286      fi
55287
55288      # Use eval to expand a potential ~
55289      eval path="$path"
55290      if test ! -f "$path" && test ! -d "$path"; then
55291        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55292      fi
55293
55294      if test -d "$path"; then
55295        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55296      else
55297        dir="`$DIRNAME "$path"`"
55298        base="`$BASENAME "$path"`"
55299        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55300      fi
55301    fi
55302  fi
55303
55304      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55305$as_echo_n "checking for $DLL_NAME... " >&6; }
55306      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55307$as_echo "$MSVC_DLL" >&6; }
55308    else
55309      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55310$as_echo "incorrect, ignoring" >&6; }
55311      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55312$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55313    fi
55314  fi
55315
55316  fi
55317
55318  if test "x$MSVC_DLL" = x; then
55319    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55320    if test "x$VS100COMNTOOLS" != x; then
55321      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55322
55323  windows_path="$CYGWIN_VS_TOOLS_DIR"
55324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55325    unix_path=`$CYGPATH -u "$windows_path"`
55326    CYGWIN_VS_TOOLS_DIR="$unix_path"
55327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55329    CYGWIN_VS_TOOLS_DIR="$unix_path"
55330  fi
55331
55332      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55333        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55334	    | $GREP -i /x64/ | $HEAD --lines 1`
55335      else
55336        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55337	    | $GREP -i /x86/ | $HEAD --lines 1`
55338      fi
55339
55340  DLL_NAME="$DLL_NAME"
55341  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55342  METHOD="search of VS100COMNTOOLS"
55343  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55344    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55345$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55346
55347    # Need to check if the found msvcr is correct architecture
55348    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55349$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55350    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55352      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55353      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55354      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55355        CORRECT_MSVCR_ARCH="PE32 executable"
55356      else
55357        CORRECT_MSVCR_ARCH="PE32+ executable"
55358      fi
55359    else
55360      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55361        CORRECT_MSVCR_ARCH=386
55362      else
55363        CORRECT_MSVCR_ARCH=x86-64
55364      fi
55365    fi
55366    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55367      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55368$as_echo "ok" >&6; }
55369      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55370
55371  # Only process if variable expands to non-empty
55372
55373  if test "x$MSVC_DLL" != x; then
55374    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55375
55376  # Input might be given as Windows format, start by converting to
55377  # unix format.
55378  path="$MSVC_DLL"
55379  new_path=`$CYGPATH -u "$path"`
55380
55381  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55382  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55383  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55384  # "foo.exe" is OK but "foo" is an error.
55385  #
55386  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55387  # It is also a way to make sure we got the proper file name for the real test later on.
55388  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55389  if test "x$test_shortpath" = x; then
55390    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55391$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55392    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55393  fi
55394
55395  # Call helper function which possibly converts this using DOS-style short mode.
55396  # If so, the updated path is stored in $new_path.
55397
55398  input_path="$new_path"
55399  # Check if we need to convert this using DOS-style short mode. If the path
55400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55401  # take no chances and rewrite it.
55402  # Note: m4 eats our [], so we need to use [ and ] instead.
55403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55404  if test "x$has_forbidden_chars" != x; then
55405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55409      # Going to short mode and back again did indeed matter. Since short mode is
55410      # case insensitive, let's make it lowercase to improve readability.
55411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55412      # Now convert it back to Unix-style (cygpath)
55413      input_path=`$CYGPATH -u "$shortmode_path"`
55414      new_path="$input_path"
55415    fi
55416  fi
55417
55418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55419  if test "x$test_cygdrive_prefix" = x; then
55420    # As a simple fix, exclude /usr/bin since it's not a real path.
55421    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55423      # a path prefixed by /cygdrive for fixpath to work.
55424      new_path="$CYGWIN_ROOT_PATH$input_path"
55425    fi
55426  fi
55427
55428
55429  if test "x$path" != "x$new_path"; then
55430    MSVC_DLL="$new_path"
55431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55432$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55433  fi
55434
55435    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55436
55437  path="$MSVC_DLL"
55438  has_colon=`$ECHO $path | $GREP ^.:`
55439  new_path="$path"
55440  if test "x$has_colon" = x; then
55441    # Not in mixed or Windows style, start by that.
55442    new_path=`cmd //c echo $path`
55443  fi
55444
55445
55446  input_path="$new_path"
55447  # Check if we need to convert this using DOS-style short mode. If the path
55448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55449  # take no chances and rewrite it.
55450  # Note: m4 eats our [], so we need to use [ and ] instead.
55451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55452  if test "x$has_forbidden_chars" != x; then
55453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55455  fi
55456
55457
55458  windows_path="$new_path"
55459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55460    unix_path=`$CYGPATH -u "$windows_path"`
55461    new_path="$unix_path"
55462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55464    new_path="$unix_path"
55465  fi
55466
55467  if test "x$path" != "x$new_path"; then
55468    MSVC_DLL="$new_path"
55469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55470$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55471  fi
55472
55473  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55474  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55475
55476    else
55477      # We're on a unix platform. Hooray! :)
55478      path="$MSVC_DLL"
55479      has_space=`$ECHO "$path" | $GREP " "`
55480      if test "x$has_space" != x; then
55481        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55482$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55483        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55484      fi
55485
55486      # Use eval to expand a potential ~
55487      eval path="$path"
55488      if test ! -f "$path" && test ! -d "$path"; then
55489        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55490      fi
55491
55492      if test -d "$path"; then
55493        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55494      else
55495        dir="`$DIRNAME "$path"`"
55496        base="`$BASENAME "$path"`"
55497        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55498      fi
55499    fi
55500  fi
55501
55502      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55503$as_echo_n "checking for $DLL_NAME... " >&6; }
55504      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55505$as_echo "$MSVC_DLL" >&6; }
55506    else
55507      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55508$as_echo "incorrect, ignoring" >&6; }
55509      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55510$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55511    fi
55512  fi
55513
55514    fi
55515  fi
55516
55517  if test "x$MSVC_DLL" = x; then
55518    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55519    # (This was the original behaviour; kept since it might turn something up)
55520    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55521      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55522        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55523	    | $GREP x64 | $HEAD --lines 1`
55524      else
55525        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55526	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55527        if test "x$POSSIBLE_MSVC_DLL" = x; then
55528          # We're grasping at straws now...
55529          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55530	      | $HEAD --lines 1`
55531        fi
55532      fi
55533
55534
55535  DLL_NAME="$DLL_NAME"
55536  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55537  METHOD="search of VCINSTALLDIR"
55538  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55539    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55540$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55541
55542    # Need to check if the found msvcr is correct architecture
55543    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55544$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55545    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55546    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55547      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55548      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55549      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55550        CORRECT_MSVCR_ARCH="PE32 executable"
55551      else
55552        CORRECT_MSVCR_ARCH="PE32+ executable"
55553      fi
55554    else
55555      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55556        CORRECT_MSVCR_ARCH=386
55557      else
55558        CORRECT_MSVCR_ARCH=x86-64
55559      fi
55560    fi
55561    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55562      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55563$as_echo "ok" >&6; }
55564      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55565
55566  # Only process if variable expands to non-empty
55567
55568  if test "x$MSVC_DLL" != x; then
55569    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55570
55571  # Input might be given as Windows format, start by converting to
55572  # unix format.
55573  path="$MSVC_DLL"
55574  new_path=`$CYGPATH -u "$path"`
55575
55576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55579  # "foo.exe" is OK but "foo" is an error.
55580  #
55581  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55582  # It is also a way to make sure we got the proper file name for the real test later on.
55583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55584  if test "x$test_shortpath" = x; then
55585    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55586$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55587    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55588  fi
55589
55590  # Call helper function which possibly converts this using DOS-style short mode.
55591  # If so, the updated path is stored in $new_path.
55592
55593  input_path="$new_path"
55594  # Check if we need to convert this using DOS-style short mode. If the path
55595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55596  # take no chances and rewrite it.
55597  # Note: m4 eats our [], so we need to use [ and ] instead.
55598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55599  if test "x$has_forbidden_chars" != x; then
55600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55601    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55602    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55603    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55604      # Going to short mode and back again did indeed matter. Since short mode is
55605      # case insensitive, let's make it lowercase to improve readability.
55606      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55607      # Now convert it back to Unix-style (cygpath)
55608      input_path=`$CYGPATH -u "$shortmode_path"`
55609      new_path="$input_path"
55610    fi
55611  fi
55612
55613  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55614  if test "x$test_cygdrive_prefix" = x; then
55615    # As a simple fix, exclude /usr/bin since it's not a real path.
55616    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55617      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55618      # a path prefixed by /cygdrive for fixpath to work.
55619      new_path="$CYGWIN_ROOT_PATH$input_path"
55620    fi
55621  fi
55622
55623
55624  if test "x$path" != "x$new_path"; then
55625    MSVC_DLL="$new_path"
55626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55627$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55628  fi
55629
55630    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55631
55632  path="$MSVC_DLL"
55633  has_colon=`$ECHO $path | $GREP ^.:`
55634  new_path="$path"
55635  if test "x$has_colon" = x; then
55636    # Not in mixed or Windows style, start by that.
55637    new_path=`cmd //c echo $path`
55638  fi
55639
55640
55641  input_path="$new_path"
55642  # Check if we need to convert this using DOS-style short mode. If the path
55643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55644  # take no chances and rewrite it.
55645  # Note: m4 eats our [], so we need to use [ and ] instead.
55646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55647  if test "x$has_forbidden_chars" != x; then
55648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55649    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55650  fi
55651
55652
55653  windows_path="$new_path"
55654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55655    unix_path=`$CYGPATH -u "$windows_path"`
55656    new_path="$unix_path"
55657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55659    new_path="$unix_path"
55660  fi
55661
55662  if test "x$path" != "x$new_path"; then
55663    MSVC_DLL="$new_path"
55664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55665$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55666  fi
55667
55668  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55669  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55670
55671    else
55672      # We're on a unix platform. Hooray! :)
55673      path="$MSVC_DLL"
55674      has_space=`$ECHO "$path" | $GREP " "`
55675      if test "x$has_space" != x; then
55676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55677$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55678        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55679      fi
55680
55681      # Use eval to expand a potential ~
55682      eval path="$path"
55683      if test ! -f "$path" && test ! -d "$path"; then
55684        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55685      fi
55686
55687      if test -d "$path"; then
55688        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55689      else
55690        dir="`$DIRNAME "$path"`"
55691        base="`$BASENAME "$path"`"
55692        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55693      fi
55694    fi
55695  fi
55696
55697      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55698$as_echo_n "checking for $DLL_NAME... " >&6; }
55699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55700$as_echo "$MSVC_DLL" >&6; }
55701    else
55702      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55703$as_echo "incorrect, ignoring" >&6; }
55704      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55705$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55706    fi
55707  fi
55708
55709    fi
55710  fi
55711
55712  if test "x$MSVC_DLL" = x; then
55713    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55714$as_echo_n "checking for $DLL_NAME... " >&6; }
55715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55716$as_echo "no" >&6; }
55717    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55718  fi
55719
55720    MSVCR_DLL="$MSVC_DLL"
55721  fi
55722
55723
55724
55725# Check whether --with-msvcp-dll was given.
55726if test "${with_msvcp_dll+set}" = set; then :
55727  withval=$with_msvcp_dll;
55728fi
55729
55730
55731  if test "x$MSVCP_NAME" != "x"; then
55732    if test "x$with_msvcp_dll" != x; then
55733      # If given explicitly by user, do not probe. If not present, fail directly.
55734
55735  DLL_NAME="$MSVCP_NAME"
55736  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55737  METHOD="--with-msvcp-dll"
55738  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55739    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55740$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55741
55742    # Need to check if the found msvcr is correct architecture
55743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55744$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55745    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55747      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55748      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55749      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55750        CORRECT_MSVCR_ARCH="PE32 executable"
55751      else
55752        CORRECT_MSVCR_ARCH="PE32+ executable"
55753      fi
55754    else
55755      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55756        CORRECT_MSVCR_ARCH=386
55757      else
55758        CORRECT_MSVCR_ARCH=x86-64
55759      fi
55760    fi
55761    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55762      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55763$as_echo "ok" >&6; }
55764      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55765
55766  # Only process if variable expands to non-empty
55767
55768  if test "x$MSVC_DLL" != x; then
55769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55770
55771  # Input might be given as Windows format, start by converting to
55772  # unix format.
55773  path="$MSVC_DLL"
55774  new_path=`$CYGPATH -u "$path"`
55775
55776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55779  # "foo.exe" is OK but "foo" is an error.
55780  #
55781  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55782  # It is also a way to make sure we got the proper file name for the real test later on.
55783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55784  if test "x$test_shortpath" = x; then
55785    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55786$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55787    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55788  fi
55789
55790  # Call helper function which possibly converts this using DOS-style short mode.
55791  # If so, the updated path is stored in $new_path.
55792
55793  input_path="$new_path"
55794  # Check if we need to convert this using DOS-style short mode. If the path
55795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55796  # take no chances and rewrite it.
55797  # Note: m4 eats our [], so we need to use [ and ] instead.
55798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55799  if test "x$has_forbidden_chars" != x; then
55800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55801    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55802    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55803    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55804      # Going to short mode and back again did indeed matter. Since short mode is
55805      # case insensitive, let's make it lowercase to improve readability.
55806      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55807      # Now convert it back to Unix-style (cygpath)
55808      input_path=`$CYGPATH -u "$shortmode_path"`
55809      new_path="$input_path"
55810    fi
55811  fi
55812
55813  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55814  if test "x$test_cygdrive_prefix" = x; then
55815    # As a simple fix, exclude /usr/bin since it's not a real path.
55816    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55817      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55818      # a path prefixed by /cygdrive for fixpath to work.
55819      new_path="$CYGWIN_ROOT_PATH$input_path"
55820    fi
55821  fi
55822
55823
55824  if test "x$path" != "x$new_path"; then
55825    MSVC_DLL="$new_path"
55826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55827$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55828  fi
55829
55830    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55831
55832  path="$MSVC_DLL"
55833  has_colon=`$ECHO $path | $GREP ^.:`
55834  new_path="$path"
55835  if test "x$has_colon" = x; then
55836    # Not in mixed or Windows style, start by that.
55837    new_path=`cmd //c echo $path`
55838  fi
55839
55840
55841  input_path="$new_path"
55842  # Check if we need to convert this using DOS-style short mode. If the path
55843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55844  # take no chances and rewrite it.
55845  # Note: m4 eats our [], so we need to use [ and ] instead.
55846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55847  if test "x$has_forbidden_chars" != x; then
55848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55850  fi
55851
55852
55853  windows_path="$new_path"
55854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55855    unix_path=`$CYGPATH -u "$windows_path"`
55856    new_path="$unix_path"
55857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55859    new_path="$unix_path"
55860  fi
55861
55862  if test "x$path" != "x$new_path"; then
55863    MSVC_DLL="$new_path"
55864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55865$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55866  fi
55867
55868  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55869  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55870
55871    else
55872      # We're on a unix platform. Hooray! :)
55873      path="$MSVC_DLL"
55874      has_space=`$ECHO "$path" | $GREP " "`
55875      if test "x$has_space" != x; then
55876        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55877$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55878        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55879      fi
55880
55881      # Use eval to expand a potential ~
55882      eval path="$path"
55883      if test ! -f "$path" && test ! -d "$path"; then
55884        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55885      fi
55886
55887      if test -d "$path"; then
55888        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55889      else
55890        dir="`$DIRNAME "$path"`"
55891        base="`$BASENAME "$path"`"
55892        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55893      fi
55894    fi
55895  fi
55896
55897      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55898$as_echo_n "checking for $DLL_NAME... " >&6; }
55899      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55900$as_echo "$MSVC_DLL" >&6; }
55901    else
55902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55903$as_echo "incorrect, ignoring" >&6; }
55904      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55905$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55906    fi
55907  fi
55908
55909      if test "x$MSVC_DLL" = x; then
55910        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55911      fi
55912      MSVCP_DLL="$MSVC_DLL"
55913    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55914
55915  DLL_NAME="$MSVCP_NAME"
55916  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55917  METHOD="devkit"
55918  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55919    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55920$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55921
55922    # Need to check if the found msvcr is correct architecture
55923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55924$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55925    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55927      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55928      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55929      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55930        CORRECT_MSVCR_ARCH="PE32 executable"
55931      else
55932        CORRECT_MSVCR_ARCH="PE32+ executable"
55933      fi
55934    else
55935      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55936        CORRECT_MSVCR_ARCH=386
55937      else
55938        CORRECT_MSVCR_ARCH=x86-64
55939      fi
55940    fi
55941    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55942      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55943$as_echo "ok" >&6; }
55944      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55945
55946  # Only process if variable expands to non-empty
55947
55948  if test "x$MSVC_DLL" != x; then
55949    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55950
55951  # Input might be given as Windows format, start by converting to
55952  # unix format.
55953  path="$MSVC_DLL"
55954  new_path=`$CYGPATH -u "$path"`
55955
55956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55959  # "foo.exe" is OK but "foo" is an error.
55960  #
55961  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55962  # It is also a way to make sure we got the proper file name for the real test later on.
55963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55964  if test "x$test_shortpath" = x; then
55965    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55966$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55967    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55968  fi
55969
55970  # Call helper function which possibly converts this using DOS-style short mode.
55971  # If so, the updated path is stored in $new_path.
55972
55973  input_path="$new_path"
55974  # Check if we need to convert this using DOS-style short mode. If the path
55975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55976  # take no chances and rewrite it.
55977  # Note: m4 eats our [], so we need to use [ and ] instead.
55978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55979  if test "x$has_forbidden_chars" != x; then
55980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55981    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55982    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55983    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55984      # Going to short mode and back again did indeed matter. Since short mode is
55985      # case insensitive, let's make it lowercase to improve readability.
55986      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55987      # Now convert it back to Unix-style (cygpath)
55988      input_path=`$CYGPATH -u "$shortmode_path"`
55989      new_path="$input_path"
55990    fi
55991  fi
55992
55993  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55994  if test "x$test_cygdrive_prefix" = x; then
55995    # As a simple fix, exclude /usr/bin since it's not a real path.
55996    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55997      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55998      # a path prefixed by /cygdrive for fixpath to work.
55999      new_path="$CYGWIN_ROOT_PATH$input_path"
56000    fi
56001  fi
56002
56003
56004  if test "x$path" != "x$new_path"; then
56005    MSVC_DLL="$new_path"
56006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56007$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56008  fi
56009
56010    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56011
56012  path="$MSVC_DLL"
56013  has_colon=`$ECHO $path | $GREP ^.:`
56014  new_path="$path"
56015  if test "x$has_colon" = x; then
56016    # Not in mixed or Windows style, start by that.
56017    new_path=`cmd //c echo $path`
56018  fi
56019
56020
56021  input_path="$new_path"
56022  # Check if we need to convert this using DOS-style short mode. If the path
56023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56024  # take no chances and rewrite it.
56025  # Note: m4 eats our [], so we need to use [ and ] instead.
56026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56027  if test "x$has_forbidden_chars" != x; then
56028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56029    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56030  fi
56031
56032
56033  windows_path="$new_path"
56034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56035    unix_path=`$CYGPATH -u "$windows_path"`
56036    new_path="$unix_path"
56037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56039    new_path="$unix_path"
56040  fi
56041
56042  if test "x$path" != "x$new_path"; then
56043    MSVC_DLL="$new_path"
56044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56045$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56046  fi
56047
56048  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56049  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56050
56051    else
56052      # We're on a unix platform. Hooray! :)
56053      path="$MSVC_DLL"
56054      has_space=`$ECHO "$path" | $GREP " "`
56055      if test "x$has_space" != x; then
56056        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56057$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56058        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56059      fi
56060
56061      # Use eval to expand a potential ~
56062      eval path="$path"
56063      if test ! -f "$path" && test ! -d "$path"; then
56064        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56065      fi
56066
56067      if test -d "$path"; then
56068        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56069      else
56070        dir="`$DIRNAME "$path"`"
56071        base="`$BASENAME "$path"`"
56072        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56073      fi
56074    fi
56075  fi
56076
56077      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56078$as_echo_n "checking for $DLL_NAME... " >&6; }
56079      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56080$as_echo "$MSVC_DLL" >&6; }
56081    else
56082      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56083$as_echo "incorrect, ignoring" >&6; }
56084      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56085$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56086    fi
56087  fi
56088
56089      if test "x$MSVC_DLL" = x; then
56090        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
56091      fi
56092      MSVCP_DLL="$MSVC_DLL"
56093    else
56094
56095  DLL_NAME="${MSVCP_NAME}"
56096  MSVC_DLL=
56097
56098  if test "x$MSVC_DLL" = x; then
56099    # Probe: Using well-known location from Visual Studio 10.0
56100    if test "x$VCINSTALLDIR" != x; then
56101      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
56102
56103  windows_path="$CYGWIN_VC_INSTALL_DIR"
56104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56105    unix_path=`$CYGPATH -u "$windows_path"`
56106    CYGWIN_VC_INSTALL_DIR="$unix_path"
56107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56109    CYGWIN_VC_INSTALL_DIR="$unix_path"
56110  fi
56111
56112      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56113        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56114      else
56115        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56116      fi
56117      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
56118
56119  DLL_NAME="$DLL_NAME"
56120  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56121  METHOD="well-known location in VCINSTALLDIR"
56122  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56123    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56124$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56125
56126    # Need to check if the found msvcr is correct architecture
56127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56128$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56129    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56130    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56131      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56132      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56133      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56134        CORRECT_MSVCR_ARCH="PE32 executable"
56135      else
56136        CORRECT_MSVCR_ARCH="PE32+ executable"
56137      fi
56138    else
56139      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56140        CORRECT_MSVCR_ARCH=386
56141      else
56142        CORRECT_MSVCR_ARCH=x86-64
56143      fi
56144    fi
56145    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56146      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56147$as_echo "ok" >&6; }
56148      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56149
56150  # Only process if variable expands to non-empty
56151
56152  if test "x$MSVC_DLL" != x; then
56153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56154
56155  # Input might be given as Windows format, start by converting to
56156  # unix format.
56157  path="$MSVC_DLL"
56158  new_path=`$CYGPATH -u "$path"`
56159
56160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56163  # "foo.exe" is OK but "foo" is an error.
56164  #
56165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56166  # It is also a way to make sure we got the proper file name for the real test later on.
56167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56168  if test "x$test_shortpath" = x; then
56169    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56170$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56171    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56172  fi
56173
56174  # Call helper function which possibly converts this using DOS-style short mode.
56175  # If so, the updated path is stored in $new_path.
56176
56177  input_path="$new_path"
56178  # Check if we need to convert this using DOS-style short mode. If the path
56179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56180  # take no chances and rewrite it.
56181  # Note: m4 eats our [], so we need to use [ and ] instead.
56182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56183  if test "x$has_forbidden_chars" != x; then
56184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56188      # Going to short mode and back again did indeed matter. Since short mode is
56189      # case insensitive, let's make it lowercase to improve readability.
56190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56191      # Now convert it back to Unix-style (cygpath)
56192      input_path=`$CYGPATH -u "$shortmode_path"`
56193      new_path="$input_path"
56194    fi
56195  fi
56196
56197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56198  if test "x$test_cygdrive_prefix" = x; then
56199    # As a simple fix, exclude /usr/bin since it's not a real path.
56200    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56202      # a path prefixed by /cygdrive for fixpath to work.
56203      new_path="$CYGWIN_ROOT_PATH$input_path"
56204    fi
56205  fi
56206
56207
56208  if test "x$path" != "x$new_path"; then
56209    MSVC_DLL="$new_path"
56210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56211$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56212  fi
56213
56214    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56215
56216  path="$MSVC_DLL"
56217  has_colon=`$ECHO $path | $GREP ^.:`
56218  new_path="$path"
56219  if test "x$has_colon" = x; then
56220    # Not in mixed or Windows style, start by that.
56221    new_path=`cmd //c echo $path`
56222  fi
56223
56224
56225  input_path="$new_path"
56226  # Check if we need to convert this using DOS-style short mode. If the path
56227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56228  # take no chances and rewrite it.
56229  # Note: m4 eats our [], so we need to use [ and ] instead.
56230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56231  if test "x$has_forbidden_chars" != x; then
56232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56234  fi
56235
56236
56237  windows_path="$new_path"
56238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56239    unix_path=`$CYGPATH -u "$windows_path"`
56240    new_path="$unix_path"
56241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56243    new_path="$unix_path"
56244  fi
56245
56246  if test "x$path" != "x$new_path"; then
56247    MSVC_DLL="$new_path"
56248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56249$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56250  fi
56251
56252  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56253  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56254
56255    else
56256      # We're on a unix platform. Hooray! :)
56257      path="$MSVC_DLL"
56258      has_space=`$ECHO "$path" | $GREP " "`
56259      if test "x$has_space" != x; then
56260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56261$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56262        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56263      fi
56264
56265      # Use eval to expand a potential ~
56266      eval path="$path"
56267      if test ! -f "$path" && test ! -d "$path"; then
56268        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56269      fi
56270
56271      if test -d "$path"; then
56272        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56273      else
56274        dir="`$DIRNAME "$path"`"
56275        base="`$BASENAME "$path"`"
56276        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56277      fi
56278    fi
56279  fi
56280
56281      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56282$as_echo_n "checking for $DLL_NAME... " >&6; }
56283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56284$as_echo "$MSVC_DLL" >&6; }
56285    else
56286      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56287$as_echo "incorrect, ignoring" >&6; }
56288      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56289$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56290    fi
56291  fi
56292
56293    fi
56294  fi
56295
56296  if test "x$MSVC_DLL" = x; then
56297    # Probe: Check in the Boot JDK directory.
56298    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
56299
56300  DLL_NAME="$DLL_NAME"
56301  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56302  METHOD="well-known location in Boot JDK"
56303  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56304    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56305$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56306
56307    # Need to check if the found msvcr is correct architecture
56308    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56309$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56310    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56311    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56312      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56313      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56314      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56315        CORRECT_MSVCR_ARCH="PE32 executable"
56316      else
56317        CORRECT_MSVCR_ARCH="PE32+ executable"
56318      fi
56319    else
56320      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56321        CORRECT_MSVCR_ARCH=386
56322      else
56323        CORRECT_MSVCR_ARCH=x86-64
56324      fi
56325    fi
56326    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56327      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56328$as_echo "ok" >&6; }
56329      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56330
56331  # Only process if variable expands to non-empty
56332
56333  if test "x$MSVC_DLL" != x; then
56334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56335
56336  # Input might be given as Windows format, start by converting to
56337  # unix format.
56338  path="$MSVC_DLL"
56339  new_path=`$CYGPATH -u "$path"`
56340
56341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56344  # "foo.exe" is OK but "foo" is an error.
56345  #
56346  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56347  # It is also a way to make sure we got the proper file name for the real test later on.
56348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56349  if test "x$test_shortpath" = x; then
56350    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56351$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56352    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56353  fi
56354
56355  # Call helper function which possibly converts this using DOS-style short mode.
56356  # If so, the updated path is stored in $new_path.
56357
56358  input_path="$new_path"
56359  # Check if we need to convert this using DOS-style short mode. If the path
56360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56361  # take no chances and rewrite it.
56362  # Note: m4 eats our [], so we need to use [ and ] instead.
56363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56364  if test "x$has_forbidden_chars" != x; then
56365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56369      # Going to short mode and back again did indeed matter. Since short mode is
56370      # case insensitive, let's make it lowercase to improve readability.
56371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56372      # Now convert it back to Unix-style (cygpath)
56373      input_path=`$CYGPATH -u "$shortmode_path"`
56374      new_path="$input_path"
56375    fi
56376  fi
56377
56378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56379  if test "x$test_cygdrive_prefix" = x; then
56380    # As a simple fix, exclude /usr/bin since it's not a real path.
56381    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56383      # a path prefixed by /cygdrive for fixpath to work.
56384      new_path="$CYGWIN_ROOT_PATH$input_path"
56385    fi
56386  fi
56387
56388
56389  if test "x$path" != "x$new_path"; then
56390    MSVC_DLL="$new_path"
56391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56392$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56393  fi
56394
56395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56396
56397  path="$MSVC_DLL"
56398  has_colon=`$ECHO $path | $GREP ^.:`
56399  new_path="$path"
56400  if test "x$has_colon" = x; then
56401    # Not in mixed or Windows style, start by that.
56402    new_path=`cmd //c echo $path`
56403  fi
56404
56405
56406  input_path="$new_path"
56407  # Check if we need to convert this using DOS-style short mode. If the path
56408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56409  # take no chances and rewrite it.
56410  # Note: m4 eats our [], so we need to use [ and ] instead.
56411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56412  if test "x$has_forbidden_chars" != x; then
56413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56415  fi
56416
56417
56418  windows_path="$new_path"
56419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56420    unix_path=`$CYGPATH -u "$windows_path"`
56421    new_path="$unix_path"
56422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56424    new_path="$unix_path"
56425  fi
56426
56427  if test "x$path" != "x$new_path"; then
56428    MSVC_DLL="$new_path"
56429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56430$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56431  fi
56432
56433  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56434  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56435
56436    else
56437      # We're on a unix platform. Hooray! :)
56438      path="$MSVC_DLL"
56439      has_space=`$ECHO "$path" | $GREP " "`
56440      if test "x$has_space" != x; then
56441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56442$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56443        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56444      fi
56445
56446      # Use eval to expand a potential ~
56447      eval path="$path"
56448      if test ! -f "$path" && test ! -d "$path"; then
56449        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56450      fi
56451
56452      if test -d "$path"; then
56453        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56454      else
56455        dir="`$DIRNAME "$path"`"
56456        base="`$BASENAME "$path"`"
56457        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56458      fi
56459    fi
56460  fi
56461
56462      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56463$as_echo_n "checking for $DLL_NAME... " >&6; }
56464      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56465$as_echo "$MSVC_DLL" >&6; }
56466    else
56467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56468$as_echo "incorrect, ignoring" >&6; }
56469      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56470$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56471    fi
56472  fi
56473
56474  fi
56475
56476  if test "x$MSVC_DLL" = x; then
56477    # Probe: Look in the Windows system32 directory
56478    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
56479
56480  windows_path="$CYGWIN_SYSTEMROOT"
56481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56482    unix_path=`$CYGPATH -u "$windows_path"`
56483    CYGWIN_SYSTEMROOT="$unix_path"
56484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56486    CYGWIN_SYSTEMROOT="$unix_path"
56487  fi
56488
56489    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
56490
56491  DLL_NAME="$DLL_NAME"
56492  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56493  METHOD="well-known location in SYSTEMROOT"
56494  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56495    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56496$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56497
56498    # Need to check if the found msvcr is correct architecture
56499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56500$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56501    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56502    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56503      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56504      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56505      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56506        CORRECT_MSVCR_ARCH="PE32 executable"
56507      else
56508        CORRECT_MSVCR_ARCH="PE32+ executable"
56509      fi
56510    else
56511      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56512        CORRECT_MSVCR_ARCH=386
56513      else
56514        CORRECT_MSVCR_ARCH=x86-64
56515      fi
56516    fi
56517    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56519$as_echo "ok" >&6; }
56520      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56521
56522  # Only process if variable expands to non-empty
56523
56524  if test "x$MSVC_DLL" != x; then
56525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56526
56527  # Input might be given as Windows format, start by converting to
56528  # unix format.
56529  path="$MSVC_DLL"
56530  new_path=`$CYGPATH -u "$path"`
56531
56532  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56533  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56534  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56535  # "foo.exe" is OK but "foo" is an error.
56536  #
56537  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56538  # It is also a way to make sure we got the proper file name for the real test later on.
56539  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56540  if test "x$test_shortpath" = x; then
56541    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56542$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56543    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56544  fi
56545
56546  # Call helper function which possibly converts this using DOS-style short mode.
56547  # If so, the updated path is stored in $new_path.
56548
56549  input_path="$new_path"
56550  # Check if we need to convert this using DOS-style short mode. If the path
56551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56552  # take no chances and rewrite it.
56553  # Note: m4 eats our [], so we need to use [ and ] instead.
56554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56555  if test "x$has_forbidden_chars" != x; then
56556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56560      # Going to short mode and back again did indeed matter. Since short mode is
56561      # case insensitive, let's make it lowercase to improve readability.
56562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56563      # Now convert it back to Unix-style (cygpath)
56564      input_path=`$CYGPATH -u "$shortmode_path"`
56565      new_path="$input_path"
56566    fi
56567  fi
56568
56569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56570  if test "x$test_cygdrive_prefix" = x; then
56571    # As a simple fix, exclude /usr/bin since it's not a real path.
56572    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56574      # a path prefixed by /cygdrive for fixpath to work.
56575      new_path="$CYGWIN_ROOT_PATH$input_path"
56576    fi
56577  fi
56578
56579
56580  if test "x$path" != "x$new_path"; then
56581    MSVC_DLL="$new_path"
56582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56583$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56584  fi
56585
56586    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56587
56588  path="$MSVC_DLL"
56589  has_colon=`$ECHO $path | $GREP ^.:`
56590  new_path="$path"
56591  if test "x$has_colon" = x; then
56592    # Not in mixed or Windows style, start by that.
56593    new_path=`cmd //c echo $path`
56594  fi
56595
56596
56597  input_path="$new_path"
56598  # Check if we need to convert this using DOS-style short mode. If the path
56599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56600  # take no chances and rewrite it.
56601  # Note: m4 eats our [], so we need to use [ and ] instead.
56602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56603  if test "x$has_forbidden_chars" != x; then
56604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56605    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56606  fi
56607
56608
56609  windows_path="$new_path"
56610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56611    unix_path=`$CYGPATH -u "$windows_path"`
56612    new_path="$unix_path"
56613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56615    new_path="$unix_path"
56616  fi
56617
56618  if test "x$path" != "x$new_path"; then
56619    MSVC_DLL="$new_path"
56620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56621$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56622  fi
56623
56624  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56625  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56626
56627    else
56628      # We're on a unix platform. Hooray! :)
56629      path="$MSVC_DLL"
56630      has_space=`$ECHO "$path" | $GREP " "`
56631      if test "x$has_space" != x; then
56632        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56633$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56634        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56635      fi
56636
56637      # Use eval to expand a potential ~
56638      eval path="$path"
56639      if test ! -f "$path" && test ! -d "$path"; then
56640        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56641      fi
56642
56643      if test -d "$path"; then
56644        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56645      else
56646        dir="`$DIRNAME "$path"`"
56647        base="`$BASENAME "$path"`"
56648        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56649      fi
56650    fi
56651  fi
56652
56653      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56654$as_echo_n "checking for $DLL_NAME... " >&6; }
56655      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56656$as_echo "$MSVC_DLL" >&6; }
56657    else
56658      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56659$as_echo "incorrect, ignoring" >&6; }
56660      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56661$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56662    fi
56663  fi
56664
56665  fi
56666
56667  if test "x$MSVC_DLL" = x; then
56668    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56669    if test "x$VS100COMNTOOLS" != x; then
56670      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56671
56672  windows_path="$CYGWIN_VS_TOOLS_DIR"
56673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56674    unix_path=`$CYGPATH -u "$windows_path"`
56675    CYGWIN_VS_TOOLS_DIR="$unix_path"
56676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56678    CYGWIN_VS_TOOLS_DIR="$unix_path"
56679  fi
56680
56681      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56682        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56683	    | $GREP -i /x64/ | $HEAD --lines 1`
56684      else
56685        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56686	    | $GREP -i /x86/ | $HEAD --lines 1`
56687      fi
56688
56689  DLL_NAME="$DLL_NAME"
56690  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56691  METHOD="search of VS100COMNTOOLS"
56692  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56693    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56694$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56695
56696    # Need to check if the found msvcr is correct architecture
56697    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56698$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56699    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56700    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56701      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56702      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56703      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56704        CORRECT_MSVCR_ARCH="PE32 executable"
56705      else
56706        CORRECT_MSVCR_ARCH="PE32+ executable"
56707      fi
56708    else
56709      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56710        CORRECT_MSVCR_ARCH=386
56711      else
56712        CORRECT_MSVCR_ARCH=x86-64
56713      fi
56714    fi
56715    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56716      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56717$as_echo "ok" >&6; }
56718      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56719
56720  # Only process if variable expands to non-empty
56721
56722  if test "x$MSVC_DLL" != x; then
56723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56724
56725  # Input might be given as Windows format, start by converting to
56726  # unix format.
56727  path="$MSVC_DLL"
56728  new_path=`$CYGPATH -u "$path"`
56729
56730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56733  # "foo.exe" is OK but "foo" is an error.
56734  #
56735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56736  # It is also a way to make sure we got the proper file name for the real test later on.
56737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56738  if test "x$test_shortpath" = x; then
56739    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56740$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56741    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56742  fi
56743
56744  # Call helper function which possibly converts this using DOS-style short mode.
56745  # If so, the updated path is stored in $new_path.
56746
56747  input_path="$new_path"
56748  # Check if we need to convert this using DOS-style short mode. If the path
56749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56750  # take no chances and rewrite it.
56751  # Note: m4 eats our [], so we need to use [ and ] instead.
56752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56753  if test "x$has_forbidden_chars" != x; then
56754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56758      # Going to short mode and back again did indeed matter. Since short mode is
56759      # case insensitive, let's make it lowercase to improve readability.
56760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56761      # Now convert it back to Unix-style (cygpath)
56762      input_path=`$CYGPATH -u "$shortmode_path"`
56763      new_path="$input_path"
56764    fi
56765  fi
56766
56767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56768  if test "x$test_cygdrive_prefix" = x; then
56769    # As a simple fix, exclude /usr/bin since it's not a real path.
56770    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56772      # a path prefixed by /cygdrive for fixpath to work.
56773      new_path="$CYGWIN_ROOT_PATH$input_path"
56774    fi
56775  fi
56776
56777
56778  if test "x$path" != "x$new_path"; then
56779    MSVC_DLL="$new_path"
56780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56781$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56782  fi
56783
56784    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56785
56786  path="$MSVC_DLL"
56787  has_colon=`$ECHO $path | $GREP ^.:`
56788  new_path="$path"
56789  if test "x$has_colon" = x; then
56790    # Not in mixed or Windows style, start by that.
56791    new_path=`cmd //c echo $path`
56792  fi
56793
56794
56795  input_path="$new_path"
56796  # Check if we need to convert this using DOS-style short mode. If the path
56797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56798  # take no chances and rewrite it.
56799  # Note: m4 eats our [], so we need to use [ and ] instead.
56800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56801  if test "x$has_forbidden_chars" != x; then
56802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56804  fi
56805
56806
56807  windows_path="$new_path"
56808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56809    unix_path=`$CYGPATH -u "$windows_path"`
56810    new_path="$unix_path"
56811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56813    new_path="$unix_path"
56814  fi
56815
56816  if test "x$path" != "x$new_path"; then
56817    MSVC_DLL="$new_path"
56818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56819$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56820  fi
56821
56822  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56823  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56824
56825    else
56826      # We're on a unix platform. Hooray! :)
56827      path="$MSVC_DLL"
56828      has_space=`$ECHO "$path" | $GREP " "`
56829      if test "x$has_space" != x; then
56830        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56831$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56832        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56833      fi
56834
56835      # Use eval to expand a potential ~
56836      eval path="$path"
56837      if test ! -f "$path" && test ! -d "$path"; then
56838        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56839      fi
56840
56841      if test -d "$path"; then
56842        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56843      else
56844        dir="`$DIRNAME "$path"`"
56845        base="`$BASENAME "$path"`"
56846        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56847      fi
56848    fi
56849  fi
56850
56851      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56852$as_echo_n "checking for $DLL_NAME... " >&6; }
56853      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56854$as_echo "$MSVC_DLL" >&6; }
56855    else
56856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56857$as_echo "incorrect, ignoring" >&6; }
56858      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56859$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56860    fi
56861  fi
56862
56863    fi
56864  fi
56865
56866  if test "x$MSVC_DLL" = x; then
56867    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56868    # (This was the original behaviour; kept since it might turn something up)
56869    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56870      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56871        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56872	    | $GREP x64 | $HEAD --lines 1`
56873      else
56874        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56875	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56876        if test "x$POSSIBLE_MSVC_DLL" = x; then
56877          # We're grasping at straws now...
56878          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56879	      | $HEAD --lines 1`
56880        fi
56881      fi
56882
56883
56884  DLL_NAME="$DLL_NAME"
56885  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56886  METHOD="search of VCINSTALLDIR"
56887  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56888    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56889$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56890
56891    # Need to check if the found msvcr is correct architecture
56892    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56893$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56894    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56895    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56896      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56897      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56898      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56899        CORRECT_MSVCR_ARCH="PE32 executable"
56900      else
56901        CORRECT_MSVCR_ARCH="PE32+ executable"
56902      fi
56903    else
56904      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56905        CORRECT_MSVCR_ARCH=386
56906      else
56907        CORRECT_MSVCR_ARCH=x86-64
56908      fi
56909    fi
56910    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56911      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56912$as_echo "ok" >&6; }
56913      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56914
56915  # Only process if variable expands to non-empty
56916
56917  if test "x$MSVC_DLL" != x; then
56918    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56919
56920  # Input might be given as Windows format, start by converting to
56921  # unix format.
56922  path="$MSVC_DLL"
56923  new_path=`$CYGPATH -u "$path"`
56924
56925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56928  # "foo.exe" is OK but "foo" is an error.
56929  #
56930  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56931  # It is also a way to make sure we got the proper file name for the real test later on.
56932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56933  if test "x$test_shortpath" = x; then
56934    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56935$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56936    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56937  fi
56938
56939  # Call helper function which possibly converts this using DOS-style short mode.
56940  # If so, the updated path is stored in $new_path.
56941
56942  input_path="$new_path"
56943  # Check if we need to convert this using DOS-style short mode. If the path
56944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56945  # take no chances and rewrite it.
56946  # Note: m4 eats our [], so we need to use [ and ] instead.
56947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56948  if test "x$has_forbidden_chars" != x; then
56949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56950    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56951    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56952    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56953      # Going to short mode and back again did indeed matter. Since short mode is
56954      # case insensitive, let's make it lowercase to improve readability.
56955      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56956      # Now convert it back to Unix-style (cygpath)
56957      input_path=`$CYGPATH -u "$shortmode_path"`
56958      new_path="$input_path"
56959    fi
56960  fi
56961
56962  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56963  if test "x$test_cygdrive_prefix" = x; then
56964    # As a simple fix, exclude /usr/bin since it's not a real path.
56965    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56966      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56967      # a path prefixed by /cygdrive for fixpath to work.
56968      new_path="$CYGWIN_ROOT_PATH$input_path"
56969    fi
56970  fi
56971
56972
56973  if test "x$path" != "x$new_path"; then
56974    MSVC_DLL="$new_path"
56975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56976$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56977  fi
56978
56979    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56980
56981  path="$MSVC_DLL"
56982  has_colon=`$ECHO $path | $GREP ^.:`
56983  new_path="$path"
56984  if test "x$has_colon" = x; then
56985    # Not in mixed or Windows style, start by that.
56986    new_path=`cmd //c echo $path`
56987  fi
56988
56989
56990  input_path="$new_path"
56991  # Check if we need to convert this using DOS-style short mode. If the path
56992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56993  # take no chances and rewrite it.
56994  # Note: m4 eats our [], so we need to use [ and ] instead.
56995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56996  if test "x$has_forbidden_chars" != x; then
56997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56999  fi
57000
57001
57002  windows_path="$new_path"
57003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57004    unix_path=`$CYGPATH -u "$windows_path"`
57005    new_path="$unix_path"
57006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57008    new_path="$unix_path"
57009  fi
57010
57011  if test "x$path" != "x$new_path"; then
57012    MSVC_DLL="$new_path"
57013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57014$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57015  fi
57016
57017  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57018  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57019
57020    else
57021      # We're on a unix platform. Hooray! :)
57022      path="$MSVC_DLL"
57023      has_space=`$ECHO "$path" | $GREP " "`
57024      if test "x$has_space" != x; then
57025        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57026$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57027        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57028      fi
57029
57030      # Use eval to expand a potential ~
57031      eval path="$path"
57032      if test ! -f "$path" && test ! -d "$path"; then
57033        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57034      fi
57035
57036      if test -d "$path"; then
57037        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57038      else
57039        dir="`$DIRNAME "$path"`"
57040        base="`$BASENAME "$path"`"
57041        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57042      fi
57043    fi
57044  fi
57045
57046      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57047$as_echo_n "checking for $DLL_NAME... " >&6; }
57048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57049$as_echo "$MSVC_DLL" >&6; }
57050    else
57051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57052$as_echo "incorrect, ignoring" >&6; }
57053      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57054$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57055    fi
57056  fi
57057
57058    fi
57059  fi
57060
57061  if test "x$MSVC_DLL" = x; then
57062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57063$as_echo_n "checking for $DLL_NAME... " >&6; }
57064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57065$as_echo "no" >&6; }
57066    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
57067  fi
57068
57069      MSVCP_DLL="$MSVC_DLL"
57070    fi
57071
57072  fi
57073
57074  fi
57075
57076
57077  if test "x$NEEDS_LIB_X11" = xfalse; then
57078    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
57079      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
57080$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
57081    fi
57082    X_CFLAGS=
57083    X_LIBS=
57084  else
57085
57086    if test "x${with_x}" = xno; then
57087      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
57088    fi
57089
57090    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
57091      # The user has specified a X11 base directory. Use it for includes and
57092      # libraries, unless explicitly overridden.
57093      if test "x$x_includes" = xNONE; then
57094        x_includes="${with_x}/include"
57095      fi
57096      if test "x$x_libraries" = xNONE; then
57097        x_libraries="${with_x}/lib"
57098      fi
57099    else
57100      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
57101      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
57102      # --x-libraries for the sysroot, if that seems to be correct.
57103      if test "x$SYSROOT" != "x"; then
57104        if test "x$x_includes" = xNONE; then
57105          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
57106            x_includes="$SYSROOT/usr/X11R6/include"
57107          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
57108            x_includes="$SYSROOT/usr/include"
57109          fi
57110        fi
57111        if test "x$x_libraries" = xNONE; then
57112          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
57113            x_libraries="$SYSROOT/usr/X11R6/lib"
57114          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57115            x_libraries="$SYSROOT/usr/lib64"
57116          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
57117            x_libraries="$SYSROOT/usr/lib"
57118          fi
57119        fi
57120      fi
57121    fi
57122
57123    # Now let autoconf do it's magic
57124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
57125$as_echo_n "checking for X... " >&6; }
57126
57127
57128# Check whether --with-x was given.
57129if test "${with_x+set}" = set; then :
57130  withval=$with_x;
57131fi
57132
57133# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
57134if test "x$with_x" = xno; then
57135  # The user explicitly disabled X.
57136  have_x=disabled
57137else
57138  case $x_includes,$x_libraries in #(
57139    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
57140    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
57141  $as_echo_n "(cached) " >&6
57142else
57143  # One or both of the vars are not set, and there is no cached value.
57144ac_x_includes=no ac_x_libraries=no
57145rm -f -r conftest.dir
57146if mkdir conftest.dir; then
57147  cd conftest.dir
57148  cat >Imakefile <<'_ACEOF'
57149incroot:
57150	@echo incroot='${INCROOT}'
57151usrlibdir:
57152	@echo usrlibdir='${USRLIBDIR}'
57153libdir:
57154	@echo libdir='${LIBDIR}'
57155_ACEOF
57156  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
57157    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
57158    for ac_var in incroot usrlibdir libdir; do
57159      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
57160    done
57161    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
57162    for ac_extension in a so sl dylib la dll; do
57163      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
57164	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
57165	ac_im_usrlibdir=$ac_im_libdir; break
57166      fi
57167    done
57168    # Screen out bogus values from the imake configuration.  They are
57169    # bogus both because they are the default anyway, and because
57170    # using them would break gcc on systems where it needs fixed includes.
57171    case $ac_im_incroot in
57172	/usr/include) ac_x_includes= ;;
57173	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
57174    esac
57175    case $ac_im_usrlibdir in
57176	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
57177	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
57178    esac
57179  fi
57180  cd ..
57181  rm -f -r conftest.dir
57182fi
57183
57184# Standard set of common directories for X headers.
57185# Check X11 before X11Rn because it is often a symlink to the current release.
57186ac_x_header_dirs='
57187/usr/X11/include
57188/usr/X11R7/include
57189/usr/X11R6/include
57190/usr/X11R5/include
57191/usr/X11R4/include
57192
57193/usr/include/X11
57194/usr/include/X11R7
57195/usr/include/X11R6
57196/usr/include/X11R5
57197/usr/include/X11R4
57198
57199/usr/local/X11/include
57200/usr/local/X11R7/include
57201/usr/local/X11R6/include
57202/usr/local/X11R5/include
57203/usr/local/X11R4/include
57204
57205/usr/local/include/X11
57206/usr/local/include/X11R7
57207/usr/local/include/X11R6
57208/usr/local/include/X11R5
57209/usr/local/include/X11R4
57210
57211/usr/X386/include
57212/usr/x386/include
57213/usr/XFree86/include/X11
57214
57215/usr/include
57216/usr/local/include
57217/usr/unsupported/include
57218/usr/athena/include
57219/usr/local/x11r5/include
57220/usr/lpp/Xamples/include
57221
57222/usr/openwin/include
57223/usr/openwin/share/include'
57224
57225if test "$ac_x_includes" = no; then
57226  # Guess where to find include files, by looking for Xlib.h.
57227  # First, try using that file with no special directory specified.
57228  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57229/* end confdefs.h.  */
57230#include <X11/Xlib.h>
57231_ACEOF
57232if ac_fn_cxx_try_cpp "$LINENO"; then :
57233  # We can compile using X headers with no special include directory.
57234ac_x_includes=
57235else
57236  for ac_dir in $ac_x_header_dirs; do
57237  if test -r "$ac_dir/X11/Xlib.h"; then
57238    ac_x_includes=$ac_dir
57239    break
57240  fi
57241done
57242fi
57243rm -f conftest.err conftest.i conftest.$ac_ext
57244fi # $ac_x_includes = no
57245
57246if test "$ac_x_libraries" = no; then
57247  # Check for the libraries.
57248  # See if we find them without any special options.
57249  # Don't add to $LIBS permanently.
57250  ac_save_LIBS=$LIBS
57251  LIBS="-lX11 $LIBS"
57252  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57253/* end confdefs.h.  */
57254#include <X11/Xlib.h>
57255int
57256main ()
57257{
57258XrmInitialize ()
57259  ;
57260  return 0;
57261}
57262_ACEOF
57263if ac_fn_cxx_try_link "$LINENO"; then :
57264  LIBS=$ac_save_LIBS
57265# We can link X programs with no special library path.
57266ac_x_libraries=
57267else
57268  LIBS=$ac_save_LIBS
57269for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
57270do
57271  # Don't even attempt the hair of trying to link an X program!
57272  for ac_extension in a so sl dylib la dll; do
57273    if test -r "$ac_dir/libX11.$ac_extension"; then
57274      ac_x_libraries=$ac_dir
57275      break 2
57276    fi
57277  done
57278done
57279fi
57280rm -f core conftest.err conftest.$ac_objext \
57281    conftest$ac_exeext conftest.$ac_ext
57282fi # $ac_x_libraries = no
57283
57284case $ac_x_includes,$ac_x_libraries in #(
57285  no,* | *,no | *\'*)
57286    # Didn't find X, or a directory has "'" in its name.
57287    ac_cv_have_x="have_x=no";; #(
57288  *)
57289    # Record where we found X for the cache.
57290    ac_cv_have_x="have_x=yes\
57291	ac_x_includes='$ac_x_includes'\
57292	ac_x_libraries='$ac_x_libraries'"
57293esac
57294fi
57295;; #(
57296    *) have_x=yes;;
57297  esac
57298  eval "$ac_cv_have_x"
57299fi # $with_x != no
57300
57301if test "$have_x" != yes; then
57302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
57303$as_echo "$have_x" >&6; }
57304  no_x=yes
57305else
57306  # If each of the values was on the command line, it overrides each guess.
57307  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
57308  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
57309  # Update the cache value to reflect the command line values.
57310  ac_cv_have_x="have_x=yes\
57311	ac_x_includes='$x_includes'\
57312	ac_x_libraries='$x_libraries'"
57313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
57314$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
57315fi
57316
57317    if test "$no_x" = yes; then
57318  # Not all programs may use this symbol, but it does not hurt to define it.
57319
57320$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
57321
57322  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
57323else
57324  if test -n "$x_includes"; then
57325    X_CFLAGS="$X_CFLAGS -I$x_includes"
57326  fi
57327
57328  # It would also be nice to do this for all -L options, not just this one.
57329  if test -n "$x_libraries"; then
57330    X_LIBS="$X_LIBS -L$x_libraries"
57331    # For Solaris; some versions of Sun CC require a space after -R and
57332    # others require no space.  Words are not sufficient . . . .
57333    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
57334$as_echo_n "checking whether -R must be followed by a space... " >&6; }
57335    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
57336    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
57337    ac_cxx_werror_flag=yes
57338    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57339/* end confdefs.h.  */
57340
57341int
57342main ()
57343{
57344
57345  ;
57346  return 0;
57347}
57348_ACEOF
57349if ac_fn_cxx_try_link "$LINENO"; then :
57350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57351$as_echo "no" >&6; }
57352       X_LIBS="$X_LIBS -R$x_libraries"
57353else
57354  LIBS="$ac_xsave_LIBS -R $x_libraries"
57355       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57356/* end confdefs.h.  */
57357
57358int
57359main ()
57360{
57361
57362  ;
57363  return 0;
57364}
57365_ACEOF
57366if ac_fn_cxx_try_link "$LINENO"; then :
57367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57368$as_echo "yes" >&6; }
57369	  X_LIBS="$X_LIBS -R $x_libraries"
57370else
57371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
57372$as_echo "neither works" >&6; }
57373fi
57374rm -f core conftest.err conftest.$ac_objext \
57375    conftest$ac_exeext conftest.$ac_ext
57376fi
57377rm -f core conftest.err conftest.$ac_objext \
57378    conftest$ac_exeext conftest.$ac_ext
57379    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
57380    LIBS=$ac_xsave_LIBS
57381  fi
57382
57383  # Check for system-dependent libraries X programs must link with.
57384  # Do this before checking for the system-independent R6 libraries
57385  # (-lICE), since we may need -lsocket or whatever for X linking.
57386
57387  if test "$ISC" = yes; then
57388    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
57389  else
57390    # Martyn Johnson says this is needed for Ultrix, if the X
57391    # libraries were built with DECnet support.  And Karl Berry says
57392    # the Alpha needs dnet_stub (dnet does not exist).
57393    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
57394    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57395/* end confdefs.h.  */
57396
57397/* Override any GCC internal prototype to avoid an error.
57398   Use char because int might match the return type of a GCC
57399   builtin and then its argument prototype would still apply.  */
57400#ifdef __cplusplus
57401extern "C"
57402#endif
57403char XOpenDisplay ();
57404int
57405main ()
57406{
57407return XOpenDisplay ();
57408  ;
57409  return 0;
57410}
57411_ACEOF
57412if ac_fn_cxx_try_link "$LINENO"; then :
57413
57414else
57415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
57416$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
57417if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
57418  $as_echo_n "(cached) " >&6
57419else
57420  ac_check_lib_save_LIBS=$LIBS
57421LIBS="-ldnet  $LIBS"
57422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57423/* end confdefs.h.  */
57424
57425/* Override any GCC internal prototype to avoid an error.
57426   Use char because int might match the return type of a GCC
57427   builtin and then its argument prototype would still apply.  */
57428#ifdef __cplusplus
57429extern "C"
57430#endif
57431char dnet_ntoa ();
57432int
57433main ()
57434{
57435return dnet_ntoa ();
57436  ;
57437  return 0;
57438}
57439_ACEOF
57440if ac_fn_cxx_try_link "$LINENO"; then :
57441  ac_cv_lib_dnet_dnet_ntoa=yes
57442else
57443  ac_cv_lib_dnet_dnet_ntoa=no
57444fi
57445rm -f core conftest.err conftest.$ac_objext \
57446    conftest$ac_exeext conftest.$ac_ext
57447LIBS=$ac_check_lib_save_LIBS
57448fi
57449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
57450$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
57451if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
57452  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
57453fi
57454
57455    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
57456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
57457$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
57458if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
57459  $as_echo_n "(cached) " >&6
57460else
57461  ac_check_lib_save_LIBS=$LIBS
57462LIBS="-ldnet_stub  $LIBS"
57463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57464/* end confdefs.h.  */
57465
57466/* Override any GCC internal prototype to avoid an error.
57467   Use char because int might match the return type of a GCC
57468   builtin and then its argument prototype would still apply.  */
57469#ifdef __cplusplus
57470extern "C"
57471#endif
57472char dnet_ntoa ();
57473int
57474main ()
57475{
57476return dnet_ntoa ();
57477  ;
57478  return 0;
57479}
57480_ACEOF
57481if ac_fn_cxx_try_link "$LINENO"; then :
57482  ac_cv_lib_dnet_stub_dnet_ntoa=yes
57483else
57484  ac_cv_lib_dnet_stub_dnet_ntoa=no
57485fi
57486rm -f core conftest.err conftest.$ac_objext \
57487    conftest$ac_exeext conftest.$ac_ext
57488LIBS=$ac_check_lib_save_LIBS
57489fi
57490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
57491$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
57492if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
57493  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
57494fi
57495
57496    fi
57497fi
57498rm -f core conftest.err conftest.$ac_objext \
57499    conftest$ac_exeext conftest.$ac_ext
57500    LIBS="$ac_xsave_LIBS"
57501
57502    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
57503    # to get the SysV transport functions.
57504    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
57505    # needs -lnsl.
57506    # The nsl library prevents programs from opening the X display
57507    # on Irix 5.2, according to T.E. Dickey.
57508    # The functions gethostbyname, getservbyname, and inet_addr are
57509    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
57510    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
57511if test "x$ac_cv_func_gethostbyname" = xyes; then :
57512
57513fi
57514
57515    if test $ac_cv_func_gethostbyname = no; then
57516      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
57517$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
57518if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
57519  $as_echo_n "(cached) " >&6
57520else
57521  ac_check_lib_save_LIBS=$LIBS
57522LIBS="-lnsl  $LIBS"
57523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57524/* end confdefs.h.  */
57525
57526/* Override any GCC internal prototype to avoid an error.
57527   Use char because int might match the return type of a GCC
57528   builtin and then its argument prototype would still apply.  */
57529#ifdef __cplusplus
57530extern "C"
57531#endif
57532char gethostbyname ();
57533int
57534main ()
57535{
57536return gethostbyname ();
57537  ;
57538  return 0;
57539}
57540_ACEOF
57541if ac_fn_cxx_try_link "$LINENO"; then :
57542  ac_cv_lib_nsl_gethostbyname=yes
57543else
57544  ac_cv_lib_nsl_gethostbyname=no
57545fi
57546rm -f core conftest.err conftest.$ac_objext \
57547    conftest$ac_exeext conftest.$ac_ext
57548LIBS=$ac_check_lib_save_LIBS
57549fi
57550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
57551$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
57552if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
57553  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
57554fi
57555
57556      if test $ac_cv_lib_nsl_gethostbyname = no; then
57557	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
57558$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
57559if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
57560  $as_echo_n "(cached) " >&6
57561else
57562  ac_check_lib_save_LIBS=$LIBS
57563LIBS="-lbsd  $LIBS"
57564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57565/* end confdefs.h.  */
57566
57567/* Override any GCC internal prototype to avoid an error.
57568   Use char because int might match the return type of a GCC
57569   builtin and then its argument prototype would still apply.  */
57570#ifdef __cplusplus
57571extern "C"
57572#endif
57573char gethostbyname ();
57574int
57575main ()
57576{
57577return gethostbyname ();
57578  ;
57579  return 0;
57580}
57581_ACEOF
57582if ac_fn_cxx_try_link "$LINENO"; then :
57583  ac_cv_lib_bsd_gethostbyname=yes
57584else
57585  ac_cv_lib_bsd_gethostbyname=no
57586fi
57587rm -f core conftest.err conftest.$ac_objext \
57588    conftest$ac_exeext conftest.$ac_ext
57589LIBS=$ac_check_lib_save_LIBS
57590fi
57591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
57592$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
57593if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
57594  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
57595fi
57596
57597      fi
57598    fi
57599
57600    # lieder@skyler.mavd.honeywell.com says without -lsocket,
57601    # socket/setsockopt and other routines are undefined under SCO ODT
57602    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57603    # on later versions), says Simon Leinen: it contains gethostby*
57604    # variants that don't use the name server (or something).  -lsocket
57605    # must be given before -lnsl if both are needed.  We assume that
57606    # if connect needs -lnsl, so does gethostbyname.
57607    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57608if test "x$ac_cv_func_connect" = xyes; then :
57609
57610fi
57611
57612    if test $ac_cv_func_connect = no; then
57613      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57614$as_echo_n "checking for connect in -lsocket... " >&6; }
57615if ${ac_cv_lib_socket_connect+:} false; then :
57616  $as_echo_n "(cached) " >&6
57617else
57618  ac_check_lib_save_LIBS=$LIBS
57619LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57621/* end confdefs.h.  */
57622
57623/* Override any GCC internal prototype to avoid an error.
57624   Use char because int might match the return type of a GCC
57625   builtin and then its argument prototype would still apply.  */
57626#ifdef __cplusplus
57627extern "C"
57628#endif
57629char connect ();
57630int
57631main ()
57632{
57633return connect ();
57634  ;
57635  return 0;
57636}
57637_ACEOF
57638if ac_fn_cxx_try_link "$LINENO"; then :
57639  ac_cv_lib_socket_connect=yes
57640else
57641  ac_cv_lib_socket_connect=no
57642fi
57643rm -f core conftest.err conftest.$ac_objext \
57644    conftest$ac_exeext conftest.$ac_ext
57645LIBS=$ac_check_lib_save_LIBS
57646fi
57647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57648$as_echo "$ac_cv_lib_socket_connect" >&6; }
57649if test "x$ac_cv_lib_socket_connect" = xyes; then :
57650  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57651fi
57652
57653    fi
57654
57655    # Guillermo Gomez says -lposix is necessary on A/UX.
57656    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57657if test "x$ac_cv_func_remove" = xyes; then :
57658
57659fi
57660
57661    if test $ac_cv_func_remove = no; then
57662      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57663$as_echo_n "checking for remove in -lposix... " >&6; }
57664if ${ac_cv_lib_posix_remove+:} false; then :
57665  $as_echo_n "(cached) " >&6
57666else
57667  ac_check_lib_save_LIBS=$LIBS
57668LIBS="-lposix  $LIBS"
57669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57670/* end confdefs.h.  */
57671
57672/* Override any GCC internal prototype to avoid an error.
57673   Use char because int might match the return type of a GCC
57674   builtin and then its argument prototype would still apply.  */
57675#ifdef __cplusplus
57676extern "C"
57677#endif
57678char remove ();
57679int
57680main ()
57681{
57682return remove ();
57683  ;
57684  return 0;
57685}
57686_ACEOF
57687if ac_fn_cxx_try_link "$LINENO"; then :
57688  ac_cv_lib_posix_remove=yes
57689else
57690  ac_cv_lib_posix_remove=no
57691fi
57692rm -f core conftest.err conftest.$ac_objext \
57693    conftest$ac_exeext conftest.$ac_ext
57694LIBS=$ac_check_lib_save_LIBS
57695fi
57696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57697$as_echo "$ac_cv_lib_posix_remove" >&6; }
57698if test "x$ac_cv_lib_posix_remove" = xyes; then :
57699  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57700fi
57701
57702    fi
57703
57704    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57705    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57706if test "x$ac_cv_func_shmat" = xyes; then :
57707
57708fi
57709
57710    if test $ac_cv_func_shmat = no; then
57711      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57712$as_echo_n "checking for shmat in -lipc... " >&6; }
57713if ${ac_cv_lib_ipc_shmat+:} false; then :
57714  $as_echo_n "(cached) " >&6
57715else
57716  ac_check_lib_save_LIBS=$LIBS
57717LIBS="-lipc  $LIBS"
57718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57719/* end confdefs.h.  */
57720
57721/* Override any GCC internal prototype to avoid an error.
57722   Use char because int might match the return type of a GCC
57723   builtin and then its argument prototype would still apply.  */
57724#ifdef __cplusplus
57725extern "C"
57726#endif
57727char shmat ();
57728int
57729main ()
57730{
57731return shmat ();
57732  ;
57733  return 0;
57734}
57735_ACEOF
57736if ac_fn_cxx_try_link "$LINENO"; then :
57737  ac_cv_lib_ipc_shmat=yes
57738else
57739  ac_cv_lib_ipc_shmat=no
57740fi
57741rm -f core conftest.err conftest.$ac_objext \
57742    conftest$ac_exeext conftest.$ac_ext
57743LIBS=$ac_check_lib_save_LIBS
57744fi
57745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57746$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57747if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57748  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57749fi
57750
57751    fi
57752  fi
57753
57754  # Check for libraries that X11R6 Xt/Xaw programs need.
57755  ac_save_LDFLAGS=$LDFLAGS
57756  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57757  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57758  # check for ICE first), but we must link in the order -lSM -lICE or
57759  # we get undefined symbols.  So assume we have SM if we have ICE.
57760  # These have to be linked with before -lX11, unlike the other
57761  # libraries we check for below, so use a different variable.
57762  # John Interrante, Karl Berry
57763  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57764$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57765if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57766  $as_echo_n "(cached) " >&6
57767else
57768  ac_check_lib_save_LIBS=$LIBS
57769LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57771/* end confdefs.h.  */
57772
57773/* Override any GCC internal prototype to avoid an error.
57774   Use char because int might match the return type of a GCC
57775   builtin and then its argument prototype would still apply.  */
57776#ifdef __cplusplus
57777extern "C"
57778#endif
57779char IceConnectionNumber ();
57780int
57781main ()
57782{
57783return IceConnectionNumber ();
57784  ;
57785  return 0;
57786}
57787_ACEOF
57788if ac_fn_cxx_try_link "$LINENO"; then :
57789  ac_cv_lib_ICE_IceConnectionNumber=yes
57790else
57791  ac_cv_lib_ICE_IceConnectionNumber=no
57792fi
57793rm -f core conftest.err conftest.$ac_objext \
57794    conftest$ac_exeext conftest.$ac_ext
57795LIBS=$ac_check_lib_save_LIBS
57796fi
57797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57798$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57799if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57800  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57801fi
57802
57803  LDFLAGS=$ac_save_LDFLAGS
57804
57805fi
57806
57807
57808    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57809    # this doesn't make sense so we remove it.
57810    if test "x$COMPILE_TYPE" = xcross; then
57811      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57812    fi
57813
57814    if test "x$no_x" = xyes; then
57815
57816  # Print a helpful message on how to acquire the necessary build dependency.
57817  # x11 is the help tag: freetype, cups, alsa etc
57818  MISSING_DEPENDENCY=x11
57819
57820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57821    cygwin_help $MISSING_DEPENDENCY
57822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57823    msys_help $MISSING_DEPENDENCY
57824  else
57825    PKGHANDLER_COMMAND=
57826
57827    case $PKGHANDLER in
57828      apt-get)
57829        apt_help     $MISSING_DEPENDENCY ;;
57830      yum)
57831        yum_help     $MISSING_DEPENDENCY ;;
57832      brew)
57833        brew_help    $MISSING_DEPENDENCY ;;
57834      port)
57835        port_help    $MISSING_DEPENDENCY ;;
57836      pkgutil)
57837        pkgutil_help $MISSING_DEPENDENCY ;;
57838      pkgadd)
57839        pkgadd_help  $MISSING_DEPENDENCY ;;
57840    esac
57841
57842    if test "x$PKGHANDLER_COMMAND" != x; then
57843      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57844    fi
57845  fi
57846
57847      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57848    fi
57849
57850    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57851      OPENWIN_HOME="/usr/openwin"
57852      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57853      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57854          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57855    fi
57856
57857    ac_ext=c
57858ac_cpp='$CPP $CPPFLAGS'
57859ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57860ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57861ac_compiler_gnu=$ac_cv_c_compiler_gnu
57862
57863    OLD_CFLAGS="$CFLAGS"
57864    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57865
57866    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57867    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57868do :
57869  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57870ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57871          # include <X11/Xlib.h>
57872          # include <X11/Xutil.h>
57873
57874
57875"
57876if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57877  cat >>confdefs.h <<_ACEOF
57878#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57879_ACEOF
57880 X11_HEADERS_OK=yes
57881else
57882  X11_HEADERS_OK=no; break
57883fi
57884
57885done
57886
57887
57888    if test "x$X11_HEADERS_OK" = xno; then
57889
57890  # Print a helpful message on how to acquire the necessary build dependency.
57891  # x11 is the help tag: freetype, cups, alsa etc
57892  MISSING_DEPENDENCY=x11
57893
57894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57895    cygwin_help $MISSING_DEPENDENCY
57896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57897    msys_help $MISSING_DEPENDENCY
57898  else
57899    PKGHANDLER_COMMAND=
57900
57901    case $PKGHANDLER in
57902      apt-get)
57903        apt_help     $MISSING_DEPENDENCY ;;
57904      yum)
57905        yum_help     $MISSING_DEPENDENCY ;;
57906      brew)
57907        brew_help    $MISSING_DEPENDENCY ;;
57908      port)
57909        port_help    $MISSING_DEPENDENCY ;;
57910      pkgutil)
57911        pkgutil_help $MISSING_DEPENDENCY ;;
57912      pkgadd)
57913        pkgadd_help  $MISSING_DEPENDENCY ;;
57914    esac
57915
57916    if test "x$PKGHANDLER_COMMAND" != x; then
57917      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57918    fi
57919  fi
57920
57921      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57922    fi
57923
57924    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57925    # defined in libawt_xawt.
57926    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57927$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57928    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57929/* end confdefs.h.  */
57930#include <X11/extensions/Xrender.h>
57931int
57932main ()
57933{
57934XLinearGradient x;
57935  ;
57936  return 0;
57937}
57938_ACEOF
57939if ac_fn_c_try_compile "$LINENO"; then :
57940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57941$as_echo "yes" >&6; }
57942else
57943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57944$as_echo "no" >&6; }
57945         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57946fi
57947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57948
57949    CFLAGS="$OLD_CFLAGS"
57950    ac_ext=cpp
57951ac_cpp='$CXXCPP $CPPFLAGS'
57952ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57953ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57954ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57955
57956  fi # NEEDS_LIB_X11
57957
57958
57959
57960
57961
57962
57963# Check whether --with-cups was given.
57964if test "${with_cups+set}" = set; then :
57965  withval=$with_cups;
57966fi
57967
57968
57969# Check whether --with-cups-include was given.
57970if test "${with_cups_include+set}" = set; then :
57971  withval=$with_cups_include;
57972fi
57973
57974
57975  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57976    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57977        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57978      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57979$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57980    fi
57981    CUPS_CFLAGS=
57982  else
57983    CUPS_FOUND=no
57984
57985    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57986      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57987    fi
57988
57989    if test "x${with_cups}" != x; then
57990      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57991$as_echo_n "checking for cups headers... " >&6; }
57992      if test -s "${with_cups}/include/cups/cups.h"; then
57993        CUPS_CFLAGS="-I${with_cups}/include"
57994        CUPS_FOUND=yes
57995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57996$as_echo "$CUPS_FOUND" >&6; }
57997      else
57998        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57999      fi
58000    fi
58001    if test "x${with_cups_include}" != x; then
58002      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
58003$as_echo_n "checking for cups headers... " >&6; }
58004      if test -s "${with_cups_include}/cups/cups.h"; then
58005        CUPS_CFLAGS="-I${with_cups_include}"
58006        CUPS_FOUND=yes
58007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
58008$as_echo "$CUPS_FOUND" >&6; }
58009      else
58010        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
58011      fi
58012    fi
58013    if test "x$CUPS_FOUND" = xno; then
58014      # Are the cups headers installed in the default /usr/include location?
58015      for ac_header in cups/cups.h cups/ppd.h
58016do :
58017  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
58018ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
58019if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
58020  cat >>confdefs.h <<_ACEOF
58021#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
58022_ACEOF
58023
58024          CUPS_FOUND=yes
58025          CUPS_CFLAGS=
58026          DEFAULT_CUPS=yes
58027
58028fi
58029
58030done
58031
58032    fi
58033    if test "x$CUPS_FOUND" = xno; then
58034
58035  # Print a helpful message on how to acquire the necessary build dependency.
58036  # cups is the help tag: freetype, cups, alsa etc
58037  MISSING_DEPENDENCY=cups
58038
58039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58040    cygwin_help $MISSING_DEPENDENCY
58041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58042    msys_help $MISSING_DEPENDENCY
58043  else
58044    PKGHANDLER_COMMAND=
58045
58046    case $PKGHANDLER in
58047      apt-get)
58048        apt_help     $MISSING_DEPENDENCY ;;
58049      yum)
58050        yum_help     $MISSING_DEPENDENCY ;;
58051      brew)
58052        brew_help    $MISSING_DEPENDENCY ;;
58053      port)
58054        port_help    $MISSING_DEPENDENCY ;;
58055      pkgutil)
58056        pkgutil_help $MISSING_DEPENDENCY ;;
58057      pkgadd)
58058        pkgadd_help  $MISSING_DEPENDENCY ;;
58059    esac
58060
58061    if test "x$PKGHANDLER_COMMAND" != x; then
58062      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58063    fi
58064  fi
58065
58066      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
58067    fi
58068  fi
58069
58070
58071
58072
58073
58074# Check whether --with-freetype was given.
58075if test "${with_freetype+set}" = set; then :
58076  withval=$with_freetype;
58077fi
58078
58079
58080# Check whether --with-freetype-include was given.
58081if test "${with_freetype_include+set}" = set; then :
58082  withval=$with_freetype_include;
58083fi
58084
58085
58086# Check whether --with-freetype-lib was given.
58087if test "${with_freetype_lib+set}" = set; then :
58088  withval=$with_freetype_lib;
58089fi
58090
58091
58092# Check whether --with-freetype-src was given.
58093if test "${with_freetype_src+set}" = set; then :
58094  withval=$with_freetype_src;
58095fi
58096
58097  # Check whether --enable-freetype-bundling was given.
58098if test "${enable_freetype_bundling+set}" = set; then :
58099  enableval=$enable_freetype_bundling;
58100fi
58101
58102
58103# Check whether --with-freetype-license was given.
58104if test "${with_freetype_license+set}" = set; then :
58105  withval=$with_freetype_license;
58106fi
58107
58108
58109  # Need to specify explicitly since it needs to be overridden on some versions of macosx
58110  FREETYPE_BASE_NAME=freetype
58111  FREETYPE_CFLAGS=
58112  FREETYPE_LIBS=
58113  FREETYPE_BUNDLE_LIB_PATH=
58114
58115  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
58116    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
58117        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
58118        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
58119        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
58120      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
58121$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
58122    fi
58123    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
58124      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
58125$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
58126    fi
58127  else
58128    # freetype is needed to build; go get it!
58129
58130    BUNDLE_FREETYPE="$enable_freetype_bundling"
58131
58132    if  test "x$with_freetype_src" != x; then
58133      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58134        # Try to build freetype if --with-freetype-src was given on Windows
58135
58136  FREETYPE_SRC_PATH="$with_freetype_src"
58137  BUILD_FREETYPE=yes
58138
58139  # Check if the freetype sources are acessible..
58140  if ! test -d $FREETYPE_SRC_PATH; then
58141    { $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
58142$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
58143    BUILD_FREETYPE=no
58144  fi
58145  # ..and contain a vc2010 project file
58146  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
58147  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
58148    { $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
58149$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
58150    BUILD_FREETYPE=no
58151  fi
58152  # Now check if configure found a version of 'msbuild.exe'
58153  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
58154    { $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
58155$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;}
58156    BUILD_FREETYPE=no
58157  fi
58158
58159  # Ready to go..
58160  if test "x$BUILD_FREETYPE" = xyes; then
58161    # msbuild requires trailing slashes for output directories
58162    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
58163    freetype_lib_path_unix="$freetype_lib_path"
58164    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
58165
58166  unix_path="$vcxproj_path"
58167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58168    windows_path=`$CYGPATH -m "$unix_path"`
58169    vcxproj_path="$windows_path"
58170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58171    windows_path=`cmd //c echo $unix_path`
58172    vcxproj_path="$windows_path"
58173  fi
58174
58175
58176  unix_path="$freetype_lib_path"
58177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58178    windows_path=`$CYGPATH -m "$unix_path"`
58179    freetype_lib_path="$windows_path"
58180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58181    windows_path=`cmd //c echo $unix_path`
58182    freetype_lib_path="$windows_path"
58183  fi
58184
58185
58186  unix_path="$freetype_obj_path"
58187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58188    windows_path=`$CYGPATH -m "$unix_path"`
58189    freetype_obj_path="$windows_path"
58190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58191    windows_path=`cmd //c echo $unix_path`
58192    freetype_obj_path="$windows_path"
58193  fi
58194
58195    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58196      freetype_platform=x64
58197    else
58198      freetype_platform=win32
58199    fi
58200
58201    # The original freetype project file is for VS 2010 (i.e. 'v100'),
58202    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
58203    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
58204    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
58205    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
58206$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
58207
58208    # First we try to build the freetype.dll
58209    $ECHO -e "@echo off\n"\
58210        "$MSBUILD $vcxproj_path "\
58211        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58212        "/p:Configuration=\"Release Multithreaded\" "\
58213        "/p:Platform=$freetype_platform "\
58214        "/p:ConfigurationType=DynamicLibrary "\
58215        "/p:TargetName=freetype "\
58216        "/p:OutDir=\"$freetype_lib_path\" "\
58217        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
58218    cmd /c freetype.bat
58219
58220    if test -s "$freetype_lib_path_unix/freetype.dll"; then
58221      # If that succeeds we also build freetype.lib
58222      $ECHO -e "@echo off\n"\
58223          "$MSBUILD $vcxproj_path "\
58224          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58225          "/p:Configuration=\"Release Multithreaded\" "\
58226          "/p:Platform=$freetype_platform "\
58227          "/p:ConfigurationType=StaticLibrary "\
58228          "/p:TargetName=freetype "\
58229          "/p:OutDir=\"$freetype_lib_path\" "\
58230          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
58231      cmd /c freetype.bat
58232
58233      if test -s "$freetype_lib_path_unix/freetype.lib"; then
58234        # Once we build both, lib and dll, set freetype lib and include path appropriately
58235        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
58236        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
58237        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
58238$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
58239      else
58240        BUILD_FREETYPE=no
58241      fi
58242    else
58243      BUILD_FREETYPE=no
58244    fi
58245  fi
58246
58247        if test "x$BUILD_FREETYPE" = xyes; then
58248          # Okay, we built it. Check that it works.
58249
58250  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58251  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58252  METHOD="--with-freetype-src"
58253
58254  # Let's start with an optimistic view of the world :-)
58255  FOUND_FREETYPE=yes
58256
58257  # First look for the canonical freetype main include file ft2build.h.
58258  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58259    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58260    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58261    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58262      # Fail.
58263      FOUND_FREETYPE=no
58264    fi
58265  fi
58266
58267  if test "x$FOUND_FREETYPE" = xyes; then
58268    # Include file found, let's continue the sanity check.
58269    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58270$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58271
58272    # Reset to default value
58273    FREETYPE_BASE_NAME=freetype
58274    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58275    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58276      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58277          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58278        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58279        # for the .6 version explicitly.
58280        FREETYPE_BASE_NAME=freetype.6
58281        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58282        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58283$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58284      else
58285        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58286$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58287        FOUND_FREETYPE=no
58288      fi
58289    else
58290      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58291        # On Windows, we will need both .lib and .dll file.
58292        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58293          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58294$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58295          FOUND_FREETYPE=no
58296        fi
58297      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58298          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58299        # Found lib in isa dir, use that instead.
58300        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58301        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58302$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58303      fi
58304    fi
58305  fi
58306
58307  if test "x$FOUND_FREETYPE" = xyes; then
58308
58309  # Only process if variable expands to non-empty
58310
58311  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58312    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58313
58314  # Input might be given as Windows format, start by converting to
58315  # unix format.
58316  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58317  new_path=`$CYGPATH -u "$path"`
58318
58319  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58320  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58321  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58322  # "foo.exe" is OK but "foo" is an error.
58323  #
58324  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58325  # It is also a way to make sure we got the proper file name for the real test later on.
58326  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58327  if test "x$test_shortpath" = x; then
58328    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58329$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58330    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58331  fi
58332
58333  # Call helper function which possibly converts this using DOS-style short mode.
58334  # If so, the updated path is stored in $new_path.
58335
58336  input_path="$new_path"
58337  # Check if we need to convert this using DOS-style short mode. If the path
58338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58339  # take no chances and rewrite it.
58340  # Note: m4 eats our [], so we need to use [ and ] instead.
58341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58342  if test "x$has_forbidden_chars" != x; then
58343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58347      # Going to short mode and back again did indeed matter. Since short mode is
58348      # case insensitive, let's make it lowercase to improve readability.
58349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58350      # Now convert it back to Unix-style (cygpath)
58351      input_path=`$CYGPATH -u "$shortmode_path"`
58352      new_path="$input_path"
58353    fi
58354  fi
58355
58356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58357  if test "x$test_cygdrive_prefix" = x; then
58358    # As a simple fix, exclude /usr/bin since it's not a real path.
58359    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58361      # a path prefixed by /cygdrive for fixpath to work.
58362      new_path="$CYGWIN_ROOT_PATH$input_path"
58363    fi
58364  fi
58365
58366
58367  if test "x$path" != "x$new_path"; then
58368    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58370$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58371  fi
58372
58373    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58374
58375  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58376  has_colon=`$ECHO $path | $GREP ^.:`
58377  new_path="$path"
58378  if test "x$has_colon" = x; then
58379    # Not in mixed or Windows style, start by that.
58380    new_path=`cmd //c echo $path`
58381  fi
58382
58383
58384  input_path="$new_path"
58385  # Check if we need to convert this using DOS-style short mode. If the path
58386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58387  # take no chances and rewrite it.
58388  # Note: m4 eats our [], so we need to use [ and ] instead.
58389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58390  if test "x$has_forbidden_chars" != x; then
58391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58393  fi
58394
58395
58396  windows_path="$new_path"
58397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58398    unix_path=`$CYGPATH -u "$windows_path"`
58399    new_path="$unix_path"
58400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58402    new_path="$unix_path"
58403  fi
58404
58405  if test "x$path" != "x$new_path"; then
58406    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58408$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58409  fi
58410
58411  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58412  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58413
58414    else
58415      # We're on a unix platform. Hooray! :)
58416      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58417      has_space=`$ECHO "$path" | $GREP " "`
58418      if test "x$has_space" != x; then
58419        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58420$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58421        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58422      fi
58423
58424      # Use eval to expand a potential ~
58425      eval path="$path"
58426      if test ! -f "$path" && test ! -d "$path"; then
58427        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58428      fi
58429
58430      if test -d "$path"; then
58431        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58432      else
58433        dir="`$DIRNAME "$path"`"
58434        base="`$BASENAME "$path"`"
58435        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58436      fi
58437    fi
58438  fi
58439
58440
58441  # Only process if variable expands to non-empty
58442
58443  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58445
58446  # Input might be given as Windows format, start by converting to
58447  # unix format.
58448  path="$POTENTIAL_FREETYPE_LIB_PATH"
58449  new_path=`$CYGPATH -u "$path"`
58450
58451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58454  # "foo.exe" is OK but "foo" is an error.
58455  #
58456  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58457  # It is also a way to make sure we got the proper file name for the real test later on.
58458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58459  if test "x$test_shortpath" = x; then
58460    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58461$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58462    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58463  fi
58464
58465  # Call helper function which possibly converts this using DOS-style short mode.
58466  # If so, the updated path is stored in $new_path.
58467
58468  input_path="$new_path"
58469  # Check if we need to convert this using DOS-style short mode. If the path
58470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58471  # take no chances and rewrite it.
58472  # Note: m4 eats our [], so we need to use [ and ] instead.
58473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58474  if test "x$has_forbidden_chars" != x; then
58475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58479      # Going to short mode and back again did indeed matter. Since short mode is
58480      # case insensitive, let's make it lowercase to improve readability.
58481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58482      # Now convert it back to Unix-style (cygpath)
58483      input_path=`$CYGPATH -u "$shortmode_path"`
58484      new_path="$input_path"
58485    fi
58486  fi
58487
58488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58489  if test "x$test_cygdrive_prefix" = x; then
58490    # As a simple fix, exclude /usr/bin since it's not a real path.
58491    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58493      # a path prefixed by /cygdrive for fixpath to work.
58494      new_path="$CYGWIN_ROOT_PATH$input_path"
58495    fi
58496  fi
58497
58498
58499  if test "x$path" != "x$new_path"; then
58500    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58502$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58503  fi
58504
58505    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58506
58507  path="$POTENTIAL_FREETYPE_LIB_PATH"
58508  has_colon=`$ECHO $path | $GREP ^.:`
58509  new_path="$path"
58510  if test "x$has_colon" = x; then
58511    # Not in mixed or Windows style, start by that.
58512    new_path=`cmd //c echo $path`
58513  fi
58514
58515
58516  input_path="$new_path"
58517  # Check if we need to convert this using DOS-style short mode. If the path
58518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58519  # take no chances and rewrite it.
58520  # Note: m4 eats our [], so we need to use [ and ] instead.
58521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58522  if test "x$has_forbidden_chars" != x; then
58523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58525  fi
58526
58527
58528  windows_path="$new_path"
58529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58530    unix_path=`$CYGPATH -u "$windows_path"`
58531    new_path="$unix_path"
58532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58534    new_path="$unix_path"
58535  fi
58536
58537  if test "x$path" != "x$new_path"; then
58538    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58540$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58541  fi
58542
58543  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58544  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58545
58546    else
58547      # We're on a unix platform. Hooray! :)
58548      path="$POTENTIAL_FREETYPE_LIB_PATH"
58549      has_space=`$ECHO "$path" | $GREP " "`
58550      if test "x$has_space" != x; then
58551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58552$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58553        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58554      fi
58555
58556      # Use eval to expand a potential ~
58557      eval path="$path"
58558      if test ! -f "$path" && test ! -d "$path"; then
58559        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58560      fi
58561
58562      if test -d "$path"; then
58563        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58564      else
58565        dir="`$DIRNAME "$path"`"
58566        base="`$BASENAME "$path"`"
58567        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58568      fi
58569    fi
58570  fi
58571
58572
58573    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58574    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58575$as_echo_n "checking for freetype includes... " >&6; }
58576    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58577$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58578    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58579    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58580$as_echo_n "checking for freetype libraries... " >&6; }
58581    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58582$as_echo "$FREETYPE_LIB_PATH" >&6; }
58583  fi
58584
58585          if test "x$FOUND_FREETYPE" != xyes; then
58586            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
58587          fi
58588        else
58589          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
58590$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58591          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58592        fi
58593      else
58594        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58595$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58596      fi
58597    fi
58598
58599    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58600      # User has specified settings
58601
58602      if test "x$BUNDLE_FREETYPE" = x; then
58603        # If not specified, default is to bundle freetype
58604        BUNDLE_FREETYPE=yes
58605      fi
58606
58607      if test "x$with_freetype" != x; then
58608        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58609        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58610      fi
58611
58612      # Allow --with-freetype-lib and --with-freetype-include to override
58613      if test "x$with_freetype_include" != x; then
58614        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58615      fi
58616      if test "x$with_freetype_lib" != x; then
58617        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58618      fi
58619
58620      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58621        # Okay, we got it. Check that it works.
58622
58623  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58624  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58625  METHOD="--with-freetype"
58626
58627  # Let's start with an optimistic view of the world :-)
58628  FOUND_FREETYPE=yes
58629
58630  # First look for the canonical freetype main include file ft2build.h.
58631  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58632    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58633    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58634    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58635      # Fail.
58636      FOUND_FREETYPE=no
58637    fi
58638  fi
58639
58640  if test "x$FOUND_FREETYPE" = xyes; then
58641    # Include file found, let's continue the sanity check.
58642    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58643$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58644
58645    # Reset to default value
58646    FREETYPE_BASE_NAME=freetype
58647    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58648    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58649      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58650          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58651        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58652        # for the .6 version explicitly.
58653        FREETYPE_BASE_NAME=freetype.6
58654        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58655        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58656$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58657      else
58658        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58659$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58660        FOUND_FREETYPE=no
58661      fi
58662    else
58663      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58664        # On Windows, we will need both .lib and .dll file.
58665        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58666          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58667$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58668          FOUND_FREETYPE=no
58669        fi
58670      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58671          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58672        # Found lib in isa dir, use that instead.
58673        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58674        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58675$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58676      fi
58677    fi
58678  fi
58679
58680  if test "x$FOUND_FREETYPE" = xyes; then
58681
58682  # Only process if variable expands to non-empty
58683
58684  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58685    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58686
58687  # Input might be given as Windows format, start by converting to
58688  # unix format.
58689  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58690  new_path=`$CYGPATH -u "$path"`
58691
58692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58695  # "foo.exe" is OK but "foo" is an error.
58696  #
58697  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58698  # It is also a way to make sure we got the proper file name for the real test later on.
58699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58700  if test "x$test_shortpath" = x; then
58701    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58702$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58703    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58704  fi
58705
58706  # Call helper function which possibly converts this using DOS-style short mode.
58707  # If so, the updated path is stored in $new_path.
58708
58709  input_path="$new_path"
58710  # Check if we need to convert this using DOS-style short mode. If the path
58711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58712  # take no chances and rewrite it.
58713  # Note: m4 eats our [], so we need to use [ and ] instead.
58714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58715  if test "x$has_forbidden_chars" != x; then
58716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58720      # Going to short mode and back again did indeed matter. Since short mode is
58721      # case insensitive, let's make it lowercase to improve readability.
58722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58723      # Now convert it back to Unix-style (cygpath)
58724      input_path=`$CYGPATH -u "$shortmode_path"`
58725      new_path="$input_path"
58726    fi
58727  fi
58728
58729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58730  if test "x$test_cygdrive_prefix" = x; then
58731    # As a simple fix, exclude /usr/bin since it's not a real path.
58732    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58734      # a path prefixed by /cygdrive for fixpath to work.
58735      new_path="$CYGWIN_ROOT_PATH$input_path"
58736    fi
58737  fi
58738
58739
58740  if test "x$path" != "x$new_path"; then
58741    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58743$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58744  fi
58745
58746    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58747
58748  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58749  has_colon=`$ECHO $path | $GREP ^.:`
58750  new_path="$path"
58751  if test "x$has_colon" = x; then
58752    # Not in mixed or Windows style, start by that.
58753    new_path=`cmd //c echo $path`
58754  fi
58755
58756
58757  input_path="$new_path"
58758  # Check if we need to convert this using DOS-style short mode. If the path
58759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58760  # take no chances and rewrite it.
58761  # Note: m4 eats our [], so we need to use [ and ] instead.
58762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58763  if test "x$has_forbidden_chars" != x; then
58764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58766  fi
58767
58768
58769  windows_path="$new_path"
58770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58771    unix_path=`$CYGPATH -u "$windows_path"`
58772    new_path="$unix_path"
58773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58775    new_path="$unix_path"
58776  fi
58777
58778  if test "x$path" != "x$new_path"; then
58779    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58781$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58782  fi
58783
58784  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58785  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58786
58787    else
58788      # We're on a unix platform. Hooray! :)
58789      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58790      has_space=`$ECHO "$path" | $GREP " "`
58791      if test "x$has_space" != x; then
58792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58793$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58794        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58795      fi
58796
58797      # Use eval to expand a potential ~
58798      eval path="$path"
58799      if test ! -f "$path" && test ! -d "$path"; then
58800        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58801      fi
58802
58803      if test -d "$path"; then
58804        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58805      else
58806        dir="`$DIRNAME "$path"`"
58807        base="`$BASENAME "$path"`"
58808        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58809      fi
58810    fi
58811  fi
58812
58813
58814  # Only process if variable expands to non-empty
58815
58816  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58817    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58818
58819  # Input might be given as Windows format, start by converting to
58820  # unix format.
58821  path="$POTENTIAL_FREETYPE_LIB_PATH"
58822  new_path=`$CYGPATH -u "$path"`
58823
58824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58827  # "foo.exe" is OK but "foo" is an error.
58828  #
58829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58830  # It is also a way to make sure we got the proper file name for the real test later on.
58831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58832  if test "x$test_shortpath" = x; then
58833    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58834$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58835    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58836  fi
58837
58838  # Call helper function which possibly converts this using DOS-style short mode.
58839  # If so, the updated path is stored in $new_path.
58840
58841  input_path="$new_path"
58842  # Check if we need to convert this using DOS-style short mode. If the path
58843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58844  # take no chances and rewrite it.
58845  # Note: m4 eats our [], so we need to use [ and ] instead.
58846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58847  if test "x$has_forbidden_chars" != x; then
58848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58852      # Going to short mode and back again did indeed matter. Since short mode is
58853      # case insensitive, let's make it lowercase to improve readability.
58854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58855      # Now convert it back to Unix-style (cygpath)
58856      input_path=`$CYGPATH -u "$shortmode_path"`
58857      new_path="$input_path"
58858    fi
58859  fi
58860
58861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58862  if test "x$test_cygdrive_prefix" = x; then
58863    # As a simple fix, exclude /usr/bin since it's not a real path.
58864    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58866      # a path prefixed by /cygdrive for fixpath to work.
58867      new_path="$CYGWIN_ROOT_PATH$input_path"
58868    fi
58869  fi
58870
58871
58872  if test "x$path" != "x$new_path"; then
58873    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58875$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58876  fi
58877
58878    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58879
58880  path="$POTENTIAL_FREETYPE_LIB_PATH"
58881  has_colon=`$ECHO $path | $GREP ^.:`
58882  new_path="$path"
58883  if test "x$has_colon" = x; then
58884    # Not in mixed or Windows style, start by that.
58885    new_path=`cmd //c echo $path`
58886  fi
58887
58888
58889  input_path="$new_path"
58890  # Check if we need to convert this using DOS-style short mode. If the path
58891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58892  # take no chances and rewrite it.
58893  # Note: m4 eats our [], so we need to use [ and ] instead.
58894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58895  if test "x$has_forbidden_chars" != x; then
58896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58898  fi
58899
58900
58901  windows_path="$new_path"
58902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58903    unix_path=`$CYGPATH -u "$windows_path"`
58904    new_path="$unix_path"
58905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58907    new_path="$unix_path"
58908  fi
58909
58910  if test "x$path" != "x$new_path"; then
58911    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58913$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58914  fi
58915
58916  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58917  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58918
58919    else
58920      # We're on a unix platform. Hooray! :)
58921      path="$POTENTIAL_FREETYPE_LIB_PATH"
58922      has_space=`$ECHO "$path" | $GREP " "`
58923      if test "x$has_space" != x; then
58924        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58925$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58926        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58927      fi
58928
58929      # Use eval to expand a potential ~
58930      eval path="$path"
58931      if test ! -f "$path" && test ! -d "$path"; then
58932        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58933      fi
58934
58935      if test -d "$path"; then
58936        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58937      else
58938        dir="`$DIRNAME "$path"`"
58939        base="`$BASENAME "$path"`"
58940        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58941      fi
58942    fi
58943  fi
58944
58945
58946    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58947    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58948$as_echo_n "checking for freetype includes... " >&6; }
58949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58950$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58951    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58952    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58953$as_echo_n "checking for freetype libraries... " >&6; }
58954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58955$as_echo "$FREETYPE_LIB_PATH" >&6; }
58956  fi
58957
58958        if test "x$FOUND_FREETYPE" != xyes; then
58959          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58960        fi
58961      else
58962        # User specified only one of lib or include. This is an error.
58963        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58964          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58965$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58966          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58967        else
58968          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58969$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58970          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58971        fi
58972      fi
58973    else
58974      # User did not specify settings, but we need freetype. Try to locate it.
58975
58976      if test "x$BUNDLE_FREETYPE" = x; then
58977        # If not specified, default is to bundle freetype only on windows
58978        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58979          BUNDLE_FREETYPE=yes
58980        else
58981          BUNDLE_FREETYPE=no
58982        fi
58983      fi
58984
58985      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58986      if test "x$SYSROOT" = x; then
58987        if test "x$FOUND_FREETYPE" != xyes; then
58988          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58989          if test "x$PKG_CONFIG" != x; then
58990
58991pkg_failed=no
58992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58993$as_echo_n "checking for FREETYPE... " >&6; }
58994
58995if test -n "$FREETYPE_CFLAGS"; then
58996    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58997 elif test -n "$PKG_CONFIG"; then
58998    if test -n "$PKG_CONFIG" && \
58999    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
59000  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
59001  ac_status=$?
59002  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59003  test $ac_status = 0; }; then
59004  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
59005else
59006  pkg_failed=yes
59007fi
59008 else
59009    pkg_failed=untried
59010fi
59011if test -n "$FREETYPE_LIBS"; then
59012    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
59013 elif test -n "$PKG_CONFIG"; then
59014    if test -n "$PKG_CONFIG" && \
59015    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
59016  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
59017  ac_status=$?
59018  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59019  test $ac_status = 0; }; then
59020  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
59021else
59022  pkg_failed=yes
59023fi
59024 else
59025    pkg_failed=untried
59026fi
59027
59028
59029
59030if test $pkg_failed = yes; then
59031
59032if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59033        _pkg_short_errors_supported=yes
59034else
59035        _pkg_short_errors_supported=no
59036fi
59037        if test $_pkg_short_errors_supported = yes; then
59038	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
59039        else
59040	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
59041        fi
59042	# Put the nasty error message in config.log where it belongs
59043	echo "$FREETYPE_PKG_ERRORS" >&5
59044
59045	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59046$as_echo "no" >&6; }
59047                FOUND_FREETYPE=no
59048elif test $pkg_failed = untried; then
59049	FOUND_FREETYPE=no
59050else
59051	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
59052	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
59053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59054$as_echo "yes" >&6; }
59055	FOUND_FREETYPE=yes
59056fi
59057            if test "x$FOUND_FREETYPE" = xyes; then
59058              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
59059              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
59060              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
59061              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
59062                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
59063              fi
59064              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
59065              if test "x$BUNDLE_FREETYPE" = xyes; then
59066                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
59067$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
59068                FOUND_FREETYPE=no
59069              else
59070                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
59071$as_echo_n "checking for freetype... " >&6; }
59072                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
59073$as_echo "yes (using pkg-config)" >&6; }
59074              fi
59075            fi
59076          fi
59077        fi
59078      fi
59079
59080      if test "x$FOUND_FREETYPE" != xyes; then
59081        # Check in well-known locations
59082        if test "x$OPENJDK_TARGET_OS" = xwindows; then
59083          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
59084
59085  windows_path="$FREETYPE_BASE_DIR"
59086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59087    unix_path=`$CYGPATH -u "$windows_path"`
59088    FREETYPE_BASE_DIR="$unix_path"
59089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59091    FREETYPE_BASE_DIR="$unix_path"
59092  fi
59093
59094
59095  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59096  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59097  METHOD="well-known location"
59098
59099  # Let's start with an optimistic view of the world :-)
59100  FOUND_FREETYPE=yes
59101
59102  # First look for the canonical freetype main include file ft2build.h.
59103  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59104    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59105    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59106    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59107      # Fail.
59108      FOUND_FREETYPE=no
59109    fi
59110  fi
59111
59112  if test "x$FOUND_FREETYPE" = xyes; then
59113    # Include file found, let's continue the sanity check.
59114    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59115$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59116
59117    # Reset to default value
59118    FREETYPE_BASE_NAME=freetype
59119    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59120    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59121      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59122          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59123        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59124        # for the .6 version explicitly.
59125        FREETYPE_BASE_NAME=freetype.6
59126        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59127        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59128$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59129      else
59130        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59131$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59132        FOUND_FREETYPE=no
59133      fi
59134    else
59135      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59136        # On Windows, we will need both .lib and .dll file.
59137        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59138          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59139$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59140          FOUND_FREETYPE=no
59141        fi
59142      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59143          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59144        # Found lib in isa dir, use that instead.
59145        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59146        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59147$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59148      fi
59149    fi
59150  fi
59151
59152  if test "x$FOUND_FREETYPE" = xyes; then
59153
59154  # Only process if variable expands to non-empty
59155
59156  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59157    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59158
59159  # Input might be given as Windows format, start by converting to
59160  # unix format.
59161  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59162  new_path=`$CYGPATH -u "$path"`
59163
59164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59167  # "foo.exe" is OK but "foo" is an error.
59168  #
59169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59170  # It is also a way to make sure we got the proper file name for the real test later on.
59171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59172  if test "x$test_shortpath" = x; then
59173    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59174$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59175    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59176  fi
59177
59178  # Call helper function which possibly converts this using DOS-style short mode.
59179  # If so, the updated path is stored in $new_path.
59180
59181  input_path="$new_path"
59182  # Check if we need to convert this using DOS-style short mode. If the path
59183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59184  # take no chances and rewrite it.
59185  # Note: m4 eats our [], so we need to use [ and ] instead.
59186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59187  if test "x$has_forbidden_chars" != x; then
59188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59192      # Going to short mode and back again did indeed matter. Since short mode is
59193      # case insensitive, let's make it lowercase to improve readability.
59194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59195      # Now convert it back to Unix-style (cygpath)
59196      input_path=`$CYGPATH -u "$shortmode_path"`
59197      new_path="$input_path"
59198    fi
59199  fi
59200
59201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59202  if test "x$test_cygdrive_prefix" = x; then
59203    # As a simple fix, exclude /usr/bin since it's not a real path.
59204    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59206      # a path prefixed by /cygdrive for fixpath to work.
59207      new_path="$CYGWIN_ROOT_PATH$input_path"
59208    fi
59209  fi
59210
59211
59212  if test "x$path" != "x$new_path"; then
59213    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59215$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59216  fi
59217
59218    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59219
59220  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59221  has_colon=`$ECHO $path | $GREP ^.:`
59222  new_path="$path"
59223  if test "x$has_colon" = x; then
59224    # Not in mixed or Windows style, start by that.
59225    new_path=`cmd //c echo $path`
59226  fi
59227
59228
59229  input_path="$new_path"
59230  # Check if we need to convert this using DOS-style short mode. If the path
59231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59232  # take no chances and rewrite it.
59233  # Note: m4 eats our [], so we need to use [ and ] instead.
59234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59235  if test "x$has_forbidden_chars" != x; then
59236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59238  fi
59239
59240
59241  windows_path="$new_path"
59242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59243    unix_path=`$CYGPATH -u "$windows_path"`
59244    new_path="$unix_path"
59245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59247    new_path="$unix_path"
59248  fi
59249
59250  if test "x$path" != "x$new_path"; then
59251    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59253$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59254  fi
59255
59256  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59257  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59258
59259    else
59260      # We're on a unix platform. Hooray! :)
59261      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59262      has_space=`$ECHO "$path" | $GREP " "`
59263      if test "x$has_space" != x; then
59264        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59265$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59266        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59267      fi
59268
59269      # Use eval to expand a potential ~
59270      eval path="$path"
59271      if test ! -f "$path" && test ! -d "$path"; then
59272        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59273      fi
59274
59275      if test -d "$path"; then
59276        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59277      else
59278        dir="`$DIRNAME "$path"`"
59279        base="`$BASENAME "$path"`"
59280        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59281      fi
59282    fi
59283  fi
59284
59285
59286  # Only process if variable expands to non-empty
59287
59288  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59290
59291  # Input might be given as Windows format, start by converting to
59292  # unix format.
59293  path="$POTENTIAL_FREETYPE_LIB_PATH"
59294  new_path=`$CYGPATH -u "$path"`
59295
59296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59299  # "foo.exe" is OK but "foo" is an error.
59300  #
59301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59302  # It is also a way to make sure we got the proper file name for the real test later on.
59303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59304  if test "x$test_shortpath" = x; then
59305    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59306$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59307    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59308  fi
59309
59310  # Call helper function which possibly converts this using DOS-style short mode.
59311  # If so, the updated path is stored in $new_path.
59312
59313  input_path="$new_path"
59314  # Check if we need to convert this using DOS-style short mode. If the path
59315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59316  # take no chances and rewrite it.
59317  # Note: m4 eats our [], so we need to use [ and ] instead.
59318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59319  if test "x$has_forbidden_chars" != x; then
59320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59324      # Going to short mode and back again did indeed matter. Since short mode is
59325      # case insensitive, let's make it lowercase to improve readability.
59326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59327      # Now convert it back to Unix-style (cygpath)
59328      input_path=`$CYGPATH -u "$shortmode_path"`
59329      new_path="$input_path"
59330    fi
59331  fi
59332
59333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59334  if test "x$test_cygdrive_prefix" = x; then
59335    # As a simple fix, exclude /usr/bin since it's not a real path.
59336    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59338      # a path prefixed by /cygdrive for fixpath to work.
59339      new_path="$CYGWIN_ROOT_PATH$input_path"
59340    fi
59341  fi
59342
59343
59344  if test "x$path" != "x$new_path"; then
59345    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59347$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59348  fi
59349
59350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59351
59352  path="$POTENTIAL_FREETYPE_LIB_PATH"
59353  has_colon=`$ECHO $path | $GREP ^.:`
59354  new_path="$path"
59355  if test "x$has_colon" = x; then
59356    # Not in mixed or Windows style, start by that.
59357    new_path=`cmd //c echo $path`
59358  fi
59359
59360
59361  input_path="$new_path"
59362  # Check if we need to convert this using DOS-style short mode. If the path
59363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59364  # take no chances and rewrite it.
59365  # Note: m4 eats our [], so we need to use [ and ] instead.
59366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59367  if test "x$has_forbidden_chars" != x; then
59368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59370  fi
59371
59372
59373  windows_path="$new_path"
59374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59375    unix_path=`$CYGPATH -u "$windows_path"`
59376    new_path="$unix_path"
59377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59379    new_path="$unix_path"
59380  fi
59381
59382  if test "x$path" != "x$new_path"; then
59383    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59385$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59386  fi
59387
59388  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59389  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59390
59391    else
59392      # We're on a unix platform. Hooray! :)
59393      path="$POTENTIAL_FREETYPE_LIB_PATH"
59394      has_space=`$ECHO "$path" | $GREP " "`
59395      if test "x$has_space" != x; then
59396        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59397$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59398        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59399      fi
59400
59401      # Use eval to expand a potential ~
59402      eval path="$path"
59403      if test ! -f "$path" && test ! -d "$path"; then
59404        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59405      fi
59406
59407      if test -d "$path"; then
59408        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59409      else
59410        dir="`$DIRNAME "$path"`"
59411        base="`$BASENAME "$path"`"
59412        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59413      fi
59414    fi
59415  fi
59416
59417
59418    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59419    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59420$as_echo_n "checking for freetype includes... " >&6; }
59421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59422$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59423    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59424    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59425$as_echo_n "checking for freetype libraries... " >&6; }
59426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59427$as_echo "$FREETYPE_LIB_PATH" >&6; }
59428  fi
59429
59430          if test "x$FOUND_FREETYPE" != xyes; then
59431            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
59432
59433  windows_path="$FREETYPE_BASE_DIR"
59434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59435    unix_path=`$CYGPATH -u "$windows_path"`
59436    FREETYPE_BASE_DIR="$unix_path"
59437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59439    FREETYPE_BASE_DIR="$unix_path"
59440  fi
59441
59442
59443  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59444  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59445  METHOD="well-known location"
59446
59447  # Let's start with an optimistic view of the world :-)
59448  FOUND_FREETYPE=yes
59449
59450  # First look for the canonical freetype main include file ft2build.h.
59451  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59452    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59453    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59454    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59455      # Fail.
59456      FOUND_FREETYPE=no
59457    fi
59458  fi
59459
59460  if test "x$FOUND_FREETYPE" = xyes; then
59461    # Include file found, let's continue the sanity check.
59462    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59463$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59464
59465    # Reset to default value
59466    FREETYPE_BASE_NAME=freetype
59467    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59468    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59469      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59470          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59471        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59472        # for the .6 version explicitly.
59473        FREETYPE_BASE_NAME=freetype.6
59474        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59475        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59476$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59477      else
59478        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59479$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59480        FOUND_FREETYPE=no
59481      fi
59482    else
59483      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59484        # On Windows, we will need both .lib and .dll file.
59485        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59486          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59487$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59488          FOUND_FREETYPE=no
59489        fi
59490      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59491          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59492        # Found lib in isa dir, use that instead.
59493        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59494        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59495$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59496      fi
59497    fi
59498  fi
59499
59500  if test "x$FOUND_FREETYPE" = xyes; then
59501
59502  # Only process if variable expands to non-empty
59503
59504  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59505    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59506
59507  # Input might be given as Windows format, start by converting to
59508  # unix format.
59509  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59510  new_path=`$CYGPATH -u "$path"`
59511
59512  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59513  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59514  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59515  # "foo.exe" is OK but "foo" is an error.
59516  #
59517  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59518  # It is also a way to make sure we got the proper file name for the real test later on.
59519  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59520  if test "x$test_shortpath" = x; then
59521    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59522$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59523    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59524  fi
59525
59526  # Call helper function which possibly converts this using DOS-style short mode.
59527  # If so, the updated path is stored in $new_path.
59528
59529  input_path="$new_path"
59530  # Check if we need to convert this using DOS-style short mode. If the path
59531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59532  # take no chances and rewrite it.
59533  # Note: m4 eats our [], so we need to use [ and ] instead.
59534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59535  if test "x$has_forbidden_chars" != x; then
59536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59540      # Going to short mode and back again did indeed matter. Since short mode is
59541      # case insensitive, let's make it lowercase to improve readability.
59542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59543      # Now convert it back to Unix-style (cygpath)
59544      input_path=`$CYGPATH -u "$shortmode_path"`
59545      new_path="$input_path"
59546    fi
59547  fi
59548
59549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59550  if test "x$test_cygdrive_prefix" = x; then
59551    # As a simple fix, exclude /usr/bin since it's not a real path.
59552    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59554      # a path prefixed by /cygdrive for fixpath to work.
59555      new_path="$CYGWIN_ROOT_PATH$input_path"
59556    fi
59557  fi
59558
59559
59560  if test "x$path" != "x$new_path"; then
59561    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59563$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59564  fi
59565
59566    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59567
59568  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59569  has_colon=`$ECHO $path | $GREP ^.:`
59570  new_path="$path"
59571  if test "x$has_colon" = x; then
59572    # Not in mixed or Windows style, start by that.
59573    new_path=`cmd //c echo $path`
59574  fi
59575
59576
59577  input_path="$new_path"
59578  # Check if we need to convert this using DOS-style short mode. If the path
59579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59580  # take no chances and rewrite it.
59581  # Note: m4 eats our [], so we need to use [ and ] instead.
59582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59583  if test "x$has_forbidden_chars" != x; then
59584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59586  fi
59587
59588
59589  windows_path="$new_path"
59590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59591    unix_path=`$CYGPATH -u "$windows_path"`
59592    new_path="$unix_path"
59593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59595    new_path="$unix_path"
59596  fi
59597
59598  if test "x$path" != "x$new_path"; then
59599    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59601$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59602  fi
59603
59604  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59605  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59606
59607    else
59608      # We're on a unix platform. Hooray! :)
59609      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59610      has_space=`$ECHO "$path" | $GREP " "`
59611      if test "x$has_space" != x; then
59612        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59613$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59614        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59615      fi
59616
59617      # Use eval to expand a potential ~
59618      eval path="$path"
59619      if test ! -f "$path" && test ! -d "$path"; then
59620        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59621      fi
59622
59623      if test -d "$path"; then
59624        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59625      else
59626        dir="`$DIRNAME "$path"`"
59627        base="`$BASENAME "$path"`"
59628        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59629      fi
59630    fi
59631  fi
59632
59633
59634  # Only process if variable expands to non-empty
59635
59636  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59637    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59638
59639  # Input might be given as Windows format, start by converting to
59640  # unix format.
59641  path="$POTENTIAL_FREETYPE_LIB_PATH"
59642  new_path=`$CYGPATH -u "$path"`
59643
59644  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59645  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59646  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59647  # "foo.exe" is OK but "foo" is an error.
59648  #
59649  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59650  # It is also a way to make sure we got the proper file name for the real test later on.
59651  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59652  if test "x$test_shortpath" = x; then
59653    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59654$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59655    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59656  fi
59657
59658  # Call helper function which possibly converts this using DOS-style short mode.
59659  # If so, the updated path is stored in $new_path.
59660
59661  input_path="$new_path"
59662  # Check if we need to convert this using DOS-style short mode. If the path
59663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59664  # take no chances and rewrite it.
59665  # Note: m4 eats our [], so we need to use [ and ] instead.
59666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59667  if test "x$has_forbidden_chars" != x; then
59668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59669    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59670    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59671    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59672      # Going to short mode and back again did indeed matter. Since short mode is
59673      # case insensitive, let's make it lowercase to improve readability.
59674      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59675      # Now convert it back to Unix-style (cygpath)
59676      input_path=`$CYGPATH -u "$shortmode_path"`
59677      new_path="$input_path"
59678    fi
59679  fi
59680
59681  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59682  if test "x$test_cygdrive_prefix" = x; then
59683    # As a simple fix, exclude /usr/bin since it's not a real path.
59684    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59685      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59686      # a path prefixed by /cygdrive for fixpath to work.
59687      new_path="$CYGWIN_ROOT_PATH$input_path"
59688    fi
59689  fi
59690
59691
59692  if test "x$path" != "x$new_path"; then
59693    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59695$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59696  fi
59697
59698    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59699
59700  path="$POTENTIAL_FREETYPE_LIB_PATH"
59701  has_colon=`$ECHO $path | $GREP ^.:`
59702  new_path="$path"
59703  if test "x$has_colon" = x; then
59704    # Not in mixed or Windows style, start by that.
59705    new_path=`cmd //c echo $path`
59706  fi
59707
59708
59709  input_path="$new_path"
59710  # Check if we need to convert this using DOS-style short mode. If the path
59711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59712  # take no chances and rewrite it.
59713  # Note: m4 eats our [], so we need to use [ and ] instead.
59714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59715  if test "x$has_forbidden_chars" != x; then
59716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59717    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59718  fi
59719
59720
59721  windows_path="$new_path"
59722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59723    unix_path=`$CYGPATH -u "$windows_path"`
59724    new_path="$unix_path"
59725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59727    new_path="$unix_path"
59728  fi
59729
59730  if test "x$path" != "x$new_path"; then
59731    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59733$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59734  fi
59735
59736  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59737  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59738
59739    else
59740      # We're on a unix platform. Hooray! :)
59741      path="$POTENTIAL_FREETYPE_LIB_PATH"
59742      has_space=`$ECHO "$path" | $GREP " "`
59743      if test "x$has_space" != x; then
59744        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59745$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59746        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59747      fi
59748
59749      # Use eval to expand a potential ~
59750      eval path="$path"
59751      if test ! -f "$path" && test ! -d "$path"; then
59752        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59753      fi
59754
59755      if test -d "$path"; then
59756        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59757      else
59758        dir="`$DIRNAME "$path"`"
59759        base="`$BASENAME "$path"`"
59760        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59761      fi
59762    fi
59763  fi
59764
59765
59766    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59768$as_echo_n "checking for freetype includes... " >&6; }
59769    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59770$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59771    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59772    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59773$as_echo_n "checking for freetype libraries... " >&6; }
59774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59775$as_echo "$FREETYPE_LIB_PATH" >&6; }
59776  fi
59777
59778          fi
59779          if test "x$FOUND_FREETYPE" != xyes; then
59780            FREETYPE_BASE_DIR="$HOME/freetype"
59781
59782  windows_path="$FREETYPE_BASE_DIR"
59783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59784    unix_path=`$CYGPATH -u "$windows_path"`
59785    FREETYPE_BASE_DIR="$unix_path"
59786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59788    FREETYPE_BASE_DIR="$unix_path"
59789  fi
59790
59791            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59792
59793  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59794  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59795  METHOD="well-known location"
59796
59797  # Let's start with an optimistic view of the world :-)
59798  FOUND_FREETYPE=yes
59799
59800  # First look for the canonical freetype main include file ft2build.h.
59801  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59802    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59803    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59804    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59805      # Fail.
59806      FOUND_FREETYPE=no
59807    fi
59808  fi
59809
59810  if test "x$FOUND_FREETYPE" = xyes; then
59811    # Include file found, let's continue the sanity check.
59812    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59813$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59814
59815    # Reset to default value
59816    FREETYPE_BASE_NAME=freetype
59817    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59818    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59819      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59820          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59821        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59822        # for the .6 version explicitly.
59823        FREETYPE_BASE_NAME=freetype.6
59824        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59825        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59826$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59827      else
59828        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59829$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59830        FOUND_FREETYPE=no
59831      fi
59832    else
59833      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59834        # On Windows, we will need both .lib and .dll file.
59835        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59836          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59837$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59838          FOUND_FREETYPE=no
59839        fi
59840      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59841          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59842        # Found lib in isa dir, use that instead.
59843        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59844        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59845$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59846      fi
59847    fi
59848  fi
59849
59850  if test "x$FOUND_FREETYPE" = xyes; then
59851
59852  # Only process if variable expands to non-empty
59853
59854  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59855    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59856
59857  # Input might be given as Windows format, start by converting to
59858  # unix format.
59859  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59860  new_path=`$CYGPATH -u "$path"`
59861
59862  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59863  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59864  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59865  # "foo.exe" is OK but "foo" is an error.
59866  #
59867  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59868  # It is also a way to make sure we got the proper file name for the real test later on.
59869  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59870  if test "x$test_shortpath" = x; then
59871    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59872$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59873    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59874  fi
59875
59876  # Call helper function which possibly converts this using DOS-style short mode.
59877  # If so, the updated path is stored in $new_path.
59878
59879  input_path="$new_path"
59880  # Check if we need to convert this using DOS-style short mode. If the path
59881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59882  # take no chances and rewrite it.
59883  # Note: m4 eats our [], so we need to use [ and ] instead.
59884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59885  if test "x$has_forbidden_chars" != x; then
59886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59890      # Going to short mode and back again did indeed matter. Since short mode is
59891      # case insensitive, let's make it lowercase to improve readability.
59892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59893      # Now convert it back to Unix-style (cygpath)
59894      input_path=`$CYGPATH -u "$shortmode_path"`
59895      new_path="$input_path"
59896    fi
59897  fi
59898
59899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59900  if test "x$test_cygdrive_prefix" = x; then
59901    # As a simple fix, exclude /usr/bin since it's not a real path.
59902    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59904      # a path prefixed by /cygdrive for fixpath to work.
59905      new_path="$CYGWIN_ROOT_PATH$input_path"
59906    fi
59907  fi
59908
59909
59910  if test "x$path" != "x$new_path"; then
59911    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59913$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59914  fi
59915
59916    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59917
59918  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59919  has_colon=`$ECHO $path | $GREP ^.:`
59920  new_path="$path"
59921  if test "x$has_colon" = x; then
59922    # Not in mixed or Windows style, start by that.
59923    new_path=`cmd //c echo $path`
59924  fi
59925
59926
59927  input_path="$new_path"
59928  # Check if we need to convert this using DOS-style short mode. If the path
59929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59930  # take no chances and rewrite it.
59931  # Note: m4 eats our [], so we need to use [ and ] instead.
59932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59933  if test "x$has_forbidden_chars" != x; then
59934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59936  fi
59937
59938
59939  windows_path="$new_path"
59940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59941    unix_path=`$CYGPATH -u "$windows_path"`
59942    new_path="$unix_path"
59943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59945    new_path="$unix_path"
59946  fi
59947
59948  if test "x$path" != "x$new_path"; then
59949    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59951$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59952  fi
59953
59954  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59955  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59956
59957    else
59958      # We're on a unix platform. Hooray! :)
59959      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59960      has_space=`$ECHO "$path" | $GREP " "`
59961      if test "x$has_space" != x; then
59962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59963$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59964        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59965      fi
59966
59967      # Use eval to expand a potential ~
59968      eval path="$path"
59969      if test ! -f "$path" && test ! -d "$path"; then
59970        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59971      fi
59972
59973      if test -d "$path"; then
59974        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59975      else
59976        dir="`$DIRNAME "$path"`"
59977        base="`$BASENAME "$path"`"
59978        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59979      fi
59980    fi
59981  fi
59982
59983
59984  # Only process if variable expands to non-empty
59985
59986  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59987    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59988
59989  # Input might be given as Windows format, start by converting to
59990  # unix format.
59991  path="$POTENTIAL_FREETYPE_LIB_PATH"
59992  new_path=`$CYGPATH -u "$path"`
59993
59994  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59995  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59996  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59997  # "foo.exe" is OK but "foo" is an error.
59998  #
59999  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60000  # It is also a way to make sure we got the proper file name for the real test later on.
60001  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60002  if test "x$test_shortpath" = x; then
60003    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60004$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60005    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60006  fi
60007
60008  # Call helper function which possibly converts this using DOS-style short mode.
60009  # If so, the updated path is stored in $new_path.
60010
60011  input_path="$new_path"
60012  # Check if we need to convert this using DOS-style short mode. If the path
60013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60014  # take no chances and rewrite it.
60015  # Note: m4 eats our [], so we need to use [ and ] instead.
60016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60017  if test "x$has_forbidden_chars" != x; then
60018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60019    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60020    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60021    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60022      # Going to short mode and back again did indeed matter. Since short mode is
60023      # case insensitive, let's make it lowercase to improve readability.
60024      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60025      # Now convert it back to Unix-style (cygpath)
60026      input_path=`$CYGPATH -u "$shortmode_path"`
60027      new_path="$input_path"
60028    fi
60029  fi
60030
60031  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60032  if test "x$test_cygdrive_prefix" = x; then
60033    # As a simple fix, exclude /usr/bin since it's not a real path.
60034    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60035      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60036      # a path prefixed by /cygdrive for fixpath to work.
60037      new_path="$CYGWIN_ROOT_PATH$input_path"
60038    fi
60039  fi
60040
60041
60042  if test "x$path" != "x$new_path"; then
60043    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60045$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60046  fi
60047
60048    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60049
60050  path="$POTENTIAL_FREETYPE_LIB_PATH"
60051  has_colon=`$ECHO $path | $GREP ^.:`
60052  new_path="$path"
60053  if test "x$has_colon" = x; then
60054    # Not in mixed or Windows style, start by that.
60055    new_path=`cmd //c echo $path`
60056  fi
60057
60058
60059  input_path="$new_path"
60060  # Check if we need to convert this using DOS-style short mode. If the path
60061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60062  # take no chances and rewrite it.
60063  # Note: m4 eats our [], so we need to use [ and ] instead.
60064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60065  if test "x$has_forbidden_chars" != x; then
60066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60067    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60068  fi
60069
60070
60071  windows_path="$new_path"
60072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60073    unix_path=`$CYGPATH -u "$windows_path"`
60074    new_path="$unix_path"
60075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60077    new_path="$unix_path"
60078  fi
60079
60080  if test "x$path" != "x$new_path"; then
60081    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60083$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60084  fi
60085
60086  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60087  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60088
60089    else
60090      # We're on a unix platform. Hooray! :)
60091      path="$POTENTIAL_FREETYPE_LIB_PATH"
60092      has_space=`$ECHO "$path" | $GREP " "`
60093      if test "x$has_space" != x; then
60094        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60095$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60096        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60097      fi
60098
60099      # Use eval to expand a potential ~
60100      eval path="$path"
60101      if test ! -f "$path" && test ! -d "$path"; then
60102        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60103      fi
60104
60105      if test -d "$path"; then
60106        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60107      else
60108        dir="`$DIRNAME "$path"`"
60109        base="`$BASENAME "$path"`"
60110        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60111      fi
60112    fi
60113  fi
60114
60115
60116    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60118$as_echo_n "checking for freetype includes... " >&6; }
60119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60120$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60121    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60123$as_echo_n "checking for freetype libraries... " >&6; }
60124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60125$as_echo "$FREETYPE_LIB_PATH" >&6; }
60126  fi
60127
60128            else
60129
60130  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60131  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60132  METHOD="well-known location"
60133
60134  # Let's start with an optimistic view of the world :-)
60135  FOUND_FREETYPE=yes
60136
60137  # First look for the canonical freetype main include file ft2build.h.
60138  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60139    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60140    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60141    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60142      # Fail.
60143      FOUND_FREETYPE=no
60144    fi
60145  fi
60146
60147  if test "x$FOUND_FREETYPE" = xyes; then
60148    # Include file found, let's continue the sanity check.
60149    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60150$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60151
60152    # Reset to default value
60153    FREETYPE_BASE_NAME=freetype
60154    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60155    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60156      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60157          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60158        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60159        # for the .6 version explicitly.
60160        FREETYPE_BASE_NAME=freetype.6
60161        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60162        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60163$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60164      else
60165        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60166$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60167        FOUND_FREETYPE=no
60168      fi
60169    else
60170      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60171        # On Windows, we will need both .lib and .dll file.
60172        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60173          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60174$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60175          FOUND_FREETYPE=no
60176        fi
60177      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60178          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60179        # Found lib in isa dir, use that instead.
60180        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60181        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60182$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60183      fi
60184    fi
60185  fi
60186
60187  if test "x$FOUND_FREETYPE" = xyes; then
60188
60189  # Only process if variable expands to non-empty
60190
60191  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60192    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60193
60194  # Input might be given as Windows format, start by converting to
60195  # unix format.
60196  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60197  new_path=`$CYGPATH -u "$path"`
60198
60199  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60200  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60201  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60202  # "foo.exe" is OK but "foo" is an error.
60203  #
60204  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60205  # It is also a way to make sure we got the proper file name for the real test later on.
60206  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60207  if test "x$test_shortpath" = x; then
60208    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60209$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60210    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60211  fi
60212
60213  # Call helper function which possibly converts this using DOS-style short mode.
60214  # If so, the updated path is stored in $new_path.
60215
60216  input_path="$new_path"
60217  # Check if we need to convert this using DOS-style short mode. If the path
60218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60219  # take no chances and rewrite it.
60220  # Note: m4 eats our [], so we need to use [ and ] instead.
60221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60222  if test "x$has_forbidden_chars" != x; then
60223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60224    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60225    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60226    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60227      # Going to short mode and back again did indeed matter. Since short mode is
60228      # case insensitive, let's make it lowercase to improve readability.
60229      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60230      # Now convert it back to Unix-style (cygpath)
60231      input_path=`$CYGPATH -u "$shortmode_path"`
60232      new_path="$input_path"
60233    fi
60234  fi
60235
60236  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60237  if test "x$test_cygdrive_prefix" = x; then
60238    # As a simple fix, exclude /usr/bin since it's not a real path.
60239    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60240      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60241      # a path prefixed by /cygdrive for fixpath to work.
60242      new_path="$CYGWIN_ROOT_PATH$input_path"
60243    fi
60244  fi
60245
60246
60247  if test "x$path" != "x$new_path"; then
60248    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60250$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60251  fi
60252
60253    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60254
60255  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60256  has_colon=`$ECHO $path | $GREP ^.:`
60257  new_path="$path"
60258  if test "x$has_colon" = x; then
60259    # Not in mixed or Windows style, start by that.
60260    new_path=`cmd //c echo $path`
60261  fi
60262
60263
60264  input_path="$new_path"
60265  # Check if we need to convert this using DOS-style short mode. If the path
60266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60267  # take no chances and rewrite it.
60268  # Note: m4 eats our [], so we need to use [ and ] instead.
60269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60270  if test "x$has_forbidden_chars" != x; then
60271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60272    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60273  fi
60274
60275
60276  windows_path="$new_path"
60277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60278    unix_path=`$CYGPATH -u "$windows_path"`
60279    new_path="$unix_path"
60280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60282    new_path="$unix_path"
60283  fi
60284
60285  if test "x$path" != "x$new_path"; then
60286    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60288$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60289  fi
60290
60291  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60292  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60293
60294    else
60295      # We're on a unix platform. Hooray! :)
60296      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60297      has_space=`$ECHO "$path" | $GREP " "`
60298      if test "x$has_space" != x; then
60299        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60300$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60301        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60302      fi
60303
60304      # Use eval to expand a potential ~
60305      eval path="$path"
60306      if test ! -f "$path" && test ! -d "$path"; then
60307        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60308      fi
60309
60310      if test -d "$path"; then
60311        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60312      else
60313        dir="`$DIRNAME "$path"`"
60314        base="`$BASENAME "$path"`"
60315        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60316      fi
60317    fi
60318  fi
60319
60320
60321  # Only process if variable expands to non-empty
60322
60323  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60324    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60325
60326  # Input might be given as Windows format, start by converting to
60327  # unix format.
60328  path="$POTENTIAL_FREETYPE_LIB_PATH"
60329  new_path=`$CYGPATH -u "$path"`
60330
60331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60334  # "foo.exe" is OK but "foo" is an error.
60335  #
60336  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60337  # It is also a way to make sure we got the proper file name for the real test later on.
60338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60339  if test "x$test_shortpath" = x; then
60340    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60341$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60342    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60343  fi
60344
60345  # Call helper function which possibly converts this using DOS-style short mode.
60346  # If so, the updated path is stored in $new_path.
60347
60348  input_path="$new_path"
60349  # Check if we need to convert this using DOS-style short mode. If the path
60350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60351  # take no chances and rewrite it.
60352  # Note: m4 eats our [], so we need to use [ and ] instead.
60353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60354  if test "x$has_forbidden_chars" != x; then
60355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60356    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60357    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60358    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60359      # Going to short mode and back again did indeed matter. Since short mode is
60360      # case insensitive, let's make it lowercase to improve readability.
60361      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60362      # Now convert it back to Unix-style (cygpath)
60363      input_path=`$CYGPATH -u "$shortmode_path"`
60364      new_path="$input_path"
60365    fi
60366  fi
60367
60368  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60369  if test "x$test_cygdrive_prefix" = x; then
60370    # As a simple fix, exclude /usr/bin since it's not a real path.
60371    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60372      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60373      # a path prefixed by /cygdrive for fixpath to work.
60374      new_path="$CYGWIN_ROOT_PATH$input_path"
60375    fi
60376  fi
60377
60378
60379  if test "x$path" != "x$new_path"; then
60380    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60382$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60383  fi
60384
60385    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60386
60387  path="$POTENTIAL_FREETYPE_LIB_PATH"
60388  has_colon=`$ECHO $path | $GREP ^.:`
60389  new_path="$path"
60390  if test "x$has_colon" = x; then
60391    # Not in mixed or Windows style, start by that.
60392    new_path=`cmd //c echo $path`
60393  fi
60394
60395
60396  input_path="$new_path"
60397  # Check if we need to convert this using DOS-style short mode. If the path
60398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60399  # take no chances and rewrite it.
60400  # Note: m4 eats our [], so we need to use [ and ] instead.
60401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60402  if test "x$has_forbidden_chars" != x; then
60403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60405  fi
60406
60407
60408  windows_path="$new_path"
60409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60410    unix_path=`$CYGPATH -u "$windows_path"`
60411    new_path="$unix_path"
60412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60414    new_path="$unix_path"
60415  fi
60416
60417  if test "x$path" != "x$new_path"; then
60418    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60420$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60421  fi
60422
60423  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60424  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60425
60426    else
60427      # We're on a unix platform. Hooray! :)
60428      path="$POTENTIAL_FREETYPE_LIB_PATH"
60429      has_space=`$ECHO "$path" | $GREP " "`
60430      if test "x$has_space" != x; then
60431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60432$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60433        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60434      fi
60435
60436      # Use eval to expand a potential ~
60437      eval path="$path"
60438      if test ! -f "$path" && test ! -d "$path"; then
60439        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60440      fi
60441
60442      if test -d "$path"; then
60443        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60444      else
60445        dir="`$DIRNAME "$path"`"
60446        base="`$BASENAME "$path"`"
60447        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60448      fi
60449    fi
60450  fi
60451
60452
60453    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60455$as_echo_n "checking for freetype includes... " >&6; }
60456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60457$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60458    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60460$as_echo_n "checking for freetype libraries... " >&6; }
60461    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60462$as_echo "$FREETYPE_LIB_PATH" >&6; }
60463  fi
60464
60465            fi
60466            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
60467                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
60468              # Source is available, as a last resort try to build freetype in default location
60469
60470  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
60471  BUILD_FREETYPE=yes
60472
60473  # Check if the freetype sources are acessible..
60474  if ! test -d $FREETYPE_SRC_PATH; then
60475    { $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
60476$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
60477    BUILD_FREETYPE=no
60478  fi
60479  # ..and contain a vc2010 project file
60480  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
60481  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
60482    { $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
60483$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
60484    BUILD_FREETYPE=no
60485  fi
60486  # Now check if configure found a version of 'msbuild.exe'
60487  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
60488    { $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
60489$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;}
60490    BUILD_FREETYPE=no
60491  fi
60492
60493  # Ready to go..
60494  if test "x$BUILD_FREETYPE" = xyes; then
60495    # msbuild requires trailing slashes for output directories
60496    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
60497    freetype_lib_path_unix="$freetype_lib_path"
60498    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
60499
60500  unix_path="$vcxproj_path"
60501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60502    windows_path=`$CYGPATH -m "$unix_path"`
60503    vcxproj_path="$windows_path"
60504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60505    windows_path=`cmd //c echo $unix_path`
60506    vcxproj_path="$windows_path"
60507  fi
60508
60509
60510  unix_path="$freetype_lib_path"
60511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60512    windows_path=`$CYGPATH -m "$unix_path"`
60513    freetype_lib_path="$windows_path"
60514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60515    windows_path=`cmd //c echo $unix_path`
60516    freetype_lib_path="$windows_path"
60517  fi
60518
60519
60520  unix_path="$freetype_obj_path"
60521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60522    windows_path=`$CYGPATH -m "$unix_path"`
60523    freetype_obj_path="$windows_path"
60524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60525    windows_path=`cmd //c echo $unix_path`
60526    freetype_obj_path="$windows_path"
60527  fi
60528
60529    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60530      freetype_platform=x64
60531    else
60532      freetype_platform=win32
60533    fi
60534
60535    # The original freetype project file is for VS 2010 (i.e. 'v100'),
60536    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
60537    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
60538    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
60539    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
60540$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
60541
60542    # First we try to build the freetype.dll
60543    $ECHO -e "@echo off\n"\
60544        "$MSBUILD $vcxproj_path "\
60545        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60546        "/p:Configuration=\"Release Multithreaded\" "\
60547        "/p:Platform=$freetype_platform "\
60548        "/p:ConfigurationType=DynamicLibrary "\
60549        "/p:TargetName=freetype "\
60550        "/p:OutDir=\"$freetype_lib_path\" "\
60551        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
60552    cmd /c freetype.bat
60553
60554    if test -s "$freetype_lib_path_unix/freetype.dll"; then
60555      # If that succeeds we also build freetype.lib
60556      $ECHO -e "@echo off\n"\
60557          "$MSBUILD $vcxproj_path "\
60558          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60559          "/p:Configuration=\"Release Multithreaded\" "\
60560          "/p:Platform=$freetype_platform "\
60561          "/p:ConfigurationType=StaticLibrary "\
60562          "/p:TargetName=freetype "\
60563          "/p:OutDir=\"$freetype_lib_path\" "\
60564          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
60565      cmd /c freetype.bat
60566
60567      if test -s "$freetype_lib_path_unix/freetype.lib"; then
60568        # Once we build both, lib and dll, set freetype lib and include path appropriately
60569        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
60570        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
60571        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
60572$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
60573      else
60574        BUILD_FREETYPE=no
60575      fi
60576    else
60577      BUILD_FREETYPE=no
60578    fi
60579  fi
60580
60581              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60582
60583  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60584  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60585  METHOD="well-known location"
60586
60587  # Let's start with an optimistic view of the world :-)
60588  FOUND_FREETYPE=yes
60589
60590  # First look for the canonical freetype main include file ft2build.h.
60591  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60592    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60593    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60594    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60595      # Fail.
60596      FOUND_FREETYPE=no
60597    fi
60598  fi
60599
60600  if test "x$FOUND_FREETYPE" = xyes; then
60601    # Include file found, let's continue the sanity check.
60602    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60603$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60604
60605    # Reset to default value
60606    FREETYPE_BASE_NAME=freetype
60607    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60608    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60609      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60610          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60611        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60612        # for the .6 version explicitly.
60613        FREETYPE_BASE_NAME=freetype.6
60614        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60615        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60616$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60617      else
60618        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60619$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60620        FOUND_FREETYPE=no
60621      fi
60622    else
60623      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60624        # On Windows, we will need both .lib and .dll file.
60625        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60626          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60627$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60628          FOUND_FREETYPE=no
60629        fi
60630      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60631          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60632        # Found lib in isa dir, use that instead.
60633        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60634        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60635$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60636      fi
60637    fi
60638  fi
60639
60640  if test "x$FOUND_FREETYPE" = xyes; then
60641
60642  # Only process if variable expands to non-empty
60643
60644  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60645    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60646
60647  # Input might be given as Windows format, start by converting to
60648  # unix format.
60649  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60650  new_path=`$CYGPATH -u "$path"`
60651
60652  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60653  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60654  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60655  # "foo.exe" is OK but "foo" is an error.
60656  #
60657  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60658  # It is also a way to make sure we got the proper file name for the real test later on.
60659  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60660  if test "x$test_shortpath" = x; then
60661    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60662$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60663    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60664  fi
60665
60666  # Call helper function which possibly converts this using DOS-style short mode.
60667  # If so, the updated path is stored in $new_path.
60668
60669  input_path="$new_path"
60670  # Check if we need to convert this using DOS-style short mode. If the path
60671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60672  # take no chances and rewrite it.
60673  # Note: m4 eats our [], so we need to use [ and ] instead.
60674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60675  if test "x$has_forbidden_chars" != x; then
60676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60677    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60678    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60679    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60680      # Going to short mode and back again did indeed matter. Since short mode is
60681      # case insensitive, let's make it lowercase to improve readability.
60682      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60683      # Now convert it back to Unix-style (cygpath)
60684      input_path=`$CYGPATH -u "$shortmode_path"`
60685      new_path="$input_path"
60686    fi
60687  fi
60688
60689  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60690  if test "x$test_cygdrive_prefix" = x; then
60691    # As a simple fix, exclude /usr/bin since it's not a real path.
60692    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60693      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60694      # a path prefixed by /cygdrive for fixpath to work.
60695      new_path="$CYGWIN_ROOT_PATH$input_path"
60696    fi
60697  fi
60698
60699
60700  if test "x$path" != "x$new_path"; then
60701    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60703$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60704  fi
60705
60706    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60707
60708  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60709  has_colon=`$ECHO $path | $GREP ^.:`
60710  new_path="$path"
60711  if test "x$has_colon" = x; then
60712    # Not in mixed or Windows style, start by that.
60713    new_path=`cmd //c echo $path`
60714  fi
60715
60716
60717  input_path="$new_path"
60718  # Check if we need to convert this using DOS-style short mode. If the path
60719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60720  # take no chances and rewrite it.
60721  # Note: m4 eats our [], so we need to use [ and ] instead.
60722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60723  if test "x$has_forbidden_chars" != x; then
60724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60725    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60726  fi
60727
60728
60729  windows_path="$new_path"
60730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60731    unix_path=`$CYGPATH -u "$windows_path"`
60732    new_path="$unix_path"
60733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60735    new_path="$unix_path"
60736  fi
60737
60738  if test "x$path" != "x$new_path"; then
60739    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60741$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60742  fi
60743
60744  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60745  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60746
60747    else
60748      # We're on a unix platform. Hooray! :)
60749      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60750      has_space=`$ECHO "$path" | $GREP " "`
60751      if test "x$has_space" != x; then
60752        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60753$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60754        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60755      fi
60756
60757      # Use eval to expand a potential ~
60758      eval path="$path"
60759      if test ! -f "$path" && test ! -d "$path"; then
60760        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60761      fi
60762
60763      if test -d "$path"; then
60764        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60765      else
60766        dir="`$DIRNAME "$path"`"
60767        base="`$BASENAME "$path"`"
60768        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60769      fi
60770    fi
60771  fi
60772
60773
60774  # Only process if variable expands to non-empty
60775
60776  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60778
60779  # Input might be given as Windows format, start by converting to
60780  # unix format.
60781  path="$POTENTIAL_FREETYPE_LIB_PATH"
60782  new_path=`$CYGPATH -u "$path"`
60783
60784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60787  # "foo.exe" is OK but "foo" is an error.
60788  #
60789  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60790  # It is also a way to make sure we got the proper file name for the real test later on.
60791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60792  if test "x$test_shortpath" = x; then
60793    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60794$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60795    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60796  fi
60797
60798  # Call helper function which possibly converts this using DOS-style short mode.
60799  # If so, the updated path is stored in $new_path.
60800
60801  input_path="$new_path"
60802  # Check if we need to convert this using DOS-style short mode. If the path
60803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60804  # take no chances and rewrite it.
60805  # Note: m4 eats our [], so we need to use [ and ] instead.
60806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60807  if test "x$has_forbidden_chars" != x; then
60808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60809    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60810    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60811    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60812      # Going to short mode and back again did indeed matter. Since short mode is
60813      # case insensitive, let's make it lowercase to improve readability.
60814      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60815      # Now convert it back to Unix-style (cygpath)
60816      input_path=`$CYGPATH -u "$shortmode_path"`
60817      new_path="$input_path"
60818    fi
60819  fi
60820
60821  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60822  if test "x$test_cygdrive_prefix" = x; then
60823    # As a simple fix, exclude /usr/bin since it's not a real path.
60824    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60825      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60826      # a path prefixed by /cygdrive for fixpath to work.
60827      new_path="$CYGWIN_ROOT_PATH$input_path"
60828    fi
60829  fi
60830
60831
60832  if test "x$path" != "x$new_path"; then
60833    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60835$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60836  fi
60837
60838    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60839
60840  path="$POTENTIAL_FREETYPE_LIB_PATH"
60841  has_colon=`$ECHO $path | $GREP ^.:`
60842  new_path="$path"
60843  if test "x$has_colon" = x; then
60844    # Not in mixed or Windows style, start by that.
60845    new_path=`cmd //c echo $path`
60846  fi
60847
60848
60849  input_path="$new_path"
60850  # Check if we need to convert this using DOS-style short mode. If the path
60851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60852  # take no chances and rewrite it.
60853  # Note: m4 eats our [], so we need to use [ and ] instead.
60854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60855  if test "x$has_forbidden_chars" != x; then
60856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60858  fi
60859
60860
60861  windows_path="$new_path"
60862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60863    unix_path=`$CYGPATH -u "$windows_path"`
60864    new_path="$unix_path"
60865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60867    new_path="$unix_path"
60868  fi
60869
60870  if test "x$path" != "x$new_path"; then
60871    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60873$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60874  fi
60875
60876  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60877  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60878
60879    else
60880      # We're on a unix platform. Hooray! :)
60881      path="$POTENTIAL_FREETYPE_LIB_PATH"
60882      has_space=`$ECHO "$path" | $GREP " "`
60883      if test "x$has_space" != x; then
60884        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60885$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60886        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60887      fi
60888
60889      # Use eval to expand a potential ~
60890      eval path="$path"
60891      if test ! -f "$path" && test ! -d "$path"; then
60892        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60893      fi
60894
60895      if test -d "$path"; then
60896        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60897      else
60898        dir="`$DIRNAME "$path"`"
60899        base="`$BASENAME "$path"`"
60900        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60901      fi
60902    fi
60903  fi
60904
60905
60906    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60908$as_echo_n "checking for freetype includes... " >&6; }
60909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60910$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60911    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60913$as_echo_n "checking for freetype libraries... " >&6; }
60914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60915$as_echo "$FREETYPE_LIB_PATH" >&6; }
60916  fi
60917
60918              else
60919
60920  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60921  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60922  METHOD="well-known location"
60923
60924  # Let's start with an optimistic view of the world :-)
60925  FOUND_FREETYPE=yes
60926
60927  # First look for the canonical freetype main include file ft2build.h.
60928  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60929    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60930    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60931    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60932      # Fail.
60933      FOUND_FREETYPE=no
60934    fi
60935  fi
60936
60937  if test "x$FOUND_FREETYPE" = xyes; then
60938    # Include file found, let's continue the sanity check.
60939    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60940$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60941
60942    # Reset to default value
60943    FREETYPE_BASE_NAME=freetype
60944    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60945    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60946      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60947          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60948        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60949        # for the .6 version explicitly.
60950        FREETYPE_BASE_NAME=freetype.6
60951        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60952        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60953$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60954      else
60955        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60956$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60957        FOUND_FREETYPE=no
60958      fi
60959    else
60960      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60961        # On Windows, we will need both .lib and .dll file.
60962        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60963          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60964$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60965          FOUND_FREETYPE=no
60966        fi
60967      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60968          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60969        # Found lib in isa dir, use that instead.
60970        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60971        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60972$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60973      fi
60974    fi
60975  fi
60976
60977  if test "x$FOUND_FREETYPE" = xyes; then
60978
60979  # Only process if variable expands to non-empty
60980
60981  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60982    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60983
60984  # Input might be given as Windows format, start by converting to
60985  # unix format.
60986  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60987  new_path=`$CYGPATH -u "$path"`
60988
60989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60992  # "foo.exe" is OK but "foo" is an error.
60993  #
60994  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60995  # It is also a way to make sure we got the proper file name for the real test later on.
60996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60997  if test "x$test_shortpath" = x; then
60998    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60999$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61000    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61001  fi
61002
61003  # Call helper function which possibly converts this using DOS-style short mode.
61004  # If so, the updated path is stored in $new_path.
61005
61006  input_path="$new_path"
61007  # Check if we need to convert this using DOS-style short mode. If the path
61008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61009  # take no chances and rewrite it.
61010  # Note: m4 eats our [], so we need to use [ and ] instead.
61011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61012  if test "x$has_forbidden_chars" != x; then
61013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61017      # Going to short mode and back again did indeed matter. Since short mode is
61018      # case insensitive, let's make it lowercase to improve readability.
61019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61020      # Now convert it back to Unix-style (cygpath)
61021      input_path=`$CYGPATH -u "$shortmode_path"`
61022      new_path="$input_path"
61023    fi
61024  fi
61025
61026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61027  if test "x$test_cygdrive_prefix" = x; then
61028    # As a simple fix, exclude /usr/bin since it's not a real path.
61029    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61031      # a path prefixed by /cygdrive for fixpath to work.
61032      new_path="$CYGWIN_ROOT_PATH$input_path"
61033    fi
61034  fi
61035
61036
61037  if test "x$path" != "x$new_path"; then
61038    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61040$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61041  fi
61042
61043    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61044
61045  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61046  has_colon=`$ECHO $path | $GREP ^.:`
61047  new_path="$path"
61048  if test "x$has_colon" = x; then
61049    # Not in mixed or Windows style, start by that.
61050    new_path=`cmd //c echo $path`
61051  fi
61052
61053
61054  input_path="$new_path"
61055  # Check if we need to convert this using DOS-style short mode. If the path
61056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61057  # take no chances and rewrite it.
61058  # Note: m4 eats our [], so we need to use [ and ] instead.
61059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61060  if test "x$has_forbidden_chars" != x; then
61061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61063  fi
61064
61065
61066  windows_path="$new_path"
61067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61068    unix_path=`$CYGPATH -u "$windows_path"`
61069    new_path="$unix_path"
61070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61072    new_path="$unix_path"
61073  fi
61074
61075  if test "x$path" != "x$new_path"; then
61076    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61078$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61079  fi
61080
61081  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61082  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61083
61084    else
61085      # We're on a unix platform. Hooray! :)
61086      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61087      has_space=`$ECHO "$path" | $GREP " "`
61088      if test "x$has_space" != x; then
61089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61090$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61091        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61092      fi
61093
61094      # Use eval to expand a potential ~
61095      eval path="$path"
61096      if test ! -f "$path" && test ! -d "$path"; then
61097        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61098      fi
61099
61100      if test -d "$path"; then
61101        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61102      else
61103        dir="`$DIRNAME "$path"`"
61104        base="`$BASENAME "$path"`"
61105        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61106      fi
61107    fi
61108  fi
61109
61110
61111  # Only process if variable expands to non-empty
61112
61113  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61114    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61115
61116  # Input might be given as Windows format, start by converting to
61117  # unix format.
61118  path="$POTENTIAL_FREETYPE_LIB_PATH"
61119  new_path=`$CYGPATH -u "$path"`
61120
61121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61124  # "foo.exe" is OK but "foo" is an error.
61125  #
61126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61127  # It is also a way to make sure we got the proper file name for the real test later on.
61128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61129  if test "x$test_shortpath" = x; then
61130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61131$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61132    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61133  fi
61134
61135  # Call helper function which possibly converts this using DOS-style short mode.
61136  # If so, the updated path is stored in $new_path.
61137
61138  input_path="$new_path"
61139  # Check if we need to convert this using DOS-style short mode. If the path
61140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61141  # take no chances and rewrite it.
61142  # Note: m4 eats our [], so we need to use [ and ] instead.
61143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61144  if test "x$has_forbidden_chars" != x; then
61145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61149      # Going to short mode and back again did indeed matter. Since short mode is
61150      # case insensitive, let's make it lowercase to improve readability.
61151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61152      # Now convert it back to Unix-style (cygpath)
61153      input_path=`$CYGPATH -u "$shortmode_path"`
61154      new_path="$input_path"
61155    fi
61156  fi
61157
61158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61159  if test "x$test_cygdrive_prefix" = x; then
61160    # As a simple fix, exclude /usr/bin since it's not a real path.
61161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61163      # a path prefixed by /cygdrive for fixpath to work.
61164      new_path="$CYGWIN_ROOT_PATH$input_path"
61165    fi
61166  fi
61167
61168
61169  if test "x$path" != "x$new_path"; then
61170    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61172$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61173  fi
61174
61175    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61176
61177  path="$POTENTIAL_FREETYPE_LIB_PATH"
61178  has_colon=`$ECHO $path | $GREP ^.:`
61179  new_path="$path"
61180  if test "x$has_colon" = x; then
61181    # Not in mixed or Windows style, start by that.
61182    new_path=`cmd //c echo $path`
61183  fi
61184
61185
61186  input_path="$new_path"
61187  # Check if we need to convert this using DOS-style short mode. If the path
61188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61189  # take no chances and rewrite it.
61190  # Note: m4 eats our [], so we need to use [ and ] instead.
61191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61192  if test "x$has_forbidden_chars" != x; then
61193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61195  fi
61196
61197
61198  windows_path="$new_path"
61199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61200    unix_path=`$CYGPATH -u "$windows_path"`
61201    new_path="$unix_path"
61202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61204    new_path="$unix_path"
61205  fi
61206
61207  if test "x$path" != "x$new_path"; then
61208    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61210$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61211  fi
61212
61213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61215
61216    else
61217      # We're on a unix platform. Hooray! :)
61218      path="$POTENTIAL_FREETYPE_LIB_PATH"
61219      has_space=`$ECHO "$path" | $GREP " "`
61220      if test "x$has_space" != x; then
61221        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61222$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61223        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61224      fi
61225
61226      # Use eval to expand a potential ~
61227      eval path="$path"
61228      if test ! -f "$path" && test ! -d "$path"; then
61229        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61230      fi
61231
61232      if test -d "$path"; then
61233        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61234      else
61235        dir="`$DIRNAME "$path"`"
61236        base="`$BASENAME "$path"`"
61237        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61238      fi
61239    fi
61240  fi
61241
61242
61243    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61244    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61245$as_echo_n "checking for freetype includes... " >&6; }
61246    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61247$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61248    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61250$as_echo_n "checking for freetype libraries... " >&6; }
61251    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61252$as_echo "$FREETYPE_LIB_PATH" >&6; }
61253  fi
61254
61255              fi
61256            fi
61257          fi
61258        else
61259          FREETYPE_BASE_DIR="$SYSROOT/usr"
61260
61261  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61262  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61263  METHOD="well-known location"
61264
61265  # Let's start with an optimistic view of the world :-)
61266  FOUND_FREETYPE=yes
61267
61268  # First look for the canonical freetype main include file ft2build.h.
61269  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61270    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61271    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61272    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61273      # Fail.
61274      FOUND_FREETYPE=no
61275    fi
61276  fi
61277
61278  if test "x$FOUND_FREETYPE" = xyes; then
61279    # Include file found, let's continue the sanity check.
61280    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61281$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61282
61283    # Reset to default value
61284    FREETYPE_BASE_NAME=freetype
61285    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61286    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61287      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61288          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61289        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61290        # for the .6 version explicitly.
61291        FREETYPE_BASE_NAME=freetype.6
61292        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61293        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61294$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61295      else
61296        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61297$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61298        FOUND_FREETYPE=no
61299      fi
61300    else
61301      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61302        # On Windows, we will need both .lib and .dll file.
61303        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61304          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61305$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61306          FOUND_FREETYPE=no
61307        fi
61308      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61309          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61310        # Found lib in isa dir, use that instead.
61311        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61312        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61313$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61314      fi
61315    fi
61316  fi
61317
61318  if test "x$FOUND_FREETYPE" = xyes; then
61319
61320  # Only process if variable expands to non-empty
61321
61322  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61323    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61324
61325  # Input might be given as Windows format, start by converting to
61326  # unix format.
61327  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61328  new_path=`$CYGPATH -u "$path"`
61329
61330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61333  # "foo.exe" is OK but "foo" is an error.
61334  #
61335  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61336  # It is also a way to make sure we got the proper file name for the real test later on.
61337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61338  if test "x$test_shortpath" = x; then
61339    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61340$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61341    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61342  fi
61343
61344  # Call helper function which possibly converts this using DOS-style short mode.
61345  # If so, the updated path is stored in $new_path.
61346
61347  input_path="$new_path"
61348  # Check if we need to convert this using DOS-style short mode. If the path
61349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61350  # take no chances and rewrite it.
61351  # Note: m4 eats our [], so we need to use [ and ] instead.
61352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61353  if test "x$has_forbidden_chars" != x; then
61354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61358      # Going to short mode and back again did indeed matter. Since short mode is
61359      # case insensitive, let's make it lowercase to improve readability.
61360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61361      # Now convert it back to Unix-style (cygpath)
61362      input_path=`$CYGPATH -u "$shortmode_path"`
61363      new_path="$input_path"
61364    fi
61365  fi
61366
61367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61368  if test "x$test_cygdrive_prefix" = x; then
61369    # As a simple fix, exclude /usr/bin since it's not a real path.
61370    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61372      # a path prefixed by /cygdrive for fixpath to work.
61373      new_path="$CYGWIN_ROOT_PATH$input_path"
61374    fi
61375  fi
61376
61377
61378  if test "x$path" != "x$new_path"; then
61379    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61381$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61382  fi
61383
61384    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61385
61386  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61387  has_colon=`$ECHO $path | $GREP ^.:`
61388  new_path="$path"
61389  if test "x$has_colon" = x; then
61390    # Not in mixed or Windows style, start by that.
61391    new_path=`cmd //c echo $path`
61392  fi
61393
61394
61395  input_path="$new_path"
61396  # Check if we need to convert this using DOS-style short mode. If the path
61397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61398  # take no chances and rewrite it.
61399  # Note: m4 eats our [], so we need to use [ and ] instead.
61400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61401  if test "x$has_forbidden_chars" != x; then
61402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61404  fi
61405
61406
61407  windows_path="$new_path"
61408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61409    unix_path=`$CYGPATH -u "$windows_path"`
61410    new_path="$unix_path"
61411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61413    new_path="$unix_path"
61414  fi
61415
61416  if test "x$path" != "x$new_path"; then
61417    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61419$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61420  fi
61421
61422  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61423  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61424
61425    else
61426      # We're on a unix platform. Hooray! :)
61427      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61428      has_space=`$ECHO "$path" | $GREP " "`
61429      if test "x$has_space" != x; then
61430        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61431$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61432        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61433      fi
61434
61435      # Use eval to expand a potential ~
61436      eval path="$path"
61437      if test ! -f "$path" && test ! -d "$path"; then
61438        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61439      fi
61440
61441      if test -d "$path"; then
61442        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61443      else
61444        dir="`$DIRNAME "$path"`"
61445        base="`$BASENAME "$path"`"
61446        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61447      fi
61448    fi
61449  fi
61450
61451
61452  # Only process if variable expands to non-empty
61453
61454  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61455    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61456
61457  # Input might be given as Windows format, start by converting to
61458  # unix format.
61459  path="$POTENTIAL_FREETYPE_LIB_PATH"
61460  new_path=`$CYGPATH -u "$path"`
61461
61462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61465  # "foo.exe" is OK but "foo" is an error.
61466  #
61467  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61468  # It is also a way to make sure we got the proper file name for the real test later on.
61469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61470  if test "x$test_shortpath" = x; then
61471    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61472$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61473    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61474  fi
61475
61476  # Call helper function which possibly converts this using DOS-style short mode.
61477  # If so, the updated path is stored in $new_path.
61478
61479  input_path="$new_path"
61480  # Check if we need to convert this using DOS-style short mode. If the path
61481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61482  # take no chances and rewrite it.
61483  # Note: m4 eats our [], so we need to use [ and ] instead.
61484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61485  if test "x$has_forbidden_chars" != x; then
61486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61490      # Going to short mode and back again did indeed matter. Since short mode is
61491      # case insensitive, let's make it lowercase to improve readability.
61492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61493      # Now convert it back to Unix-style (cygpath)
61494      input_path=`$CYGPATH -u "$shortmode_path"`
61495      new_path="$input_path"
61496    fi
61497  fi
61498
61499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61500  if test "x$test_cygdrive_prefix" = x; then
61501    # As a simple fix, exclude /usr/bin since it's not a real path.
61502    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61504      # a path prefixed by /cygdrive for fixpath to work.
61505      new_path="$CYGWIN_ROOT_PATH$input_path"
61506    fi
61507  fi
61508
61509
61510  if test "x$path" != "x$new_path"; then
61511    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61513$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61514  fi
61515
61516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61517
61518  path="$POTENTIAL_FREETYPE_LIB_PATH"
61519  has_colon=`$ECHO $path | $GREP ^.:`
61520  new_path="$path"
61521  if test "x$has_colon" = x; then
61522    # Not in mixed or Windows style, start by that.
61523    new_path=`cmd //c echo $path`
61524  fi
61525
61526
61527  input_path="$new_path"
61528  # Check if we need to convert this using DOS-style short mode. If the path
61529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61530  # take no chances and rewrite it.
61531  # Note: m4 eats our [], so we need to use [ and ] instead.
61532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61533  if test "x$has_forbidden_chars" != x; then
61534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61536  fi
61537
61538
61539  windows_path="$new_path"
61540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61541    unix_path=`$CYGPATH -u "$windows_path"`
61542    new_path="$unix_path"
61543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61545    new_path="$unix_path"
61546  fi
61547
61548  if test "x$path" != "x$new_path"; then
61549    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61551$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61552  fi
61553
61554  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61555  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61556
61557    else
61558      # We're on a unix platform. Hooray! :)
61559      path="$POTENTIAL_FREETYPE_LIB_PATH"
61560      has_space=`$ECHO "$path" | $GREP " "`
61561      if test "x$has_space" != x; then
61562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61563$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61564        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61565      fi
61566
61567      # Use eval to expand a potential ~
61568      eval path="$path"
61569      if test ! -f "$path" && test ! -d "$path"; then
61570        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61571      fi
61572
61573      if test -d "$path"; then
61574        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61575      else
61576        dir="`$DIRNAME "$path"`"
61577        base="`$BASENAME "$path"`"
61578        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61579      fi
61580    fi
61581  fi
61582
61583
61584    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61585    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61586$as_echo_n "checking for freetype includes... " >&6; }
61587    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61588$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61589    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61591$as_echo_n "checking for freetype libraries... " >&6; }
61592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61593$as_echo "$FREETYPE_LIB_PATH" >&6; }
61594  fi
61595
61596
61597          if test "x$FOUND_FREETYPE" != xyes; then
61598            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61599
61600  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61601  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61602  METHOD="well-known location"
61603
61604  # Let's start with an optimistic view of the world :-)
61605  FOUND_FREETYPE=yes
61606
61607  # First look for the canonical freetype main include file ft2build.h.
61608  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61609    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61610    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61611    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61612      # Fail.
61613      FOUND_FREETYPE=no
61614    fi
61615  fi
61616
61617  if test "x$FOUND_FREETYPE" = xyes; then
61618    # Include file found, let's continue the sanity check.
61619    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61620$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61621
61622    # Reset to default value
61623    FREETYPE_BASE_NAME=freetype
61624    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61625    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61626      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61627          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61628        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61629        # for the .6 version explicitly.
61630        FREETYPE_BASE_NAME=freetype.6
61631        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61632        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61633$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61634      else
61635        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61636$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61637        FOUND_FREETYPE=no
61638      fi
61639    else
61640      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61641        # On Windows, we will need both .lib and .dll file.
61642        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61643          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61644$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61645          FOUND_FREETYPE=no
61646        fi
61647      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61648          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61649        # Found lib in isa dir, use that instead.
61650        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61651        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61652$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61653      fi
61654    fi
61655  fi
61656
61657  if test "x$FOUND_FREETYPE" = xyes; then
61658
61659  # Only process if variable expands to non-empty
61660
61661  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61662    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61663
61664  # Input might be given as Windows format, start by converting to
61665  # unix format.
61666  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61667  new_path=`$CYGPATH -u "$path"`
61668
61669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61672  # "foo.exe" is OK but "foo" is an error.
61673  #
61674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61675  # It is also a way to make sure we got the proper file name for the real test later on.
61676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61677  if test "x$test_shortpath" = x; then
61678    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61679$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61680    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61681  fi
61682
61683  # Call helper function which possibly converts this using DOS-style short mode.
61684  # If so, the updated path is stored in $new_path.
61685
61686  input_path="$new_path"
61687  # Check if we need to convert this using DOS-style short mode. If the path
61688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61689  # take no chances and rewrite it.
61690  # Note: m4 eats our [], so we need to use [ and ] instead.
61691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61692  if test "x$has_forbidden_chars" != x; then
61693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61697      # Going to short mode and back again did indeed matter. Since short mode is
61698      # case insensitive, let's make it lowercase to improve readability.
61699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61700      # Now convert it back to Unix-style (cygpath)
61701      input_path=`$CYGPATH -u "$shortmode_path"`
61702      new_path="$input_path"
61703    fi
61704  fi
61705
61706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61707  if test "x$test_cygdrive_prefix" = x; then
61708    # As a simple fix, exclude /usr/bin since it's not a real path.
61709    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61711      # a path prefixed by /cygdrive for fixpath to work.
61712      new_path="$CYGWIN_ROOT_PATH$input_path"
61713    fi
61714  fi
61715
61716
61717  if test "x$path" != "x$new_path"; then
61718    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61720$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61721  fi
61722
61723    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61724
61725  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61726  has_colon=`$ECHO $path | $GREP ^.:`
61727  new_path="$path"
61728  if test "x$has_colon" = x; then
61729    # Not in mixed or Windows style, start by that.
61730    new_path=`cmd //c echo $path`
61731  fi
61732
61733
61734  input_path="$new_path"
61735  # Check if we need to convert this using DOS-style short mode. If the path
61736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61737  # take no chances and rewrite it.
61738  # Note: m4 eats our [], so we need to use [ and ] instead.
61739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61740  if test "x$has_forbidden_chars" != x; then
61741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61743  fi
61744
61745
61746  windows_path="$new_path"
61747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61748    unix_path=`$CYGPATH -u "$windows_path"`
61749    new_path="$unix_path"
61750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61752    new_path="$unix_path"
61753  fi
61754
61755  if test "x$path" != "x$new_path"; then
61756    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61758$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61759  fi
61760
61761  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61762  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61763
61764    else
61765      # We're on a unix platform. Hooray! :)
61766      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61767      has_space=`$ECHO "$path" | $GREP " "`
61768      if test "x$has_space" != x; then
61769        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61770$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61771        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61772      fi
61773
61774      # Use eval to expand a potential ~
61775      eval path="$path"
61776      if test ! -f "$path" && test ! -d "$path"; then
61777        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61778      fi
61779
61780      if test -d "$path"; then
61781        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61782      else
61783        dir="`$DIRNAME "$path"`"
61784        base="`$BASENAME "$path"`"
61785        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61786      fi
61787    fi
61788  fi
61789
61790
61791  # Only process if variable expands to non-empty
61792
61793  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61795
61796  # Input might be given as Windows format, start by converting to
61797  # unix format.
61798  path="$POTENTIAL_FREETYPE_LIB_PATH"
61799  new_path=`$CYGPATH -u "$path"`
61800
61801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61804  # "foo.exe" is OK but "foo" is an error.
61805  #
61806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61807  # It is also a way to make sure we got the proper file name for the real test later on.
61808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61809  if test "x$test_shortpath" = x; then
61810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61811$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61812    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61813  fi
61814
61815  # Call helper function which possibly converts this using DOS-style short mode.
61816  # If so, the updated path is stored in $new_path.
61817
61818  input_path="$new_path"
61819  # Check if we need to convert this using DOS-style short mode. If the path
61820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61821  # take no chances and rewrite it.
61822  # Note: m4 eats our [], so we need to use [ and ] instead.
61823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61824  if test "x$has_forbidden_chars" != x; then
61825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61829      # Going to short mode and back again did indeed matter. Since short mode is
61830      # case insensitive, let's make it lowercase to improve readability.
61831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61832      # Now convert it back to Unix-style (cygpath)
61833      input_path=`$CYGPATH -u "$shortmode_path"`
61834      new_path="$input_path"
61835    fi
61836  fi
61837
61838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61839  if test "x$test_cygdrive_prefix" = x; then
61840    # As a simple fix, exclude /usr/bin since it's not a real path.
61841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61843      # a path prefixed by /cygdrive for fixpath to work.
61844      new_path="$CYGWIN_ROOT_PATH$input_path"
61845    fi
61846  fi
61847
61848
61849  if test "x$path" != "x$new_path"; then
61850    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61852$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61853  fi
61854
61855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61856
61857  path="$POTENTIAL_FREETYPE_LIB_PATH"
61858  has_colon=`$ECHO $path | $GREP ^.:`
61859  new_path="$path"
61860  if test "x$has_colon" = x; then
61861    # Not in mixed or Windows style, start by that.
61862    new_path=`cmd //c echo $path`
61863  fi
61864
61865
61866  input_path="$new_path"
61867  # Check if we need to convert this using DOS-style short mode. If the path
61868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61869  # take no chances and rewrite it.
61870  # Note: m4 eats our [], so we need to use [ and ] instead.
61871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61872  if test "x$has_forbidden_chars" != x; then
61873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61875  fi
61876
61877
61878  windows_path="$new_path"
61879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61880    unix_path=`$CYGPATH -u "$windows_path"`
61881    new_path="$unix_path"
61882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61884    new_path="$unix_path"
61885  fi
61886
61887  if test "x$path" != "x$new_path"; then
61888    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61890$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61891  fi
61892
61893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61895
61896    else
61897      # We're on a unix platform. Hooray! :)
61898      path="$POTENTIAL_FREETYPE_LIB_PATH"
61899      has_space=`$ECHO "$path" | $GREP " "`
61900      if test "x$has_space" != x; then
61901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61902$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61903        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61904      fi
61905
61906      # Use eval to expand a potential ~
61907      eval path="$path"
61908      if test ! -f "$path" && test ! -d "$path"; then
61909        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61910      fi
61911
61912      if test -d "$path"; then
61913        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61914      else
61915        dir="`$DIRNAME "$path"`"
61916        base="`$BASENAME "$path"`"
61917        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61918      fi
61919    fi
61920  fi
61921
61922
61923    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61924    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61925$as_echo_n "checking for freetype includes... " >&6; }
61926    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61927$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61928    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61930$as_echo_n "checking for freetype libraries... " >&6; }
61931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61932$as_echo "$FREETYPE_LIB_PATH" >&6; }
61933  fi
61934
61935          fi
61936          if test "x$FOUND_FREETYPE" != xyes; then
61937            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61938
61939  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61940  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61941  METHOD="well-known location"
61942
61943  # Let's start with an optimistic view of the world :-)
61944  FOUND_FREETYPE=yes
61945
61946  # First look for the canonical freetype main include file ft2build.h.
61947  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61948    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61949    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61950    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61951      # Fail.
61952      FOUND_FREETYPE=no
61953    fi
61954  fi
61955
61956  if test "x$FOUND_FREETYPE" = xyes; then
61957    # Include file found, let's continue the sanity check.
61958    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61959$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61960
61961    # Reset to default value
61962    FREETYPE_BASE_NAME=freetype
61963    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61964    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61965      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61966          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61967        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61968        # for the .6 version explicitly.
61969        FREETYPE_BASE_NAME=freetype.6
61970        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61971        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61972$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61973      else
61974        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61975$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61976        FOUND_FREETYPE=no
61977      fi
61978    else
61979      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61980        # On Windows, we will need both .lib and .dll file.
61981        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61982          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61983$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61984          FOUND_FREETYPE=no
61985        fi
61986      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61987          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61988        # Found lib in isa dir, use that instead.
61989        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61990        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61991$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61992      fi
61993    fi
61994  fi
61995
61996  if test "x$FOUND_FREETYPE" = xyes; then
61997
61998  # Only process if variable expands to non-empty
61999
62000  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62001    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62002
62003  # Input might be given as Windows format, start by converting to
62004  # unix format.
62005  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62006  new_path=`$CYGPATH -u "$path"`
62007
62008  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62009  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62010  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62011  # "foo.exe" is OK but "foo" is an error.
62012  #
62013  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62014  # It is also a way to make sure we got the proper file name for the real test later on.
62015  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62016  if test "x$test_shortpath" = x; then
62017    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62018$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62019    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62020  fi
62021
62022  # Call helper function which possibly converts this using DOS-style short mode.
62023  # If so, the updated path is stored in $new_path.
62024
62025  input_path="$new_path"
62026  # Check if we need to convert this using DOS-style short mode. If the path
62027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62028  # take no chances and rewrite it.
62029  # Note: m4 eats our [], so we need to use [ and ] instead.
62030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62031  if test "x$has_forbidden_chars" != x; then
62032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62036      # Going to short mode and back again did indeed matter. Since short mode is
62037      # case insensitive, let's make it lowercase to improve readability.
62038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62039      # Now convert it back to Unix-style (cygpath)
62040      input_path=`$CYGPATH -u "$shortmode_path"`
62041      new_path="$input_path"
62042    fi
62043  fi
62044
62045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62046  if test "x$test_cygdrive_prefix" = x; then
62047    # As a simple fix, exclude /usr/bin since it's not a real path.
62048    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62050      # a path prefixed by /cygdrive for fixpath to work.
62051      new_path="$CYGWIN_ROOT_PATH$input_path"
62052    fi
62053  fi
62054
62055
62056  if test "x$path" != "x$new_path"; then
62057    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62059$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62060  fi
62061
62062    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62063
62064  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62065  has_colon=`$ECHO $path | $GREP ^.:`
62066  new_path="$path"
62067  if test "x$has_colon" = x; then
62068    # Not in mixed or Windows style, start by that.
62069    new_path=`cmd //c echo $path`
62070  fi
62071
62072
62073  input_path="$new_path"
62074  # Check if we need to convert this using DOS-style short mode. If the path
62075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62076  # take no chances and rewrite it.
62077  # Note: m4 eats our [], so we need to use [ and ] instead.
62078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62079  if test "x$has_forbidden_chars" != x; then
62080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62081    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62082  fi
62083
62084
62085  windows_path="$new_path"
62086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62087    unix_path=`$CYGPATH -u "$windows_path"`
62088    new_path="$unix_path"
62089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62091    new_path="$unix_path"
62092  fi
62093
62094  if test "x$path" != "x$new_path"; then
62095    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62097$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62098  fi
62099
62100  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62101  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62102
62103    else
62104      # We're on a unix platform. Hooray! :)
62105      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62106      has_space=`$ECHO "$path" | $GREP " "`
62107      if test "x$has_space" != x; then
62108        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62109$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62110        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62111      fi
62112
62113      # Use eval to expand a potential ~
62114      eval path="$path"
62115      if test ! -f "$path" && test ! -d "$path"; then
62116        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62117      fi
62118
62119      if test -d "$path"; then
62120        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62121      else
62122        dir="`$DIRNAME "$path"`"
62123        base="`$BASENAME "$path"`"
62124        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62125      fi
62126    fi
62127  fi
62128
62129
62130  # Only process if variable expands to non-empty
62131
62132  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62134
62135  # Input might be given as Windows format, start by converting to
62136  # unix format.
62137  path="$POTENTIAL_FREETYPE_LIB_PATH"
62138  new_path=`$CYGPATH -u "$path"`
62139
62140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62143  # "foo.exe" is OK but "foo" is an error.
62144  #
62145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62146  # It is also a way to make sure we got the proper file name for the real test later on.
62147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62148  if test "x$test_shortpath" = x; then
62149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62150$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62151    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62152  fi
62153
62154  # Call helper function which possibly converts this using DOS-style short mode.
62155  # If so, the updated path is stored in $new_path.
62156
62157  input_path="$new_path"
62158  # Check if we need to convert this using DOS-style short mode. If the path
62159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62160  # take no chances and rewrite it.
62161  # Note: m4 eats our [], so we need to use [ and ] instead.
62162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62163  if test "x$has_forbidden_chars" != x; then
62164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62168      # Going to short mode and back again did indeed matter. Since short mode is
62169      # case insensitive, let's make it lowercase to improve readability.
62170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62171      # Now convert it back to Unix-style (cygpath)
62172      input_path=`$CYGPATH -u "$shortmode_path"`
62173      new_path="$input_path"
62174    fi
62175  fi
62176
62177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62178  if test "x$test_cygdrive_prefix" = x; then
62179    # As a simple fix, exclude /usr/bin since it's not a real path.
62180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62182      # a path prefixed by /cygdrive for fixpath to work.
62183      new_path="$CYGWIN_ROOT_PATH$input_path"
62184    fi
62185  fi
62186
62187
62188  if test "x$path" != "x$new_path"; then
62189    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62191$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62192  fi
62193
62194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62195
62196  path="$POTENTIAL_FREETYPE_LIB_PATH"
62197  has_colon=`$ECHO $path | $GREP ^.:`
62198  new_path="$path"
62199  if test "x$has_colon" = x; then
62200    # Not in mixed or Windows style, start by that.
62201    new_path=`cmd //c echo $path`
62202  fi
62203
62204
62205  input_path="$new_path"
62206  # Check if we need to convert this using DOS-style short mode. If the path
62207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62208  # take no chances and rewrite it.
62209  # Note: m4 eats our [], so we need to use [ and ] instead.
62210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62211  if test "x$has_forbidden_chars" != x; then
62212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62214  fi
62215
62216
62217  windows_path="$new_path"
62218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62219    unix_path=`$CYGPATH -u "$windows_path"`
62220    new_path="$unix_path"
62221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62223    new_path="$unix_path"
62224  fi
62225
62226  if test "x$path" != "x$new_path"; then
62227    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62229$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62230  fi
62231
62232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62234
62235    else
62236      # We're on a unix platform. Hooray! :)
62237      path="$POTENTIAL_FREETYPE_LIB_PATH"
62238      has_space=`$ECHO "$path" | $GREP " "`
62239      if test "x$has_space" != x; then
62240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62241$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62242        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62243      fi
62244
62245      # Use eval to expand a potential ~
62246      eval path="$path"
62247      if test ! -f "$path" && test ! -d "$path"; then
62248        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62249      fi
62250
62251      if test -d "$path"; then
62252        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62253      else
62254        dir="`$DIRNAME "$path"`"
62255        base="`$BASENAME "$path"`"
62256        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62257      fi
62258    fi
62259  fi
62260
62261
62262    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62264$as_echo_n "checking for freetype includes... " >&6; }
62265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62266$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62267    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62268    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62269$as_echo_n "checking for freetype libraries... " >&6; }
62270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62271$as_echo "$FREETYPE_LIB_PATH" >&6; }
62272  fi
62273
62274          fi
62275
62276          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
62277            if test "x$FOUND_FREETYPE" != xyes; then
62278              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
62279              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
62280
62281  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62282  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62283  METHOD="well-known location"
62284
62285  # Let's start with an optimistic view of the world :-)
62286  FOUND_FREETYPE=yes
62287
62288  # First look for the canonical freetype main include file ft2build.h.
62289  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62290    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62291    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62292    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62293      # Fail.
62294      FOUND_FREETYPE=no
62295    fi
62296  fi
62297
62298  if test "x$FOUND_FREETYPE" = xyes; then
62299    # Include file found, let's continue the sanity check.
62300    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62301$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62302
62303    # Reset to default value
62304    FREETYPE_BASE_NAME=freetype
62305    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62306    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62307      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62308          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62309        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62310        # for the .6 version explicitly.
62311        FREETYPE_BASE_NAME=freetype.6
62312        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62313        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62314$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62315      else
62316        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62317$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62318        FOUND_FREETYPE=no
62319      fi
62320    else
62321      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62322        # On Windows, we will need both .lib and .dll file.
62323        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62324          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62325$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62326          FOUND_FREETYPE=no
62327        fi
62328      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62329          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62330        # Found lib in isa dir, use that instead.
62331        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62332        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62333$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62334      fi
62335    fi
62336  fi
62337
62338  if test "x$FOUND_FREETYPE" = xyes; then
62339
62340  # Only process if variable expands to non-empty
62341
62342  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62343    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62344
62345  # Input might be given as Windows format, start by converting to
62346  # unix format.
62347  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62348  new_path=`$CYGPATH -u "$path"`
62349
62350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62353  # "foo.exe" is OK but "foo" is an error.
62354  #
62355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62356  # It is also a way to make sure we got the proper file name for the real test later on.
62357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62358  if test "x$test_shortpath" = x; then
62359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62360$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62361    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62362  fi
62363
62364  # Call helper function which possibly converts this using DOS-style short mode.
62365  # If so, the updated path is stored in $new_path.
62366
62367  input_path="$new_path"
62368  # Check if we need to convert this using DOS-style short mode. If the path
62369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62370  # take no chances and rewrite it.
62371  # Note: m4 eats our [], so we need to use [ and ] instead.
62372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62373  if test "x$has_forbidden_chars" != x; then
62374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62378      # Going to short mode and back again did indeed matter. Since short mode is
62379      # case insensitive, let's make it lowercase to improve readability.
62380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62381      # Now convert it back to Unix-style (cygpath)
62382      input_path=`$CYGPATH -u "$shortmode_path"`
62383      new_path="$input_path"
62384    fi
62385  fi
62386
62387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62388  if test "x$test_cygdrive_prefix" = x; then
62389    # As a simple fix, exclude /usr/bin since it's not a real path.
62390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62392      # a path prefixed by /cygdrive for fixpath to work.
62393      new_path="$CYGWIN_ROOT_PATH$input_path"
62394    fi
62395  fi
62396
62397
62398  if test "x$path" != "x$new_path"; then
62399    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62401$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62402  fi
62403
62404    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62405
62406  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62407  has_colon=`$ECHO $path | $GREP ^.:`
62408  new_path="$path"
62409  if test "x$has_colon" = x; then
62410    # Not in mixed or Windows style, start by that.
62411    new_path=`cmd //c echo $path`
62412  fi
62413
62414
62415  input_path="$new_path"
62416  # Check if we need to convert this using DOS-style short mode. If the path
62417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62418  # take no chances and rewrite it.
62419  # Note: m4 eats our [], so we need to use [ and ] instead.
62420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62421  if test "x$has_forbidden_chars" != x; then
62422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62424  fi
62425
62426
62427  windows_path="$new_path"
62428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62429    unix_path=`$CYGPATH -u "$windows_path"`
62430    new_path="$unix_path"
62431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62433    new_path="$unix_path"
62434  fi
62435
62436  if test "x$path" != "x$new_path"; then
62437    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62439$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62440  fi
62441
62442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62444
62445    else
62446      # We're on a unix platform. Hooray! :)
62447      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62448      has_space=`$ECHO "$path" | $GREP " "`
62449      if test "x$has_space" != x; then
62450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62451$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62452        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62453      fi
62454
62455      # Use eval to expand a potential ~
62456      eval path="$path"
62457      if test ! -f "$path" && test ! -d "$path"; then
62458        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62459      fi
62460
62461      if test -d "$path"; then
62462        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62463      else
62464        dir="`$DIRNAME "$path"`"
62465        base="`$BASENAME "$path"`"
62466        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62467      fi
62468    fi
62469  fi
62470
62471
62472  # Only process if variable expands to non-empty
62473
62474  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62475    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62476
62477  # Input might be given as Windows format, start by converting to
62478  # unix format.
62479  path="$POTENTIAL_FREETYPE_LIB_PATH"
62480  new_path=`$CYGPATH -u "$path"`
62481
62482  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62483  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62484  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62485  # "foo.exe" is OK but "foo" is an error.
62486  #
62487  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62488  # It is also a way to make sure we got the proper file name for the real test later on.
62489  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62490  if test "x$test_shortpath" = x; then
62491    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62492$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62493    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62494  fi
62495
62496  # Call helper function which possibly converts this using DOS-style short mode.
62497  # If so, the updated path is stored in $new_path.
62498
62499  input_path="$new_path"
62500  # Check if we need to convert this using DOS-style short mode. If the path
62501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62502  # take no chances and rewrite it.
62503  # Note: m4 eats our [], so we need to use [ and ] instead.
62504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62505  if test "x$has_forbidden_chars" != x; then
62506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62507    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62508    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62509    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62510      # Going to short mode and back again did indeed matter. Since short mode is
62511      # case insensitive, let's make it lowercase to improve readability.
62512      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62513      # Now convert it back to Unix-style (cygpath)
62514      input_path=`$CYGPATH -u "$shortmode_path"`
62515      new_path="$input_path"
62516    fi
62517  fi
62518
62519  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62520  if test "x$test_cygdrive_prefix" = x; then
62521    # As a simple fix, exclude /usr/bin since it's not a real path.
62522    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62523      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62524      # a path prefixed by /cygdrive for fixpath to work.
62525      new_path="$CYGWIN_ROOT_PATH$input_path"
62526    fi
62527  fi
62528
62529
62530  if test "x$path" != "x$new_path"; then
62531    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62533$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62534  fi
62535
62536    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62537
62538  path="$POTENTIAL_FREETYPE_LIB_PATH"
62539  has_colon=`$ECHO $path | $GREP ^.:`
62540  new_path="$path"
62541  if test "x$has_colon" = x; then
62542    # Not in mixed or Windows style, start by that.
62543    new_path=`cmd //c echo $path`
62544  fi
62545
62546
62547  input_path="$new_path"
62548  # Check if we need to convert this using DOS-style short mode. If the path
62549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62550  # take no chances and rewrite it.
62551  # Note: m4 eats our [], so we need to use [ and ] instead.
62552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62553  if test "x$has_forbidden_chars" != x; then
62554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62555    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62556  fi
62557
62558
62559  windows_path="$new_path"
62560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62561    unix_path=`$CYGPATH -u "$windows_path"`
62562    new_path="$unix_path"
62563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62565    new_path="$unix_path"
62566  fi
62567
62568  if test "x$path" != "x$new_path"; then
62569    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62570    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62571$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62572  fi
62573
62574  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62575  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62576
62577    else
62578      # We're on a unix platform. Hooray! :)
62579      path="$POTENTIAL_FREETYPE_LIB_PATH"
62580      has_space=`$ECHO "$path" | $GREP " "`
62581      if test "x$has_space" != x; then
62582        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62583$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62584        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62585      fi
62586
62587      # Use eval to expand a potential ~
62588      eval path="$path"
62589      if test ! -f "$path" && test ! -d "$path"; then
62590        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62591      fi
62592
62593      if test -d "$path"; then
62594        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62595      else
62596        dir="`$DIRNAME "$path"`"
62597        base="`$BASENAME "$path"`"
62598        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62599      fi
62600    fi
62601  fi
62602
62603
62604    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62605    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62606$as_echo_n "checking for freetype includes... " >&6; }
62607    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62608$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62609    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62610    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62611$as_echo_n "checking for freetype libraries... " >&6; }
62612    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62613$as_echo "$FREETYPE_LIB_PATH" >&6; }
62614  fi
62615
62616            fi
62617          fi
62618
62619          if test "x$FOUND_FREETYPE" != xyes; then
62620            FREETYPE_BASE_DIR="$SYSROOT/usr"
62621            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62622
62623  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62624  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
62625  METHOD="well-known location"
62626
62627  # Let's start with an optimistic view of the world :-)
62628  FOUND_FREETYPE=yes
62629
62630  # First look for the canonical freetype main include file ft2build.h.
62631  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62632    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62633    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62634    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62635      # Fail.
62636      FOUND_FREETYPE=no
62637    fi
62638  fi
62639
62640  if test "x$FOUND_FREETYPE" = xyes; then
62641    # Include file found, let's continue the sanity check.
62642    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62643$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62644
62645    # Reset to default value
62646    FREETYPE_BASE_NAME=freetype
62647    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62648    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62649      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62650          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62651        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62652        # for the .6 version explicitly.
62653        FREETYPE_BASE_NAME=freetype.6
62654        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62655        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62656$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62657      else
62658        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62659$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62660        FOUND_FREETYPE=no
62661      fi
62662    else
62663      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62664        # On Windows, we will need both .lib and .dll file.
62665        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62666          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62667$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62668          FOUND_FREETYPE=no
62669        fi
62670      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62671          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62672        # Found lib in isa dir, use that instead.
62673        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62674        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62675$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62676      fi
62677    fi
62678  fi
62679
62680  if test "x$FOUND_FREETYPE" = xyes; then
62681
62682  # Only process if variable expands to non-empty
62683
62684  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62685    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62686
62687  # Input might be given as Windows format, start by converting to
62688  # unix format.
62689  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62690  new_path=`$CYGPATH -u "$path"`
62691
62692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62695  # "foo.exe" is OK but "foo" is an error.
62696  #
62697  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62698  # It is also a way to make sure we got the proper file name for the real test later on.
62699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62700  if test "x$test_shortpath" = x; then
62701    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62702$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62703    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62704  fi
62705
62706  # Call helper function which possibly converts this using DOS-style short mode.
62707  # If so, the updated path is stored in $new_path.
62708
62709  input_path="$new_path"
62710  # Check if we need to convert this using DOS-style short mode. If the path
62711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62712  # take no chances and rewrite it.
62713  # Note: m4 eats our [], so we need to use [ and ] instead.
62714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62715  if test "x$has_forbidden_chars" != x; then
62716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62720      # Going to short mode and back again did indeed matter. Since short mode is
62721      # case insensitive, let's make it lowercase to improve readability.
62722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62723      # Now convert it back to Unix-style (cygpath)
62724      input_path=`$CYGPATH -u "$shortmode_path"`
62725      new_path="$input_path"
62726    fi
62727  fi
62728
62729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62730  if test "x$test_cygdrive_prefix" = x; then
62731    # As a simple fix, exclude /usr/bin since it's not a real path.
62732    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62734      # a path prefixed by /cygdrive for fixpath to work.
62735      new_path="$CYGWIN_ROOT_PATH$input_path"
62736    fi
62737  fi
62738
62739
62740  if test "x$path" != "x$new_path"; then
62741    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62743$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62744  fi
62745
62746    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62747
62748  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62749  has_colon=`$ECHO $path | $GREP ^.:`
62750  new_path="$path"
62751  if test "x$has_colon" = x; then
62752    # Not in mixed or Windows style, start by that.
62753    new_path=`cmd //c echo $path`
62754  fi
62755
62756
62757  input_path="$new_path"
62758  # Check if we need to convert this using DOS-style short mode. If the path
62759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62760  # take no chances and rewrite it.
62761  # Note: m4 eats our [], so we need to use [ and ] instead.
62762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62763  if test "x$has_forbidden_chars" != x; then
62764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62766  fi
62767
62768
62769  windows_path="$new_path"
62770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62771    unix_path=`$CYGPATH -u "$windows_path"`
62772    new_path="$unix_path"
62773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62775    new_path="$unix_path"
62776  fi
62777
62778  if test "x$path" != "x$new_path"; then
62779    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62781$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62782  fi
62783
62784  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62785  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62786
62787    else
62788      # We're on a unix platform. Hooray! :)
62789      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62790      has_space=`$ECHO "$path" | $GREP " "`
62791      if test "x$has_space" != x; then
62792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62793$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62794        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62795      fi
62796
62797      # Use eval to expand a potential ~
62798      eval path="$path"
62799      if test ! -f "$path" && test ! -d "$path"; then
62800        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62801      fi
62802
62803      if test -d "$path"; then
62804        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62805      else
62806        dir="`$DIRNAME "$path"`"
62807        base="`$BASENAME "$path"`"
62808        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62809      fi
62810    fi
62811  fi
62812
62813
62814  # Only process if variable expands to non-empty
62815
62816  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62817    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62818
62819  # Input might be given as Windows format, start by converting to
62820  # unix format.
62821  path="$POTENTIAL_FREETYPE_LIB_PATH"
62822  new_path=`$CYGPATH -u "$path"`
62823
62824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62827  # "foo.exe" is OK but "foo" is an error.
62828  #
62829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62830  # It is also a way to make sure we got the proper file name for the real test later on.
62831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62832  if test "x$test_shortpath" = x; then
62833    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62834$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62835    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62836  fi
62837
62838  # Call helper function which possibly converts this using DOS-style short mode.
62839  # If so, the updated path is stored in $new_path.
62840
62841  input_path="$new_path"
62842  # Check if we need to convert this using DOS-style short mode. If the path
62843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62844  # take no chances and rewrite it.
62845  # Note: m4 eats our [], so we need to use [ and ] instead.
62846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62847  if test "x$has_forbidden_chars" != x; then
62848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62852      # Going to short mode and back again did indeed matter. Since short mode is
62853      # case insensitive, let's make it lowercase to improve readability.
62854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62855      # Now convert it back to Unix-style (cygpath)
62856      input_path=`$CYGPATH -u "$shortmode_path"`
62857      new_path="$input_path"
62858    fi
62859  fi
62860
62861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62862  if test "x$test_cygdrive_prefix" = x; then
62863    # As a simple fix, exclude /usr/bin since it's not a real path.
62864    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62866      # a path prefixed by /cygdrive for fixpath to work.
62867      new_path="$CYGWIN_ROOT_PATH$input_path"
62868    fi
62869  fi
62870
62871
62872  if test "x$path" != "x$new_path"; then
62873    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62875$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62876  fi
62877
62878    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62879
62880  path="$POTENTIAL_FREETYPE_LIB_PATH"
62881  has_colon=`$ECHO $path | $GREP ^.:`
62882  new_path="$path"
62883  if test "x$has_colon" = x; then
62884    # Not in mixed or Windows style, start by that.
62885    new_path=`cmd //c echo $path`
62886  fi
62887
62888
62889  input_path="$new_path"
62890  # Check if we need to convert this using DOS-style short mode. If the path
62891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62892  # take no chances and rewrite it.
62893  # Note: m4 eats our [], so we need to use [ and ] instead.
62894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62895  if test "x$has_forbidden_chars" != x; then
62896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62898  fi
62899
62900
62901  windows_path="$new_path"
62902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62903    unix_path=`$CYGPATH -u "$windows_path"`
62904    new_path="$unix_path"
62905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62907    new_path="$unix_path"
62908  fi
62909
62910  if test "x$path" != "x$new_path"; then
62911    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62913$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62914  fi
62915
62916  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62917  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62918
62919    else
62920      # We're on a unix platform. Hooray! :)
62921      path="$POTENTIAL_FREETYPE_LIB_PATH"
62922      has_space=`$ECHO "$path" | $GREP " "`
62923      if test "x$has_space" != x; then
62924        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62925$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62926        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62927      fi
62928
62929      # Use eval to expand a potential ~
62930      eval path="$path"
62931      if test ! -f "$path" && test ! -d "$path"; then
62932        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62933      fi
62934
62935      if test -d "$path"; then
62936        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62937      else
62938        dir="`$DIRNAME "$path"`"
62939        base="`$BASENAME "$path"`"
62940        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62941      fi
62942    fi
62943  fi
62944
62945
62946    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62947    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62948$as_echo_n "checking for freetype includes... " >&6; }
62949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62950$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62951    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62952    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62953$as_echo_n "checking for freetype libraries... " >&6; }
62954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62955$as_echo "$FREETYPE_LIB_PATH" >&6; }
62956  fi
62957
62958            else
62959
62960  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62961  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62962  METHOD="well-known location"
62963
62964  # Let's start with an optimistic view of the world :-)
62965  FOUND_FREETYPE=yes
62966
62967  # First look for the canonical freetype main include file ft2build.h.
62968  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62969    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62970    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62971    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62972      # Fail.
62973      FOUND_FREETYPE=no
62974    fi
62975  fi
62976
62977  if test "x$FOUND_FREETYPE" = xyes; then
62978    # Include file found, let's continue the sanity check.
62979    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62980$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62981
62982    # Reset to default value
62983    FREETYPE_BASE_NAME=freetype
62984    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62985    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62986      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62987          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62988        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62989        # for the .6 version explicitly.
62990        FREETYPE_BASE_NAME=freetype.6
62991        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62992        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62993$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62994      else
62995        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62996$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62997        FOUND_FREETYPE=no
62998      fi
62999    else
63000      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63001        # On Windows, we will need both .lib and .dll file.
63002        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63003          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63004$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63005          FOUND_FREETYPE=no
63006        fi
63007      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63008          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63009        # Found lib in isa dir, use that instead.
63010        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63011        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63012$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63013      fi
63014    fi
63015  fi
63016
63017  if test "x$FOUND_FREETYPE" = xyes; then
63018
63019  # Only process if variable expands to non-empty
63020
63021  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63022    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63023
63024  # Input might be given as Windows format, start by converting to
63025  # unix format.
63026  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63027  new_path=`$CYGPATH -u "$path"`
63028
63029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63032  # "foo.exe" is OK but "foo" is an error.
63033  #
63034  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63035  # It is also a way to make sure we got the proper file name for the real test later on.
63036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63037  if test "x$test_shortpath" = x; then
63038    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63039$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63040    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63041  fi
63042
63043  # Call helper function which possibly converts this using DOS-style short mode.
63044  # If so, the updated path is stored in $new_path.
63045
63046  input_path="$new_path"
63047  # Check if we need to convert this using DOS-style short mode. If the path
63048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63049  # take no chances and rewrite it.
63050  # Note: m4 eats our [], so we need to use [ and ] instead.
63051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63052  if test "x$has_forbidden_chars" != x; then
63053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63057      # Going to short mode and back again did indeed matter. Since short mode is
63058      # case insensitive, let's make it lowercase to improve readability.
63059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63060      # Now convert it back to Unix-style (cygpath)
63061      input_path=`$CYGPATH -u "$shortmode_path"`
63062      new_path="$input_path"
63063    fi
63064  fi
63065
63066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63067  if test "x$test_cygdrive_prefix" = x; then
63068    # As a simple fix, exclude /usr/bin since it's not a real path.
63069    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63071      # a path prefixed by /cygdrive for fixpath to work.
63072      new_path="$CYGWIN_ROOT_PATH$input_path"
63073    fi
63074  fi
63075
63076
63077  if test "x$path" != "x$new_path"; then
63078    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63080$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63081  fi
63082
63083    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63084
63085  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63086  has_colon=`$ECHO $path | $GREP ^.:`
63087  new_path="$path"
63088  if test "x$has_colon" = x; then
63089    # Not in mixed or Windows style, start by that.
63090    new_path=`cmd //c echo $path`
63091  fi
63092
63093
63094  input_path="$new_path"
63095  # Check if we need to convert this using DOS-style short mode. If the path
63096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63097  # take no chances and rewrite it.
63098  # Note: m4 eats our [], so we need to use [ and ] instead.
63099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63100  if test "x$has_forbidden_chars" != x; then
63101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63103  fi
63104
63105
63106  windows_path="$new_path"
63107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63108    unix_path=`$CYGPATH -u "$windows_path"`
63109    new_path="$unix_path"
63110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63112    new_path="$unix_path"
63113  fi
63114
63115  if test "x$path" != "x$new_path"; then
63116    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63118$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63119  fi
63120
63121  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63122  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63123
63124    else
63125      # We're on a unix platform. Hooray! :)
63126      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63127      has_space=`$ECHO "$path" | $GREP " "`
63128      if test "x$has_space" != x; then
63129        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63130$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63131        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63132      fi
63133
63134      # Use eval to expand a potential ~
63135      eval path="$path"
63136      if test ! -f "$path" && test ! -d "$path"; then
63137        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63138      fi
63139
63140      if test -d "$path"; then
63141        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63142      else
63143        dir="`$DIRNAME "$path"`"
63144        base="`$BASENAME "$path"`"
63145        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63146      fi
63147    fi
63148  fi
63149
63150
63151  # Only process if variable expands to non-empty
63152
63153  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63155
63156  # Input might be given as Windows format, start by converting to
63157  # unix format.
63158  path="$POTENTIAL_FREETYPE_LIB_PATH"
63159  new_path=`$CYGPATH -u "$path"`
63160
63161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63164  # "foo.exe" is OK but "foo" is an error.
63165  #
63166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63167  # It is also a way to make sure we got the proper file name for the real test later on.
63168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63169  if test "x$test_shortpath" = x; then
63170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63171$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63172    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63173  fi
63174
63175  # Call helper function which possibly converts this using DOS-style short mode.
63176  # If so, the updated path is stored in $new_path.
63177
63178  input_path="$new_path"
63179  # Check if we need to convert this using DOS-style short mode. If the path
63180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63181  # take no chances and rewrite it.
63182  # Note: m4 eats our [], so we need to use [ and ] instead.
63183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63184  if test "x$has_forbidden_chars" != x; then
63185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63189      # Going to short mode and back again did indeed matter. Since short mode is
63190      # case insensitive, let's make it lowercase to improve readability.
63191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63192      # Now convert it back to Unix-style (cygpath)
63193      input_path=`$CYGPATH -u "$shortmode_path"`
63194      new_path="$input_path"
63195    fi
63196  fi
63197
63198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63199  if test "x$test_cygdrive_prefix" = x; then
63200    # As a simple fix, exclude /usr/bin since it's not a real path.
63201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63203      # a path prefixed by /cygdrive for fixpath to work.
63204      new_path="$CYGWIN_ROOT_PATH$input_path"
63205    fi
63206  fi
63207
63208
63209  if test "x$path" != "x$new_path"; then
63210    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63212$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63213  fi
63214
63215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63216
63217  path="$POTENTIAL_FREETYPE_LIB_PATH"
63218  has_colon=`$ECHO $path | $GREP ^.:`
63219  new_path="$path"
63220  if test "x$has_colon" = x; then
63221    # Not in mixed or Windows style, start by that.
63222    new_path=`cmd //c echo $path`
63223  fi
63224
63225
63226  input_path="$new_path"
63227  # Check if we need to convert this using DOS-style short mode. If the path
63228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63229  # take no chances and rewrite it.
63230  # Note: m4 eats our [], so we need to use [ and ] instead.
63231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63232  if test "x$has_forbidden_chars" != x; then
63233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63235  fi
63236
63237
63238  windows_path="$new_path"
63239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63240    unix_path=`$CYGPATH -u "$windows_path"`
63241    new_path="$unix_path"
63242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63244    new_path="$unix_path"
63245  fi
63246
63247  if test "x$path" != "x$new_path"; then
63248    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63250$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63251  fi
63252
63253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63255
63256    else
63257      # We're on a unix platform. Hooray! :)
63258      path="$POTENTIAL_FREETYPE_LIB_PATH"
63259      has_space=`$ECHO "$path" | $GREP " "`
63260      if test "x$has_space" != x; then
63261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63262$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63263        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63264      fi
63265
63266      # Use eval to expand a potential ~
63267      eval path="$path"
63268      if test ! -f "$path" && test ! -d "$path"; then
63269        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63270      fi
63271
63272      if test -d "$path"; then
63273        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63274      else
63275        dir="`$DIRNAME "$path"`"
63276        base="`$BASENAME "$path"`"
63277        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63278      fi
63279    fi
63280  fi
63281
63282
63283    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63284    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63285$as_echo_n "checking for freetype includes... " >&6; }
63286    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63287$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63288    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63289    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63290$as_echo_n "checking for freetype libraries... " >&6; }
63291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63292$as_echo "$FREETYPE_LIB_PATH" >&6; }
63293  fi
63294
63295              if test "x$FOUND_FREETYPE" != xyes; then
63296
63297  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63298  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
63299  METHOD="well-known location"
63300
63301  # Let's start with an optimistic view of the world :-)
63302  FOUND_FREETYPE=yes
63303
63304  # First look for the canonical freetype main include file ft2build.h.
63305  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63306    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63307    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63308    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63309      # Fail.
63310      FOUND_FREETYPE=no
63311    fi
63312  fi
63313
63314  if test "x$FOUND_FREETYPE" = xyes; then
63315    # Include file found, let's continue the sanity check.
63316    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63317$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63318
63319    # Reset to default value
63320    FREETYPE_BASE_NAME=freetype
63321    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63322    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63323      if test "x$OPENJDK_TARGET_OS" = xmacosx \
63324          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63325        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63326        # for the .6 version explicitly.
63327        FREETYPE_BASE_NAME=freetype.6
63328        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63329        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63330$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63331      else
63332        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63333$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63334        FOUND_FREETYPE=no
63335      fi
63336    else
63337      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63338        # On Windows, we will need both .lib and .dll file.
63339        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63340          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63341$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63342          FOUND_FREETYPE=no
63343        fi
63344      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63345          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63346        # Found lib in isa dir, use that instead.
63347        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63348        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63349$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63350      fi
63351    fi
63352  fi
63353
63354  if test "x$FOUND_FREETYPE" = xyes; then
63355
63356  # Only process if variable expands to non-empty
63357
63358  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63359    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63360
63361  # Input might be given as Windows format, start by converting to
63362  # unix format.
63363  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63364  new_path=`$CYGPATH -u "$path"`
63365
63366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63369  # "foo.exe" is OK but "foo" is an error.
63370  #
63371  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63372  # It is also a way to make sure we got the proper file name for the real test later on.
63373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63374  if test "x$test_shortpath" = x; then
63375    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63376$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63377    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63378  fi
63379
63380  # Call helper function which possibly converts this using DOS-style short mode.
63381  # If so, the updated path is stored in $new_path.
63382
63383  input_path="$new_path"
63384  # Check if we need to convert this using DOS-style short mode. If the path
63385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63386  # take no chances and rewrite it.
63387  # Note: m4 eats our [], so we need to use [ and ] instead.
63388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63389  if test "x$has_forbidden_chars" != x; then
63390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63394      # Going to short mode and back again did indeed matter. Since short mode is
63395      # case insensitive, let's make it lowercase to improve readability.
63396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63397      # Now convert it back to Unix-style (cygpath)
63398      input_path=`$CYGPATH -u "$shortmode_path"`
63399      new_path="$input_path"
63400    fi
63401  fi
63402
63403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63404  if test "x$test_cygdrive_prefix" = x; then
63405    # As a simple fix, exclude /usr/bin since it's not a real path.
63406    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63408      # a path prefixed by /cygdrive for fixpath to work.
63409      new_path="$CYGWIN_ROOT_PATH$input_path"
63410    fi
63411  fi
63412
63413
63414  if test "x$path" != "x$new_path"; then
63415    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63417$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63418  fi
63419
63420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63421
63422  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63423  has_colon=`$ECHO $path | $GREP ^.:`
63424  new_path="$path"
63425  if test "x$has_colon" = x; then
63426    # Not in mixed or Windows style, start by that.
63427    new_path=`cmd //c echo $path`
63428  fi
63429
63430
63431  input_path="$new_path"
63432  # Check if we need to convert this using DOS-style short mode. If the path
63433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63434  # take no chances and rewrite it.
63435  # Note: m4 eats our [], so we need to use [ and ] instead.
63436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63437  if test "x$has_forbidden_chars" != x; then
63438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63440  fi
63441
63442
63443  windows_path="$new_path"
63444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63445    unix_path=`$CYGPATH -u "$windows_path"`
63446    new_path="$unix_path"
63447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63449    new_path="$unix_path"
63450  fi
63451
63452  if test "x$path" != "x$new_path"; then
63453    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63455$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63456  fi
63457
63458  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63459  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63460
63461    else
63462      # We're on a unix platform. Hooray! :)
63463      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63464      has_space=`$ECHO "$path" | $GREP " "`
63465      if test "x$has_space" != x; then
63466        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63467$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63468        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63469      fi
63470
63471      # Use eval to expand a potential ~
63472      eval path="$path"
63473      if test ! -f "$path" && test ! -d "$path"; then
63474        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63475      fi
63476
63477      if test -d "$path"; then
63478        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63479      else
63480        dir="`$DIRNAME "$path"`"
63481        base="`$BASENAME "$path"`"
63482        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63483      fi
63484    fi
63485  fi
63486
63487
63488  # Only process if variable expands to non-empty
63489
63490  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63491    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63492
63493  # Input might be given as Windows format, start by converting to
63494  # unix format.
63495  path="$POTENTIAL_FREETYPE_LIB_PATH"
63496  new_path=`$CYGPATH -u "$path"`
63497
63498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63501  # "foo.exe" is OK but "foo" is an error.
63502  #
63503  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63504  # It is also a way to make sure we got the proper file name for the real test later on.
63505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63506  if test "x$test_shortpath" = x; then
63507    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63508$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63509    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63510  fi
63511
63512  # Call helper function which possibly converts this using DOS-style short mode.
63513  # If so, the updated path is stored in $new_path.
63514
63515  input_path="$new_path"
63516  # Check if we need to convert this using DOS-style short mode. If the path
63517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63518  # take no chances and rewrite it.
63519  # Note: m4 eats our [], so we need to use [ and ] instead.
63520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63521  if test "x$has_forbidden_chars" != x; then
63522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63526      # Going to short mode and back again did indeed matter. Since short mode is
63527      # case insensitive, let's make it lowercase to improve readability.
63528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63529      # Now convert it back to Unix-style (cygpath)
63530      input_path=`$CYGPATH -u "$shortmode_path"`
63531      new_path="$input_path"
63532    fi
63533  fi
63534
63535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63536  if test "x$test_cygdrive_prefix" = x; then
63537    # As a simple fix, exclude /usr/bin since it's not a real path.
63538    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63540      # a path prefixed by /cygdrive for fixpath to work.
63541      new_path="$CYGWIN_ROOT_PATH$input_path"
63542    fi
63543  fi
63544
63545
63546  if test "x$path" != "x$new_path"; then
63547    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63549$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63550  fi
63551
63552    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63553
63554  path="$POTENTIAL_FREETYPE_LIB_PATH"
63555  has_colon=`$ECHO $path | $GREP ^.:`
63556  new_path="$path"
63557  if test "x$has_colon" = x; then
63558    # Not in mixed or Windows style, start by that.
63559    new_path=`cmd //c echo $path`
63560  fi
63561
63562
63563  input_path="$new_path"
63564  # Check if we need to convert this using DOS-style short mode. If the path
63565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63566  # take no chances and rewrite it.
63567  # Note: m4 eats our [], so we need to use [ and ] instead.
63568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63569  if test "x$has_forbidden_chars" != x; then
63570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63572  fi
63573
63574
63575  windows_path="$new_path"
63576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63577    unix_path=`$CYGPATH -u "$windows_path"`
63578    new_path="$unix_path"
63579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63581    new_path="$unix_path"
63582  fi
63583
63584  if test "x$path" != "x$new_path"; then
63585    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63587$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63588  fi
63589
63590  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63591  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63592
63593    else
63594      # We're on a unix platform. Hooray! :)
63595      path="$POTENTIAL_FREETYPE_LIB_PATH"
63596      has_space=`$ECHO "$path" | $GREP " "`
63597      if test "x$has_space" != x; then
63598        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63599$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63600        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63601      fi
63602
63603      # Use eval to expand a potential ~
63604      eval path="$path"
63605      if test ! -f "$path" && test ! -d "$path"; then
63606        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63607      fi
63608
63609      if test -d "$path"; then
63610        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63611      else
63612        dir="`$DIRNAME "$path"`"
63613        base="`$BASENAME "$path"`"
63614        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63615      fi
63616    fi
63617  fi
63618
63619
63620    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63622$as_echo_n "checking for freetype includes... " >&6; }
63623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63624$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63625    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63627$as_echo_n "checking for freetype libraries... " >&6; }
63628    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63629$as_echo "$FREETYPE_LIB_PATH" >&6; }
63630  fi
63631
63632              fi
63633            fi
63634          fi
63635        fi
63636      fi # end check in well-known locations
63637
63638      if test "x$FOUND_FREETYPE" != xyes; then
63639
63640  # Print a helpful message on how to acquire the necessary build dependency.
63641  # freetype is the help tag: freetype, cups, alsa etc
63642  MISSING_DEPENDENCY=freetype
63643
63644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63645    cygwin_help $MISSING_DEPENDENCY
63646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63647    msys_help $MISSING_DEPENDENCY
63648  else
63649    PKGHANDLER_COMMAND=
63650
63651    case $PKGHANDLER in
63652      apt-get)
63653        apt_help     $MISSING_DEPENDENCY ;;
63654      yum)
63655        yum_help     $MISSING_DEPENDENCY ;;
63656      brew)
63657        brew_help    $MISSING_DEPENDENCY ;;
63658      port)
63659        port_help    $MISSING_DEPENDENCY ;;
63660      pkgutil)
63661        pkgutil_help $MISSING_DEPENDENCY ;;
63662      pkgadd)
63663        pkgadd_help  $MISSING_DEPENDENCY ;;
63664    esac
63665
63666    if test "x$PKGHANDLER_COMMAND" != x; then
63667      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63668    fi
63669  fi
63670
63671        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63672      fi
63673    fi # end user specified settings
63674
63675    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63676    if test "x$FREETYPE_CFLAGS" = x; then
63677
63678  # Only process if variable expands to non-empty
63679
63680  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63682
63683  # Input might be given as Windows format, start by converting to
63684  # unix format.
63685  path="$FREETYPE_INCLUDE_PATH"
63686  new_path=`$CYGPATH -u "$path"`
63687
63688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63691  # "foo.exe" is OK but "foo" is an error.
63692  #
63693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63694  # It is also a way to make sure we got the proper file name for the real test later on.
63695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63696  if test "x$test_shortpath" = x; then
63697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63698$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63699    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63700  fi
63701
63702  # Call helper function which possibly converts this using DOS-style short mode.
63703  # If so, the updated path is stored in $new_path.
63704
63705  input_path="$new_path"
63706  # Check if we need to convert this using DOS-style short mode. If the path
63707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63708  # take no chances and rewrite it.
63709  # Note: m4 eats our [], so we need to use [ and ] instead.
63710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63711  if test "x$has_forbidden_chars" != x; then
63712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63716      # Going to short mode and back again did indeed matter. Since short mode is
63717      # case insensitive, let's make it lowercase to improve readability.
63718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63719      # Now convert it back to Unix-style (cygpath)
63720      input_path=`$CYGPATH -u "$shortmode_path"`
63721      new_path="$input_path"
63722    fi
63723  fi
63724
63725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63726  if test "x$test_cygdrive_prefix" = x; then
63727    # As a simple fix, exclude /usr/bin since it's not a real path.
63728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63730      # a path prefixed by /cygdrive for fixpath to work.
63731      new_path="$CYGWIN_ROOT_PATH$input_path"
63732    fi
63733  fi
63734
63735
63736  if test "x$path" != "x$new_path"; then
63737    FREETYPE_INCLUDE_PATH="$new_path"
63738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63739$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63740  fi
63741
63742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63743
63744  path="$FREETYPE_INCLUDE_PATH"
63745  has_colon=`$ECHO $path | $GREP ^.:`
63746  new_path="$path"
63747  if test "x$has_colon" = x; then
63748    # Not in mixed or Windows style, start by that.
63749    new_path=`cmd //c echo $path`
63750  fi
63751
63752
63753  input_path="$new_path"
63754  # Check if we need to convert this using DOS-style short mode. If the path
63755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63756  # take no chances and rewrite it.
63757  # Note: m4 eats our [], so we need to use [ and ] instead.
63758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63759  if test "x$has_forbidden_chars" != x; then
63760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63762  fi
63763
63764
63765  windows_path="$new_path"
63766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63767    unix_path=`$CYGPATH -u "$windows_path"`
63768    new_path="$unix_path"
63769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63771    new_path="$unix_path"
63772  fi
63773
63774  if test "x$path" != "x$new_path"; then
63775    FREETYPE_INCLUDE_PATH="$new_path"
63776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63777$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63778  fi
63779
63780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63782
63783    else
63784      # We're on a unix platform. Hooray! :)
63785      path="$FREETYPE_INCLUDE_PATH"
63786      has_space=`$ECHO "$path" | $GREP " "`
63787      if test "x$has_space" != x; then
63788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63789$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63790        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63791      fi
63792
63793      # Use eval to expand a potential ~
63794      eval path="$path"
63795      if test ! -f "$path" && test ! -d "$path"; then
63796        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63797      fi
63798
63799      if test -d "$path"; then
63800        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63801      else
63802        dir="`$DIRNAME "$path"`"
63803        base="`$BASENAME "$path"`"
63804        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63805      fi
63806    fi
63807  fi
63808
63809      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63810        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63811      else
63812        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63813      fi
63814    fi
63815
63816    if test "x$FREETYPE_LIBS" = x; then
63817
63818  # Only process if variable expands to non-empty
63819
63820  if test "x$FREETYPE_LIB_PATH" != x; then
63821    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63822
63823  # Input might be given as Windows format, start by converting to
63824  # unix format.
63825  path="$FREETYPE_LIB_PATH"
63826  new_path=`$CYGPATH -u "$path"`
63827
63828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63831  # "foo.exe" is OK but "foo" is an error.
63832  #
63833  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63834  # It is also a way to make sure we got the proper file name for the real test later on.
63835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63836  if test "x$test_shortpath" = x; then
63837    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63838$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63839    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63840  fi
63841
63842  # Call helper function which possibly converts this using DOS-style short mode.
63843  # If so, the updated path is stored in $new_path.
63844
63845  input_path="$new_path"
63846  # Check if we need to convert this using DOS-style short mode. If the path
63847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63848  # take no chances and rewrite it.
63849  # Note: m4 eats our [], so we need to use [ and ] instead.
63850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63851  if test "x$has_forbidden_chars" != x; then
63852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63853    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63856      # Going to short mode and back again did indeed matter. Since short mode is
63857      # case insensitive, let's make it lowercase to improve readability.
63858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63859      # Now convert it back to Unix-style (cygpath)
63860      input_path=`$CYGPATH -u "$shortmode_path"`
63861      new_path="$input_path"
63862    fi
63863  fi
63864
63865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63866  if test "x$test_cygdrive_prefix" = x; then
63867    # As a simple fix, exclude /usr/bin since it's not a real path.
63868    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63870      # a path prefixed by /cygdrive for fixpath to work.
63871      new_path="$CYGWIN_ROOT_PATH$input_path"
63872    fi
63873  fi
63874
63875
63876  if test "x$path" != "x$new_path"; then
63877    FREETYPE_LIB_PATH="$new_path"
63878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63879$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63880  fi
63881
63882    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63883
63884  path="$FREETYPE_LIB_PATH"
63885  has_colon=`$ECHO $path | $GREP ^.:`
63886  new_path="$path"
63887  if test "x$has_colon" = x; then
63888    # Not in mixed or Windows style, start by that.
63889    new_path=`cmd //c echo $path`
63890  fi
63891
63892
63893  input_path="$new_path"
63894  # Check if we need to convert this using DOS-style short mode. If the path
63895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63896  # take no chances and rewrite it.
63897  # Note: m4 eats our [], so we need to use [ and ] instead.
63898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63899  if test "x$has_forbidden_chars" != x; then
63900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63901    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63902  fi
63903
63904
63905  windows_path="$new_path"
63906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63907    unix_path=`$CYGPATH -u "$windows_path"`
63908    new_path="$unix_path"
63909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63911    new_path="$unix_path"
63912  fi
63913
63914  if test "x$path" != "x$new_path"; then
63915    FREETYPE_LIB_PATH="$new_path"
63916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63917$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63918  fi
63919
63920  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63921  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63922
63923    else
63924      # We're on a unix platform. Hooray! :)
63925      path="$FREETYPE_LIB_PATH"
63926      has_space=`$ECHO "$path" | $GREP " "`
63927      if test "x$has_space" != x; then
63928        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63929$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63930        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63931      fi
63932
63933      # Use eval to expand a potential ~
63934      eval path="$path"
63935      if test ! -f "$path" && test ! -d "$path"; then
63936        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63937      fi
63938
63939      if test -d "$path"; then
63940        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63941      else
63942        dir="`$DIRNAME "$path"`"
63943        base="`$BASENAME "$path"`"
63944        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63945      fi
63946    fi
63947  fi
63948
63949      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63950        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63951      else
63952        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63953      fi
63954    fi
63955
63956    # Try to compile it
63957    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63958$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63959    ac_ext=cpp
63960ac_cpp='$CXXCPP $CPPFLAGS'
63961ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63962ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63963ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63964
63965    PREV_CXXCFLAGS="$CXXFLAGS"
63966    PREV_LIBS="$LIBS"
63967    PREV_CXX="$CXX"
63968    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63969    LIBS="$LIBS $FREETYPE_LIBS"
63970    CXX="$FIXPATH $CXX"
63971    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63972/* end confdefs.h.  */
63973
63974          #include<ft2build.h>
63975          #include FT_FREETYPE_H
63976          int main () {
63977            FT_Init_FreeType(NULL);
63978            return 0;
63979          }
63980
63981_ACEOF
63982if ac_fn_cxx_try_link "$LINENO"; then :
63983
63984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63985$as_echo "yes" >&6; }
63986
63987else
63988
63989          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63990$as_echo "no" >&6; }
63991          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63992$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63993          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63994$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63995
63996
63997  # Print a helpful message on how to acquire the necessary build dependency.
63998  # freetype is the help tag: freetype, cups, alsa etc
63999  MISSING_DEPENDENCY=freetype
64000
64001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64002    cygwin_help $MISSING_DEPENDENCY
64003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64004    msys_help $MISSING_DEPENDENCY
64005  else
64006    PKGHANDLER_COMMAND=
64007
64008    case $PKGHANDLER in
64009      apt-get)
64010        apt_help     $MISSING_DEPENDENCY ;;
64011      yum)
64012        yum_help     $MISSING_DEPENDENCY ;;
64013      brew)
64014        brew_help    $MISSING_DEPENDENCY ;;
64015      port)
64016        port_help    $MISSING_DEPENDENCY ;;
64017      pkgutil)
64018        pkgutil_help $MISSING_DEPENDENCY ;;
64019      pkgadd)
64020        pkgadd_help  $MISSING_DEPENDENCY ;;
64021    esac
64022
64023    if test "x$PKGHANDLER_COMMAND" != x; then
64024      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64025    fi
64026  fi
64027
64028
64029          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
64030
64031
64032fi
64033rm -f core conftest.err conftest.$ac_objext \
64034    conftest$ac_exeext conftest.$ac_ext
64035    CXXCFLAGS="$PREV_CXXFLAGS"
64036    LIBS="$PREV_LIBS"
64037    CXX="$PREV_CXX"
64038    ac_ext=cpp
64039ac_cpp='$CXXCPP $CPPFLAGS'
64040ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64041ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64042ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64043
64044
64045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
64046$as_echo_n "checking if we should bundle freetype... " >&6; }
64047    if test "x$BUNDLE_FREETYPE" = xyes; then
64048      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
64049    fi
64050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
64051$as_echo "$BUNDLE_FREETYPE" >&6; }
64052
64053  fi # end freetype needed
64054
64055  FREETYPE_LICENSE=""
64056  if test "x$with_freetype_license" = "xyes"; then
64057    as_fn_error $? "--with-freetype-license must have a value" "$LINENO" 5
64058  elif test "x$with_freetype_license" != "x"; then
64059    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype license" >&5
64060$as_echo_n "checking for freetype license... " >&6; }
64061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freetype_license" >&5
64062$as_echo "$with_freetype_license" >&6; }
64063    FREETYPE_LICENSE="$with_freetype_license"
64064
64065  # Only process if variable expands to non-empty
64066
64067  if test "x$FREETYPE_LICENSE" != x; then
64068    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64069
64070  # Input might be given as Windows format, start by converting to
64071  # unix format.
64072  path="$FREETYPE_LICENSE"
64073  new_path=`$CYGPATH -u "$path"`
64074
64075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64078  # "foo.exe" is OK but "foo" is an error.
64079  #
64080  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64081  # It is also a way to make sure we got the proper file name for the real test later on.
64082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64083  if test "x$test_shortpath" = x; then
64084    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
64085$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
64086    as_fn_error $? "Cannot locate the the path of FREETYPE_LICENSE" "$LINENO" 5
64087  fi
64088
64089  # Call helper function which possibly converts this using DOS-style short mode.
64090  # If so, the updated path is stored in $new_path.
64091
64092  input_path="$new_path"
64093  # Check if we need to convert this using DOS-style short mode. If the path
64094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64095  # take no chances and rewrite it.
64096  # Note: m4 eats our [], so we need to use [ and ] instead.
64097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64098  if test "x$has_forbidden_chars" != x; then
64099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64103      # Going to short mode and back again did indeed matter. Since short mode is
64104      # case insensitive, let's make it lowercase to improve readability.
64105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64106      # Now convert it back to Unix-style (cygpath)
64107      input_path=`$CYGPATH -u "$shortmode_path"`
64108      new_path="$input_path"
64109    fi
64110  fi
64111
64112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64113  if test "x$test_cygdrive_prefix" = x; then
64114    # As a simple fix, exclude /usr/bin since it's not a real path.
64115    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64117      # a path prefixed by /cygdrive for fixpath to work.
64118      new_path="$CYGWIN_ROOT_PATH$input_path"
64119    fi
64120  fi
64121
64122
64123  if test "x$path" != "x$new_path"; then
64124    FREETYPE_LICENSE="$new_path"
64125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64126$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64127  fi
64128
64129    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64130
64131  path="$FREETYPE_LICENSE"
64132  has_colon=`$ECHO $path | $GREP ^.:`
64133  new_path="$path"
64134  if test "x$has_colon" = x; then
64135    # Not in mixed or Windows style, start by that.
64136    new_path=`cmd //c echo $path`
64137  fi
64138
64139
64140  input_path="$new_path"
64141  # Check if we need to convert this using DOS-style short mode. If the path
64142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64143  # take no chances and rewrite it.
64144  # Note: m4 eats our [], so we need to use [ and ] instead.
64145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64146  if test "x$has_forbidden_chars" != x; then
64147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64148    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64149  fi
64150
64151
64152  windows_path="$new_path"
64153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64154    unix_path=`$CYGPATH -u "$windows_path"`
64155    new_path="$unix_path"
64156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64158    new_path="$unix_path"
64159  fi
64160
64161  if test "x$path" != "x$new_path"; then
64162    FREETYPE_LICENSE="$new_path"
64163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64164$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64165  fi
64166
64167  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64168  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64169
64170    else
64171      # We're on a unix platform. Hooray! :)
64172      path="$FREETYPE_LICENSE"
64173      has_space=`$ECHO "$path" | $GREP " "`
64174      if test "x$has_space" != x; then
64175        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
64176$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
64177        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64178      fi
64179
64180      # Use eval to expand a potential ~
64181      eval path="$path"
64182      if test ! -f "$path" && test ! -d "$path"; then
64183        as_fn_error $? "The path of FREETYPE_LICENSE, which resolves as \"$path\", is not found." "$LINENO" 5
64184      fi
64185
64186      if test -d "$path"; then
64187        FREETYPE_LICENSE="`cd "$path"; $THEPWDCMD -L`"
64188      else
64189        dir="`$DIRNAME "$path"`"
64190        base="`$BASENAME "$path"`"
64191        FREETYPE_LICENSE="`cd "$dir"; $THEPWDCMD -L`/$base"
64192      fi
64193    fi
64194  fi
64195
64196    if test ! -f "$FREETYPE_LICENSE"; then
64197      as_fn_error $? "$FREETYPE_LICENSE cannot be found" "$LINENO" 5
64198    fi
64199  fi
64200
64201
64202
64203
64204
64205
64206
64207
64208# Check whether --with-alsa was given.
64209if test "${with_alsa+set}" = set; then :
64210  withval=$with_alsa;
64211fi
64212
64213
64214# Check whether --with-alsa-include was given.
64215if test "${with_alsa_include+set}" = set; then :
64216  withval=$with_alsa_include;
64217fi
64218
64219
64220# Check whether --with-alsa-lib was given.
64221if test "${with_alsa_lib+set}" = set; then :
64222  withval=$with_alsa_lib;
64223fi
64224
64225
64226  if test "x$NEEDS_LIB_ALSA" = xfalse; then
64227    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
64228        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
64229        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
64230      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
64231$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
64232    fi
64233    ALSA_CFLAGS=
64234    ALSA_LIBS=
64235  else
64236    ALSA_FOUND=no
64237
64238    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
64239      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
64240    fi
64241
64242    if test "x${with_alsa}" != x; then
64243      ALSA_LIBS="-L${with_alsa}/lib -lasound"
64244      ALSA_CFLAGS="-I${with_alsa}/include"
64245      ALSA_FOUND=yes
64246    fi
64247    if test "x${with_alsa_include}" != x; then
64248      ALSA_CFLAGS="-I${with_alsa_include}"
64249      ALSA_FOUND=yes
64250    fi
64251    if test "x${with_alsa_lib}" != x; then
64252      ALSA_LIBS="-L${with_alsa_lib} -lasound"
64253      ALSA_FOUND=yes
64254    fi
64255    # Do not try pkg-config if we have a sysroot set.
64256    if test "x$SYSROOT" = x; then
64257      if test "x$ALSA_FOUND" = xno; then
64258
64259pkg_failed=no
64260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
64261$as_echo_n "checking for ALSA... " >&6; }
64262
64263if test -n "$ALSA_CFLAGS"; then
64264    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
64265 elif test -n "$PKG_CONFIG"; then
64266    if test -n "$PKG_CONFIG" && \
64267    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64268  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64269  ac_status=$?
64270  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64271  test $ac_status = 0; }; then
64272  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
64273else
64274  pkg_failed=yes
64275fi
64276 else
64277    pkg_failed=untried
64278fi
64279if test -n "$ALSA_LIBS"; then
64280    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
64281 elif test -n "$PKG_CONFIG"; then
64282    if test -n "$PKG_CONFIG" && \
64283    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64284  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64285  ac_status=$?
64286  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64287  test $ac_status = 0; }; then
64288  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
64289else
64290  pkg_failed=yes
64291fi
64292 else
64293    pkg_failed=untried
64294fi
64295
64296
64297
64298if test $pkg_failed = yes; then
64299
64300if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64301        _pkg_short_errors_supported=yes
64302else
64303        _pkg_short_errors_supported=no
64304fi
64305        if test $_pkg_short_errors_supported = yes; then
64306	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
64307        else
64308	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
64309        fi
64310	# Put the nasty error message in config.log where it belongs
64311	echo "$ALSA_PKG_ERRORS" >&5
64312
64313	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64314$as_echo "no" >&6; }
64315                ALSA_FOUND=no
64316elif test $pkg_failed = untried; then
64317	ALSA_FOUND=no
64318else
64319	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
64320	ALSA_LIBS=$pkg_cv_ALSA_LIBS
64321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64322$as_echo "yes" >&6; }
64323	ALSA_FOUND=yes
64324fi
64325      fi
64326    fi
64327    if test "x$ALSA_FOUND" = xno; then
64328      for ac_header in alsa/asoundlib.h
64329do :
64330  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
64331if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
64332  cat >>confdefs.h <<_ACEOF
64333#define HAVE_ALSA_ASOUNDLIB_H 1
64334_ACEOF
64335
64336            ALSA_FOUND=yes
64337            ALSA_CFLAGS=-Iignoreme
64338            ALSA_LIBS=-lasound
64339            DEFAULT_ALSA=yes
64340
64341else
64342  ALSA_FOUND=no
64343
64344fi
64345
64346done
64347
64348    fi
64349    if test "x$ALSA_FOUND" = xno; then
64350
64351  # Print a helpful message on how to acquire the necessary build dependency.
64352  # alsa is the help tag: freetype, cups, alsa etc
64353  MISSING_DEPENDENCY=alsa
64354
64355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64356    cygwin_help $MISSING_DEPENDENCY
64357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64358    msys_help $MISSING_DEPENDENCY
64359  else
64360    PKGHANDLER_COMMAND=
64361
64362    case $PKGHANDLER in
64363      apt-get)
64364        apt_help     $MISSING_DEPENDENCY ;;
64365      yum)
64366        yum_help     $MISSING_DEPENDENCY ;;
64367      brew)
64368        brew_help    $MISSING_DEPENDENCY ;;
64369      port)
64370        port_help    $MISSING_DEPENDENCY ;;
64371      pkgutil)
64372        pkgutil_help $MISSING_DEPENDENCY ;;
64373      pkgadd)
64374        pkgadd_help  $MISSING_DEPENDENCY ;;
64375    esac
64376
64377    if test "x$PKGHANDLER_COMMAND" != x; then
64378      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64379    fi
64380  fi
64381
64382      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
64383    fi
64384  fi
64385
64386
64387
64388
64389
64390
64391# Check whether --with-libffi was given.
64392if test "${with_libffi+set}" = set; then :
64393  withval=$with_libffi;
64394fi
64395
64396
64397# Check whether --with-libffi-include was given.
64398if test "${with_libffi_include+set}" = set; then :
64399  withval=$with_libffi_include;
64400fi
64401
64402
64403# Check whether --with-libffi-lib was given.
64404if test "${with_libffi_lib+set}" = set; then :
64405  withval=$with_libffi_lib;
64406fi
64407
64408  # Check whether --enable-libffi-bundling was given.
64409if test "${enable_libffi_bundling+set}" = set; then :
64410  enableval=$enable_libffi_bundling;
64411fi
64412
64413
64414  if test "x$NEEDS_LIB_FFI" = xfalse; then
64415    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
64416        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
64417        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
64418      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
64419$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
64420    fi
64421    LIBFFI_CFLAGS=
64422    LIBFFI_LIBS=
64423  else
64424    LIBFFI_FOUND=no
64425
64426    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
64427      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
64428    fi
64429
64430    if test "x${with_libffi}" != x; then
64431      LIBFFI_LIB_PATH="${with_libffi}/lib"
64432      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
64433      LIBFFI_CFLAGS="-I${with_libffi}/include"
64434      LIBFFI_FOUND=yes
64435    fi
64436    if test "x${with_libffi_include}" != x; then
64437      LIBFFI_CFLAGS="-I${with_libffi_include}"
64438      LIBFFI_FOUND=yes
64439    fi
64440    if test "x${with_libffi_lib}" != x; then
64441      LIBFFI_LIB_PATH="${with_libffi_lib}"
64442      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
64443      LIBFFI_FOUND=yes
64444    fi
64445    # Do not try pkg-config if we have a sysroot set.
64446    if test "x$SYSROOT" = x; then
64447      if test "x$LIBFFI_FOUND" = xno; then
64448        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
64449
64450pkg_failed=no
64451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
64452$as_echo_n "checking for LIBFFI... " >&6; }
64453
64454if test -n "$LIBFFI_CFLAGS"; then
64455    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
64456 elif test -n "$PKG_CONFIG"; then
64457    if test -n "$PKG_CONFIG" && \
64458    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64459  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64460  ac_status=$?
64461  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64462  test $ac_status = 0; }; then
64463  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
64464else
64465  pkg_failed=yes
64466fi
64467 else
64468    pkg_failed=untried
64469fi
64470if test -n "$LIBFFI_LIBS"; then
64471    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
64472 elif test -n "$PKG_CONFIG"; then
64473    if test -n "$PKG_CONFIG" && \
64474    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64475  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64476  ac_status=$?
64477  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64478  test $ac_status = 0; }; then
64479  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
64480else
64481  pkg_failed=yes
64482fi
64483 else
64484    pkg_failed=untried
64485fi
64486
64487
64488
64489if test $pkg_failed = yes; then
64490
64491if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64492        _pkg_short_errors_supported=yes
64493else
64494        _pkg_short_errors_supported=no
64495fi
64496        if test $_pkg_short_errors_supported = yes; then
64497	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
64498        else
64499	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
64500        fi
64501	# Put the nasty error message in config.log where it belongs
64502	echo "$LIBFFI_PKG_ERRORS" >&5
64503
64504	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64505$as_echo "no" >&6; }
64506                LIBFFI_FOUND=no
64507elif test $pkg_failed = untried; then
64508	LIBFFI_FOUND=no
64509else
64510	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
64511	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
64512        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64513$as_echo "yes" >&6; }
64514	LIBFFI_FOUND=yes
64515fi
64516      fi
64517    fi
64518    if test "x$LIBFFI_FOUND" = xno; then
64519      for ac_header in ffi.h
64520do :
64521  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
64522if test "x$ac_cv_header_ffi_h" = xyes; then :
64523  cat >>confdefs.h <<_ACEOF
64524#define HAVE_FFI_H 1
64525_ACEOF
64526
64527            LIBFFI_FOUND=yes
64528            LIBFFI_CFLAGS=
64529            LIBFFI_LIBS=-lffi
64530
64531else
64532  LIBFFI_FOUND=no
64533
64534fi
64535
64536done
64537
64538    fi
64539    if test "x$LIBFFI_FOUND" = xno; then
64540
64541  # Print a helpful message on how to acquire the necessary build dependency.
64542  # ffi is the help tag: freetype, cups, alsa etc
64543  MISSING_DEPENDENCY=ffi
64544
64545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64546    cygwin_help $MISSING_DEPENDENCY
64547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64548    msys_help $MISSING_DEPENDENCY
64549  else
64550    PKGHANDLER_COMMAND=
64551
64552    case $PKGHANDLER in
64553      apt-get)
64554        apt_help     $MISSING_DEPENDENCY ;;
64555      yum)
64556        yum_help     $MISSING_DEPENDENCY ;;
64557      brew)
64558        brew_help    $MISSING_DEPENDENCY ;;
64559      port)
64560        port_help    $MISSING_DEPENDENCY ;;
64561      pkgutil)
64562        pkgutil_help $MISSING_DEPENDENCY ;;
64563      pkgadd)
64564        pkgadd_help  $MISSING_DEPENDENCY ;;
64565    esac
64566
64567    if test "x$PKGHANDLER_COMMAND" != x; then
64568      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64569    fi
64570  fi
64571
64572      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
64573    fi
64574
64575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
64576$as_echo_n "checking if libffi works... " >&6; }
64577    ac_ext=c
64578ac_cpp='$CPP $CPPFLAGS'
64579ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64580ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64581ac_compiler_gnu=$ac_cv_c_compiler_gnu
64582
64583    OLD_CFLAGS="$CFLAGS"
64584    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
64585    OLD_LIBS="$LIBS"
64586    LIBS="$LIBS $LIBFFI_LIBS"
64587    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64588/* end confdefs.h.  */
64589#include <ffi.h>
64590int
64591main ()
64592{
64593
64594          ffi_call(NULL, NULL, NULL, NULL);
64595          return 0;
64596
64597  ;
64598  return 0;
64599}
64600_ACEOF
64601if ac_fn_c_try_link "$LINENO"; then :
64602  LIBFFI_WORKS=yes
64603else
64604  LIBFFI_WORKS=no
64605
64606fi
64607rm -f core conftest.err conftest.$ac_objext \
64608    conftest$ac_exeext conftest.$ac_ext
64609    CFLAGS="$OLD_CFLAGS"
64610    LIBS="$OLD_LIBS"
64611    ac_ext=cpp
64612ac_cpp='$CXXCPP $CPPFLAGS'
64613ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64614ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64615ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64616
64617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
64618$as_echo "$LIBFFI_WORKS" >&6; }
64619
64620    if test "x$LIBFFI_WORKS" = xno; then
64621
64622  # Print a helpful message on how to acquire the necessary build dependency.
64623  # ffi is the help tag: freetype, cups, alsa etc
64624  MISSING_DEPENDENCY=ffi
64625
64626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64627    cygwin_help $MISSING_DEPENDENCY
64628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64629    msys_help $MISSING_DEPENDENCY
64630  else
64631    PKGHANDLER_COMMAND=
64632
64633    case $PKGHANDLER in
64634      apt-get)
64635        apt_help     $MISSING_DEPENDENCY ;;
64636      yum)
64637        yum_help     $MISSING_DEPENDENCY ;;
64638      brew)
64639        brew_help    $MISSING_DEPENDENCY ;;
64640      port)
64641        port_help    $MISSING_DEPENDENCY ;;
64642      pkgutil)
64643        pkgutil_help $MISSING_DEPENDENCY ;;
64644      pkgadd)
64645        pkgadd_help  $MISSING_DEPENDENCY ;;
64646    esac
64647
64648    if test "x$PKGHANDLER_COMMAND" != x; then
64649      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64650    fi
64651  fi
64652
64653      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
64654    fi
64655
64656    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
64657$as_echo_n "checking if libffi should be bundled... " >&6; }
64658    if test "x$enable_libffi_bundling" = "x"; then
64659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64660$as_echo "no" >&6; }
64661      ENABLE_LIBFFI_BUNDLING=false
64662    elif  test "x$enable_libffi_bundling" = "xno"; then
64663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64664$as_echo "no, forced" >&6; }
64665      ENABLE_LIBFFI_BUNDLING=false
64666    elif  test "x$enable_libffi_bundling" = "xyes"; then
64667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64668$as_echo "yes, forced" >&6; }
64669      ENABLE_LIBFFI_BUNDLING=true
64670    else
64671      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
64672    fi
64673
64674    # Find the libffi.so.X to bundle
64675    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
64676      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
64677$as_echo_n "checking for libffi lib file location... " >&6; }
64678      if test "x${LIBFFI_LIB_PATH}" != x; then
64679        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
64680          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
64681        else
64682          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
64683        fi
64684      else
64685        # If we don't have an explicit path, look in a few obvious places
64686        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
64687          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64688            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64689          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
64690            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
64691          else
64692            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64693          fi
64694        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
64695          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
64696            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
64697          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
64698            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
64699          else
64700            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64701          fi
64702        else
64703          # Fallback on the default /usr/lib dir
64704          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64705            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64706          else
64707            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64708          fi
64709        fi
64710      fi
64711      # Make sure the wildcard is evaluated
64712      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64713      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64714$as_echo "${LIBFFI_LIB_FILE}" >&6; }
64715    fi
64716  fi
64717
64718
64719
64720
64721
64722
64723
64724  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64725    # Extract the first word of "llvm-config", so it can be a program name with args.
64726set dummy llvm-config; ac_word=$2
64727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64728$as_echo_n "checking for $ac_word... " >&6; }
64729if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64730  $as_echo_n "(cached) " >&6
64731else
64732  if test -n "$LLVM_CONFIG"; then
64733  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64734else
64735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64736for as_dir in $PATH
64737do
64738  IFS=$as_save_IFS
64739  test -z "$as_dir" && as_dir=.
64740    for ac_exec_ext in '' $ac_executable_extensions; do
64741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64742    ac_cv_prog_LLVM_CONFIG="llvm-config"
64743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64744    break 2
64745  fi
64746done
64747  done
64748IFS=$as_save_IFS
64749
64750fi
64751fi
64752LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64753if test -n "$LLVM_CONFIG"; then
64754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64755$as_echo "$LLVM_CONFIG" >&6; }
64756else
64757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64758$as_echo "no" >&6; }
64759fi
64760
64761
64762
64763    if test "x$LLVM_CONFIG" != xllvm-config; then
64764      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64765    fi
64766
64767    llvm_components="jit mcjit engine nativecodegen native"
64768    unset LLVM_CFLAGS
64769    for flag in $("$LLVM_CONFIG" --cxxflags); do
64770      if echo "${flag}" | grep -q '^-[ID]'; then
64771        if test "${flag}" != "-D_DEBUG" ; then
64772          if test "${LLVM_CFLAGS}" != "" ; then
64773            LLVM_CFLAGS="${LLVM_CFLAGS} "
64774          fi
64775          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64776        fi
64777      fi
64778    done
64779    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64780    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64781
64782    unset LLVM_LDFLAGS
64783    for flag in $("${LLVM_CONFIG}" --ldflags); do
64784      if echo "${flag}" | grep -q '^-L'; then
64785        if test "${LLVM_LDFLAGS}" != ""; then
64786          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64787        fi
64788        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64789      fi
64790    done
64791
64792    unset LLVM_LIBS
64793    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64794      if echo "${flag}" | grep -q '^-l'; then
64795        if test "${LLVM_LIBS}" != ""; then
64796          LLVM_LIBS="${LLVM_LIBS} "
64797        fi
64798        LLVM_LIBS="${LLVM_LIBS}${flag}"
64799      fi
64800    done
64801
64802    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64803    # always properly detect -ltinfo
64804    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64805
64806
64807
64808
64809  fi
64810
64811
64812
64813# Check whether --with-libjpeg was given.
64814if test "${with_libjpeg+set}" = set; then :
64815  withval=$with_libjpeg;
64816fi
64817
64818
64819  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64820$as_echo_n "checking for which libjpeg to use... " >&6; }
64821  # default is bundled
64822  DEFAULT_LIBJPEG=bundled
64823  # if user didn't specify, use DEFAULT_LIBJPEG
64824  if test "x${with_libjpeg}" = "x"; then
64825    with_libjpeg=${DEFAULT_LIBJPEG}
64826  fi
64827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64828$as_echo "${with_libjpeg}" >&6; }
64829
64830  if test "x${with_libjpeg}" = "xbundled"; then
64831    USE_EXTERNAL_LIBJPEG=false
64832  elif test "x${with_libjpeg}" = "xsystem"; then
64833    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64834if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64835
64836else
64837   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64838fi
64839
64840
64841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64842$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64843if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64844  $as_echo_n "(cached) " >&6
64845else
64846  ac_check_lib_save_LIBS=$LIBS
64847LIBS="-ljpeg  $LIBS"
64848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64849/* end confdefs.h.  */
64850
64851/* Override any GCC internal prototype to avoid an error.
64852   Use char because int might match the return type of a GCC
64853   builtin and then its argument prototype would still apply.  */
64854#ifdef __cplusplus
64855extern "C"
64856#endif
64857char jpeg_CreateDecompress ();
64858int
64859main ()
64860{
64861return jpeg_CreateDecompress ();
64862  ;
64863  return 0;
64864}
64865_ACEOF
64866if ac_fn_cxx_try_link "$LINENO"; then :
64867  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64868else
64869  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64870fi
64871rm -f core conftest.err conftest.$ac_objext \
64872    conftest$ac_exeext conftest.$ac_ext
64873LIBS=$ac_check_lib_save_LIBS
64874fi
64875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64876$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64877if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64878  cat >>confdefs.h <<_ACEOF
64879#define HAVE_LIBJPEG 1
64880_ACEOF
64881
64882  LIBS="-ljpeg $LIBS"
64883
64884else
64885   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64886fi
64887
64888
64889    USE_EXTERNAL_LIBJPEG=true
64890  else
64891    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64892  fi
64893
64894
64895
64896
64897
64898# Check whether --with-giflib was given.
64899if test "${with_giflib+set}" = set; then :
64900  withval=$with_giflib;
64901fi
64902
64903
64904  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64905$as_echo_n "checking for which giflib to use... " >&6; }
64906  # default is bundled
64907  DEFAULT_GIFLIB=bundled
64908  # if user didn't specify, use DEFAULT_GIFLIB
64909  if test "x${with_giflib}" = "x"; then
64910    with_giflib=${DEFAULT_GIFLIB}
64911  fi
64912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64913$as_echo "${with_giflib}" >&6; }
64914
64915  if test "x${with_giflib}" = "xbundled"; then
64916    USE_EXTERNAL_LIBGIF=false
64917  elif test "x${with_giflib}" = "xsystem"; then
64918    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64919if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64920
64921else
64922   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64923fi
64924
64925
64926    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64927$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64928if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64929  $as_echo_n "(cached) " >&6
64930else
64931  ac_check_lib_save_LIBS=$LIBS
64932LIBS="-lgif  $LIBS"
64933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64934/* end confdefs.h.  */
64935
64936/* Override any GCC internal prototype to avoid an error.
64937   Use char because int might match the return type of a GCC
64938   builtin and then its argument prototype would still apply.  */
64939#ifdef __cplusplus
64940extern "C"
64941#endif
64942char DGifGetCode ();
64943int
64944main ()
64945{
64946return DGifGetCode ();
64947  ;
64948  return 0;
64949}
64950_ACEOF
64951if ac_fn_cxx_try_link "$LINENO"; then :
64952  ac_cv_lib_gif_DGifGetCode=yes
64953else
64954  ac_cv_lib_gif_DGifGetCode=no
64955fi
64956rm -f core conftest.err conftest.$ac_objext \
64957    conftest$ac_exeext conftest.$ac_ext
64958LIBS=$ac_check_lib_save_LIBS
64959fi
64960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64961$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64962if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64963  cat >>confdefs.h <<_ACEOF
64964#define HAVE_LIBGIF 1
64965_ACEOF
64966
64967  LIBS="-lgif $LIBS"
64968
64969else
64970   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64971fi
64972
64973
64974    USE_EXTERNAL_LIBGIF=true
64975  else
64976    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64977  fi
64978
64979
64980
64981
64982
64983# Check whether --with-libpng was given.
64984if test "${with_libpng+set}" = set; then :
64985  withval=$with_libpng;
64986fi
64987
64988
64989  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64990$as_echo_n "checking for which libpng to use... " >&6; }
64991
64992  # default is bundled
64993  DEFAULT_LIBPNG=bundled
64994  # if user didn't specify, use DEFAULT_LIBPNG
64995  if test "x${with_libpng}" = "x"; then
64996    with_libpng=${DEFAULT_LIBPNG}
64997  fi
64998
64999  if test "x${with_libpng}" = "xbundled"; then
65000    USE_EXTERNAL_LIBPNG=false
65001    PNG_CFLAGS=""
65002    PNG_LIBS=""
65003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65004$as_echo "bundled" >&6; }
65005  elif test "x${with_libpng}" = "xsystem"; then
65006
65007pkg_failed=no
65008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
65009$as_echo_n "checking for PNG... " >&6; }
65010
65011if test -n "$PNG_CFLAGS"; then
65012    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
65013 elif test -n "$PKG_CONFIG"; then
65014    if test -n "$PKG_CONFIG" && \
65015    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
65016  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
65017  ac_status=$?
65018  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65019  test $ac_status = 0; }; then
65020  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
65021else
65022  pkg_failed=yes
65023fi
65024 else
65025    pkg_failed=untried
65026fi
65027if test -n "$PNG_LIBS"; then
65028    pkg_cv_PNG_LIBS="$PNG_LIBS"
65029 elif test -n "$PKG_CONFIG"; then
65030    if test -n "$PKG_CONFIG" && \
65031    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
65032  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
65033  ac_status=$?
65034  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65035  test $ac_status = 0; }; then
65036  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
65037else
65038  pkg_failed=yes
65039fi
65040 else
65041    pkg_failed=untried
65042fi
65043
65044
65045
65046if test $pkg_failed = yes; then
65047
65048if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65049        _pkg_short_errors_supported=yes
65050else
65051        _pkg_short_errors_supported=no
65052fi
65053        if test $_pkg_short_errors_supported = yes; then
65054	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
65055        else
65056	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
65057        fi
65058	# Put the nasty error message in config.log where it belongs
65059	echo "$PNG_PKG_ERRORS" >&5
65060
65061	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65062$as_echo "no" >&6; }
65063                LIBPNG_FOUND=no
65064elif test $pkg_failed = untried; then
65065	LIBPNG_FOUND=no
65066else
65067	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
65068	PNG_LIBS=$pkg_cv_PNG_LIBS
65069        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65070$as_echo "yes" >&6; }
65071	LIBPNG_FOUND=yes
65072fi
65073    if test "x${LIBPNG_FOUND}" = "xyes"; then
65074      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
65075      USE_EXTERNAL_LIBPNG=true
65076      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65077$as_echo "system" >&6; }
65078    else
65079      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
65080$as_echo "system not found" >&6; }
65081      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
65082    fi
65083  else
65084    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
65085  fi
65086
65087
65088
65089
65090
65091
65092
65093# Check whether --with-zlib was given.
65094if test "${with_zlib+set}" = set; then :
65095  withval=$with_zlib;
65096fi
65097
65098
65099  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
65100$as_echo_n "checking for compress in -lz... " >&6; }
65101if ${ac_cv_lib_z_compress+:} false; then :
65102  $as_echo_n "(cached) " >&6
65103else
65104  ac_check_lib_save_LIBS=$LIBS
65105LIBS="-lz  $LIBS"
65106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65107/* end confdefs.h.  */
65108
65109/* Override any GCC internal prototype to avoid an error.
65110   Use char because int might match the return type of a GCC
65111   builtin and then its argument prototype would still apply.  */
65112#ifdef __cplusplus
65113extern "C"
65114#endif
65115char compress ();
65116int
65117main ()
65118{
65119return compress ();
65120  ;
65121  return 0;
65122}
65123_ACEOF
65124if ac_fn_cxx_try_link "$LINENO"; then :
65125  ac_cv_lib_z_compress=yes
65126else
65127  ac_cv_lib_z_compress=no
65128fi
65129rm -f core conftest.err conftest.$ac_objext \
65130    conftest$ac_exeext conftest.$ac_ext
65131LIBS=$ac_check_lib_save_LIBS
65132fi
65133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
65134$as_echo "$ac_cv_lib_z_compress" >&6; }
65135if test "x$ac_cv_lib_z_compress" = xyes; then :
65136   ZLIB_FOUND=yes
65137else
65138   ZLIB_FOUND=no
65139fi
65140
65141
65142  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
65143$as_echo_n "checking for which zlib to use... " >&6; }
65144
65145  DEFAULT_ZLIB=system
65146  if test "x$OPENJDK_TARGET_OS" = xwindows; then
65147    # On windows default is bundled...on others default is system
65148    DEFAULT_ZLIB=bundled
65149  fi
65150
65151  if test "x${ZLIB_FOUND}" != "xyes"; then
65152    # If we don't find any system...set default to bundled
65153    DEFAULT_ZLIB=bundled
65154  fi
65155
65156  # If user didn't specify, use DEFAULT_ZLIB
65157  if test "x${with_zlib}" = "x"; then
65158    with_zlib=${DEFAULT_ZLIB}
65159  fi
65160
65161  if test "x${with_zlib}" = "xbundled"; then
65162    USE_EXTERNAL_LIBZ=false
65163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65164$as_echo "bundled" >&6; }
65165  elif test "x${with_zlib}" = "xsystem"; then
65166    if test "x${ZLIB_FOUND}" = "xyes"; then
65167      USE_EXTERNAL_LIBZ=true
65168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65169$as_echo "system" >&6; }
65170    else
65171      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
65172$as_echo "system not found" >&6; }
65173      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
65174    fi
65175  else
65176    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
65177  fi
65178
65179
65180
65181
65182
65183# Check whether --with-lcms was given.
65184if test "${with_lcms+set}" = set; then :
65185  withval=$with_lcms;
65186fi
65187
65188
65189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
65190$as_echo_n "checking for which lcms to use... " >&6; }
65191
65192  DEFAULT_LCMS=bundled
65193  # If user didn't specify, use DEFAULT_LCMS
65194  if test "x${with_lcms}" = "x"; then
65195    with_lcms=${DEFAULT_LCMS}
65196  fi
65197
65198  if test "x${with_lcms}" = "xbundled"; then
65199    USE_EXTERNAL_LCMS=false
65200    LCMS_CFLAGS=""
65201    LCMS_LIBS=""
65202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65203$as_echo "bundled" >&6; }
65204  elif test "x${with_lcms}" = "xsystem"; then
65205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65206$as_echo "system" >&6; }
65207
65208pkg_failed=no
65209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
65210$as_echo_n "checking for LCMS... " >&6; }
65211
65212if test -n "$LCMS_CFLAGS"; then
65213    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
65214 elif test -n "$PKG_CONFIG"; then
65215    if test -n "$PKG_CONFIG" && \
65216    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65217  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65218  ac_status=$?
65219  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65220  test $ac_status = 0; }; then
65221  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
65222else
65223  pkg_failed=yes
65224fi
65225 else
65226    pkg_failed=untried
65227fi
65228if test -n "$LCMS_LIBS"; then
65229    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
65230 elif test -n "$PKG_CONFIG"; then
65231    if test -n "$PKG_CONFIG" && \
65232    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65233  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65234  ac_status=$?
65235  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65236  test $ac_status = 0; }; then
65237  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
65238else
65239  pkg_failed=yes
65240fi
65241 else
65242    pkg_failed=untried
65243fi
65244
65245
65246
65247if test $pkg_failed = yes; then
65248
65249if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65250        _pkg_short_errors_supported=yes
65251else
65252        _pkg_short_errors_supported=no
65253fi
65254        if test $_pkg_short_errors_supported = yes; then
65255	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
65256        else
65257	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
65258        fi
65259	# Put the nasty error message in config.log where it belongs
65260	echo "$LCMS_PKG_ERRORS" >&5
65261
65262	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65263$as_echo "no" >&6; }
65264                LCMS_FOUND=no
65265elif test $pkg_failed = untried; then
65266	LCMS_FOUND=no
65267else
65268	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
65269	LCMS_LIBS=$pkg_cv_LCMS_LIBS
65270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65271$as_echo "yes" >&6; }
65272	LCMS_FOUND=yes
65273fi
65274    if test "x${LCMS_FOUND}" = "xyes"; then
65275      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
65276      USE_EXTERNAL_LCMS=true
65277    else
65278      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
65279    fi
65280  else
65281    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
65282  fi
65283
65284
65285
65286
65287
65288
65289
65290
65291
65292
65293
65294
65295
65296  # Setup libm (the maths library)
65297  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
65298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
65299$as_echo_n "checking for cos in -lm... " >&6; }
65300if ${ac_cv_lib_m_cos+:} false; then :
65301  $as_echo_n "(cached) " >&6
65302else
65303  ac_check_lib_save_LIBS=$LIBS
65304LIBS="-lm  $LIBS"
65305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65306/* end confdefs.h.  */
65307
65308/* Override any GCC internal prototype to avoid an error.
65309   Use char because int might match the return type of a GCC
65310   builtin and then its argument prototype would still apply.  */
65311#ifdef __cplusplus
65312extern "C"
65313#endif
65314char cos ();
65315int
65316main ()
65317{
65318return cos ();
65319  ;
65320  return 0;
65321}
65322_ACEOF
65323if ac_fn_cxx_try_link "$LINENO"; then :
65324  ac_cv_lib_m_cos=yes
65325else
65326  ac_cv_lib_m_cos=no
65327fi
65328rm -f core conftest.err conftest.$ac_objext \
65329    conftest$ac_exeext conftest.$ac_ext
65330LIBS=$ac_check_lib_save_LIBS
65331fi
65332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
65333$as_echo "$ac_cv_lib_m_cos" >&6; }
65334if test "x$ac_cv_lib_m_cos" = xyes; then :
65335  cat >>confdefs.h <<_ACEOF
65336#define HAVE_LIBM 1
65337_ACEOF
65338
65339  LIBS="-lm $LIBS"
65340
65341else
65342
65343        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
65344$as_echo "$as_me: Maths library was not found" >&6;}
65345
65346fi
65347
65348    LIBM="-lm"
65349  else
65350    LIBM=""
65351  fi
65352
65353
65354  # Setup libdl (for dynamic library loading)
65355  save_LIBS="$LIBS"
65356  LIBS=""
65357  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
65358$as_echo_n "checking for dlopen in -ldl... " >&6; }
65359if ${ac_cv_lib_dl_dlopen+:} false; then :
65360  $as_echo_n "(cached) " >&6
65361else
65362  ac_check_lib_save_LIBS=$LIBS
65363LIBS="-ldl  $LIBS"
65364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65365/* end confdefs.h.  */
65366
65367/* Override any GCC internal prototype to avoid an error.
65368   Use char because int might match the return type of a GCC
65369   builtin and then its argument prototype would still apply.  */
65370#ifdef __cplusplus
65371extern "C"
65372#endif
65373char dlopen ();
65374int
65375main ()
65376{
65377return dlopen ();
65378  ;
65379  return 0;
65380}
65381_ACEOF
65382if ac_fn_cxx_try_link "$LINENO"; then :
65383  ac_cv_lib_dl_dlopen=yes
65384else
65385  ac_cv_lib_dl_dlopen=no
65386fi
65387rm -f core conftest.err conftest.$ac_objext \
65388    conftest$ac_exeext conftest.$ac_ext
65389LIBS=$ac_check_lib_save_LIBS
65390fi
65391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
65392$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
65393if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
65394  cat >>confdefs.h <<_ACEOF
65395#define HAVE_LIBDL 1
65396_ACEOF
65397
65398  LIBS="-ldl $LIBS"
65399
65400fi
65401
65402  LIBDL="$LIBS"
65403
65404  LIBS="$save_LIBS"
65405
65406  # Deprecated libraries, keep the flags for backwards compatibility
65407  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
65408
65409
65410# Check whether --with-dxsdk was given.
65411if test "${with_dxsdk+set}" = set; then :
65412  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
65413$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
65414fi
65415
65416
65417
65418
65419# Check whether --with-dxsdk-lib was given.
65420if test "${with_dxsdk_lib+set}" = set; then :
65421  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
65422$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
65423fi
65424
65425
65426
65427
65428# Check whether --with-dxsdk-include was given.
65429if test "${with_dxsdk_include+set}" = set; then :
65430  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
65431$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
65432fi
65433
65434
65435  fi
65436
65437  # Control if libzip can use mmap. Available for purposes of overriding.
65438  LIBZIP_CAN_USE_MMAP=true
65439
65440
65441
65442  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
65443    # Find the root of the Solaris Studio installation from the compiler path
65444    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
65445    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
65446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
65447$as_echo_n "checking for libstlport.so.1... " >&6; }
65448    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
65449      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
65450      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
65451    fi
65452    if test -f "$STLPORT_LIB"; then
65453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
65454$as_echo "yes, $STLPORT_LIB" >&6; }
65455
65456  # Only process if variable expands to non-empty
65457
65458  if test "x$STLPORT_LIB" != x; then
65459    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65460
65461  # Input might be given as Windows format, start by converting to
65462  # unix format.
65463  path="$STLPORT_LIB"
65464  new_path=`$CYGPATH -u "$path"`
65465
65466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65469  # "foo.exe" is OK but "foo" is an error.
65470  #
65471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
65472  # It is also a way to make sure we got the proper file name for the real test later on.
65473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65474  if test "x$test_shortpath" = x; then
65475    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65476$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65477    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
65478  fi
65479
65480  # Call helper function which possibly converts this using DOS-style short mode.
65481  # If so, the updated path is stored in $new_path.
65482
65483  input_path="$new_path"
65484  # Check if we need to convert this using DOS-style short mode. If the path
65485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65486  # take no chances and rewrite it.
65487  # Note: m4 eats our [], so we need to use [ and ] instead.
65488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65489  if test "x$has_forbidden_chars" != x; then
65490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65494      # Going to short mode and back again did indeed matter. Since short mode is
65495      # case insensitive, let's make it lowercase to improve readability.
65496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65497      # Now convert it back to Unix-style (cygpath)
65498      input_path=`$CYGPATH -u "$shortmode_path"`
65499      new_path="$input_path"
65500    fi
65501  fi
65502
65503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65504  if test "x$test_cygdrive_prefix" = x; then
65505    # As a simple fix, exclude /usr/bin since it's not a real path.
65506    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65508      # a path prefixed by /cygdrive for fixpath to work.
65509      new_path="$CYGWIN_ROOT_PATH$input_path"
65510    fi
65511  fi
65512
65513
65514  if test "x$path" != "x$new_path"; then
65515    STLPORT_LIB="$new_path"
65516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65517$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65518  fi
65519
65520    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65521
65522  path="$STLPORT_LIB"
65523  has_colon=`$ECHO $path | $GREP ^.:`
65524  new_path="$path"
65525  if test "x$has_colon" = x; then
65526    # Not in mixed or Windows style, start by that.
65527    new_path=`cmd //c echo $path`
65528  fi
65529
65530
65531  input_path="$new_path"
65532  # Check if we need to convert this using DOS-style short mode. If the path
65533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65534  # take no chances and rewrite it.
65535  # Note: m4 eats our [], so we need to use [ and ] instead.
65536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65537  if test "x$has_forbidden_chars" != x; then
65538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65540  fi
65541
65542
65543  windows_path="$new_path"
65544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65545    unix_path=`$CYGPATH -u "$windows_path"`
65546    new_path="$unix_path"
65547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65549    new_path="$unix_path"
65550  fi
65551
65552  if test "x$path" != "x$new_path"; then
65553    STLPORT_LIB="$new_path"
65554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65555$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65556  fi
65557
65558  # Save the first 10 bytes of this path to the storage, so fixpath can work.
65559  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65560
65561    else
65562      # We're on a unix platform. Hooray! :)
65563      path="$STLPORT_LIB"
65564      has_space=`$ECHO "$path" | $GREP " "`
65565      if test "x$has_space" != x; then
65566        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65567$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65568        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65569      fi
65570
65571      # Use eval to expand a potential ~
65572      eval path="$path"
65573      if test ! -f "$path" && test ! -d "$path"; then
65574        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
65575      fi
65576
65577      if test -d "$path"; then
65578        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
65579      else
65580        dir="`$DIRNAME "$path"`"
65581        base="`$BASENAME "$path"`"
65582        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
65583      fi
65584    fi
65585  fi
65586
65587    else
65588      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
65589$as_echo "no, not found at $STLPORT_LIB" >&6; }
65590      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
65591    fi
65592
65593  fi
65594
65595
65596
65597
65598
65599
65600
65601
65602
65603
65604
65605
65606
65607
65608# Hotspot setup depends on lib checks (AOT needs libelf).
65609
65610
65611  # The user can in some cases supply additional jvm features. For the custom
65612  # variant, this defines the entire variant.
65613
65614# Check whether --with-jvm-features was given.
65615if test "${with_jvm_features+set}" = set; then :
65616  withval=$with_jvm_features;
65617fi
65618
65619  if test "x$with_jvm_features" != x; then
65620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65621$as_echo_n "checking additional JVM features... " >&6; }
65622    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65624$as_echo "$JVM_FEATURES" >&6; }
65625  fi
65626
65627  # Override hotspot cpu definitions for ARM platforms
65628  if test "x$OPENJDK_TARGET_CPU" = xarm; then
65629    HOTSPOT_TARGET_CPU=arm_32
65630    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65631    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65632    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65633  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65634    HOTSPOT_TARGET_CPU=arm_64
65635    HOTSPOT_TARGET_CPU_ARCH=arm
65636    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65637    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65638  fi
65639
65640  # Verify that dependencies are met for explicitly set features.
65641  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65642    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65643  fi
65644
65645  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65646    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65647  fi
65648
65649  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65650    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65651  fi
65652
65653  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65654    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65655  fi
65656
65657  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65658    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65659  fi
65660
65661  # Turn on additional features based on other parts of configure
65662  if test "x$INCLUDE_DTRACE" = "xtrue"; then
65663    JVM_FEATURES="$JVM_FEATURES dtrace"
65664  else
65665    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65666      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65667    fi
65668  fi
65669
65670  if test "x$STATIC_BUILD" = "xtrue"; then
65671    JVM_FEATURES="$JVM_FEATURES static-build"
65672  else
65673    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65674      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65675    fi
65676  fi
65677
65678  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65679    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65680      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65681    fi
65682  fi
65683
65684  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65685    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65686      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65687    fi
65688  fi
65689
65690  # Only enable jvmci on x86_64, sparcv9 and aarch64.
65691  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65692     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65693     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65694    JVM_FEATURES_jvmci="jvmci"
65695  else
65696    JVM_FEATURES_jvmci=""
65697  fi
65698
65699  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65700$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65701  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65702    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65703$as_echo "yes, forced" >&6; }
65704    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65705      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65706    fi
65707    INCLUDE_GRAAL="true"
65708  else
65709    # By default enable graal build where AOT is available
65710    if test "x$ENABLE_AOT" = "xtrue"; then
65711      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65712$as_echo "yes" >&6; }
65713      JVM_FEATURES_graal="graal"
65714      INCLUDE_GRAAL="true"
65715    else
65716      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65717$as_echo "no" >&6; }
65718      JVM_FEATURES_graal=""
65719      INCLUDE_GRAAL="false"
65720    fi
65721  fi
65722
65723
65724
65725  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65726$as_echo_n "checking if aot should be enabled... " >&6; }
65727  if test "x$ENABLE_AOT" = "xtrue"; then
65728    if test "x$enable_aot" = "xyes"; then
65729      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65730$as_echo "yes, forced" >&6; }
65731    else
65732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65733$as_echo "yes" >&6; }
65734    fi
65735    JVM_FEATURES_aot="aot"
65736  else
65737    if test "x$enable_aot" = "xno"; then
65738      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65739$as_echo "no, forced" >&6; }
65740    else
65741      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65742$as_echo "no" >&6; }
65743    fi
65744    JVM_FEATURES_aot=""
65745  fi
65746
65747  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65748    # Default to use link time optimizations on minimal on arm
65749    JVM_FEATURES_link_time_opt="link-time-opt"
65750  else
65751    JVM_FEATURES_link_time_opt=""
65752  fi
65753
65754  # All variants but minimal (and custom) get these features
65755  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65756
65757  # Enable features depending on variant.
65758  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65759  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65760  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65761  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65762  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65763  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65764  JVM_FEATURES_custom="$JVM_FEATURES"
65765
65766
65767
65768
65769
65770
65771
65772
65773
65774  # Used for verification of Makefiles by check-jvm-feature
65775
65776
65777  # We don't support --with-jvm-interpreter anymore, use zero instead.
65778
65779
65780# Check whether --with-jvm-interpreter was given.
65781if test "${with_jvm_interpreter+set}" = set; then :
65782  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65783$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65784fi
65785
65786
65787
65788
65789###############################################################################
65790#
65791# We need to do some final tweaking, when everything else is done.
65792#
65793###############################################################################
65794
65795
65796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65797$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65798
65799  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65800    ENABLE_INTREE_EC=true
65801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65802$as_echo "yes" >&6; }
65803  else
65804    ENABLE_INTREE_EC=false
65805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65806$as_echo "no" >&6; }
65807  fi
65808
65809
65810
65811
65812  # Check whether --enable-jtreg-failure-handler was given.
65813if test "${enable_jtreg_failure_handler+set}" = set; then :
65814  enableval=$enable_jtreg_failure_handler;
65815fi
65816
65817
65818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65819$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65820
65821  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65822    if test "x$JT_HOME" = "x"; then
65823      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65824    else
65825      BUILD_FAILURE_HANDLER=true
65826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65827$as_echo "yes, forced" >&6; }
65828    fi
65829  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65830    BUILD_FAILURE_HANDLER=false
65831    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65832$as_echo "no, forced" >&6; }
65833  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65834      || test "x$enable_jtreg_failure_handler" = "x"; then
65835    if test "x$JT_HOME" = "x"; then
65836      BUILD_FAILURE_HANDLER=false
65837      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65838$as_echo "no, missing jtreg" >&6; }
65839    else
65840      BUILD_FAILURE_HANDLER=true
65841      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65842$as_echo "yes, jtreg present" >&6; }
65843    fi
65844  else
65845    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65846  fi
65847
65848
65849
65850
65851  # Check whether --enable-generate-classlist was given.
65852if test "${enable_generate_classlist+set}" = set; then :
65853  enableval=$enable_generate_classlist;
65854fi
65855
65856
65857  # Check if it's likely that it's possible to generate the classlist. Depending
65858  # on exact jvm configuration it could be possible anyway.
65859  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65860    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65861  else
65862    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65863  fi
65864
65865  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65866$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65867  if test "x$enable_generate_classlist" = "xyes"; then
65868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65869$as_echo "yes, forced" >&6; }
65870    ENABLE_GENERATE_CLASSLIST="true"
65871    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65872      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65873$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65874    fi
65875  elif test "x$enable_generate_classlist" = "xno"; then
65876    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65877$as_echo "no, forced" >&6; }
65878    ENABLE_GENERATE_CLASSLIST="false"
65879  elif test "x$enable_generate_classlist" = "x"; then
65880    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65881      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65882$as_echo "yes" >&6; }
65883      ENABLE_GENERATE_CLASSLIST="true"
65884    else
65885      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65886$as_echo "no" >&6; }
65887      ENABLE_GENERATE_CLASSLIST="false"
65888    fi
65889  else
65890    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65891  fi
65892
65893
65894
65895
65896###############################################################################
65897#
65898# Configure parts of the build that only affect the build performance,
65899# not the result.
65900#
65901###############################################################################
65902
65903
65904  # How many cores do we have on this build system?
65905
65906# Check whether --with-num-cores was given.
65907if test "${with_num_cores+set}" = set; then :
65908  withval=$with_num_cores;
65909fi
65910
65911  if test "x$with_num_cores" = x; then
65912    # The number of cores were not specified, try to probe them.
65913
65914  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
65915$as_echo_n "checking for number of cores... " >&6; }
65916  NUM_CORES=1
65917  FOUND_CORES=no
65918
65919  if test -f /proc/cpuinfo; then
65920    # Looks like a Linux (or cygwin) system
65921    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
65922    FOUND_CORES=yes
65923  elif test -x /usr/sbin/psrinfo; then
65924    # Looks like a Solaris system
65925    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
65926    FOUND_CORES=yes
65927  elif test -x /usr/sbin/sysctl; then
65928    # Looks like a MacOSX system
65929    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
65930    FOUND_CORES=yes
65931  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
65932    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
65933    FOUND_CORES=yes
65934  elif test -n "$NUMBER_OF_PROCESSORS"; then
65935    # On windows, look in the env
65936    NUM_CORES=$NUMBER_OF_PROCESSORS
65937    FOUND_CORES=yes
65938  fi
65939
65940  if test "x$FOUND_CORES" = xyes; then
65941    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
65942$as_echo "$NUM_CORES" >&6; }
65943  else
65944    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
65945$as_echo "could not detect number of cores, defaulting to 1" >&6; }
65946    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
65947$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
65948  fi
65949
65950  else
65951    NUM_CORES=$with_num_cores
65952  fi
65953
65954
65955
65956  # How much memory do we have on this build system?
65957
65958# Check whether --with-memory-size was given.
65959if test "${with_memory_size+set}" = set; then :
65960  withval=$with_memory_size;
65961fi
65962
65963  if test "x$with_memory_size" = x; then
65964    # The memory size was not specified, try to probe it.
65965
65966  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
65967$as_echo_n "checking for memory size... " >&6; }
65968  # Default to 1024 MB
65969  MEMORY_SIZE=1024
65970  FOUND_MEM=no
65971
65972  if test -f /proc/meminfo; then
65973    # Looks like a Linux (or cygwin) system
65974    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
65975    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
65976    FOUND_MEM=yes
65977  elif test -x /usr/sbin/prtconf; then
65978    # Looks like a Solaris or AIX system
65979    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
65980    FOUND_MEM=yes
65981  elif test -x /usr/sbin/sysctl; then
65982    # Looks like a MacOSX system
65983    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
65984    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65985    FOUND_MEM=yes
65986  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
65987    # Windows, but without cygwin
65988    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
65989    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65990    FOUND_MEM=yes
65991  fi
65992
65993  if test "x$FOUND_MEM" = xyes; then
65994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
65995$as_echo "$MEMORY_SIZE MB" >&6; }
65996  else
65997    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
65998$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
65999    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
66000$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
66001  fi
66002
66003  else
66004    MEMORY_SIZE=$with_memory_size
66005  fi
66006
66007
66008
66009  # Provide a decent default number of parallel jobs for make depending on
66010  # number of cores, amount of memory and machine architecture.
66011
66012# Check whether --with-jobs was given.
66013if test "${with_jobs+set}" = set; then :
66014  withval=$with_jobs;
66015fi
66016
66017  if test "x$with_jobs" = x; then
66018    # Number of jobs was not specified, calculate.
66019    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
66020$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
66021    # Approximate memory in GB.
66022    memory_gb=`expr $MEMORY_SIZE / 1024`
66023    # Pick the lowest of memory in gb and number of cores.
66024    if test "$memory_gb" -lt "$NUM_CORES"; then
66025      JOBS="$memory_gb"
66026    else
66027      JOBS="$NUM_CORES"
66028    fi
66029    if test "$JOBS" -eq "0"; then
66030      JOBS=1
66031    fi
66032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
66033$as_echo "$JOBS" >&6; }
66034  else
66035    JOBS=$with_jobs
66036  fi
66037
66038
66039
66040  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
66041
66042# Check whether --with-test-jobs was given.
66043if test "${with_test_jobs+set}" = set; then :
66044  withval=$with_test_jobs;
66045fi
66046
66047  if test "x$with_test_jobs" = x; then
66048      TEST_JOBS=0
66049  else
66050      TEST_JOBS=$with_test_jobs
66051  fi
66052
66053
66054
66055# Setup arguments for the boot jdk (after cores and memory have been setup)
66056
66057  ##############################################################################
66058  #
66059  # Specify jvm options for anything that is run with the Boot JDK.
66060  # Not all JVM:s accept the same arguments on the command line.
66061  #
66062
66063# Check whether --with-boot-jdk-jvmargs was given.
66064if test "${with_boot_jdk_jvmargs+set}" = set; then :
66065  withval=$with_boot_jdk_jvmargs;
66066fi
66067
66068
66069  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
66070$as_echo_n "checking flags for boot jdk java command ... " >&6; }
66071
66072  # Disable special log output when a debug build is used as Boot JDK...
66073
66074  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
66075  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
66076  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
66077  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66078  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66079  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66080    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
66081    JVM_ARG_OK=true
66082  else
66083    $ECHO "Arg failed:" >&5
66084    $ECHO "$OUTPUT" >&5
66085    JVM_ARG_OK=false
66086  fi
66087
66088
66089  # Force en-US environment
66090
66091  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
66092  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
66093  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
66094  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66095  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66096  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66097    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
66098    JVM_ARG_OK=true
66099  else
66100    $ECHO "Arg failed:" >&5
66101    $ECHO "$OUTPUT" >&5
66102    JVM_ARG_OK=false
66103  fi
66104
66105
66106  # Apply user provided options.
66107
66108  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
66109  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
66110  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
66111  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66112  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66113  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66114    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
66115    JVM_ARG_OK=true
66116  else
66117    $ECHO "Arg failed:" >&5
66118    $ECHO "$OUTPUT" >&5
66119    JVM_ARG_OK=false
66120  fi
66121
66122
66123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
66124$as_echo "$boot_jdk_jvmargs" >&6; }
66125
66126  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
66127  JAVA_FLAGS=$boot_jdk_jvmargs
66128
66129
66130
66131  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
66132$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
66133
66134  # Starting amount of heap memory.
66135
66136  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
66137  $ECHO "Command: $JAVA -Xms64M -version" >&5
66138  OUTPUT=`$JAVA -Xms64M -version 2>&1`
66139  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66140  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66141  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66142    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
66143    JVM_ARG_OK=true
66144  else
66145    $ECHO "Arg failed:" >&5
66146    $ECHO "$OUTPUT" >&5
66147    JVM_ARG_OK=false
66148  fi
66149
66150  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
66151
66152  # Maximum amount of heap memory and stack size.
66153  JVM_HEAP_LIMIT_32="1024"
66154  # Running a 64 bit JVM allows for and requires a bigger heap
66155  JVM_HEAP_LIMIT_64="1600"
66156  STACK_SIZE_32=768
66157  STACK_SIZE_64=1536
66158  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
66159  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
66160    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
66161  fi
66162  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
66163    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
66164  fi
66165  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
66166    JVM_HEAP_LIMIT_32=512
66167    JVM_HEAP_LIMIT_64=512
66168  fi
66169
66170  if test "x$BOOT_JDK_BITS" = "x32"; then
66171    STACK_SIZE=$STACK_SIZE_32
66172    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
66173  else
66174    STACK_SIZE=$STACK_SIZE_64
66175    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
66176  fi
66177
66178  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
66179  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
66180  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
66181  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66182  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66183  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66184    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
66185    JVM_ARG_OK=true
66186  else
66187    $ECHO "Arg failed:" >&5
66188    $ECHO "$OUTPUT" >&5
66189    JVM_ARG_OK=false
66190  fi
66191
66192
66193  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
66194  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
66195  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
66196  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66197  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66198  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66199    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
66200    JVM_ARG_OK=true
66201  else
66202    $ECHO "Arg failed:" >&5
66203    $ECHO "$OUTPUT" >&5
66204    JVM_ARG_OK=false
66205  fi
66206
66207
66208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
66209$as_echo "$boot_jdk_jvmargs_big" >&6; }
66210
66211  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
66212
66213
66214  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
66215    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
66216    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
66217  else
66218    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
66219    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
66220  fi
66221  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
66222  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
66223  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
66224$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
66225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
66226$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
66227
66228
66229  # By default, the main javac compilations use big
66230  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
66231
66232
66233  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
66234$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
66235
66236  # Use serial gc for small short lived tools if possible
66237
66238  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
66239  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
66240  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
66241  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66242  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66243  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66244    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
66245    JVM_ARG_OK=true
66246  else
66247    $ECHO "Arg failed:" >&5
66248    $ECHO "$OUTPUT" >&5
66249    JVM_ARG_OK=false
66250  fi
66251
66252
66253  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
66254  $ECHO "Command: $JAVA -Xms32M -version" >&5
66255  OUTPUT=`$JAVA -Xms32M -version 2>&1`
66256  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66257  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66258  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66259    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
66260    JVM_ARG_OK=true
66261  else
66262    $ECHO "Arg failed:" >&5
66263    $ECHO "$OUTPUT" >&5
66264    JVM_ARG_OK=false
66265  fi
66266
66267
66268  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
66269  $ECHO "Command: $JAVA -Xmx512M -version" >&5
66270  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
66271  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66272  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66273  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66274    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
66275    JVM_ARG_OK=true
66276  else
66277    $ECHO "Arg failed:" >&5
66278    $ECHO "$OUTPUT" >&5
66279    JVM_ARG_OK=false
66280  fi
66281
66282
66283  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
66284  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
66285  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
66286  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66287  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66288  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66289    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
66290    JVM_ARG_OK=true
66291  else
66292    $ECHO "Arg failed:" >&5
66293    $ECHO "$OUTPUT" >&5
66294    JVM_ARG_OK=false
66295  fi
66296
66297
66298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
66299$as_echo "$boot_jdk_jvmargs_small" >&6; }
66300
66301  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
66302
66303
66304  JAVA_TOOL_FLAGS_SMALL=""
66305  for f in $JAVA_FLAGS_SMALL; do
66306    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
66307  done
66308
66309
66310
66311# Setup smart javac (after cores and memory have been setup)
66312
66313
66314# Check whether --with-sjavac-server-java was given.
66315if test "${with_sjavac_server_java+set}" = set; then :
66316  withval=$with_sjavac_server_java;
66317fi
66318
66319
66320  if test "x$with_sjavac_server_java" != x; then
66321    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
66322    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
66323    if test "x$FOUND_VERSION" = x; then
66324      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
66325    fi
66326  else
66327    SJAVAC_SERVER_JAVA="$JAVA"
66328  fi
66329
66330
66331  if test "$MEMORY_SIZE" -gt "3000"; then
66332    if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
66333      JVM_64BIT=true
66334    fi
66335  fi
66336
66337  MX_VALUE=`expr $MEMORY_SIZE / 2`
66338  if test "$JVM_64BIT" = true; then
66339    # Set ms lower than mx since more than one instance of the server might
66340    # get launched at the same time before they figure out which instance won.
66341    MS_VALUE=512
66342    if test "$MX_VALUE" -gt "2048"; then
66343      MX_VALUE=2048
66344    fi
66345  else
66346    MS_VALUE=256
66347    if test "$MX_VALUE" -gt "1500"; then
66348      MX_VALUE=1500
66349    fi
66350  fi
66351  if test "$MX_VALUE" -lt "512"; then
66352    MX_VALUE=512
66353  fi
66354
66355  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
66356  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
66357  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
66358  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66359  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66360  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66361    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
66362    JVM_ARG_OK=true
66363  else
66364    $ECHO "Arg failed:" >&5
66365    $ECHO "$OUTPUT" >&5
66366    JVM_ARG_OK=false
66367  fi
66368
66369
66370
66371  # Check whether --enable-sjavac was given.
66372if test "${enable_sjavac+set}" = set; then :
66373  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
66374else
66375  ENABLE_SJAVAC="no"
66376fi
66377
66378  if test "x$JVM_ARG_OK" = "xfalse"; then
66379    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
66380$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
66381    ENABLE_SJAVAC="no"
66382  fi
66383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
66384$as_echo_n "checking whether to use sjavac... " >&6; }
66385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
66386$as_echo "$ENABLE_SJAVAC" >&6; }
66387
66388
66389  # Check whether --enable-javac-server was given.
66390if test "${enable_javac_server+set}" = set; then :
66391  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
66392else
66393  ENABLE_JAVAC_SERVER="yes"
66394fi
66395
66396  if test "x$JVM_ARG_OK" = "xfalse"; then
66397    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
66398$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
66399    ENABLE_JAVAC_SERVER="no"
66400  fi
66401  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
66402$as_echo_n "checking whether to use javac server... " >&6; }
66403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
66404$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
66405
66406
66407  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
66408    # When using a server javac, the small client instances do not need much
66409    # resources.
66410    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
66411  fi
66412
66413
66414# Setup use of icecc if requested
66415
66416  # Check whether --enable-icecc was given.
66417if test "${enable_icecc+set}" = set; then :
66418  enableval=$enable_icecc;
66419fi
66420
66421
66422  if test "x${enable_icecc}" = "xyes"; then
66423
66424
66425
66426  # Publish this variable in the help.
66427
66428
66429  if [ -z "${ICECC_CMD+x}" ]; then
66430    # The variable is not set by user, try to locate tool using the code snippet
66431    for ac_prog in icecc
66432do
66433  # Extract the first word of "$ac_prog", so it can be a program name with args.
66434set dummy $ac_prog; ac_word=$2
66435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66436$as_echo_n "checking for $ac_word... " >&6; }
66437if ${ac_cv_path_ICECC_CMD+:} false; then :
66438  $as_echo_n "(cached) " >&6
66439else
66440  case $ICECC_CMD in
66441  [\\/]* | ?:[\\/]*)
66442  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66443  ;;
66444  *)
66445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66446for as_dir in $PATH
66447do
66448  IFS=$as_save_IFS
66449  test -z "$as_dir" && as_dir=.
66450    for ac_exec_ext in '' $ac_executable_extensions; do
66451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66452    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66454    break 2
66455  fi
66456done
66457  done
66458IFS=$as_save_IFS
66459
66460  ;;
66461esac
66462fi
66463ICECC_CMD=$ac_cv_path_ICECC_CMD
66464if test -n "$ICECC_CMD"; then
66465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66466$as_echo "$ICECC_CMD" >&6; }
66467else
66468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66469$as_echo "no" >&6; }
66470fi
66471
66472
66473  test -n "$ICECC_CMD" && break
66474done
66475
66476  else
66477    # The variable is set, but is it from the command line or the environment?
66478
66479    # Try to remove the string !ICECC_CMD! from our list.
66480    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
66481    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66482      # If it failed, the variable was not from the command line. Ignore it,
66483      # but warn the user (except for BASH, which is always set by the calling BASH).
66484      if test "xICECC_CMD" != xBASH; then
66485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
66486$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
66487      fi
66488      # Try to locate tool using the code snippet
66489      for ac_prog in icecc
66490do
66491  # Extract the first word of "$ac_prog", so it can be a program name with args.
66492set dummy $ac_prog; ac_word=$2
66493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66494$as_echo_n "checking for $ac_word... " >&6; }
66495if ${ac_cv_path_ICECC_CMD+:} false; then :
66496  $as_echo_n "(cached) " >&6
66497else
66498  case $ICECC_CMD in
66499  [\\/]* | ?:[\\/]*)
66500  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66501  ;;
66502  *)
66503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66504for as_dir in $PATH
66505do
66506  IFS=$as_save_IFS
66507  test -z "$as_dir" && as_dir=.
66508    for ac_exec_ext in '' $ac_executable_extensions; do
66509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66510    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66512    break 2
66513  fi
66514done
66515  done
66516IFS=$as_save_IFS
66517
66518  ;;
66519esac
66520fi
66521ICECC_CMD=$ac_cv_path_ICECC_CMD
66522if test -n "$ICECC_CMD"; then
66523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66524$as_echo "$ICECC_CMD" >&6; }
66525else
66526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66527$as_echo "no" >&6; }
66528fi
66529
66530
66531  test -n "$ICECC_CMD" && break
66532done
66533
66534    else
66535      # If it succeeded, then it was overridden by the user. We will use it
66536      # for the tool.
66537
66538      # First remove it from the list of overridden variables, so we can test
66539      # for unknown variables in the end.
66540      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66541
66542      # Check if we try to supply an empty value
66543      if test "x$ICECC_CMD" = x; then
66544        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
66545$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
66546        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66547$as_echo_n "checking for ICECC_CMD... " >&6; }
66548        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66549$as_echo "disabled" >&6; }
66550      else
66551        # Check if the provided tool contains a complete path.
66552        tool_specified="$ICECC_CMD"
66553        tool_basename="${tool_specified##*/}"
66554        if test "x$tool_basename" = "x$tool_specified"; then
66555          # A command without a complete path is provided, search $PATH.
66556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
66557$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
66558          # Extract the first word of "$tool_basename", so it can be a program name with args.
66559set dummy $tool_basename; ac_word=$2
66560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66561$as_echo_n "checking for $ac_word... " >&6; }
66562if ${ac_cv_path_ICECC_CMD+:} false; then :
66563  $as_echo_n "(cached) " >&6
66564else
66565  case $ICECC_CMD in
66566  [\\/]* | ?:[\\/]*)
66567  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66568  ;;
66569  *)
66570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66571for as_dir in $PATH
66572do
66573  IFS=$as_save_IFS
66574  test -z "$as_dir" && as_dir=.
66575    for ac_exec_ext in '' $ac_executable_extensions; do
66576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66577    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66579    break 2
66580  fi
66581done
66582  done
66583IFS=$as_save_IFS
66584
66585  ;;
66586esac
66587fi
66588ICECC_CMD=$ac_cv_path_ICECC_CMD
66589if test -n "$ICECC_CMD"; then
66590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66591$as_echo "$ICECC_CMD" >&6; }
66592else
66593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66594$as_echo "no" >&6; }
66595fi
66596
66597
66598          if test "x$ICECC_CMD" = x; then
66599            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66600          fi
66601        else
66602          # Otherwise we believe it is a complete path. Use it as it is.
66603          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
66604$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
66605          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66606$as_echo_n "checking for ICECC_CMD... " >&6; }
66607          if test ! -x "$tool_specified"; then
66608            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66609$as_echo "not found" >&6; }
66610            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66611          fi
66612          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66613$as_echo "$tool_specified" >&6; }
66614        fi
66615      fi
66616    fi
66617
66618  fi
66619
66620
66621
66622  if test "x$ICECC_CMD" = x; then
66623    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66624  fi
66625
66626
66627    old_path="$PATH"
66628
66629    # Look for icecc-create-env in some known places
66630    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66631
66632
66633
66634  # Publish this variable in the help.
66635
66636
66637  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66638    # The variable is not set by user, try to locate tool using the code snippet
66639    for ac_prog in icecc-create-env
66640do
66641  # Extract the first word of "$ac_prog", so it can be a program name with args.
66642set dummy $ac_prog; ac_word=$2
66643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66644$as_echo_n "checking for $ac_word... " >&6; }
66645if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66646  $as_echo_n "(cached) " >&6
66647else
66648  case $ICECC_CREATE_ENV in
66649  [\\/]* | ?:[\\/]*)
66650  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66651  ;;
66652  *)
66653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66654for as_dir in $PATH
66655do
66656  IFS=$as_save_IFS
66657  test -z "$as_dir" && as_dir=.
66658    for ac_exec_ext in '' $ac_executable_extensions; do
66659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66660    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66662    break 2
66663  fi
66664done
66665  done
66666IFS=$as_save_IFS
66667
66668  ;;
66669esac
66670fi
66671ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66672if test -n "$ICECC_CREATE_ENV"; then
66673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66674$as_echo "$ICECC_CREATE_ENV" >&6; }
66675else
66676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66677$as_echo "no" >&6; }
66678fi
66679
66680
66681  test -n "$ICECC_CREATE_ENV" && break
66682done
66683
66684  else
66685    # The variable is set, but is it from the command line or the environment?
66686
66687    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66688    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66689    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66690      # If it failed, the variable was not from the command line. Ignore it,
66691      # but warn the user (except for BASH, which is always set by the calling BASH).
66692      if test "xICECC_CREATE_ENV" != xBASH; then
66693        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66694$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66695      fi
66696      # Try to locate tool using the code snippet
66697      for ac_prog in icecc-create-env
66698do
66699  # Extract the first word of "$ac_prog", so it can be a program name with args.
66700set dummy $ac_prog; ac_word=$2
66701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66702$as_echo_n "checking for $ac_word... " >&6; }
66703if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66704  $as_echo_n "(cached) " >&6
66705else
66706  case $ICECC_CREATE_ENV in
66707  [\\/]* | ?:[\\/]*)
66708  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66709  ;;
66710  *)
66711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66712for as_dir in $PATH
66713do
66714  IFS=$as_save_IFS
66715  test -z "$as_dir" && as_dir=.
66716    for ac_exec_ext in '' $ac_executable_extensions; do
66717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66718    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66720    break 2
66721  fi
66722done
66723  done
66724IFS=$as_save_IFS
66725
66726  ;;
66727esac
66728fi
66729ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66730if test -n "$ICECC_CREATE_ENV"; then
66731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66732$as_echo "$ICECC_CREATE_ENV" >&6; }
66733else
66734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66735$as_echo "no" >&6; }
66736fi
66737
66738
66739  test -n "$ICECC_CREATE_ENV" && break
66740done
66741
66742    else
66743      # If it succeeded, then it was overridden by the user. We will use it
66744      # for the tool.
66745
66746      # First remove it from the list of overridden variables, so we can test
66747      # for unknown variables in the end.
66748      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66749
66750      # Check if we try to supply an empty value
66751      if test "x$ICECC_CREATE_ENV" = x; then
66752        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66753$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66754        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66755$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66756        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66757$as_echo "disabled" >&6; }
66758      else
66759        # Check if the provided tool contains a complete path.
66760        tool_specified="$ICECC_CREATE_ENV"
66761        tool_basename="${tool_specified##*/}"
66762        if test "x$tool_basename" = "x$tool_specified"; then
66763          # A command without a complete path is provided, search $PATH.
66764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66765$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66766          # Extract the first word of "$tool_basename", so it can be a program name with args.
66767set dummy $tool_basename; ac_word=$2
66768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66769$as_echo_n "checking for $ac_word... " >&6; }
66770if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66771  $as_echo_n "(cached) " >&6
66772else
66773  case $ICECC_CREATE_ENV in
66774  [\\/]* | ?:[\\/]*)
66775  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66776  ;;
66777  *)
66778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66779for as_dir in $PATH
66780do
66781  IFS=$as_save_IFS
66782  test -z "$as_dir" && as_dir=.
66783    for ac_exec_ext in '' $ac_executable_extensions; do
66784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66785    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66787    break 2
66788  fi
66789done
66790  done
66791IFS=$as_save_IFS
66792
66793  ;;
66794esac
66795fi
66796ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66797if test -n "$ICECC_CREATE_ENV"; then
66798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66799$as_echo "$ICECC_CREATE_ENV" >&6; }
66800else
66801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66802$as_echo "no" >&6; }
66803fi
66804
66805
66806          if test "x$ICECC_CREATE_ENV" = x; then
66807            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66808          fi
66809        else
66810          # Otherwise we believe it is a complete path. Use it as it is.
66811          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66812$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66813          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66814$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66815          if test ! -x "$tool_specified"; then
66816            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66817$as_echo "not found" >&6; }
66818            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66819          fi
66820          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66821$as_echo "$tool_specified" >&6; }
66822        fi
66823      fi
66824    fi
66825
66826  fi
66827
66828
66829
66830  if test "x$ICECC_CREATE_ENV" = x; then
66831    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66832  fi
66833
66834
66835    # Use icecc-create-env to create a minimal compilation environment that can
66836    # be sent to the other hosts in the icecream cluster.
66837    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66838    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66839    # Older versions of icecc does not have the --gcc parameter
66840    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66841      icecc_gcc_arg="--gcc"
66842    fi
66843    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66844
66845  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66846      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66847          ${icecc_create_env_log} 2>&1 )
66848  if test "$?" != "0"; then
66849    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66850$as_echo "$as_me: icecc-create-env output:" >&6;}
66851    cat \
66852          ${icecc_create_env_log}
66853    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66854  fi
66855
66856    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66857      # For clang, the icecc compilerwrapper is needed. It usually resides next
66858      # to icecc-create-env.
66859
66860
66861
66862  # Publish this variable in the help.
66863
66864
66865  if [ -z "${ICECC_WRAPPER+x}" ]; then
66866    # The variable is not set by user, try to locate tool using the code snippet
66867    for ac_prog in compilerwrapper
66868do
66869  # Extract the first word of "$ac_prog", so it can be a program name with args.
66870set dummy $ac_prog; ac_word=$2
66871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66872$as_echo_n "checking for $ac_word... " >&6; }
66873if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66874  $as_echo_n "(cached) " >&6
66875else
66876  case $ICECC_WRAPPER in
66877  [\\/]* | ?:[\\/]*)
66878  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66879  ;;
66880  *)
66881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66882for as_dir in $PATH
66883do
66884  IFS=$as_save_IFS
66885  test -z "$as_dir" && as_dir=.
66886    for ac_exec_ext in '' $ac_executable_extensions; do
66887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66888    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66890    break 2
66891  fi
66892done
66893  done
66894IFS=$as_save_IFS
66895
66896  ;;
66897esac
66898fi
66899ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66900if test -n "$ICECC_WRAPPER"; then
66901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66902$as_echo "$ICECC_WRAPPER" >&6; }
66903else
66904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66905$as_echo "no" >&6; }
66906fi
66907
66908
66909  test -n "$ICECC_WRAPPER" && break
66910done
66911
66912  else
66913    # The variable is set, but is it from the command line or the environment?
66914
66915    # Try to remove the string !ICECC_WRAPPER! from our list.
66916    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
66917    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66918      # If it failed, the variable was not from the command line. Ignore it,
66919      # but warn the user (except for BASH, which is always set by the calling BASH).
66920      if test "xICECC_WRAPPER" != xBASH; then
66921        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
66922$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
66923      fi
66924      # Try to locate tool using the code snippet
66925      for ac_prog in compilerwrapper
66926do
66927  # Extract the first word of "$ac_prog", so it can be a program name with args.
66928set dummy $ac_prog; ac_word=$2
66929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66930$as_echo_n "checking for $ac_word... " >&6; }
66931if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66932  $as_echo_n "(cached) " >&6
66933else
66934  case $ICECC_WRAPPER in
66935  [\\/]* | ?:[\\/]*)
66936  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66937  ;;
66938  *)
66939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66940for as_dir in $PATH
66941do
66942  IFS=$as_save_IFS
66943  test -z "$as_dir" && as_dir=.
66944    for ac_exec_ext in '' $ac_executable_extensions; do
66945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66946    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66948    break 2
66949  fi
66950done
66951  done
66952IFS=$as_save_IFS
66953
66954  ;;
66955esac
66956fi
66957ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66958if test -n "$ICECC_WRAPPER"; then
66959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66960$as_echo "$ICECC_WRAPPER" >&6; }
66961else
66962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66963$as_echo "no" >&6; }
66964fi
66965
66966
66967  test -n "$ICECC_WRAPPER" && break
66968done
66969
66970    else
66971      # If it succeeded, then it was overridden by the user. We will use it
66972      # for the tool.
66973
66974      # First remove it from the list of overridden variables, so we can test
66975      # for unknown variables in the end.
66976      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66977
66978      # Check if we try to supply an empty value
66979      if test "x$ICECC_WRAPPER" = x; then
66980        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
66981$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
66982        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66983$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66985$as_echo "disabled" >&6; }
66986      else
66987        # Check if the provided tool contains a complete path.
66988        tool_specified="$ICECC_WRAPPER"
66989        tool_basename="${tool_specified##*/}"
66990        if test "x$tool_basename" = "x$tool_specified"; then
66991          # A command without a complete path is provided, search $PATH.
66992          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
66993$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
66994          # Extract the first word of "$tool_basename", so it can be a program name with args.
66995set dummy $tool_basename; ac_word=$2
66996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66997$as_echo_n "checking for $ac_word... " >&6; }
66998if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66999  $as_echo_n "(cached) " >&6
67000else
67001  case $ICECC_WRAPPER in
67002  [\\/]* | ?:[\\/]*)
67003  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67004  ;;
67005  *)
67006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67007for as_dir in $PATH
67008do
67009  IFS=$as_save_IFS
67010  test -z "$as_dir" && as_dir=.
67011    for ac_exec_ext in '' $ac_executable_extensions; do
67012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67013    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67015    break 2
67016  fi
67017done
67018  done
67019IFS=$as_save_IFS
67020
67021  ;;
67022esac
67023fi
67024ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67025if test -n "$ICECC_WRAPPER"; then
67026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67027$as_echo "$ICECC_WRAPPER" >&6; }
67028else
67029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67030$as_echo "no" >&6; }
67031fi
67032
67033
67034          if test "x$ICECC_WRAPPER" = x; then
67035            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67036          fi
67037        else
67038          # Otherwise we believe it is a complete path. Use it as it is.
67039          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
67040$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
67041          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
67042$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
67043          if test ! -x "$tool_specified"; then
67044            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67045$as_echo "not found" >&6; }
67046            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
67047          fi
67048          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67049$as_echo "$tool_specified" >&6; }
67050        fi
67051      fi
67052    fi
67053
67054  fi
67055
67056
67057
67058  if test "x$ICECC_WRAPPER" = x; then
67059    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
67060  fi
67061
67062
67063
67064  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67065      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
67066  if test "$?" != "0"; then
67067    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67068$as_echo "$as_me: icecc-create-env output:" >&6;}
67069    cat ${icecc_create_env_log}
67070    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67071  fi
67072
67073    else
67074      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
67075    fi
67076    PATH="$old_path"
67077    # The bundle with the compiler gets a name based on checksums. Parse log file
67078    # to find it.
67079    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
67080    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67081    if test ! -f ${ICECC_ENV_BUNDLE}; then
67082      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67083    fi
67084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
67085$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
67086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67087$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67088    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
67089
67090    if test "x${COMPILE_TYPE}" = "xcross"; then
67091      # If cross compiling, create a separate env package for the build compiler
67092      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
67093      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
67094      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
67095
67096  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67097      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
67098            ${icecc_create_env_log_build} 2>&1 )
67099  if test "$?" != "0"; then
67100    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67101$as_echo "$as_me: icecc-create-env output:" >&6;}
67102    cat \
67103            ${icecc_create_env_log_build}
67104    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67105  fi
67106
67107      elif test "x${BUILD_CC##*/}" = "xclang"; then
67108
67109  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67110      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
67111  if test "$?" != "0"; then
67112    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67113$as_echo "$as_me: icecc-create-env output:" >&6;}
67114    cat ${icecc_create_env_log_build}
67115    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67116  fi
67117
67118      else
67119        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
67120      fi
67121      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
67122      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67123      if test ! -f ${ICECC_ENV_BUNDLE}; then
67124        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67125      fi
67126      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
67127$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
67128      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67129$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67130      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
67131          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
67132    else
67133      BUILD_ICECC="${ICECC}"
67134    fi
67135
67136
67137  fi
67138
67139
67140# Can the C/C++ compiler use precompiled headers?
67141
67142
67143  ###############################################################################
67144  #
67145  # Can the C/C++ compiler use precompiled headers?
67146  #
67147  # Check whether --enable-precompiled-headers was given.
67148if test "${enable_precompiled_headers+set}" = set; then :
67149  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
67150else
67151  ENABLE_PRECOMPH=yes
67152fi
67153
67154
67155  USE_PRECOMPILED_HEADER=true
67156  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
67157$as_echo_n "checking If precompiled header is enabled... " >&6; }
67158  if test "x$ENABLE_PRECOMPH" = xno; then
67159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
67160$as_echo "no, forced" >&6; }
67161    USE_PRECOMPILED_HEADER=false
67162  elif test "x$ICECC" != "x"; then
67163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
67164$as_echo "no, does not work effectively with icecc" >&6; }
67165    USE_PRECOMPILED_HEADER=false
67166  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
67167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
67168$as_echo "no, does not work with Solaris Studio" >&6; }
67169    USE_PRECOMPILED_HEADER=false
67170  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
67171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
67172$as_echo "no, does not work with xlc" >&6; }
67173    USE_PRECOMPILED_HEADER=false
67174  else
67175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67176$as_echo "yes" >&6; }
67177  fi
67178
67179  if test "x$ENABLE_PRECOMPH" = xyes; then
67180    # Check that the compiler actually supports precomp headers.
67181    if test "x$TOOLCHAIN_TYPE" = xgcc; then
67182      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
67183$as_echo_n "checking that precompiled headers work... " >&6; }
67184      echo "int alfa();" > conftest.h
67185      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
67186      if test ! -f conftest.hpp.gch; then
67187        USE_PRECOMPILED_HEADER=false
67188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67189$as_echo "no" >&6; }
67190      else
67191        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67192$as_echo "yes" >&6; }
67193      fi
67194      $RM conftest.h conftest.hpp.gch
67195    fi
67196  fi
67197
67198
67199
67200
67201# Setup use of ccache, if available
67202
67203  # Check whether --enable-ccache was given.
67204if test "${enable_ccache+set}" = set; then :
67205  enableval=$enable_ccache;
67206fi
67207
67208
67209  CCACHE_STATUS=
67210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
67211$as_echo_n "checking is ccache enabled... " >&6; }
67212  if test "x$enable_ccache" = xyes; then
67213    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
67214      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67215$as_echo "yes" >&6; }
67216      OLD_PATH="$PATH"
67217      if test "x$TOOLCHAIN_PATH" != x; then
67218        PATH=$TOOLCHAIN_PATH:$PATH
67219      fi
67220
67221
67222
67223  # Publish this variable in the help.
67224
67225
67226  if [ -z "${CCACHE+x}" ]; then
67227    # The variable is not set by user, try to locate tool using the code snippet
67228    for ac_prog in ccache
67229do
67230  # Extract the first word of "$ac_prog", so it can be a program name with args.
67231set dummy $ac_prog; ac_word=$2
67232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67233$as_echo_n "checking for $ac_word... " >&6; }
67234if ${ac_cv_path_CCACHE+:} false; then :
67235  $as_echo_n "(cached) " >&6
67236else
67237  case $CCACHE in
67238  [\\/]* | ?:[\\/]*)
67239  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67240  ;;
67241  *)
67242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67243for as_dir in $PATH
67244do
67245  IFS=$as_save_IFS
67246  test -z "$as_dir" && as_dir=.
67247    for ac_exec_ext in '' $ac_executable_extensions; do
67248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67249    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67251    break 2
67252  fi
67253done
67254  done
67255IFS=$as_save_IFS
67256
67257  ;;
67258esac
67259fi
67260CCACHE=$ac_cv_path_CCACHE
67261if test -n "$CCACHE"; then
67262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67263$as_echo "$CCACHE" >&6; }
67264else
67265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67266$as_echo "no" >&6; }
67267fi
67268
67269
67270  test -n "$CCACHE" && break
67271done
67272
67273  else
67274    # The variable is set, but is it from the command line or the environment?
67275
67276    # Try to remove the string !CCACHE! from our list.
67277    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
67278    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67279      # If it failed, the variable was not from the command line. Ignore it,
67280      # but warn the user (except for BASH, which is always set by the calling BASH).
67281      if test "xCCACHE" != xBASH; then
67282        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
67283$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
67284      fi
67285      # Try to locate tool using the code snippet
67286      for ac_prog in ccache
67287do
67288  # Extract the first word of "$ac_prog", so it can be a program name with args.
67289set dummy $ac_prog; ac_word=$2
67290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67291$as_echo_n "checking for $ac_word... " >&6; }
67292if ${ac_cv_path_CCACHE+:} false; then :
67293  $as_echo_n "(cached) " >&6
67294else
67295  case $CCACHE in
67296  [\\/]* | ?:[\\/]*)
67297  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67298  ;;
67299  *)
67300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67301for as_dir in $PATH
67302do
67303  IFS=$as_save_IFS
67304  test -z "$as_dir" && as_dir=.
67305    for ac_exec_ext in '' $ac_executable_extensions; do
67306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67307    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67309    break 2
67310  fi
67311done
67312  done
67313IFS=$as_save_IFS
67314
67315  ;;
67316esac
67317fi
67318CCACHE=$ac_cv_path_CCACHE
67319if test -n "$CCACHE"; then
67320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67321$as_echo "$CCACHE" >&6; }
67322else
67323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67324$as_echo "no" >&6; }
67325fi
67326
67327
67328  test -n "$CCACHE" && break
67329done
67330
67331    else
67332      # If it succeeded, then it was overridden by the user. We will use it
67333      # for the tool.
67334
67335      # First remove it from the list of overridden variables, so we can test
67336      # for unknown variables in the end.
67337      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67338
67339      # Check if we try to supply an empty value
67340      if test "x$CCACHE" = x; then
67341        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
67342$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
67343        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67344$as_echo_n "checking for CCACHE... " >&6; }
67345        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67346$as_echo "disabled" >&6; }
67347      else
67348        # Check if the provided tool contains a complete path.
67349        tool_specified="$CCACHE"
67350        tool_basename="${tool_specified##*/}"
67351        if test "x$tool_basename" = "x$tool_specified"; then
67352          # A command without a complete path is provided, search $PATH.
67353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
67354$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
67355          # Extract the first word of "$tool_basename", so it can be a program name with args.
67356set dummy $tool_basename; ac_word=$2
67357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67358$as_echo_n "checking for $ac_word... " >&6; }
67359if ${ac_cv_path_CCACHE+:} false; then :
67360  $as_echo_n "(cached) " >&6
67361else
67362  case $CCACHE in
67363  [\\/]* | ?:[\\/]*)
67364  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67365  ;;
67366  *)
67367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67368for as_dir in $PATH
67369do
67370  IFS=$as_save_IFS
67371  test -z "$as_dir" && as_dir=.
67372    for ac_exec_ext in '' $ac_executable_extensions; do
67373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67374    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67376    break 2
67377  fi
67378done
67379  done
67380IFS=$as_save_IFS
67381
67382  ;;
67383esac
67384fi
67385CCACHE=$ac_cv_path_CCACHE
67386if test -n "$CCACHE"; then
67387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67388$as_echo "$CCACHE" >&6; }
67389else
67390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67391$as_echo "no" >&6; }
67392fi
67393
67394
67395          if test "x$CCACHE" = x; then
67396            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67397          fi
67398        else
67399          # Otherwise we believe it is a complete path. Use it as it is.
67400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
67401$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
67402          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67403$as_echo_n "checking for CCACHE... " >&6; }
67404          if test ! -x "$tool_specified"; then
67405            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67406$as_echo "not found" >&6; }
67407            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
67408          fi
67409          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67410$as_echo "$tool_specified" >&6; }
67411        fi
67412      fi
67413    fi
67414
67415  fi
67416
67417
67418
67419  if test "x$CCACHE" = x; then
67420    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
67421  fi
67422
67423
67424      PATH="$OLD_PATH"
67425      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
67426      CCACHE_STATUS="Active ($CCACHE_VERSION)"
67427    else
67428      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67429$as_echo "no" >&6; }
67430      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
67431$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
67432    fi
67433  elif test "x$enable_ccache" = xno; then
67434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
67435$as_echo "no, explicitly disabled" >&6; }
67436    CCACHE_STATUS="Disabled"
67437  elif test "x$enable_ccache" = x; then
67438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67439$as_echo "no" >&6; }
67440  else
67441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
67442$as_echo "unknown" >&6; }
67443    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
67444  fi
67445
67446
67447
67448# Check whether --with-ccache-dir was given.
67449if test "${with_ccache_dir+set}" = set; then :
67450  withval=$with_ccache_dir;
67451fi
67452
67453
67454  if test "x$with_ccache_dir" != x; then
67455    # When using a non home ccache directory, assume the use is to share ccache files
67456    # with other users. Thus change the umask.
67457    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
67458    if test "x$CCACHE" = x; then
67459      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
67460$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
67461    fi
67462  fi
67463
67464  if test "x$CCACHE" != x; then
67465
67466  if test "x$CCACHE" != x; then
67467    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
67468      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67469          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
67470      if test "x$HAS_BAD_CCACHE" != "x"; then
67471        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
67472      fi
67473    fi
67474    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
67475      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67476          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
67477      if test "x$HAS_BAD_CCACHE" != "x"; then
67478        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
67479      fi
67480      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
67481$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
67482      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
67483      PUSHED_FLAGS="$CXXFLAGS"
67484      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
67485      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67486/* end confdefs.h.  */
67487
67488int
67489main ()
67490{
67491
67492  ;
67493  return 0;
67494}
67495_ACEOF
67496if ac_fn_cxx_try_compile "$LINENO"; then :
67497  CC_KNOWS_CCACHE_TRICK=yes
67498else
67499  CC_KNOWS_CCACHE_TRICK=no
67500fi
67501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67502      CXXFLAGS="$PUSHED_FLAGS"
67503      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
67504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67505$as_echo "yes" >&6; }
67506        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
67507
67508        CCACHE_SLOPPINESS=pch_defines,time_macros
67509      else
67510        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67511$as_echo "no" >&6; }
67512        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
67513      fi
67514    fi
67515
67516    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
67517        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
67518
67519    if test "x$SET_CCACHE_DIR" != x; then
67520      mkdir -p $CCACHE_DIR > /dev/null 2>&1
67521      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
67522    fi
67523  fi
67524
67525  fi
67526
67527
67528###############################################################################
67529#
67530# And now the finish...
67531#
67532###############################################################################
67533
67534# Check for some common pitfalls
67535
67536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
67537    file_to_test="$SRC_ROOT/LICENSE"
67538    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
67539      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
67540    fi
67541  fi
67542
67543
67544  # Did user specify any unknown variables?
67545
67546  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
67547    # Replace the separating ! with spaces before presenting for end user.
67548    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
67549    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
67550$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
67551  fi
67552
67553
67554  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
67555$as_echo_n "checking if build directory is on local disk... " >&6; }
67556
67557  # df -l lists only local disks; if the given directory is not found then
67558  # a non-zero exit code is given
67559  if test "x$DF" = x; then
67560    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67561      # msys does not have df; use Windows "net use" instead.
67562      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
67563      if test "x$IS_NETWORK_DISK" = x; then
67564        OUTPUT_DIR_IS_LOCAL="yes"
67565      else
67566        OUTPUT_DIR_IS_LOCAL="no"
67567      fi
67568    else
67569      # No df here, say it's local
67570      OUTPUT_DIR_IS_LOCAL="yes"
67571    fi
67572  else
67573    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
67574      OUTPUT_DIR_IS_LOCAL="yes"
67575    else
67576      OUTPUT_DIR_IS_LOCAL="no"
67577    fi
67578  fi
67579
67580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
67581$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
67582
67583
67584
67585  # Check if the user has any old-style ALT_ variables set.
67586  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
67587
67588  # Before generating output files, test if they exist. If they do, this is a reconfigure.
67589  # Since we can't properly handle the dependencies for this, warn the user about the situation
67590  if test -e $OUTPUT_ROOT/spec.gmk; then
67591    IS_RECONFIGURE=yes
67592  else
67593    IS_RECONFIGURE=no
67594  fi
67595
67596
67597# At the end, call the custom hook. (Dummy macro if no custom sources available)
67598
67599
67600# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67601
67602  # Keep feature lists sorted and free of duplicates
67603  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67604  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67605  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67606  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67607  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67608  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67609  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67610
67611  # Validate features
67612  for variant in $JVM_VARIANTS; do
67613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67614$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67615    features_var_name=JVM_FEATURES_$variant
67616    JVM_FEATURES_TO_TEST=${!features_var_name}
67617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67618$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67619    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67620    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67621    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67622    if test "x$INVALID_FEATURES" != x; then
67623      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67624    fi
67625  done
67626
67627
67628# We're messing a bit with internal autoconf variables to put the config.status
67629# in the output directory instead of the current directory.
67630CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67631
67632# Create the actual output files. Now the main work of configure is done.
67633cat >confcache <<\_ACEOF
67634# This file is a shell script that caches the results of configure
67635# tests run on this system so they can be shared between configure
67636# scripts and configure runs, see configure's option --config-cache.
67637# It is not useful on other systems.  If it contains results you don't
67638# want to keep, you may remove or edit it.
67639#
67640# config.status only pays attention to the cache file if you give it
67641# the --recheck option to rerun configure.
67642#
67643# `ac_cv_env_foo' variables (set or unset) will be overridden when
67644# loading this file, other *unset* `ac_cv_foo' will be assigned the
67645# following values.
67646
67647_ACEOF
67648
67649# The following way of writing the cache mishandles newlines in values,
67650# but we know of no workaround that is simple, portable, and efficient.
67651# So, we kill variables containing newlines.
67652# Ultrix sh set writes to stderr and can't be redirected directly,
67653# and sets the high bit in the cache file unless we assign to the vars.
67654(
67655  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67656    eval ac_val=\$$ac_var
67657    case $ac_val in #(
67658    *${as_nl}*)
67659      case $ac_var in #(
67660      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67661$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67662      esac
67663      case $ac_var in #(
67664      _ | IFS | as_nl) ;; #(
67665      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67666      *) { eval $ac_var=; unset $ac_var;} ;;
67667      esac ;;
67668    esac
67669  done
67670
67671  (set) 2>&1 |
67672    case $as_nl`(ac_space=' '; set) 2>&1` in #(
67673    *${as_nl}ac_space=\ *)
67674      # `set' does not quote correctly, so add quotes: double-quote
67675      # substitution turns \\\\ into \\, and sed turns \\ into \.
67676      sed -n \
67677	"s/'/'\\\\''/g;
67678	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67679      ;; #(
67680    *)
67681      # `set' quotes correctly as required by POSIX, so do not add quotes.
67682      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67683      ;;
67684    esac |
67685    sort
67686) |
67687  sed '
67688     /^ac_cv_env_/b end
67689     t clear
67690     :clear
67691     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67692     t end
67693     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67694     :end' >>confcache
67695if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67696  if test -w "$cache_file"; then
67697    if test "x$cache_file" != "x/dev/null"; then
67698      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67699$as_echo "$as_me: updating cache $cache_file" >&6;}
67700      if test ! -f "$cache_file" || test -h "$cache_file"; then
67701	cat confcache >"$cache_file"
67702      else
67703        case $cache_file in #(
67704        */* | ?:*)
67705	  mv -f confcache "$cache_file"$$ &&
67706	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67707        *)
67708	  mv -f confcache "$cache_file" ;;
67709	esac
67710      fi
67711    fi
67712  else
67713    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67714$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67715  fi
67716fi
67717rm -f confcache
67718
67719test "x$prefix" = xNONE && prefix=$ac_default_prefix
67720# Let make expand exec_prefix.
67721test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67722
67723# Transform confdefs.h into DEFS.
67724# Protect against shell expansion while executing Makefile rules.
67725# Protect against Makefile macro expansion.
67726#
67727# If the first sed substitution is executed (which looks for macros that
67728# take arguments), then branch to the quote section.  Otherwise,
67729# look for a macro that doesn't take arguments.
67730ac_script='
67731:mline
67732/\\$/{
67733 N
67734 s,\\\n,,
67735 b mline
67736}
67737t clear
67738:clear
67739s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67740t quote
67741s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67742t quote
67743b any
67744:quote
67745s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67746s/\[/\\&/g
67747s/\]/\\&/g
67748s/\$/$$/g
67749H
67750:any
67751${
67752	g
67753	s/^\n//
67754	s/\n/ /g
67755	p
67756}
67757'
67758DEFS=`sed -n "$ac_script" confdefs.h`
67759
67760
67761ac_libobjs=
67762ac_ltlibobjs=
67763U=
67764for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67765  # 1. Remove the extension, and $U if already installed.
67766  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67767  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67768  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67769  #    will be set to the directory where LIBOBJS objects are built.
67770  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67771  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67772done
67773LIBOBJS=$ac_libobjs
67774
67775LTLIBOBJS=$ac_ltlibobjs
67776
67777
67778
67779: "${CONFIG_STATUS=./config.status}"
67780ac_write_fail=0
67781ac_clean_files_save=$ac_clean_files
67782ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67783{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67784$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67785as_write_fail=0
67786cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67787#! $SHELL
67788# Generated by $as_me.
67789# Run this file to recreate the current configuration.
67790# Compiler output produced by configure, useful for debugging
67791# configure, is in config.log if it exists.
67792
67793debug=false
67794ac_cs_recheck=false
67795ac_cs_silent=false
67796
67797SHELL=\${CONFIG_SHELL-$SHELL}
67798export SHELL
67799_ASEOF
67800cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67801## -------------------- ##
67802## M4sh Initialization. ##
67803## -------------------- ##
67804
67805# Be more Bourne compatible
67806DUALCASE=1; export DUALCASE # for MKS sh
67807if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67808  emulate sh
67809  NULLCMD=:
67810  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67811  # is contrary to our usage.  Disable this feature.
67812  alias -g '${1+"$@"}'='"$@"'
67813  setopt NO_GLOB_SUBST
67814else
67815  case `(set -o) 2>/dev/null` in #(
67816  *posix*) :
67817    set -o posix ;; #(
67818  *) :
67819     ;;
67820esac
67821fi
67822
67823
67824as_nl='
67825'
67826export as_nl
67827# Printing a long string crashes Solaris 7 /usr/bin/printf.
67828as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67829as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67830as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67831# Prefer a ksh shell builtin over an external printf program on Solaris,
67832# but without wasting forks for bash or zsh.
67833if test -z "$BASH_VERSION$ZSH_VERSION" \
67834    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67835  as_echo='print -r --'
67836  as_echo_n='print -rn --'
67837elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67838  as_echo='printf %s\n'
67839  as_echo_n='printf %s'
67840else
67841  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67842    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67843    as_echo_n='/usr/ucb/echo -n'
67844  else
67845    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67846    as_echo_n_body='eval
67847      arg=$1;
67848      case $arg in #(
67849      *"$as_nl"*)
67850	expr "X$arg" : "X\\(.*\\)$as_nl";
67851	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67852      esac;
67853      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67854    '
67855    export as_echo_n_body
67856    as_echo_n='sh -c $as_echo_n_body as_echo'
67857  fi
67858  export as_echo_body
67859  as_echo='sh -c $as_echo_body as_echo'
67860fi
67861
67862# The user is always right.
67863if test "${PATH_SEPARATOR+set}" != set; then
67864  PATH_SEPARATOR=:
67865  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67866    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67867      PATH_SEPARATOR=';'
67868  }
67869fi
67870
67871
67872# IFS
67873# We need space, tab and new line, in precisely that order.  Quoting is
67874# there to prevent editors from complaining about space-tab.
67875# (If _AS_PATH_WALK were called with IFS unset, it would disable word
67876# splitting by setting IFS to empty value.)
67877IFS=" ""	$as_nl"
67878
67879# Find who we are.  Look in the path if we contain no directory separator.
67880as_myself=
67881case $0 in #((
67882  *[\\/]* ) as_myself=$0 ;;
67883  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67884for as_dir in $PATH
67885do
67886  IFS=$as_save_IFS
67887  test -z "$as_dir" && as_dir=.
67888    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67889  done
67890IFS=$as_save_IFS
67891
67892     ;;
67893esac
67894# We did not find ourselves, most probably we were run as `sh COMMAND'
67895# in which case we are not to be found in the path.
67896if test "x$as_myself" = x; then
67897  as_myself=$0
67898fi
67899if test ! -f "$as_myself"; then
67900  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67901  exit 1
67902fi
67903
67904# Unset variables that we do not need and which cause bugs (e.g. in
67905# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67906# suppresses any "Segmentation fault" message there.  '((' could
67907# trigger a bug in pdksh 5.2.14.
67908for as_var in BASH_ENV ENV MAIL MAILPATH
67909do eval test x\${$as_var+set} = xset \
67910  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
67911done
67912PS1='$ '
67913PS2='> '
67914PS4='+ '
67915
67916# NLS nuisances.
67917LC_ALL=C
67918export LC_ALL
67919LANGUAGE=C
67920export LANGUAGE
67921
67922# CDPATH.
67923(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
67924
67925
67926# as_fn_error STATUS ERROR [LINENO LOG_FD]
67927# ----------------------------------------
67928# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
67929# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
67930# script with STATUS, using 1 if that was 0.
67931as_fn_error ()
67932{
67933  as_status=$1; test $as_status -eq 0 && as_status=1
67934  if test "$4"; then
67935    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
67936    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
67937  fi
67938  $as_echo "$as_me: error: $2" >&2
67939  as_fn_exit $as_status
67940} # as_fn_error
67941
67942
67943# as_fn_set_status STATUS
67944# -----------------------
67945# Set $? to STATUS, without forking.
67946as_fn_set_status ()
67947{
67948  return $1
67949} # as_fn_set_status
67950
67951# as_fn_exit STATUS
67952# -----------------
67953# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
67954as_fn_exit ()
67955{
67956  set +e
67957  as_fn_set_status $1
67958  exit $1
67959} # as_fn_exit
67960
67961# as_fn_unset VAR
67962# ---------------
67963# Portably unset VAR.
67964as_fn_unset ()
67965{
67966  { eval $1=; unset $1;}
67967}
67968as_unset=as_fn_unset
67969# as_fn_append VAR VALUE
67970# ----------------------
67971# Append the text in VALUE to the end of the definition contained in VAR. Take
67972# advantage of any shell optimizations that allow amortized linear growth over
67973# repeated appends, instead of the typical quadratic growth present in naive
67974# implementations.
67975if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
67976  eval 'as_fn_append ()
67977  {
67978    eval $1+=\$2
67979  }'
67980else
67981  as_fn_append ()
67982  {
67983    eval $1=\$$1\$2
67984  }
67985fi # as_fn_append
67986
67987# as_fn_arith ARG...
67988# ------------------
67989# Perform arithmetic evaluation on the ARGs, and store the result in the
67990# global $as_val. Take advantage of shells that can avoid forks. The arguments
67991# must be portable across $(()) and expr.
67992if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
67993  eval 'as_fn_arith ()
67994  {
67995    as_val=$(( $* ))
67996  }'
67997else
67998  as_fn_arith ()
67999  {
68000    as_val=`expr "$@" || test $? -eq 1`
68001  }
68002fi # as_fn_arith
68003
68004
68005if expr a : '\(a\)' >/dev/null 2>&1 &&
68006   test "X`expr 00001 : '.*\(...\)'`" = X001; then
68007  as_expr=expr
68008else
68009  as_expr=false
68010fi
68011
68012if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
68013  as_basename=basename
68014else
68015  as_basename=false
68016fi
68017
68018if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
68019  as_dirname=dirname
68020else
68021  as_dirname=false
68022fi
68023
68024as_me=`$as_basename -- "$0" ||
68025$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68026	 X"$0" : 'X\(//\)$' \| \
68027	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
68028$as_echo X/"$0" |
68029    sed '/^.*\/\([^/][^/]*\)\/*$/{
68030	    s//\1/
68031	    q
68032	  }
68033	  /^X\/\(\/\/\)$/{
68034	    s//\1/
68035	    q
68036	  }
68037	  /^X\/\(\/\).*/{
68038	    s//\1/
68039	    q
68040	  }
68041	  s/.*/./; q'`
68042
68043# Avoid depending upon Character Ranges.
68044as_cr_letters='abcdefghijklmnopqrstuvwxyz'
68045as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
68046as_cr_Letters=$as_cr_letters$as_cr_LETTERS
68047as_cr_digits='0123456789'
68048as_cr_alnum=$as_cr_Letters$as_cr_digits
68049
68050ECHO_C= ECHO_N= ECHO_T=
68051case `echo -n x` in #(((((
68052-n*)
68053  case `echo 'xy\c'` in
68054  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
68055  xy)  ECHO_C='\c';;
68056  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
68057       ECHO_T='	';;
68058  esac;;
68059*)
68060  ECHO_N='-n';;
68061esac
68062
68063rm -f conf$$ conf$$.exe conf$$.file
68064if test -d conf$$.dir; then
68065  rm -f conf$$.dir/conf$$.file
68066else
68067  rm -f conf$$.dir
68068  mkdir conf$$.dir 2>/dev/null
68069fi
68070if (echo >conf$$.file) 2>/dev/null; then
68071  if ln -s conf$$.file conf$$ 2>/dev/null; then
68072    as_ln_s='ln -s'
68073    # ... but there are two gotchas:
68074    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
68075    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
68076    # In both cases, we have to default to `cp -pR'.
68077    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
68078      as_ln_s='cp -pR'
68079  elif ln conf$$.file conf$$ 2>/dev/null; then
68080    as_ln_s=ln
68081  else
68082    as_ln_s='cp -pR'
68083  fi
68084else
68085  as_ln_s='cp -pR'
68086fi
68087rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
68088rmdir conf$$.dir 2>/dev/null
68089
68090
68091# as_fn_mkdir_p
68092# -------------
68093# Create "$as_dir" as a directory, including parents if necessary.
68094as_fn_mkdir_p ()
68095{
68096
68097  case $as_dir in #(
68098  -*) as_dir=./$as_dir;;
68099  esac
68100  test -d "$as_dir" || eval $as_mkdir_p || {
68101    as_dirs=
68102    while :; do
68103      case $as_dir in #(
68104      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
68105      *) as_qdir=$as_dir;;
68106      esac
68107      as_dirs="'$as_qdir' $as_dirs"
68108      as_dir=`$as_dirname -- "$as_dir" ||
68109$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68110	 X"$as_dir" : 'X\(//\)[^/]' \| \
68111	 X"$as_dir" : 'X\(//\)$' \| \
68112	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
68113$as_echo X"$as_dir" |
68114    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68115	    s//\1/
68116	    q
68117	  }
68118	  /^X\(\/\/\)[^/].*/{
68119	    s//\1/
68120	    q
68121	  }
68122	  /^X\(\/\/\)$/{
68123	    s//\1/
68124	    q
68125	  }
68126	  /^X\(\/\).*/{
68127	    s//\1/
68128	    q
68129	  }
68130	  s/.*/./; q'`
68131      test -d "$as_dir" && break
68132    done
68133    test -z "$as_dirs" || eval "mkdir $as_dirs"
68134  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
68135
68136
68137} # as_fn_mkdir_p
68138if mkdir -p . 2>/dev/null; then
68139  as_mkdir_p='mkdir -p "$as_dir"'
68140else
68141  test -d ./-p && rmdir ./-p
68142  as_mkdir_p=false
68143fi
68144
68145
68146# as_fn_executable_p FILE
68147# -----------------------
68148# Test if FILE is an executable regular file.
68149as_fn_executable_p ()
68150{
68151  test -f "$1" && test -x "$1"
68152} # as_fn_executable_p
68153as_test_x='test -x'
68154as_executable_p=as_fn_executable_p
68155
68156# Sed expression to map a string onto a valid CPP name.
68157as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
68158
68159# Sed expression to map a string onto a valid variable name.
68160as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
68161
68162
68163exec 6>&1
68164## ----------------------------------- ##
68165## Main body of $CONFIG_STATUS script. ##
68166## ----------------------------------- ##
68167_ASEOF
68168test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
68169
68170cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68171# Save the log message, to keep $0 and so on meaningful, and to
68172# report actual input values of CONFIG_FILES etc. instead of their
68173# values after options handling.
68174ac_log="
68175This file was extended by OpenJDK $as_me jdk9, which was
68176generated by GNU Autoconf 2.69.  Invocation command line was
68177
68178  CONFIG_FILES    = $CONFIG_FILES
68179  CONFIG_HEADERS  = $CONFIG_HEADERS
68180  CONFIG_LINKS    = $CONFIG_LINKS
68181  CONFIG_COMMANDS = $CONFIG_COMMANDS
68182  $ $0 $@
68183
68184on `(hostname || uname -n) 2>/dev/null | sed 1q`
68185"
68186
68187_ACEOF
68188
68189case $ac_config_files in *"
68190"*) set x $ac_config_files; shift; ac_config_files=$*;;
68191esac
68192
68193
68194
68195cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68196# Files that config.status was made for.
68197config_files="$ac_config_files"
68198
68199_ACEOF
68200
68201cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68202ac_cs_usage="\
68203\`$as_me' instantiates files and other configuration actions
68204from templates according to the current configuration.  Unless the files
68205and actions are specified as TAGs, all are instantiated by default.
68206
68207Usage: $0 [OPTION]... [TAG]...
68208
68209  -h, --help       print this help, then exit
68210  -V, --version    print version number and configuration settings, then exit
68211      --config     print configuration, then exit
68212  -q, --quiet, --silent
68213                   do not print progress messages
68214  -d, --debug      don't remove temporary files
68215      --recheck    update $as_me by reconfiguring in the same conditions
68216      --file=FILE[:TEMPLATE]
68217                   instantiate the configuration file FILE
68218
68219Configuration files:
68220$config_files
68221
68222Report bugs to <build-dev@openjdk.java.net>.
68223OpenJDK home page: <http://openjdk.java.net>."
68224
68225_ACEOF
68226cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68227ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
68228ac_cs_version="\\
68229OpenJDK config.status jdk9
68230configured by $0, generated by GNU Autoconf 2.69,
68231  with options \\"\$ac_cs_config\\"
68232
68233Copyright (C) 2012 Free Software Foundation, Inc.
68234This config.status script is free software; the Free Software Foundation
68235gives unlimited permission to copy, distribute and modify it."
68236
68237ac_pwd='$ac_pwd'
68238srcdir='$srcdir'
68239AWK='$AWK'
68240test -n "\$AWK" || AWK=awk
68241_ACEOF
68242
68243cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68244# The default lists apply if the user does not specify any file.
68245ac_need_defaults=:
68246while test $# != 0
68247do
68248  case $1 in
68249  --*=?*)
68250    ac_option=`expr "X$1" : 'X\([^=]*\)='`
68251    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
68252    ac_shift=:
68253    ;;
68254  --*=)
68255    ac_option=`expr "X$1" : 'X\([^=]*\)='`
68256    ac_optarg=
68257    ac_shift=:
68258    ;;
68259  *)
68260    ac_option=$1
68261    ac_optarg=$2
68262    ac_shift=shift
68263    ;;
68264  esac
68265
68266  case $ac_option in
68267  # Handling of the options.
68268  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
68269    ac_cs_recheck=: ;;
68270  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
68271    $as_echo "$ac_cs_version"; exit ;;
68272  --config | --confi | --conf | --con | --co | --c )
68273    $as_echo "$ac_cs_config"; exit ;;
68274  --debug | --debu | --deb | --de | --d | -d )
68275    debug=: ;;
68276  --file | --fil | --fi | --f )
68277    $ac_shift
68278    case $ac_optarg in
68279    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
68280    '') as_fn_error $? "missing file argument" ;;
68281    esac
68282    as_fn_append CONFIG_FILES " '$ac_optarg'"
68283    ac_need_defaults=false;;
68284  --he | --h |  --help | --hel | -h )
68285    $as_echo "$ac_cs_usage"; exit ;;
68286  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
68287  | -silent | --silent | --silen | --sile | --sil | --si | --s)
68288    ac_cs_silent=: ;;
68289
68290  # This is an error.
68291  -*) as_fn_error $? "unrecognized option: \`$1'
68292Try \`$0 --help' for more information." ;;
68293
68294  *) as_fn_append ac_config_targets " $1"
68295     ac_need_defaults=false ;;
68296
68297  esac
68298  shift
68299done
68300
68301ac_configure_extra_args=
68302
68303if $ac_cs_silent; then
68304  exec 6>/dev/null
68305  ac_configure_extra_args="$ac_configure_extra_args --silent"
68306fi
68307
68308_ACEOF
68309cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68310if \$ac_cs_recheck; then
68311  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
68312  shift
68313  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
68314  CONFIG_SHELL='$SHELL'
68315  export CONFIG_SHELL
68316  exec "\$@"
68317fi
68318
68319_ACEOF
68320cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68321exec 5>>config.log
68322{
68323  echo
68324  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
68325## Running $as_me. ##
68326_ASBOX
68327  $as_echo "$ac_log"
68328} >&5
68329
68330_ACEOF
68331cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68332_ACEOF
68333
68334cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68335
68336# Handling of arguments.
68337for ac_config_target in $ac_config_targets
68338do
68339  case $ac_config_target in
68340    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
68341    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
68342    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
68343    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
68344    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
68345
68346  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
68347  esac
68348done
68349
68350
68351# If the user did not use the arguments to specify the items to instantiate,
68352# then the envvar interface is used.  Set only those that are not.
68353# We use the long form for the default assignment because of an extremely
68354# bizarre bug on SunOS 4.1.3.
68355if $ac_need_defaults; then
68356  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
68357fi
68358
68359# Have a temporary directory for convenience.  Make it in the build tree
68360# simply because there is no reason against having it here, and in addition,
68361# creating and moving files from /tmp can sometimes cause problems.
68362# Hook for its removal unless debugging.
68363# Note that there is a small window in which the directory will not be cleaned:
68364# after its creation but before its name has been assigned to `$tmp'.
68365$debug ||
68366{
68367  tmp= ac_tmp=
68368  trap 'exit_status=$?
68369  : "${ac_tmp:=$tmp}"
68370  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
68371' 0
68372  trap 'as_fn_exit 1' 1 2 13 15
68373}
68374# Create a (secure) tmp directory for tmp files.
68375
68376{
68377  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
68378  test -d "$tmp"
68379}  ||
68380{
68381  tmp=./conf$$-$RANDOM
68382  (umask 077 && mkdir "$tmp")
68383} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
68384ac_tmp=$tmp
68385
68386# Set up the scripts for CONFIG_FILES section.
68387# No need to generate them if there are no CONFIG_FILES.
68388# This happens for instance with `./config.status config.h'.
68389if test -n "$CONFIG_FILES"; then
68390
68391
68392ac_cr=`echo X | tr X '\015'`
68393# On cygwin, bash can eat \r inside `` if the user requested igncr.
68394# But we know of no other shell where ac_cr would be empty at this
68395# point, so we can use a bashism as a fallback.
68396if test "x$ac_cr" = x; then
68397  eval ac_cr=\$\'\\r\'
68398fi
68399ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
68400if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
68401  ac_cs_awk_cr='\\r'
68402else
68403  ac_cs_awk_cr=$ac_cr
68404fi
68405
68406echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
68407_ACEOF
68408
68409
68410{
68411  echo "cat >conf$$subs.awk <<_ACEOF" &&
68412  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
68413  echo "_ACEOF"
68414} >conf$$subs.sh ||
68415  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68416ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
68417ac_delim='%!_!# '
68418for ac_last_try in false false false false false :; do
68419  . ./conf$$subs.sh ||
68420    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68421
68422  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
68423  if test $ac_delim_n = $ac_delim_num; then
68424    break
68425  elif $ac_last_try; then
68426    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68427  else
68428    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
68429  fi
68430done
68431rm -f conf$$subs.sh
68432
68433cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68434cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
68435_ACEOF
68436sed -n '
68437h
68438s/^/S["/; s/!.*/"]=/
68439p
68440g
68441s/^[^!]*!//
68442:repl
68443t repl
68444s/'"$ac_delim"'$//
68445t delim
68446:nl
68447h
68448s/\(.\{148\}\)..*/\1/
68449t more1
68450s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
68451p
68452n
68453b repl
68454:more1
68455s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68456p
68457g
68458s/.\{148\}//
68459t nl
68460:delim
68461h
68462s/\(.\{148\}\)..*/\1/
68463t more2
68464s/["\\]/\\&/g; s/^/"/; s/$/"/
68465p
68466b
68467:more2
68468s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68469p
68470g
68471s/.\{148\}//
68472t delim
68473' <conf$$subs.awk | sed '
68474/^[^""]/{
68475  N
68476  s/\n//
68477}
68478' >>$CONFIG_STATUS || ac_write_fail=1
68479rm -f conf$$subs.awk
68480cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68481_ACAWK
68482cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
68483  for (key in S) S_is_set[key] = 1
68484  FS = ""
68485
68486}
68487{
68488  line = $ 0
68489  nfields = split(line, field, "@")
68490  substed = 0
68491  len = length(field[1])
68492  for (i = 2; i < nfields; i++) {
68493    key = field[i]
68494    keylen = length(key)
68495    if (S_is_set[key]) {
68496      value = S[key]
68497      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
68498      len += length(value) + length(field[++i])
68499      substed = 1
68500    } else
68501      len += 1 + keylen
68502  }
68503
68504  print line
68505}
68506
68507_ACAWK
68508_ACEOF
68509cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68510if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
68511  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
68512else
68513  cat
68514fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
68515  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
68516_ACEOF
68517
68518# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
68519# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
68520# trailing colons and then remove the whole line if VPATH becomes empty
68521# (actually we leave an empty line to preserve line numbers).
68522if test "x$srcdir" = x.; then
68523  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
68524h
68525s///
68526s/^/:/
68527s/[	 ]*$/:/
68528s/:\$(srcdir):/:/g
68529s/:\${srcdir}:/:/g
68530s/:@srcdir@:/:/g
68531s/^:*//
68532s/:*$//
68533x
68534s/\(=[	 ]*\).*/\1/
68535G
68536s/\n//
68537s/^[^=]*=[	 ]*$//
68538}'
68539fi
68540
68541cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68542fi # test -n "$CONFIG_FILES"
68543
68544
68545eval set X "  :F $CONFIG_FILES      "
68546shift
68547for ac_tag
68548do
68549  case $ac_tag in
68550  :[FHLC]) ac_mode=$ac_tag; continue;;
68551  esac
68552  case $ac_mode$ac_tag in
68553  :[FHL]*:*);;
68554  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
68555  :[FH]-) ac_tag=-:-;;
68556  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
68557  esac
68558  ac_save_IFS=$IFS
68559  IFS=:
68560  set x $ac_tag
68561  IFS=$ac_save_IFS
68562  shift
68563  ac_file=$1
68564  shift
68565
68566  case $ac_mode in
68567  :L) ac_source=$1;;
68568  :[FH])
68569    ac_file_inputs=
68570    for ac_f
68571    do
68572      case $ac_f in
68573      -) ac_f="$ac_tmp/stdin";;
68574      *) # Look for the file first in the build tree, then in the source tree
68575	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
68576	 # because $ac_f cannot contain `:'.
68577	 test -f "$ac_f" ||
68578	   case $ac_f in
68579	   [\\/$]*) false;;
68580	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
68581	   esac ||
68582	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
68583      esac
68584      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
68585      as_fn_append ac_file_inputs " '$ac_f'"
68586    done
68587
68588    # Let's still pretend it is `configure' which instantiates (i.e., don't
68589    # use $as_me), people would be surprised to read:
68590    #    /* config.h.  Generated by config.status.  */
68591    configure_input='Generated from '`
68592	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
68593	`' by configure.'
68594    if test x"$ac_file" != x-; then
68595      configure_input="$ac_file.  $configure_input"
68596      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
68597$as_echo "$as_me: creating $ac_file" >&6;}
68598    fi
68599    # Neutralize special characters interpreted by sed in replacement strings.
68600    case $configure_input in #(
68601    *\&* | *\|* | *\\* )
68602       ac_sed_conf_input=`$as_echo "$configure_input" |
68603       sed 's/[\\\\&|]/\\\\&/g'`;; #(
68604    *) ac_sed_conf_input=$configure_input;;
68605    esac
68606
68607    case $ac_tag in
68608    *:-:* | *:-) cat >"$ac_tmp/stdin" \
68609      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68610    esac
68611    ;;
68612  esac
68613
68614  ac_dir=`$as_dirname -- "$ac_file" ||
68615$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68616	 X"$ac_file" : 'X\(//\)[^/]' \| \
68617	 X"$ac_file" : 'X\(//\)$' \| \
68618	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68619$as_echo X"$ac_file" |
68620    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68621	    s//\1/
68622	    q
68623	  }
68624	  /^X\(\/\/\)[^/].*/{
68625	    s//\1/
68626	    q
68627	  }
68628	  /^X\(\/\/\)$/{
68629	    s//\1/
68630	    q
68631	  }
68632	  /^X\(\/\).*/{
68633	    s//\1/
68634	    q
68635	  }
68636	  s/.*/./; q'`
68637  as_dir="$ac_dir"; as_fn_mkdir_p
68638  ac_builddir=.
68639
68640case "$ac_dir" in
68641.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68642*)
68643  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68644  # A ".." for each directory in $ac_dir_suffix.
68645  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68646  case $ac_top_builddir_sub in
68647  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68648  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68649  esac ;;
68650esac
68651ac_abs_top_builddir=$ac_pwd
68652ac_abs_builddir=$ac_pwd$ac_dir_suffix
68653# for backward compatibility:
68654ac_top_builddir=$ac_top_build_prefix
68655
68656case $srcdir in
68657  .)  # We are building in place.
68658    ac_srcdir=.
68659    ac_top_srcdir=$ac_top_builddir_sub
68660    ac_abs_top_srcdir=$ac_pwd ;;
68661  [\\/]* | ?:[\\/]* )  # Absolute name.
68662    ac_srcdir=$srcdir$ac_dir_suffix;
68663    ac_top_srcdir=$srcdir
68664    ac_abs_top_srcdir=$srcdir ;;
68665  *) # Relative name.
68666    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68667    ac_top_srcdir=$ac_top_build_prefix$srcdir
68668    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68669esac
68670ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68671
68672
68673  case $ac_mode in
68674  :F)
68675  #
68676  # CONFIG_FILE
68677  #
68678
68679_ACEOF
68680
68681cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68682# If the template does not know about datarootdir, expand it.
68683# FIXME: This hack should be removed a few years after 2.60.
68684ac_datarootdir_hack=; ac_datarootdir_seen=
68685ac_sed_dataroot='
68686/datarootdir/ {
68687  p
68688  q
68689}
68690/@datadir@/p
68691/@docdir@/p
68692/@infodir@/p
68693/@localedir@/p
68694/@mandir@/p'
68695case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68696*datarootdir*) ac_datarootdir_seen=yes;;
68697*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68698  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68699$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68700_ACEOF
68701cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68702  ac_datarootdir_hack='
68703  s&@datadir@&$datadir&g
68704  s&@docdir@&$docdir&g
68705  s&@infodir@&$infodir&g
68706  s&@localedir@&$localedir&g
68707  s&@mandir@&$mandir&g
68708  s&\\\${datarootdir}&$datarootdir&g' ;;
68709esac
68710_ACEOF
68711
68712# Neutralize VPATH when `$srcdir' = `.'.
68713# Shell code in configure.ac might set extrasub.
68714# FIXME: do we really want to maintain this feature?
68715cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68716ac_sed_extra="$ac_vpsub
68717$extrasub
68718_ACEOF
68719cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68720:t
68721/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68722s|@configure_input@|$ac_sed_conf_input|;t t
68723s&@top_builddir@&$ac_top_builddir_sub&;t t
68724s&@top_build_prefix@&$ac_top_build_prefix&;t t
68725s&@srcdir@&$ac_srcdir&;t t
68726s&@abs_srcdir@&$ac_abs_srcdir&;t t
68727s&@top_srcdir@&$ac_top_srcdir&;t t
68728s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68729s&@builddir@&$ac_builddir&;t t
68730s&@abs_builddir@&$ac_abs_builddir&;t t
68731s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68732$ac_datarootdir_hack
68733"
68734eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68735  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68736
68737test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68738  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68739  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68740      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68741  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68742which seems to be undefined.  Please make sure it is defined" >&5
68743$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68744which seems to be undefined.  Please make sure it is defined" >&2;}
68745
68746  rm -f "$ac_tmp/stdin"
68747  case $ac_file in
68748  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68749  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68750  esac \
68751  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68752 ;;
68753
68754
68755
68756  esac
68757
68758done # for ac_tag
68759
68760
68761as_fn_exit 0
68762_ACEOF
68763ac_clean_files=$ac_clean_files_save
68764
68765test $ac_write_fail = 0 ||
68766  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68767
68768
68769# configure is writing to config.log, and then calls config.status.
68770# config.status does its own redirection, appending to config.log.
68771# Unfortunately, on DOS this fails, as config.log is still kept open
68772# by configure, so config.status won't be able to write to it; its
68773# output is simply discarded.  So we exec the FD to /dev/null,
68774# effectively closing config.log, so it can be properly (re)opened and
68775# appended to by config.status.  When coming back to configure, we
68776# need to make the FD available again.
68777if test "$no_create" != yes; then
68778  ac_cs_success=:
68779  ac_config_status_args=
68780  test "$silent" = yes &&
68781    ac_config_status_args="$ac_config_status_args --quiet"
68782  exec 5>/dev/null
68783  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68784  exec 5>>config.log
68785  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68786  # would make configure fail if this is the last instruction.
68787  $ac_cs_success || as_fn_exit 1
68788fi
68789if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68790  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68791$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68792fi
68793
68794
68795# After AC_OUTPUT, we need to do final work
68796
68797
68798  # Try to move config.log (generated by autoconf) to the configure-support directory.
68799  if test -e ./config.log; then
68800    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68801  fi
68802
68803  # Rotate our log file (configure.log)
68804  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68805    $RM -f "$OUTPUT_ROOT/configure.log.old"
68806  fi
68807  if test -e "$OUTPUT_ROOT/configure.log"; then
68808    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68809  fi
68810
68811  # Move configure.log from current directory to the build output root
68812  if test -e ./configure.log; then
68813    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68814  fi
68815
68816  # Make the compare script executable
68817  $CHMOD +x $OUTPUT_ROOT/compare.sh
68818
68819
68820# Finally output some useful information to the user
68821
68822  # Finally output some useful information to the user
68823
68824  printf "\n"
68825  printf "====================================================\n"
68826  if test "x$no_create" != "xyes"; then
68827    if test "x$IS_RECONFIGURE" != "xyes"; then
68828      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68829    else
68830      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68831    fi
68832  else
68833    if test "x$IS_RECONFIGURE" != "xyes"; then
68834      printf "A configuration has been successfully checked but not created\n"
68835    else
68836      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68837    fi
68838  fi
68839  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68840    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68841  else
68842    printf "using default settings.\n"
68843  fi
68844
68845  printf "\n"
68846  printf "Configuration summary:\n"
68847  printf "* Debug level:    $DEBUG_LEVEL\n"
68848  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68849  printf "* JDK variant:    $JDK_VARIANT\n"
68850  printf "* JVM variants:   $JVM_VARIANTS\n"
68851  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68852  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68853
68854  printf "\n"
68855  printf "Tools summary:\n"
68856  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68857    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68858  fi
68859  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68860  if test "x$TOOLCHAIN_VERSION" != "x"; then
68861    print_version=" $TOOLCHAIN_VERSION"
68862  fi
68863  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68864  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68865  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68866
68867  printf "\n"
68868  printf "Build performance summary:\n"
68869  printf "* Cores to use:   $JOBS\n"
68870  printf "* Memory limit:   $MEMORY_SIZE MB\n"
68871  if test "x$CCACHE_STATUS" != "x"; then
68872    printf "* ccache status:  $CCACHE_STATUS\n"
68873  fi
68874  printf "\n"
68875
68876  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68877    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68878    printf "will result in longer build times.\n"
68879    printf "\n"
68880  fi
68881
68882  if test "x$FOUND_ALT_VARIABLES" != "x"; then
68883    printf "WARNING: You have old-style ALT_ environment variables set.\n"
68884    printf "These are not respected, and will be ignored. It is recommended\n"
68885    printf "that you clean your environment. The following variables are set:\n"
68886    printf "$FOUND_ALT_VARIABLES\n"
68887    printf "\n"
68888  fi
68889
68890  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68891    printf "WARNING: Your build output directory is not on a local disk.\n"
68892    printf "This will severely degrade build performance!\n"
68893    printf "It is recommended that you create an output directory on a local disk,\n"
68894    printf "and run the configure script again from that directory.\n"
68895    printf "\n"
68896  fi
68897
68898  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68899    printf "WARNING: The result of this configuration has overridden an older\n"
68900    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68901    printf "proper build. Failure to do so might result in strange build problems.\n"
68902    printf "\n"
68903  fi
68904
68905  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68906    printf "WARNING: The result of this configuration was not saved.\n"
68907    printf "You should run without '--no-create | -n' to create the configuration.\n"
68908    printf "\n"
68909  fi
68910
68911
68912
68913  # Locate config.log.
68914  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
68915    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
68916  elif test -e "./config.log"; then
68917    CONFIG_LOG_PATH="."
68918  fi
68919
68920  if test -e "$CONFIG_LOG_PATH/config.log"; then
68921    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
68922    if test $? -eq 0; then
68923      printf "The following warnings were produced. Repeated here for convenience:\n"
68924      # We must quote sed expression (using []) to stop m4 from eating the [].
68925      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
68926      printf "\n"
68927    fi
68928  fi
68929
68930